I wish to enter arbitrary Unicode characters while writing in Plain TeX using the pdfTeX engine. How may this be achieved? I have already referred to this question, but the solution assumes the use of LaTeX, whereas I am using Plain TeX. Thanks a lot.
Asked
Active
Viewed 331 times
1
-
Just use a Unicode engine with a Unicode font and enter it directly. – Henri Menke Dec 26 '16 at 18:48
-
Is there a reason for only considering pdfTeX but not XeTeX or LuaTeX? – Mico Dec 26 '16 at 19:06
-
2pdftex has no support for unicode, it is possible to emulate certain aspects of Unicode encodings in the macro layer but plain tex has no such macros you could input a version of the latex macros into plain tex, but that is more or less equivalent to using latex, which you say you do not want to do. – David Carlisle Dec 26 '16 at 19:52
-
2A starting point is http://tex.stackexchange.com/questions/163852/how-to-input-accents-in-plaintex-with-utf-8-encoding but you need to find yourself the fonts for the needed characters. – egreg Dec 26 '16 at 20:40
1 Answers
4
With LuaTeX and XeTeX you get Unicode support for free.
\ifdefined\directlua
\input luaotfload.sty
\fi
\font\tenrm="CMU Serif"
\rm
¡ ¢ £ ¤ ¥ ¦ § ¨ © ª « ¬ ® ¯ ° ± ² ³ ´ µ ¶ · ¸ ¹ º »
¼ ½ ¾ ¿ À Á Â Ã Ä Å Æ Ç È É Ê Ë Ì Í Î Ï Ð Ñ Ò Ó Ô Õ Ö
× Ø Ù Ú Û Ü Ý Þ ß à á â ã ä å æ ç è é ê ë ì í î ï ð ñ
ò ó ô õ ö ÷ ø ù ú û ü ý þ ÿ
\bye
Henri Menke
- 109,596
-
When I try this, I get the error:
Font \tenrm=CMU Serif not loadable: metric data not found or bad.– ceving Apr 12 '19 at 09:34
