docs: Latex generation improvements #18141
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Follow-up to #17997 (and discussion timotheecour#727).
A few improvements, mostly stylistic ones to Latex doc generation:
contributing.rst/docstyle.rst
which contain unicode examples in comments start to compile. Switching between different fonts is a more complex task in Latex, i did not try to achieve it here)doc2tex
: generate docs to Latex #17997)fvextra
instead offancyvrb
). Draw frames around code blocks. See Example 4.--
in code, not as en-dash.tabulary
package). Also table is not floating anymore (because floating without references can be very confusing like in Example 1, but we don't currently generate refs).\n
(e.g. Example 3).GoMono
as default mono space font (better than antiquecourier
IMHO)doc2tex
and make additional indentation for items descriptions. See Example 3.Tested with TexLive 2018 and Miktex 20.12. I expect that this will be incompatible with old versions of Latex, something around TexLive 2016 is probably required.
Example 1.
before
after
Example 2.
before
after
Example 3
before
after
Example 4
before
after
cc @timotheecour @narimiran