All of lore.kernel.org
 help / color / mirror / Atom feed
From: michael.opdenacker@bootlin.com
To: docs@lists.yoctoproject.org
Cc: Michael Opdenacker <michael.opdenacker@bootlin.com>,
	Quentin Schulz <foss+yocto@0leil.net>,
	Quentin Schulz <quentin.schulz@theobroma-systems.com>
Subject: [kirkstone][PATCH 2/9] docs: conf.py: properly escape backslashes for latex_elements
Date: Sun, 14 Apr 2024 20:20:04 +0200	[thread overview]
Message-ID: <20240414182011.994356-3-michael.opdenacker@bootlin.com> (raw)
In-Reply-To: <20240414182011.994356-1-michael.opdenacker@bootlin.com>

From: Michael Opdenacker <michael.opdenacker@bootlin.com>

From: Quentin Schulz <quentin.schulz@theobroma-systems.com>

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>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Reviewed-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
---
 documentation/conf.py | 4 ++--
 1 file 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'
 html_secnumber_suffix = " "
 
 latex_elements = {
-    'passoptionstopackages': '\PassOptionsToPackage{bookmarksdepth=5}{hyperref}',
-    'preamble': '\setcounter{tocdepth}{2}',
+    'passoptionstopackages': '\\PassOptionsToPackage{bookmarksdepth=5}{hyperref}',
+    'preamble': '\\setcounter{tocdepth}{2}',
 }
 
 # Make the EPUB builder prefer PNG to SVG because of issues rendering Inkscape SVG
-- 
2.34.1



  parent reply	other threads:[~2024-04-14 18:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-14 18:20 [kirkstone][PATCH 0/9] documentation backports michael.opdenacker
2024-04-14 18:20 ` [kirkstone][PATCH 1/9] release-notes-4.0.17: reorder CVEs michael.opdenacker
2024-04-14 18:20 ` michael.opdenacker [this message]
2024-04-14 18:20 ` [kirkstone][PATCH 3/9] manuals: refer to new yocto-patches mailing list wherever appropriate michael.opdenacker
2024-04-14 18:20 ` [kirkstone][PATCH 4/9] manuals: fix duplicate "stylecheck" target michael.opdenacker
2024-04-14 18:20 ` [kirkstone][PATCH 5/9] manuals: add initial sphinx-lint support michael.opdenacker
2024-04-14 18:20 ` [kirkstone][PATCH 6/9] manuals: fix trailing spaces michael.opdenacker
2024-04-14 18:20 ` [kirkstone][PATCH 7/9] manuals: fix incorrect double backticks michael.opdenacker
2024-04-14 18:20 ` [kirkstone][PATCH 8/9] kernel-dev: join mkdir commands with -p michael.opdenacker
2024-04-14 18:20 ` [kirkstone][PATCH 9/9] manuals: remove tab characters michael.opdenacker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240414182011.994356-3-michael.opdenacker@bootlin.com \
    --to=michael.opdenacker@bootlin.com \
    --cc=docs@lists.yoctoproject.org \
    --cc=foss+yocto@0leil.net \
    --cc=quentin.schulz@theobroma-systems.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.