joemccann / dillinger

The last Markdown editor, ever.
https://dillinger.io
MIT License
7.95k stars 1.11k forks source link

When Markdown converted to PDF, math markup disapperars #774

Open WriterArtistCoder opened 4 years ago

WriterArtistCoder commented 4 years ago

If you type math markup in a Markdown document, e.g.

$$f{x} = \int_{-\infty}^\infty
    \hat f\xi\,e^{2 \pi i \xi x}
    \,d\xi$$

it doesn't display correctly when converted to a PDF.

In Dillinger: Math markup in Dillinger

Exported as PDF: Math markup displaying as text when converted to PDF from Markdown

joemccann commented 4 years ago

Good catch. This has to do with the PDF renderer Dillinger uses. Maybe there's a setting or configuration option that needs to be set?

On Sat, Sep 5, 2020 at 11:23 Percy Ghenburg notifications@github.com wrote:

If you type math markup in a Markdown document, e.g.

$$f{x} = \int_{-\infty}^\infty

\hat f\xi\,e^{2 \pi i \xi x}

\,d\xi$$

it doesn't display correctly when converted to a PDF.

In Dillinger:

[image: Math markup in Dillinger] https://user-images.githubusercontent.com/41657434/92311199-f341c600-ef69-11ea-9064-6ad8c6a56e56.png

Exported as PDF:

[image: Math markup displaying as text when converted to PDF from Markdown] https://user-images.githubusercontent.com/41657434/92311201-f3da5c80-ef69-11ea-8c96-1204ee58811e.png

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/joemccann/dillinger/issues/774, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAALY2QTPP4YJ2PPABJ2VZTSEJ6YZANCNFSM4Q3GQGVQ .

-- Sent from Joe in Real Life

WriterArtistCoder commented 4 years ago

I looked at the md-to-pdf package and its dependency Marked and couldn't find any options about math markup. Maybe the math could be rendered as SVG images before the document is converted to a PDF?

joemccann commented 4 years ago

Good idea. Pull requests accepted.

On Tue, Sep 8, 2020 at 18:45 Percy Ghenburg notifications@github.com wrote:

I looked at the md-to-pdf https://www.npmjs.com/package/md-to-pdf package and its dependency Marked https://github.com/markedjs/marked and couldn't find any options about math markup. Maybe the math could be rendered as SVG images before the document is converted to a PDF?

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/joemccann/dillinger/issues/774#issuecomment-689246991, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAALY2XJ5O7URQ45LSYUINTSE3M2JANCNFSM4Q3GQGVQ .

-- Sent from Joe in Real Life

WriterArtistCoder commented 4 years ago

I didn't make a pull request?

joemccann commented 4 years ago

I know I'm saying if you want this feature added give it a shot and submit a PR

On Tue, Sep 8, 2020 at 20:45 Percy Ghenburg notifications@github.com wrote:

I didn't make a pull request?

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/joemccann/dillinger/issues/774#issuecomment-689282124, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAALY2XK26X3YSQWUQGPUSTSE324XANCNFSM4Q3GQGVQ .

-- Sent from Joe in Real Life

WriterArtistCoder commented 4 years ago

Oh ok! I'm still new to contributing to open-source things, haha. I'll give it a shot.

FujiwaraChoki commented 4 months ago

+1