Skip to content
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

Improve warning when there are $ in doc strings / .md files in Documenter 1.0 #2288

Open
kellertuer opened this issue Sep 30, 2023 · 6 comments

Comments

@kellertuer
Copy link

I was a bit uncareful with my LaTeX writing in the doc strings and the markdown files, cf. e.g.

https://github.com/JuliaManifolds/Manopt.jl/blob/0865eb8b3a9a6f937c0599354bd3bbbc4c5e6c6d/docs/src/solvers/ChambollePock.md?plain=1#L6

While the “old” Documenter (pre 1.0) was quite fine with this (or tolerant to $...$ LaTeX, now one gets the warning

┌ Warning: Unexpected Julia interpolation of type Symbol in the Markdown.
│   value = :p
└ @ Documenter.HTMLWriter ~/.julia/packages/Documenter/9kOxY/src/html/HTMLWriter.jl:2215

(which luckily someone hunted down for me to the above line). I think that warning could maybe improved?
It also seems that this does not always happen … so maybe also only for $ in Doc strings but not in md files?
The reason I assume that is, that some of my Markdown files are generated by Quarto before the Documenter run – that Markdown contains (for laziness and Quarto/Pandoc preferring $...$) normal LaTeX, and that renders without warning.

Sorry if this is a bit vague, but I am still not 100% sure how to reproduce this.

@odow
Copy link
Collaborator

odow commented Sep 30, 2023

x-ref #872

@kellertuer
Copy link
Author

Yes, kind of, while for a missing reference I can both search for the reference mentioned and know the file (which often at least helps me, I often see what is wrong with the ref already) – here I have neither.

But sure, even having a line number would be a dream.

@odow
Copy link
Collaborator

odow commented Sep 30, 2023

I think we could improve all error reporting, not just this specific one, or the reference one.

@mortenpi
Copy link
Member

mortenpi commented Nov 8, 2023

#2327

@mortenpi mortenpi closed this as completed Nov 8, 2023
@odow
Copy link
Collaborator

odow commented Nov 8, 2023

Yeah I wasn't sure if the warning closes this. It's a more helpful but still not very helpful warning.

@mortenpi
Copy link
Member

mortenpi commented Nov 8, 2023

That's fair actually. Let's make having some source file / line information in the warning the actionable item here.

@mortenpi mortenpi reopened this Nov 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants