80720ae Remove test target
--check-bounds
, is implicit
~ninjin pushed to ~ninjin/Unicode2LaTeX.jl git
Unicode2LaTeX is a tiny Julia library for mapping Unicode characters to their corresponding LaTeX-internal form. While modern TeX engines have Unicode support, passing pure ASCII data is a safer option when programmatically generating content to be consumed by a TeX engine not under your control.
Simply use the Julia package manager:
add Unicode2LaTeX
Unicode2LaTeX exports a single function that maps strings and characters to their corresponding LaTeX-internal form:
using Unicode2LaTeX
unicode2latex('ö') # => "\\\"o"
unicode2latex("Kurt Gödel") # => "Kurt G\\\"odel"
Do note that ASCII characters are left in place, as TeX already knows how to interpret them.
To produce this library it was necessary to go deep down a rabbit hole of LaTeX internals. If you also want to find out what lurks in the depths of LaTeX input encoding and font output encoding, you may find the following documents useful: