-
Notifications
You must be signed in to change notification settings - Fork 482
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TeX] Escape $
in equation
#1804
Comments
Can you clarify what your input was? For me the latex output of
is
which looks correct? |
I think it was trying to incorporate HISTORY.md into the manual, and it has some https://github.com/JuliaLang/julia/blob/master/HISTORY.md#standard-library-changes-5 |
Duplicate of #1020? |
md input: julia/HISTORY.md # Line1509 at master · JuliaLang/julia ``echo `$(nothing)` `` Markdown.parse("`` `\$(nothing)` ``") |> s -> latex(stdout, s)
# $`$(nothing)`$ Maybe I've found a work around: Markdown.parse("``` `\$(nothing)` ```") |> s -> latex(stdout, s)
# \texttt{`\$(nothing)`}
It does seem to be an issue related to the Markdown.parse("`` `\$(nothing)` ``") |> typeof
# Markdown.MD |
Ah, yes, I believe you're right that this is not a duplicate of that issue, but an escaping issue. That said the double-backtick version
is not actually intended, since that implies an equation. But I am not sure if we should actually do anything here. The problem here is that the user has provided invalid LaTeX, and the correct solution is to fix the source (in this case, to use the correct backticks; but in a different case, if you actually want a dollar sign in your equation, you need to escape it accordingly). Maybe in an ideal world we could somehow check each small LaTeX snippet, to make sure that it is valid, and then print a more helpful error to the user, but I don't have a good idea how to actually even do something like that. |
By the way, I noticed that the last CI for the nightly PDF crashed. It's probably due to this escaping issue? |
I thought we are not yet including HISTORY.md in the pdf. |
I agree. Close in favor of #1697? |
md: "
echo `$(nothing)`
"tex:
\(echo `$(nothing)`\)
should be:
\(echo `\$(nothing)`\)
Related code:
Documenter.jl/src/Writers/LaTeXWriter.jl
Lines 683 to 687 in cd57c41
TODO:
Background: JuliaLang/julia#45034 (comment)
The text was updated successfully, but these errors were encountered: