Literate.jl icon indicating copy to clipboard operation
Literate.jl copied to clipboard

How to properly caputure LaTeXString output in markdown output?

Open newptcai opened this issue 3 years ago • 2 comments

I tried to convert

using Latexify
latexify("x/y") |> display

to markdown. But the output is not captured.

I also tried

using Latexify
latexify("x/y") |> display

But then I got

````
$\frac{x}{y}$
````

This is fine when you want to demonstrate what is the output the code. However, I am trying to use Julia to generate markdown so that I can convert it to PDF via pandoc.

newptcai avatar Mar 08 '22 01:03 newptcai

What output do you want? As far as I know there is not a standard math environment for markdown.

fredrikekre avatar Mar 08 '22 10:03 fredrikekre

I just like it to have no fences around it, so when I turn it into PDF, \frac{x}{y} can be rendered as math equations.

newptcai avatar Mar 08 '22 10:03 newptcai

What I was trying to do is to write generate some LaTeX using Julia code and render them into PDF. As I wrote above, however, Literate.jl would capture my output with ``` around them. So they are instead rendered as code in the final PDF.

newptcai avatar Sep 30 '22 01:09 newptcai

In the end, it seems that Weave.jl is a better option for writing scientific reports. Literate.jl is better suited for writing package document.

newptcai avatar Oct 19 '22 06:10 newptcai