Closed jfernandz closed 4 years ago
Would you please check if it works under asciidoctor alone in the html renderer? It seems that you are lacking some fonts.
For .html
format is all working as expected.
@ProgramFan I've also detected problems in single letters rendering, it is rendering them like superscripts as you can see in the screenshot. Otherwise the test.html
file is properly rendered when I get it from asciidoctor test.adoc
I can confirm the rendering of brackets is an issue of missing fonts. Install all fonts as stated in mathematical page https://github.com/gjtorikian/mathematical. This is what I get on macOS:
The i
and n
problem is caused by the font size, which, however, does not have any solutions yet.
@ProgramFan well, you were right about fonts, I've solved the issue installing this package in Arch; however
I'd consider that as a valuable info which could be added to the readme in the Arch Linux case.
Also I cannot understand you won't consider the problem for single letter for in-line math mode as a valid issue.
Is not there an argument to prevent those multiple stem-<code>.png
pictures be generated? At least to clean after runtime?
The issue is considered invalid because asciidoctor-mathematical can do nothing since it is caused by mathematical itself. Whether mathematical will consider it an issue depends on mathematical itself.
For the stem-xxxxx.png, unfortunately, asciidoctor-mathematical can not delete them on its own. asciidoctor-mathematical is meant to be used as a plugin, so you can use it with the pdf, html, docbook and even epub3 backend. Only the pdf backend can safely remove the files after pdf generation. If you care about this, use a makefile do build pdf and clean the stem pngs at the same time.
For the first suggestion, an PR is welcome.
@ProgramFan Are devs aware about this font issue in the mathematical repo? (I guess they are.)
They are and they have instructions in the repo README. But they only have instructions for osx.
Excuse me, could you specify where exactly those instructions are? I was reading the readme and I could not find them.
cd ~/Library/Fonts
curl -LO http://mirrors.ctan.org/fonts/cm/ps-type1/bakoma/ttf/cmex10.ttf \
-LO http://mirrors.ctan.org/fonts/cm/ps-type1/bakoma/ttf/cmmi10.ttf \
-LO http://mirrors.ctan.org/fonts/cm/ps-type1/bakoma/ttf/cmr10.ttf \
-LO http://mirrors.ctan.org/fonts/cm/ps-type1/bakoma/ttf/cmsy10.ttf \
-LO http://mirrors.ctan.org/fonts/cm/ps-type1/bakoma/ttf/esint10.ttf \
-LO http://mirrors.ctan.org/fonts/cm/ps-type1/bakoma/ttf/eufm10.ttf \
-LO http://mirrors.ctan.org/fonts/cm/ps-type1/bakoma/ttf/msam10.ttf \
-LO http://mirrors.ctan.org/fonts/cm/ps-type1/bakoma/ttf/msbm10.ttf
But that's for install the fonts, what has that to do with font size, which is causing the issue for single letters size?
Are those maybe fixed ones? Because in that case I could create a new AUR package to ship them to the system. As I've pointed in #68 those fonts are packaged in this one but even those are causing the smaller size than normal.
The package I mention fetches the fonts from http://distfiles.gentoo.org/distfiles/texcm-ttf.zip which is not exactly the same site than mathematical repo suggests, that's why I'm asking if there would be a difference and this size issue could be fixed shipping the suggested ones.
EDIT: In fact I would not need to package those .ttf
fonts because the lyx package has them, like you can see in its file list
EDIT2: I've realised you probably misunderstood me; I was talking about the font size issue, not my problem with parenthesis rendering. On the other hand ... I've also noticed that lyx package is not really shipping the fonts to the right folder so they make them unusable in systemwide unless you copy them to some of the right paths: /usr/share/fonts
or ~/.local/share/fonts
. Due this I would recommend the ttf-computer-modern-fonts package, which it makes the fonts systemwide usable.
Sorry to have misunderstood the issue. Based on my own experience, I have no idea how to deal with the font size problem. Mathematical converts the latex equation to MML and uses Lasem to convert MML to png and SVG. After the conversion, all font information is lost and only path information is recorded. So it can only be typeset as a fix-sized inline image and unfortunately, the produced image is just too small.
I would suggest you not to rely on this package for publication, but for drafting. For publication, asciidoctor + asciidoctor-latex + asciidoctor-bibtex is more friendly to play with.
Well, here the MWE
This is the result I'm getting after conversion with