JunoLab / Weave.jl

Scientific reports/literate programming for Julia
http://weavejl.mpastell.com
MIT License
827 stars 95 forks source link

Latex output of bold symbols not working #181

Open mpastell opened 5 years ago

mpastell commented 5 years ago

Latex output of bold symbols e.g. 𝐋 (\bfL) is not working. The best fix would probably be to define these in the LaTeX template https://github.com/mpastell/Weave.jl/blob/master/templates/julia_tex.tpl .

mpastell commented 5 years ago

@ChrisRackauckas would you have time to look into this? Or do you know of a package that would define Julia's \bf* symbols? Weave converts unicode to tex symbols using uc2texfunction: https://github.com/mpastell/Weave.jl/blob/26cf943d256a8b8494e68da3a3938c36c54ae689/src/format.jl#L238

The main advantage is that the output also works with pdflatex and it supports more symbols than any xelatex font that I've managed to find.

ChrisRackauckas commented 5 years ago

I don't know of a package that would do that. I think the right way to go would be to extend uc2tex to handle these cases, though that might be a lot of work.

mpastell commented 5 years ago

I think I managed to improve this quite a bit with the previous commit, so the most common cases should work now. I'll leave the issue open as I didn't implement support for all cases e.g. \bftwo

sebastianpech commented 5 years ago

Started working on an improved version of uc2tex which should be directly implemented in JuliaDocs/Highlights.jl#30 (because text and math needs to be escaped differnetly)