BREAKING A CAKE WITH WRITING ON IT [Shabbos: Mochek]
Gemara
(Beraisa): One is Yotzei with Matzah that has designs, even though one may not bake Matzah with designs on Pesach.
Shabbos 104b (R. Ami): If one wrote one letter in Tiverya and one letter in Tzipori, he is liable. It is writing, just the letters must be brought together.
Question (Mishnah): If he wrote on two columns of a tablet that cannot be read together, he is exempt.
Answer: There, an action must be done to bring the letters together. (He must cut the tablet in between). Here, he need only bring them together.
Rishonim
Mordechai (Shabbos 369): Letters and words are written on children's cakes. May one eat them on Yom Tov? Maharam answered that the Torah forbids erasing only in order to write. However, there is an Isur mid'Rabanan. If a minor does an Isur by himself, Beis Din need not stop him, if people did not overtly give the Isur to him.
Poskim
Rema (OC 340:3): One may not break a cake on which are written forms like letters, even though he intends only for eating, for this is Mochek.
Taz (2): I do not understand the Mordechai. Even an Av Melachah such as Borer or grinding does not apply to eating, since he does so for the sake of eating. All the more so here is permitted, for he is Mekalkel, since he does not erase in order to write. Every Mekalkel is exempt. Why should we forbid Derech Achilah?! If it is because he initially makes the letters and knows that they will be broken at the time of eating, we should forbid even minors to do so, for this is like overtly giving Isur to them! This requires investigation.
Magen Avraham (5): The Agudah says 'I write in honey mixed with a little water, which is fruit juice, so this is not erasing.' This requires investigation, for in any case the impression is noticeable.
Magen Avraham (6): If letters are forbidden, even pictures should be forbidden, for one who draws a picture is liable. If so, also one who erases it is liable! This requires investigation. Rash ha'Levi forbids breaking a cake only when the writing is not from the cake itself. If the writing is from the cake itself, it is permitted. Therefore, one may eat cake with designs. This requires investigation.
Dagul me'Revavah: The Magen Avraham is correct. Pesachim 37a proves that it is permitted. One is Yotzei with Matzah with designs on it! We must distinguish like Rash ha'Levi. The Terumas ha'Deshen (64) permits a Pesik Reishei for mid'Rabanan laws. The Magen Avraham forbids, but here he would permit [breaking], for he does not intend, he is Mekalkel, and it is k'Le'acher Yad (unskillfully). All the more so one may eat it, for this is Derech Achilah. Surely an Isur mid'Rabanan of erasing without intent to write, if he does not intend, is permitted even if it is a Pesik Reishei. All the Acharonim were astounded at the Isur, just they hesitated to be lenient against Maharam. I say that he discussed cakes with words that minors eat with intent for a Segulah to attain Chachmah. This is intent, and not Mekalkel. Therefore, he permitted only for minors. In other cases even adults are permitted. One may be stringent for himself, but not for others.
Mishnah Berurah (14): One may give it to a minor.
Mishnah Berurah (15): One should not be stringent if the writing is from the cake itself, or if the writing was from honey with water, or other fruit juice.
Mishnah Berurah (16): Some are stringent even for designs.
Mishnah Berurah (17): One may rely on Dagul me'Revavah if he does not cut with his hand where the letters are, rather, with his mouth Derech Achilah.
Rema (Teshuvah 119): If something is written on the edges of the pages of a Sefer, and one can read it only when the Sefer is closed, may one open the Sefer? One who writes with anything that does not last is exempt, but it is forbidden. Here, even though the writing does not last, opening and closing the Sefer erases and writes. Do not say that one may open it because he will close it again and thereby write it again. This is worse, for he does two Isurim! One who erases and writes is liable! Do not permit because he is Misasek (engaged in) his learning, and it is Davar she'Eino Miskaven. R. Shimon agrees that a Pesik Reishei is forbidden! (Hagahah - Melachah she'Einah Tzerichah l'Gufah exempts, but it does not permit l'Chatchilah. Here it is Tzerichah l'Gufah, for he must erase and write in order to open and close the Sefer. Since this is the way to erase and write, we can say that it is forbidden, just like Maharam forbids on Yom Tov breaking cakes with letters on them. The Acharonim connote like this. They forbid writing on the Matzos (for the Seder) Aleph Beis and Gimel to know which is which, for breaking the Matzah erases on Yom Tov. This shows that this is the way of writing and erasing. Therefore it is forbidden even without intent. Perhaps here is worse. There, he is Mekalkel. He does not erase in order to write again [on the Matzah]. Even so, we forbid. All the more so here it is forbidden.
Rema: However, we can say that since it is arranged to open and close, this is not Derech Mechikah. If one writes on two tablets, he is liable only if they can be read together. Why didn't we learn a bigger Chidush, that even if the letters were already written, one is liable for opening and closing the tablet, for this is like writing and erasing?
Suggestion: It did not teach opening and closing, for one is exempt for them, but indeed it is forbidden.
Rejection (Rema): If so, we should have taught this distinction in the Seifa, rather than writing on two tablets that cannot be read together, which can be inferred from the Reisha. One is liable for writing two letters in different places if they could be brought together. Bringing them together is not called an action. Likewise, separating adjacent letters is not erasing.
Rema: Do not say that here is different, for opening [and closing] the book in the middle of a letter [erases and] writes the letter. If there were a distinction between bringing close different letters or halves of a letters, there was no question against R. Avahu (our text - R. Ami). This is unlike a cake with writing. There, eating it is an act that cannot be reversed. Another proof is from Rashi (73a DH Kosev), who explains that in the Mishkan they wrote letters on Kerashim to know which go next to each other, and sometimes they erred and needed to erase. He did not say that they wrote half a letter on each board, and bringing the boards together and distancing them is writing and erasing! Even though this is only one letter, we learn the Melachos from the Mishkan, but not the Shi'ur. Tana'im argue about whether one is liable for letters that do not form a word. We did not learn from the Mishkan that one is liable for any two letters! Also, our Sugya compares writing to building, and on 47a we permit to assemble and dissemble a bed or Menorah of parts.
Levush (4): I say that if something is written on the edges of the pages of a Sefer, one may not open or close the Sefer, for this erases and writes. This is unlike breaking a cake, which is erasing without intent to write. This is unlike the Av Melachah. It seems that one is Chayav Chatas for opening the Sefer.
Rebuttal (Taz 2): He is not liable. He intends only to close the Sefer, but not to arrange the letters. Shabbos 104b says that bringing letters close is not an action. This is not only to be stringent [to obligate a Korban, even though one must bring them close]. If one is exempt, the Korban is Chulin b'Azarah! It is permitted even mid'Rabanan, unlike the cake. There, he is Mekalkel. One cannot join the letters again. Here, there is no Kilkul. Also, he does not intend for erasing. Also, we obligate one who wrote a letter and completed a Sefer (104b). We do not teach liability for bringing a letter close and completing it! If this were liable, also bringing half a letter close would be liable.
Magen Avraham (6): One should be stringent about Seforim like the Levush. The Rema's proof is not solid. Keneses ha'Gedolah and Rash ha'Levi say that the custom is to permit.
Kaf ha'Chayim (44, citing Eliyahu Rabah): The Rambam (11:14) exempts one who wrote with his left hand. It seems that the same applies to erasing. Therefore, it is good to use the left hand to break the cake or open the Sefer.
Rebuttal (Avnei Nezer OC 209:19): One is liable for erasing with the left hand, just like for Hotza'ah, or for writing according to R. Yosi, who obligates for Roshem with the left hand. We exempt only for writing, for one cannot write well with the left hand.
Yabi'a Omer (4 OC 38:10): [The Chidushim initially attributed to] the Ran (Shabbos 103a) says so.
Mishnah Berurah (17): Many Acharonim are lenient about opening and closing the Sefer. It is like a door that one always opens and closes. This is the custom. In any case it is proper to be stringent if he has another Sefer.