pandoc / lua-filters

A collection of lua filters for pandoc
MIT License
600 stars 165 forks source link

Garbled math characters in tikz images #280

Closed Vftdan closed 3 months ago

Vftdan commented 3 months ago

In diagram-generator.lua.

When tikz node labels contain math formulas, punctuation in them is rendered as incorrect characters. Perhaps, it can be fixed by changing utf package configuration or avoiding pdf to svg conversion?

Steps to reproduce

Create a markdown file with content:

``` tikz
\begin{tikzpicture}[]
    \node (mynode) at (10bp,10bp) [draw] {$\lbrace a, b \rbrace$};
\end{tikzpicture}

Compile it to pdf:

``` sh
pandoc -L diagram-generator.lua file.md -o file.pdf

Result

image

tarleb commented 3 months ago

That filter moved to pandoc-ext/diagram, the version here is unmaintained. We should probably remove it from this repo.

jgm commented 3 months ago

Or perhaps just add a prominent note in the README directing people to the better-maintained version?