Whether it renders as $ or $$ is inferred from the position, if it's inline 
it uses $ if it's a block $$.

julia> Markdown.latex(Markdown.parse("""\$\\sin(x)\$"""))
"\$\$\\sin(x)\$\$"


julia> Markdown.latex(Markdown.parse("""inline \$\\sin(x)\$"""))
"inline \$\\sin(x)\$\n"


https://github.com/JuliaLang/julia/blob/6e4c9f164832b5743b13c36c58d6bdd63ebbf1b8/base/markdown/IPython/IPython.jl#L28-L32

On Tuesday, 13 October 2015 19:30:48 UTC-7, j verzani wrote:
>
> With v0.4, is there a way to have Markdown parse latex and tell the 
> difference between inline math and display math? In particular, this yields 
> two identical pieces:
>
> ```
>
> julia> macro L_mstr(x) x end
>
> julia> Markdown.parse(L"""
>
>        $\sin(x)$
>
>        $$\sin(x)$$""", flavor=:julia).content
>
> 2-element Array{Any,1}:
>
>  Base.Markdown.LaTeX("\\sin(x)")
>
>  Base.Markdown.LaTeX("\\sin(x)")
>
> ```
>
>
> I tried other flavors (github, common), but they don't identify the LaTeX
>

Reply via email to