asciidoctor / asciidoctor-mathematical

An extension for Asciidoctor that converts the content of STEM blocks and inline macros using Mathematical.
MIT License
49 stars 44 forks source link

Some math symbols get incorrectly rendered #42

Closed witzatom closed 5 years ago

witzatom commented 5 years ago

Hey, ran into issues with the renderer aswell. It looks that the default font in asciidoctor-pdf does not support a lot of the unicode math symbols.

stem:[0 \in {0, 1, 2, 3}] gets rendered as stem-2d450f409d1d8078235bc2ca31ea4e6f Image taken directly from images/stem-*

I do not have the same issue with sqrt as the OP has though.

stem:[\sqrt 4 = 2] gets rendered correctly

Details on how to reproduce: Dockerfile of my asciidoctor image

FROM asciidoctor/docker-asciidoctor

RUN gem install asciidoctor-mathematical --no-ri --no-rdoc

CMD ["/bin/bash"]

command that I use to build: docker run --rm -v ${PWD}:/documents/ asciidoctor_withmath asciidoctor-pdf -r asciidoctor-mathematical test.adoc

Related issues: https://github.com/asciidoctor/docker-asciidoctor/issues/78 https://github.com/asciidoctor/asciidoctor-mathematical/issues/41

witzatom commented 5 years ago

Workaround - add these fonts to render symbols:

apk add ttf-dejavu
ProgramFan commented 5 years ago

So it shall be caused by missing fonts. The workaround is the solution.