diff options
author | Quentin Schulz <quentin.schulz@theobroma-systems.com> | 2024-03-28 16:07:14 +0100 |
---|---|---|
committer | Steve Sakoman <steve@sakoman.com> | 2024-04-19 04:50:39 -0700 |
commit | 9d7485f8bfb4da8f5ddf38eb40e7621e2b7fac8b (patch) | |
tree | df4003ce8e40c7165f07834168c5dc7ea07fd1eb | |
parent | 73955d99545bba79dd4ed67560ffc129c50b117d (diff) | |
download | poky-9d7485f8bfb4da8f5ddf38eb40e7621e2b7fac8b.tar.gz |
docs: conf.py: properly escape backslashes for latex_elements
There are some syntax warnings returned by Python:
"""
yocto-docs/documentation/conf.py:162: SyntaxWarning: invalid escape sequence '\P'
'passoptionstopackages': '\PassOptionsToPackage{bookmarksdepth=5}{hyperref}',
yocto-docs/documentation/conf.py:163: SyntaxWarning: invalid escape sequence '\s'
'preamble': '\setcounter{tocdepth}{2}',
"""
Backslashes must be doubled in Python string literals to avoid
interpretation as escape sequence, c.f.
https://www.sphinx-doc.org/en/master/latex.html#module-latex.
Cc: Quentin Schulz <foss+yocto@0leil.net>
(From yocto-docs rev: 037f99339a4bae60f41f89df37911690b507c9a1)
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Reviewed-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r-- | documentation/conf.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/documentation/conf.py b/documentation/conf.py index 5ff5ec8655..83cf829e6a 100644 --- a/documentation/conf.py +++ b/documentation/conf.py | |||
@@ -159,8 +159,8 @@ html_last_updated_fmt = '%b %d, %Y' | |||
159 | html_secnumber_suffix = " " | 159 | html_secnumber_suffix = " " |
160 | 160 | ||
161 | latex_elements = { | 161 | latex_elements = { |
162 | 'passoptionstopackages': '\PassOptionsToPackage{bookmarksdepth=5}{hyperref}', | 162 | 'passoptionstopackages': '\\PassOptionsToPackage{bookmarksdepth=5}{hyperref}', |
163 | 'preamble': '\setcounter{tocdepth}{2}', | 163 | 'preamble': '\\setcounter{tocdepth}{2}', |
164 | } | 164 | } |
165 | 165 | ||
166 | # Make the EPUB builder prefer PNG to SVG because of issues rendering Inkscape SVG | 166 | # Make the EPUB builder prefer PNG to SVG because of issues rendering Inkscape SVG |