Say I have a file eng.tex:

\def\encounter (#1){Hello, #1!}
\encounter (World)

I convert it to Pig Latin and save it as pig.tex:

\efday\encounterway (#1){Ellohay, #1!}
\encounterway (Orldway)

Is there a way (e.g. header you could insert) to make TeX parse pig.tex like it was written normally in eng.tex, macros and all? (I'm not very experienced with how TeX parses and don't know where to start.)

  • Is there e.g. an unpig script written in a more conventional language to demonstrate exactly what you would want changed? – Charles Staats Dec 12 '13 at 15:04
  • In this simple example, one could start by \let\efday\def\let\yebay\bye. Macro names don't require changing, but the non-macro names do. – Werner Dec 12 '13 at 15:21

The answer is NO since the transformation from English to Pig Latin is not 1-to-1 and hence not invertible. Consider the statement

in pig latin nails and snail are the same

Which according to the rules for converting English to Pig Latin becomes

inway igpay atinlay ailsnay andway ailsnay areway ethay amesay

which is also Pig Latin for

in pig latin snail and nails are the same

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.