erictapen / weird-tree-plot

A plotter for really weird tree graphs.
GNU General Public License v3.0
5 stars 2 forks source link

Sanitize strings, before insert into tex! #6

Open erictapen opened 9 years ago

erictapen commented 9 years ago

! Package inputenc Error: Unicode char \u8:ō not set up for use with LaTeX. ! LaTeX Error: Command \k unavailable in encoding OT1.

FinnIckler commented 9 years ago

That's the Problem with Multilanguage support in LaTeX. Try to use \usepackage[T1]{fontenc} in the preamble though, OT1 hasn't been the standard for ~20 years (sadly this doesn't fix the problem, unicode support is not there yet). To fix the Problem all the different Unicode chars have to be replaced with their LaTeX equivalent (probably what you are thinking about), or just use luaTeX to compile and use a Unicode font. For Example, compiling this in the console with lualatex, should work! Maybe we should even consider using http://www.ctan.org/pkg/polyglossia (only works in LuaTex an XeTeX) \documentclass{article} \usepackage{fontspec} \setmainfont{FreeSerif} \setmonofont{FreeMono}

\begin{document} \begin{verbatim} ōōōōōōōōōōō \end{verbatim} \end{document}

erictapen commented 9 years ago

Mh, does that mean I have to change my latex compiler? Is there any chance to do this platform independent? Thanks alot for your effort!

FinnIckler commented 9 years ago

Well TeX doesn't have Multi-Byte Font support, so it won't work with the current version of LaTeX (latex2e). What are you using to compile? pdfTex? I'm sure your TeX distribution supports LuaTex natively.