TransWikia.com

Use any unicode character in source with pdfLaTeX (without XeLaTeX or LuaLaTeX)

TeX - LaTeX Asked by iceplant on April 7, 2021

I’m writing a script that converts .md files into latex source code and compiles it to a .pdf. I’ve been using pdfLaTeX and would rather not refactor this late in the game. I want to be able to handle any unicode character that might come up in the .md file. From other posts here, I’ve gotten this somewhat exhaustive solution, but there are still a few characters that break it (like the last one U+FFFD)

documentclass{article}
usepackage[utf8]{inputenc}
usepackage[T1]{fontenc}
usepackage{textcomp}
% usepackage{lmodern}

begin{document}

¡ | ¢ | £ | ¤ | ¥ | ¦ | § | ¨ | © | ª | « | ¬ | ­ | ® | ¯
° | ± | ² | ³ | ´ | µ | ¶ | · | ¸ | ¹ | º | » | ¼ | ½ | ¾ | ¿
À | Á | Â | Ã | Ä | Å | Æ | Ç | È | É | Ê | Ë | Ì | Í | Î | Ï
Ð | Ñ | Ò | Ó | Ô | Õ | Ö | × | Ø | Ù | Ú | Û | Ü | Ý | Þ | ß
à | á | â | ã | ä | å | æ | ç | è | é | ê | ë | ì | í | î | ï
ð | ñ | ò | ó | ô | õ | ö | ÷ | ø | ù | ú | û | ü | ý | þ ����

end{document}

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP