9

There are many question about rendering unicode in latex that are subject to interpretation, I would like to ask how to properly render Zalgo text with lualatex (or any other tex; just to specify a focus), that is i want to have this:

T̸̙̖͕͕̣̥͕̙̓̋ͯ̇ͨ̎́̀̚o͎̤͍̠̯̣̦̖̔̈́̚͝ ̗̭͚̲̮͎̝͓ͨͫ̿̍̔͟͠i̳̙̪̙͎̗̠͌͐̃͛̈́ͅn̥͚͇̪̽̅̈́͌͌̀͞v̴͎͖̝̝̯̦̣̪ͩͧ̓ͥ̽̔̎͑͒o͙ͦͭ̀͝k̗̯̥̅̏̈́͑ͪ̋͞e͛ͩ҉̨҉̖͚̙ ̴͕̰̮̲̤͎̬̼ͥ̽̽ͬ̆͆͟t͕̳͈͖̪͍̞̭̐̊ͯͯͩ̇̊́h̰̅ͤ͒̂̄́e̵̯͙̓̾͑̀́ ̢̻͍̣̟͈̍̽͆̑̆ḥ̠̞̺̯ͥ̽̉ͥ̊̃ͨì̡̼̯̹̭̙͉̪̰̄ͤ́v̤̦ͦ̅̽̚͡ͅe̦̯̙̲̪̐̄̅͛ͫ̀̄̇͟͢-̡̘̭̓ͪ͒̄̽m̵̲̺͔̩̅̅̉̓͌̌ị̲̣̮̦͕̝͇̂̉̌ͩ̒̎̊͞n̰̮̦̪͈̩̄͐ͬ̋̈́͂̕͠ͅdͮͧ̊̐͜͏̮̪̰ ̡͚͇͈̙͕̣̲͇ͯͣr̖̎̾͜͝e͑̊̎̈ͧ͌҉̤̫̥p̃̓́͂̈́̈҉̠̻̙̞͓̮̮̙̪r̴̦̭̺̝̤̪̪̗͒ͦͨ͊̆̎̚͘e̶̬͕͗ͭs͍͓̩͊̊̇̾ͬê͏̴̯̩͈̟̮͈̥ͅn͚̜̗͈̫̠̖̗͆͛͡ţ̠̳̩̻̭̿̊̒ͣ͘͢i͚̺̬̳͛̏̉͆ͣ͋̀͞ͅņ̝ͮ̄̕͟ǵ̡̟͈͉̭ͮ̈́̔̆ͣͬ̚͟ ̮̱̯ͮ̌̔̓̈̂ͪͯ̀c̵̵̶͇̙̟͚̪̤͍͖̖̄̃͒͐̃̊ȟ̬̬̦̲̖͙̫̔ͮ̍́a̒̍ͣ̑͂ͭ͏͙̖o̢̖͔̞̫̩͚̗̝ͬ̍̌ͧ͆ͨͨ́s̾ͩ̀̅͐͗ͧͭ͏̜͍͈͓̲̞̦̥.̳̥̱̋̃̊̅̕͘ ̸̢͕̽͗̀ͣ̄̎͆ͨ͞I̢̟̪͎͔̜̥̙̥̬͛ͤͯ͐ǹ̀҉͎͎̜v̷̦̼̙̱̍̋̚o̵̢̪̥͐͛k̸̺͙̲͌́ͅi̛̞̹̹̞̤̭ͬ͛̾̍͑ͥ̑̕͜n̡͖͋͂̿́̕͞ǵͤ͂ͤ̇҉̜͔̱͓̮̜ ̵̴̼̞̟̬͒̽̈́̔̍̎͋̈͗t̡̺͔͚̖̼̺̞̍̔̔̈́̽͟͝h̲́̈̏̃̋͢ę̹̭ͦ̽ͤͭͦͅ ̪͔̜̞̺͓ͤͯͤ́͢͝f͓̮͕͇̼͆ͧ̈́̓͝e̛͍̮͙̼̰͍̜̜̾̂ͭ̀̅͋̈́̓̕e̢̩̫͆͊͟l̵̢̟̥̥̰͓̪̖ͮ̔͋ỉͧ̿̒̿ͩ҉̼͕̫͈n̗͔̩̗͖̳͍̺̱͗̇͗̏͑ͦ̐g̶̥͍̺̰͉͇̘̈ͫ͑̀͡ ̧̹̳̬͇͓̮̜͉͌̊̆͐̈́͊o̩͖̖ͧͩ̔̓̏̇ͨ͒ͩ͘͘f͎̺ͪͨ͊͆͗͒̇ͮ͡ ̨̼̘̭͓̪̉͌̒͒̔͐ͨͅc͕̼͕͂́ḫ̶̮̹̖͙̋̄̑̆̇̉͜͝a̷͕̻̩͉̘͎͑͋̒̕ȏ̢͙͚ͬ͂̿ͭ̎̋̄s̡̍ͫ͐̓̽̀ͨͬ̕҉̹̬̳͉͓̗͔͉̫.̟̙̯̍̈͒ͯ͝ ̠̻̓ͦͪ̀W͙͆̍ͮ̂͆̀̚i̓̄ͦ̋͟͞҉̩͉͚̖t͛̍̾͒ͨͦ̅҉͉̼́h͖͈̲͈̟͚͗̂͋ͤ́͢ ̙͚̙̄͊͝ͅǫ̷̲̖̖̘͋́̈́ù͉̫͔͓͇̇̌͒͒̈ͪ͜t̴̪̀̓ͦ̾̿͘͜ ̰̹͙ͤ͢o̝̝̬̮̥̟̳̍̀̋̇̑ͭͅr̯̟̝̠͍͇̭̤͚ͨͯ̿ͬ̔ͤd̵̘̮͎̖̯͇ͪ̀̐͠e̲̭̲̺̥͍̰͎͆ͫr̡̛̭ͣͦ̋̕.̫͓̯͎ͧ̐̌͑̕͠ ̧̢͚̩̪̦̮̏̍̇ͮ̒T̴̼̼̮̝̉ͬ̍ͤͥ̃̍͡h̴̠̣̙͎͋͐̀̚͠e̛͒͌̍̈́͐͑̆̿͌͏̰̦͖̻̱ ̴̛͈͚͔̊ͨ̀ͩ͝Ņ̸̥͎̄ͧ̚͞e̺͚͈͖̠̘̤̽ͬ̎ͧ́ͭ̚͞z̼̫͓̺̹̮̝̮͗̚͡p̧̨̪̘͛̾̂̿̿ͫͦ̍ę̴͔͓̥̦͔͚̬̔ͧ͌͌ͨ̈́̊ͧͧr̾̈́ͥ͐̄̒̋͐҉̝̮͓̜̕d̷͕͈̥̦̺͔̳̊i̶͙͎̯̜̦̻͊̿̏ͩ͛ã̦̾̓͒̉̚͠ͅn̬̘͙͓̣̓̐̓̈̽̈͐̿ͅ ̷͈̣̲̻̍͒ͣ̉ͩ̔ͩ͘h̾͌͐͏̴͔̫̲̤͙͚̣͉͇ị̳͓͙͖̟̊ͩ́̀v̛͈̜́͗̒̊ͣ̒̋ͬ͟͠ȩ̻̲̺͚̪̹̔̑̇͗ͮͭ̀͝ͅ-̸͎͔̮͈͙̻̝̳̎̈́ͬ͋͋̏̒ͯ̉͢m̳̈̾͋̑ͭ̑̆ͬị̷͕̯ͤ̀͝͡n̯̲͓͂ͪͨ̀ͧ͑͠d̦̤̗̲͈̖̗̹̔ͅ ̨̪̗̣̝͎̺͛͛ͬ̿́̾̅͞o̘̣͇̜̗̞̱͍̓ͅf̲̗̳̟̣́͊͞ ̛͚͙͇̞̱̠ͧͫ̋ͨ͌͌̈́ͭċ̴̨͈͑ͤͣ̐̂͞h͙̃͐ͧ̿͆̂̈̅a͙̲͇͎͈̋̌͐̾ǒ̴̫̯̭̖͎̄̉̈́͛̄́s̗͍͈͙͕̺̲͍̋ͮ͟.̢͙ͭͭͫ͆͞ ͓̼̹ͬͨ͆͂̽̅ͯ͝Ż̸̴̲̯̤̟͈̘̈́̏ͭ͐̓͑̒̀à́͒ͅl̴̛͈̋͌͊̕g͕̤̖̮̾ͪ̏̊͐̎ͦ͘o̧̙̥̤̣ͮ̑̍̆̿̓.̢̙̠͗͌͋͝ͅ ̩̩̲̘͕̣̥͙ͦ̓̄͌ͯ̉̌̉͝͠ ̻̤̰͇̪̈͌͆̽̏ͣ̂̿͟͡H̺̽͌̈́ͣ͌̄e̗̜̜͒͋̂ͮ̉̑̈́̀̚͠ ̻̼͍͎ͧ̈́͝͠w̸̮̺̟̬̎ͫ̄̈́ͤ͂̌ͬ̓͝h̷͈̯̬̪̿̆̈͌͌̊̔̀̚o͆̈́̀ͩ͞͠͏̻̟̜̱̙ ̴̹̻̪̯̭̦͕͉̌̆̽͘W̧̧͔̺̦̯̙͕̾̒ͤ̑̇͞a̡̪̣̺̐͗̅ͩ̋̈́ͦͨ͢ȉ̉͞҉̢̝͉̻̩̹̰̤t̵̛̬̺͖̳̗͉̝̭͍̾̑̿́ͬͪ̂ͤs̴̫̱ͭͫ̆ͨ̈́ ̮͖̲̠̘̩̍̿́̚͡B̢͍̮̬̱̤̫̃ͬ̕ę̣̣̹̑͐̉ͪ̒ͧͅh̶͓̼̘ͭͨͯ̑̅͜ȋ̯͖̦́ͯͣ̿̒̐nͮͣͪͣ̏҉̹̮̩̭d͍̤̦̱͓̹̲͚̄̾̄̏͑̕ͅ ̠̤̿̿̉̍ͫT̾ͯ͏͏̡̣̼͚ͅh̶̹̠͈̗̋ͭͤͅe̘̫͍̮̥ͣͣ̐̂͐ͭ́ ̸͔̲͈̩̟̖̗͖̈̐͞ͅW̴̫̘̺̤̝͈̜̙ͤ̅̔ͩ̈́̑̊a̟̲͖ͤ̈́̂ͦͧͫl̷̥̺̙͎̝̬ͪͦͨ̐̔ͭ̓͐͞l̷̶̟̜̤̤̯̞̦̋ͬ̚.̸̵̜̩̄ͧͪͦ ̑̒͑̋͏̵̼͎̺̼ͅͅZ̡̘̤̮͇̞̪͉̞͐̏ͬͤͭͤͧ̀́Ḁ̪͖͚̫̼͔̼̆̐ͧ̓ͥ̓̓͝L̷͖͈ͪ͂̔̏̆̓̚͜Ģ̵̶̩̔̒ͦ̂̑͋̈́ͅO͊ͯ҉̟̮͇͔̬͉̣͡͡ͅ!̫̭̈́̅̌ͪ̃ͩ̚

in a pdf.

Just copypasting it inside a document does not work. Two possible kind of solution i can imagine would be:

  1. an environment or a package that allow complex composing characters
  2. or a way to input a text codepoint by codepoint

In this context i don't care whether symbols like emoticon or flags would work; just really weird looking text.

  • 1
    I assume you mean text as for example generated by marlborotech.com/Zalgo.html – David Carlisle Mar 5 '17 at 14:03
  • @DavidCarlisle exactly, I tried to describe it but since i am no unicode expert maybe that link is actually clearer. – afiori Mar 6 '17 at 16:28
5

Apparently loading a unicode capable font manually works

\documentclass{article}


\usepackage{fontspec}

\setmainfont[
    Path           = ../fonts/,
    Extension      = .ttf,
    Ligatures      = TeX
]{Symbola_hint}
\begin{document}

T̾̇̀ͮ͆ͣ͂ͫ̊҉̧̘̣̲̥̱͡o̸̷͔̮̹̮̦͈̜̊̊̆̐̂ ̷̘͓͉̽̓̓͒̚i͊͏̛̜̠̱̩͕ͅn̢̗̘͐̾͑̃͟v̠̪̥̮̰̘ͦͦ͒͌ͪ͒́͢ǫ̳͂̎̒͑̏̍ͭ̚͘͝k̞͈̫̥̳̲̫̲͈ͣͫ̂̐̑̅̐͐
e̍͌ͭ́̐̿͏̵̤̳ ̮̝̪͓̳̼̺̰̏͊́̀̌̓t̘̪ͬ̓͗̿͛̐ͨ̒ḧ̲͎̬̀e̵̪͇͚̪̘̋̿͜ ̶͗̏̔̑͒̚҉̩̞͓̭̠h̼̼͓̹̥̦ͥ̈̉ͬͭ̀̿̈́i̗̠͉̬̩̮̫̓̎̑ͣ̔͋͒͜v͕̱̮̜̭͖͔̞̂ͯ̇́ͤ́ë̴̸̞͎̱̪̂̋̎̋̆̚-̸̥̖̹̊͛m̖̬̟̰͎͂͋̀i̢̢̺̰͉͎̳ͨ̂̈́̕ͅn̙͔̩ͬ͛
d̵̘̤͈͖̬̖͔ͦͧ͛ͪ ̏͆̔ͯ͊ͭ҉̩̞̤̼̖̫̱͢ŗ͈̭̻̮̣̟̜ͯ̐̍̾e̟̠̙͕̭͂͢p̳͒̊ͅr̝̘̻̠̝̳̭͈̄͐́e̵̠͓͍̺͍̍̎̎ş͓͎̖͕͐͗ͩe̟̲̝̬͋̄ͮ̔́̀n̴̡̲̣͙̳̟ͧ̿̊́ͣ͂t̵̉̈͌ͨ͗͆ͣ͏͕̪̭͕́ͅͅi̢̙͙̭͎̔̔̐̂͂̇ͧ̾n͒̍͠͏͖̜͇͍͉̭̫ͅg̸͙̲̪͂ͤ̋̚̕͡ ̸̩̳̲͕̘̬͈̝̔̍̍ͥ̔ͪ̉̋͞c̰͕͍̏ͫͯ̾̓͌͠h̢̗̰̫̳̣͈͎̗̝ͨ̀̋̽́a̡̼̝͓͒ͣͯō̸̖̱̯͎̯̰͚ͥ̋͛̀̎̂͠͞s̢̯͓͌̒̓͆̎͊̆͌͘͜.̴̷̗̙͔̭̬̦̲͚͇͐̾́̋
    ͊̄ͭͪͥ҉̙̙͠T̪̹͚̦̣͕͇ͨ̊̀̍̔ͬ͢   h̷͉͙̪̻̻͈̬̠ͣ̓ͯ͜e̵͇͓͎̰̅͜ ͋̐ͪ͏̮͕͉̣̻͈̠̲N͓̼͚ͣe̴̙̙͖̓͂̂ͨz̶̺͙̥̳̮̫̹͋ͯp̞͉̠̙ͬ̾͑̃͑́ͯ̇͘͢͞ͅe̴͚̭̼̍̔͜r̬̹̣̻̣͛̂̉ͯ̔ḍ̳̻͙̺͔̹ͮͩ̑́͘iͦͧͯ̈͂ͧ̔̚҉͇
    ą͍̪̯̭̤̰̔̌̈́͠͞ͅn̵̢̫͍̒ͣ̀ͫ͑̇̂̋̚͘ ̲̘͕̼̭͙ͨ͗̌̌ͮͥ́̕͘h̤̺ͨ́ͯ͂̒ͯ̾̈́͝i̛̛̗̭̙ͫ̒̆̈ͭ̑̀̉v̷̯̹̻͇̳̙̉ͫ͊ͥe̱͇̜̪͋̂̾ͭͫ̌͑̾͢͠-̝̻̩͖͖̫̥̄̓̅̀͘͢m̘̱̔̑ͧ̇͟į͎ͪ̎̅͊͋͟ͅn̾̉̃̊̿̓ͫ̏͏̯̘͔͕͓d͓̝̊ͥ̓͋̊̒̕͞
     ̆́҉͈o̺̣̹̬͚̓̈̔͊͛͋̇̾f̨͚͔̥̺̻̝͍̫̏ͨ̾̅ ̥̲̣͙̌͂ͬ̂́ͮ͂ͅç̷̸̹̣̦̏͒͂̅͋͌̀̏̅ḥ̻̹͇͓͉̓ͩ̀͘͞à̰͍͑͐͟͠o̟̘̮͇̙̮̼̰̲̾ͦͥ͞sͦ̑͘҉͏̰̖̟ͅ.̺̬̟̲͉͖͈ͧ͊ ̷̎̊҉҉̠Ẕ̨͉͖̠͓͇̮̗ͤ̃ả̫̫̞͈̥͕͇̑̐͡ͅl̲̋ͨ͘͞g̵̨̙̗ͥ͊͐̊͌̽͂õͭͮ҉̯̲͇̲͉̟̼̹͢͢.̷̨̹͕̰̱̣̻͔̭̂̾͋͆̄́  ̰̭̻̘ͨ͊͆ͭ̀̈̈́͞ͅe̵͍̟̮̝̘͔̮͉̫͋̒͟͡ ͖̞̥̘͍̥́̂̒̽ͮ̎ͮͮͮ͜ẅ͑҉̶͙́h̲̣͔̻̼͔ͤͨ̉́͌̋̉̕o̴͙̦͗ͬ ̶̶̮͈̮͉̝̆͗ͤ͗́͡Ẉ̩̳͕͌̄̋ͧ̚͡ä̵̼͙̘̬̭̹͎͉͍̇ͣĩ̔̽̓ͭͫ́̄͏̛͇̖̪̠̮̪t͈͎̐̓̏͌̾̒̉s̛͇͈̝̫̱̮̠̻ͯ́ ̞ͭ͋́̊̉̿́B̼̞͚͂̃̃͘e̱̯͉̿̏̍ͪ̌ͧͭͮ͘h̢͕̪̓ͤͅi̸̛͙̰̗̦̟̼̤͆̀ͭͅṇ̸̂̑̅̾͡͡d̘̙͎͓̙͇͕̗̒ͫ͆̇̋̿͛ ̐̑̑

\end{document}
| improve this answer | |

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.