1 This is a crude Java program to:
3 1. Scrape the stixfonts.org website for their table of unicode-to-tex mappings
5 2. Run an arbitrary UTF-8 text file through this mapping to produce an ASCII tex file
7 Any characters with code >127 not found in the table will be reported
8 on stderr (each code is warned only once). We assume your terminal is
9 capable of printing unicode characters (as Apple's Terminal.app is).
15 $ echo '\documentclass{article}' > out.tex
16 $ echo '\begin{document}' >> out.tex
17 $ echo '\usepackage{amsmath}' >> out.tex
18 $ echo '\usepackage{amssymb}' >> out.tex
19 $ echo '\usepackage{upgreek}' >> out.tex
20 $ echo '\usepackage{stmaryrd}' >> out.tex
21 $ echo '{\\tt{' >> out.tex
23 $ java -jar unicode2tex.jar < yourfile.txt > out.tex
25 $ echo '}}' >> out.tex
26 $ echo '\end{document}' >> out.tex
29 No warranties. The stixfonts.org scraping code is shockingly naive.
31 Public domain, though I'd appreciate credit.
33 - Adam Megacz <adam@megacz.com>