1

My software uses pdflatex to generate PDF files that include text entered by users. This text can be in any language, so I need something like the following to "just work" with any arbitrary Unicode content:

\usepackage[T1,T2A]{fontenc}
\usepackage[utf8]{inputenc}

\begin{document}
Öüä Эюя Tiếng Việt 日本語
\end{document}

I added the T1 and T2A encodings, so European/Cyrillic languages should be fine now. I can add more, but according to the CTAN guide, encodings for languages like Chinese are "experimental". The reliable way to output many languages seems to be to install and use additional packages specific to them, like cjk. Do I really need to go through the world's languages (sometimes one by one) and install whatever's out there?! Right now I'm tempted to just generate an image with the text and \includegraphics it, which may actually be less ridiculous.

Can anyone suggest a better way? I assumed a typesetting system used by academia around the world in 2016 would just have simple, sane support for Unicode. Don't see it right now.

  • Not with pdflatex: you're asking for gigantic work. – egreg Nov 14 '16 at 11:34
  • So what's the alternative? I just need a PDF file. – kontextify Nov 14 '16 at 11:36
3

You're essentially asking for a huge enterprise without any real advantage. Even the idea of using pictures would require an enormous amount of work.

If you use XeLaTeX/LuaLaTeX with a font having wide Unicode coverage, you'll be home rather quickly.

\documentclass{article}
\usepackage{fontspec}

\setmainfont{Code2000}

\begin{document}

Öüä Эюя Tiếng Việt 日本語

\end{document}

enter image description here

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.