Skip to content

Fix section rendering that includes greek LaTeX characters in the documentation#5380

Merged
navidcy merged 4 commits intomainfrom
ncc/docs-id
Mar 12, 2026
Merged

Fix section rendering that includes greek LaTeX characters in the documentation#5380
navidcy merged 4 commits intomainfrom
ncc/docs-id

Conversation

@navidcy
Copy link
Copy Markdown
Member

@navidcy navidcy commented Mar 8, 2026

This is an attempt to fix #5377; let's see the docs preview.

edit: closes #5377

@navidcy navidcy added the documentation 📜 The sacred scrolls label Mar 8, 2026
@giordano
Copy link
Copy Markdown
Collaborator

giordano commented Mar 8, 2026

Doesn't seem to have fixed anything: https://clima.github.io/OceananigansDocumentation/previews/PR5356/models/coriolis#traditional-plane-traditional-beta-plane. Note also how the section anchor is not the ID you used in the PR. I still believe this is a DocumenterVitepress.jl bug.

@lazarusA
Copy link
Copy Markdown
Collaborator

lazarusA commented Mar 9, 2026

That should fix it, I cannot reproduce the issue, see below.

The preview should be at (PR5380 not PR5356 )

https://clima.github.io/OceananigansDocumentation/previews/PR5380/models/coriolis#traditional-plane-traditional-beta-plane.

(deleted now).

and using id is the current workaround for this case (header + equation), open to suggestions (PRs).

Screenshot 2026-03-09 at 19 22 03 Screenshot 2026-03-09 at 19 21 34

@navidcy
Copy link
Copy Markdown
Member Author

navidcy commented Mar 10, 2026

I was under the impression that, at least in the main text, LaTeX is done within double backticks. For section titles it should be $?

@lazarusA
Copy link
Copy Markdown
Collaborator

lazarusA commented Mar 10, 2026

both should work here, DVpress parses ``...`` to $ ... $ because vitepress uses $ $ for inline math.

@navidcy navidcy changed the title Add custom ids to sections Fix section rendering that includes greek LaTeX characters in the documentation Mar 12, 2026
@navidcy
Copy link
Copy Markdown
Member Author

navidcy commented Mar 12, 2026

So we do need the @ids?

@lazarusA
Copy link
Copy Markdown
Collaborator

So we do need the @ids?

yes, for now, until there is another solution.

And I said before, I think your previous commit did fix things, you were only looking at the wrong PR preview.

@navidcy
Copy link
Copy Markdown
Member Author

navidcy commented Mar 12, 2026

So when do we need to add an @id even if we don't need/use it. When the section title has LaTeX in it?

@lazarusA
Copy link
Copy Markdown
Collaborator

lazarusA commented Mar 12, 2026

When the section title has LaTeX in it?

yes, as far as know 😄, I haven't seen other cases, ahhh... and also I think when you have the same header (for whatever reason ) in the same file.

@navidcy navidcy requested review from giordano and lazarusA March 12, 2026 12:07
@navidcy
Copy link
Copy Markdown
Member Author

navidcy commented Mar 12, 2026

Cool! I'll merge when someone approves ;)

@navidcy navidcy merged commit 28001ff into main Mar 12, 2026
73 of 77 checks passed
@navidcy navidcy deleted the ncc/docs-id branch March 12, 2026 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation 📜 The sacred scrolls

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Some incorrect formatting in the docs

3 participants