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

Fix latex errors in documentation #6198

Merged
merged 1 commit into from
Dec 20, 2024

Conversation

gassmoeller
Copy link
Member

This should go a big step towards resolving the first task in #6178 and make our documentation compile in the pdf mode of Sphinx.

Fixes in this PR:

  • We used to escape some constructs in the parameter documentation like [x,y](z) for the markdown documentation, because they look like markdown links, unfortunately we changed them to \[x,y\](z). However \[ and \] start and end math mode in Latex, which broke the Latex build. So I now replace [x,y](z) with {x,y}(z) inside the parameter documentation instead.
  • References in figure captions broke the tex file, because the \hyperlink command inside a \caption wouldnt work as reported here: https://tex.stackexchange.com/questions/522524/using-hyperrefs-hyperlink-command-inside-caption-in-figure-environment. I took some inspiration from Latex issue when is included a citation in the caption of a table or figure mcmtroffaes/sphinxcontrib-bibtex#276 to work around the issue (redefining the \hyperlink macro to always be \protect\hyperlink, maybe a bit drastic, but it seems to work)
  • adding the siunitx package again into the generated tex file. With some trickery we may be able to get all the \si commands to work at least in the .pdf manual
  • add cairosvg into the environment file of the documentation (I think this was just not done in sphinx doc: add plugin for svg conversion #6181 because it was probably already installed on that test machine)
  • unified the name of a parameter (\viscosity is not valid latex, \eta is)
  • the last change also made it necessary to update the parameter files, so I ran update_parameters.sh

I can now run make latexpdf successfully locally, let's see what readthedocs says.

Copy link
Member

@tjhei tjhei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thank you.

@tjhei tjhei merged commit 85802d9 into geodynamics:main Dec 20, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants