benrbray / tikzjax

TikZJax is TikZ running under WebAssembly in the browser
12 stars 3 forks source link

unicode / `utf8` support #1

Open benrbray opened 1 year ago

benrbray commented 1 year ago

Currently, tikzjax does not support unicode characters as input, which is a quite severe limitation. It would be great to find a workaround.

Related Issues

benrbray commented 1 year ago

I tried including the inputenc and fontenc packages as part of the tikzjax build by adding the following to tex_files.json, but I cannot find any combination of \usepackage[utf8]{inputenc] and \usepackage[...]{babel} and \usepackage[...]{fontenc} that work.

"babel.sty",
"babel.def",
"txtbabel.def",
"switch.def",
"english.ldf",
"russian.ldf",
"russianb.ldf",
"japanese.ldf",
benrbray commented 1 year ago

I also tried including the CJK and CJKutf8 packages in the build, but CJK seems to depend on many files which are not locatable by kpsewhich, so it's difficult to include everything in the current build process. I wasn't sure if this approach would be fruitful so I gave up for now. But perhaps someone else would have some success.