According to Halacha, when a Sofer writes the Shem in Torah, he must do so with the proper Kavanah, that is, he must recite a verbal santification before the writing of each and every Shem in the Torah. If the sofer fails do so, the Shem has no holiness and the Sefer Torah, Tefillin or Mezuzah is Pasul. That’s why there’s the minhag of going to the Mikve before writing the Shem – it’s part of this santification process.
Additionally, there’s a special kabbalistic way of writing the Shem, as thaught by the Arizal and thus not only the preparation to write the Shem is difficult, but also the actual writing itself.
According to Halacha once the Shem is written it can’t be erased, a prohibition derived from the Pasuk in Devarim Deut. 12-03:04, which states "ואבדתם את שמם מן המקום ההוא לא תעשון כן ליהוה אלהיכם (and you shall destroy the names of pagan gods from their places. You shall not do similarly to G-d your Lord)." Any paper containing the Shem cannot be thrown in garbage, and in fact there’s a glued paper in my Kollel’s door containing Shemot that no one can remove (photo in the right).
Because of this prohibition, the old printed Chumashim do not spell the full Shem but use a peculiar alternative, the Yud-Yud (photo in the right). This way, if a Chumash gets ripped or simple lost there will be no transgression of the aforementioned problem. But why did the publishers chose specifically Yud-Yud?
If you look in even older books, you’ll see a line under or above the Yud-Yud – I saw this in old Ketubot from all sorts (Hebrew University has a great collection).
I’ve heard two explanations for this. If you look in Sefardic and some Chassidic siddurim you’ll see that all the Shemot are written in the form of “Shiluv” (photo in the right), that is, in a combination of the letters of the written Shem and the way we pronounce the Shem (they are not the same). That’s a Kabbalistic custom and you will see that the Shiluv starts with Yud and ends with Yud. That might be the reason why the Yud-Yud was chosen to replace the Shem in the Siddurim.
But I saw in the Darkei Moshe another explanation. As I said, the ancient books have Yud-Yud with an underline. This underline is a Vav, and if you take the Gematria of the Yud (10) Yud (10) and Vav (6) you will get 26, which is the same numerical value as the Shem.
(The same explanation is said about the Aleph, which consists of two Yuds and one Vav. That’s an allusion that G-d (26) is one in this world).
Since some 15 years ago, the seforim publishers stopped using the Yud-Yud by and large, rather using the explicit Shem. I happen to know the owner of one of the most popular publishers of Jerusalem and he told me the Gedolim had asked him to use the Shem because unlike some time ago, the Seforim are much more durable and it’s easier to keep them in good condition. However, I’ve seen one very recent edition of the Chumash that uses a creative solution – they wrote the Shem but disconnected the “foot” of the first Hey (photo in the right). In a first look you may not realize, but it’s there and consequently there will be no problems in case the Chumash gets ripped or something.
(A side point: Why disconnect the first Hey? If they would do it in the second Hey, the first two letters of the Shem would read Yud-Hey, which is another Shem and we would be back to square zero).
All in all, it should be clear now that a very beautiful Sefer Torah or Tefillin or Mezuza can be worthless if the Sofer didn’t follow the rules of the game. Be carefull, and do your due diligence before you buy something so holy. This is just as serious as any other investment and if you fail to do your homework you might be getting yourself in the Safrut version of Maddof’s Ponzi scheme – a worthless piece of parchement. Be aware!