asciidoctor / asciidoctor-mathematical

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

Underline not rendered correctly #114

Open aranvir opened 2 years ago

aranvir commented 2 years ago

Hi, I'm experiencing an issue when using the \underline command. For both, asciimath and latexmath it is rendered correctly, but when I'm generating a PDF from it, it does not work correctly. This happens for inline formulas and for blocks. In my example using asciimath, \underline does not work in a [stem] block but only for the inline formula.

PDF Rendering: image

HTML Rendering: image

For document generation, I'm using the asciidoctor docker: https://hub.docker.com/r/asciidoctor/docker-asciidoctor/ (at time of writing: asciidoctor 2.0.17, asciidoctor-pdf 2.1.2, asciidoctor-mathematical 0.3.5) For generation commands I'm using a gitlab pipeline:

adoc:
  stage: docs
  image: asciidoctor/docker-asciidoctor
  script:
    - asciidoctor-pdf -v
    - asciidoctor-pdf -r asciidoctor-mathematical -a mathematical-format=svg adoc/demo_asciimath.adoc
    - asciidoctor-pdf -r asciidoctor-mathematical -a mathematical-format=svg adoc/demo_latexmath.adoc
    - asciidoctor adoc/demo_asciimath.adoc
    - asciidoctor adoc/demo_latexmath.adoc
  artifacts:
    paths:
      - adoc/*.html
      - adoc/*.pdf

I uploaded my demo files below (adoc, html, pdf) adoc_math_demo.zip

edxu96 commented 1 year ago

I'm relying on a workaround: \underset{\mathbf{-}}{Q}.