[Fix] Inline latex formula alignment
Fixed an issue of latex inline formulas not aligning correctly with the text. The fix is a ruby translation of the Perl code described in http://tex.stackexchange.com/questions/44486/pixel-perfect-vertical-alignment-of-image-rendered-tex-snippets. This code calculates the alignment of the generated image depending on the image size and the size of the white space between the formula and the margins of the image. The alignment now is nearly perfect, however the new rendering comes with a performance impact because of the increased number of operations. To reduce this impact, the generated images and calculated values for the alignment are now cached in `~/.cache/gollum`. The caching is done per formula and not per page, thus avoiding caching the same formula twice. The Readme and tests have been modified accordingly with the new tool requirements and expected markup.
This commit is contained in:
@@ -352,8 +352,8 @@ inline with regular text. For example:
|
||||
|
||||
In order to get the mathematical equations rendering to work, you need the following binaries:
|
||||
|
||||
* LaText, TeTex or MacTex/BasicTeX (latex, dvips)
|
||||
* ImageMagick (convert)
|
||||
* LaTex, TeTex or MacTex/BasicTeX (pdflatex)
|
||||
* Netpbm (pnmcrop, pnmpad, pnmscale, ppmtopgm, pnmgamma, pnmtopng)
|
||||
* Ghostscript (gs)
|
||||
|
||||
## SEQUENCE DIAGRAMS
|
||||
|
||||
Reference in New Issue
Block a user