summaryrefslogtreecommitdiff
path: root/doc/latex.rst
diff options
context:
space:
mode:
authorjfbu <jfbu@free.fr>2019-11-06 18:42:52 +0100
committerjfbu <jfbu@free.fr>2019-11-06 18:59:09 +0100
commita550c7075fcbeb9bcb37ec5546a42f811bb2ee1d (patch)
tree4ae90a8cbdf633bf7dca3488a89bd234aeb667a2 /doc/latex.rst
parent59a1b06757a31a6b457eb0a938a33c31197f6a4c (diff)
downloadsphinx-git-a550c7075fcbeb9bcb37ec5546a42f811bb2ee1d.tar.gz
LaTeX: Allow linebreaks at \ (in literals, code-blocks, parsed-literal)
Default configuration is to allow the linebreak after the backslash. It is possible at user side via 'preamble' key and some LaTeX code to allow the linebreak before the backslash, but each of inline-literal, code-block, and parsed-literal has its more or less cumbersome way for that. Closes: #6000, #6001 This commit handles only the \ character, which had been left aside by accident so far. Inline-literals could break at more characters but this is not yet done in this commit. In this context, in future it could be useful to modify sphinx.util.texescape to use mark-up such as \sphinxtextbackslash rather than naked \textbackslash and similarly for some other characters. This could then be used to allow linebreaks even in regular text paragraphs.
Diffstat (limited to 'doc/latex.rst')
-rw-r--r--doc/latex.rst7
1 files changed, 5 insertions, 2 deletions
diff --git a/doc/latex.rst b/doc/latex.rst
index 7321f964b..01c0e0cb8 100644
--- a/doc/latex.rst
+++ b/doc/latex.rst
@@ -619,12 +619,15 @@ macros may be significant.
default ``true``. Allows linebreaks inside inline literals: but extra
potential break-points (additionally to those allowed by LaTeX at spaces
or for hyphenation) are currently inserted only after the characters
- ``. , ; ? ! /``. Due to TeX internals, white space in the line will be
- stretched (or shrunk) in order to accomodate the linebreak.
+ ``. , ; ? ! /`` and ``\``. Due to TeX internals, white space in the line
+ will be stretched (or shrunk) in order to accomodate the linebreak.
.. versionadded:: 1.5
set this option value to ``false`` to recover former behaviour.
+ .. versionchanged:: 2.3.0
+ added potential breakpoint at ``\`` characters.
+
``verbatimvisiblespace``
default ``\textcolor{red}{\textvisiblespace}``. When a long code line is
split, the last space character from the source code line right before the