Commit Graph
100 Commits
Author SHA1 Message Date
jfbu e49e98a9fa Update CHANGES for PR #6891 2019-12-15 14:27:30 +01:00
jfbu 30b26dd6a1 LaTeX: avoid quotes and TeX ligature replacements in PDF output
Refs: #6890

The comma character is not TeX-escaped because it is frequent in general
text and escaping it would make the LaTeX output larger for only dealing
with the problem of the LaTeX-ligature of ,, into a single character.
And one there is problem with the commas in options to Verbatim from
PygmentsBridge.

The hyphen character is escaped (not in ids and URIs!) to
\sphinxhyphen{} for both Unicode and non-Unicode engines. This is needed
to work around hyperref transforming -- and --- from section titles into
EN DASH resp. EM DASH in PDF bookmarks.

https://github.com/latex3/hyperref/issues/112

Note to expert LaTeX users: if Sphinx latex user with xelatex has

- turned off Smart Quotes for some reason,

- but does want TeX ligatures and thus overrode Sphinx
latex_elements['fontenc'] default (since #6888) to this effect,

then this should be added to LaTeX preamble:

    \def\sphinxhyphen#1{-}% (\protected is now not needed)
    \let\sphinxhyphenforbookmarks\sphinxhyphen
2019-12-15 14:19:50 +01:00
jfbu 2199a127e8 Typo (refs #6491) 2019-12-09 22:57:45 +01:00
Jean-François B 85676f401b Merge pull request #6904 from ollehu/2.0
Add sphinxcontrib-beamer to list of extensions for 2.x release.
2019-12-09 13:43:29 +01:00
Jean-François B 7a98c2bfa1 Merge pull request #6888 from jfbu/xelatex_6886
LaTeX: inhibit so-called TeX Ligatures with xelatex and lualatex
2019-12-07 16:43:18 +01:00
jfbu 73a2228c87 Update 'fontenc' latex_elements key documentation 2019-12-07 12:27:21 +01:00
jfbu a0fe0aba1b Update longtable latex template 2019-12-07 00:37:33 +01:00
jfbu bc1557528f LaTeX: inhibit so-called TeX Ligatures with xelatex and lualatex
Closes: #6886

It is difficult to understand why fontspec _by default_ turns straight
double quotes " into ” i.e. right curly ones, calling this "TeX
ligature", but that's life and fortunately fontspec also provides a way
to turn this off. With this workaround also a straight ' in LaTeX file,
(i.e. a straight ' in source and smartquotes = False was used) will not
become a curly quote and this is an advantage compared to the pdflatex
situation.

We suppress TeX Ligatures also for \ttfamily (used in code-blocks) but
that appears to be already the case with fontspec although user manual
does not seem explicit (and no list of what exactly the TeX Ligatures
are is to be found in fontspec user documentation, one has to go into
its source code). (the fact that Pygmentize escapes the " to \char`\"
TeX mark-up would not by itself prevent the transformation into a curly
double quote, it is because fontspec does not apply this transform to
monospace typeface that it did not show).
2019-12-05 00:21:19 +01:00
Jean-François B c235a43007 Merge pull request #6877 from jfbu/latex_6876
LaTeX: avoid ragged line endings in case of multi-line author display
2019-12-01 10:02:13 +01:00
jfbu 204c230c73 LaTeX: avoid ragged line endings in case of multi-line author display
Closes #6876
2019-11-30 23:49:57 +01:00
jfbu dc53404d48 Fix markup issue in our docs 2019-11-26 14:22:17 +01:00
jfbu d398959230 Fix typo in docs 2019-11-26 14:11:40 +01:00
jfbu d9bd9c4098 Fix typo in LaTeX code comment
modified:   sphinx/texinputs/sphinxmulticell.sty
2019-11-22 21:23:07 +01:00
jfbu 70f087990b DOC: add Greek to list of supported languages 2019-11-22 19:15:59 +01:00
Jean-François B 9f7c7a34db Merge pull request #6845 from jfbu/latex_do_not_escape_verticalbarchar
LaTeX: stop escaping | to LaTeX macro, except if in an index entry
2019-11-18 21:39:43 +01:00
jfbu 30c7af788c LaTeX: revert in index entries to \textbar{} not \sphinxtextbar{}
This is because of case of an index directive or role in a table cell.
For the same reason tabulary is not compatible with code-cells,
it affects index entries. The escaping of | char by a LaTeX macro
needed to be by a "robus" or "protected" one, or by string like {"|}.
This was not the choice of previous commit, by oversight.

By reverting to \textbar{} (which is a "robust" command) we also
maintain maximal backwards compatibility for the sorting in the
index done by the makeindex program.
2019-11-18 21:23:06 +01:00
Jean-François B 2b285a2911 Merge pull request #6846 from jfbu/latex_texteuro
LaTeX: Do not escape € wrongly (refs: 0103ff2a2b, #6835)
2019-11-18 19:56:15 +01:00
jfbu cf376bb455 LaTeX: Do not escape € wrongly (refs: 0103ff2a2b, #6835) 2019-11-18 14:48:18 +01:00
jfbu e720f0a1a2 LaTeX: stop escaping | to LaTeX macro, except if in an index entry 2019-11-18 01:57:07 +01:00
Jean-François B 53cd2a064e Merge pull request #6835 from jfbu/latex_unicode_reduce_tex_escape
LaTeX: escape fewer Unicode chars if engine is lualatex or xelatex
2019-11-16 11:42:21 +01:00
jfbu 38926cf708 LaTeX: escape fewer Unicode chars if engine is lualatex or xelatex 2019-11-16 10:36:41 +01:00
Jean-François B ef09ea23fe Merge pull request #6750 from tk0miya/6738_new_escape_for_unicode_latex_engine
Fix #6738: Do not replace unicode characters by LaTeX macros on unicode supported LaTeX engine
2019-11-15 19:10:22 +01:00
Jean-François B b070e5be52 Merge branch '2.0' into 6738_new_escape_for_unicode_latex_engine 2019-11-15 19:09:16 +01:00
Jean-François B d09c681351 Merge pull request #6810 from jfbu/6809_code_block_in_danger
LaTeX: fix #6809
2019-11-15 09:47:45 +01:00
jfbu b6cb5dd219 Trim possibly erroneous comment from Sphinx LaTeX code 2019-11-15 09:46:23 +01:00
jfbu 53ead2a0d9 LaTeX: fix #6809 2019-11-15 09:46:23 +01:00
Jean-François B 2e68d76244 Merge pull request #6807 from jfbu/6804_long_code_block_in_danger
LaTeX: fix #6804
2019-11-15 09:29:29 +01:00
jfbu e6ba2fe6d7 Update CHANGES 2019-11-10 13:45:22 +01:00
jfbu d247299a88 LaTeX: fix #6804
In case a code-block is in an environment already using the "framed"
package, measure the vertical size needed for the code lines and use a
nested "framed" only if short enough (i.e. at most 90% of text area on a
page).

Long nested contents will drop the inner frame. They lose the background
color as well as the continuation hints across pagebreaks. But the
caption if present is typeset normally. And highlighted lines and line
numbers are rendered with no alteration.

Short nested contents (should) render exactly as before this commit:
they use "framed" but this must be encapsulated in an unbreakable
"minipage". All decoration including caption are obeyed but of course
not the continuation hints are these never apply.
2019-11-10 12:58:47 +01:00
Jean-François B a7f53a7957 Merge pull request #6799 from jfbu/6000_latex_backslash
LaTeX: Allow linebreaks at \ (in literals, code-blocks, parsed-literal)
2019-11-07 17:30:58 +01:00
jfbu a550c7075f 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.
2019-11-06 18:59:09 +01:00
jfbu 59a1b06757 Merge branch '2.2.2' into 2.0 2019-11-06 18:29:07 +01:00
Jean-François B 2ebdd0daac Merge pull request #6778 from jfbu/6776_latex_october_2019
Fix #6776: 2019-10-01 LaTeX release breaks sphinxcyrillic.sty
2019-10-29 09:18:27 +01:00
jfbu ca06005caf Drop addition of X2 to LaTeX test to avoid extra dependencies for CI
This can be reverted if adding the extra dependencies is deemed worth
it, but it means having to look at Debian packaging and currently means
adding texlive-lang-cyrillic as requirement
2019-10-28 18:52:07 +01:00
jfbu 0c6ffa42a5 Fix #6776: 2019-10-01 LaTeX release breaks sphinxcyrillic.sty 2019-10-28 17:15:19 +01:00
Jean-François B d000de6e99 Merge pull request #6711 from jfbu/latex_greekfix
Add latexpdf support for Greek as main language (via xelatex use)
2019-10-08 14:20:01 +02:00
jfbu 6a1ea849c2 Remove superfluous `or ''` from a conditional 2019-10-06 21:18:38 +02:00
jfbu 7a7cb6d418 Merge branch '2.2.1' into latex_greekfix 2019-10-06 21:15:50 +02:00
jfbu 7be68b7c4b Add latexpdf support for Greek as main language (via xelatex use)
Closes: #6710
2019-10-01 10:27:43 +02:00
jfbu e8963e84ed Merge branch '2.2.1' into 2.0
Resolved Conflicts:
	CHANGES
	sphinx/__init__.py
	sphinx/texinputs/sphinx.sty
2019-09-14 15:25:44 +02:00
Jean-François B 59890a3b6d Merge pull request #6683 from jfbu/latex_6641
Fix #6641: Undefined control sequence \sphinxmaketitle
2019-09-14 15:17:10 +02:00
Jean-François B e944a55517 Merge pull request #6681 from jfbu/latex_6668
Fix #6668: LaTeX: Longtable before header has incorrect distance
2019-09-06 10:05:48 +02:00
Jean-François B d51142bdf0 Merge branch '2.0' into latex_6668 2019-09-06 09:58:59 +02:00
jfbu fcba6b68fc Update CHANGES for PR #6633 2019-09-05 09:26:05 +02:00
Jean-François B 53bbc27f1f Merge pull request #6633 from sebhub/fix-6618
LaTeX: Avoid section titles at the end of a page
2019-09-05 09:23:11 +02:00
jfbu d95f6d103c Fix mark-up in CHANGES 2019-09-03 17:04:18 +02:00
jfbu 37cb8ba147 Fix #6641: Undefined control sequence \sphinxmaketitle 2019-09-02 21:53:47 +02:00
jfbu 655e949b3a Fix #6668: LaTeX: Longtable before header has incorrect distance 2019-09-01 22:58:14 +02:00
jfbu 4ae5414ee5 Update our docs for imgmath_latex (refs: #6610) 2019-08-03 12:00:24 +02:00
jfbu 4732ec5edf Fix type annotation 2019-08-01 18:30:15 +02:00
jfbu 7c59e44eaa Fix version changed info in our document for imgmath 2019-08-01 18:24:28 +02:00
jfbu 365574f052 Fix error in cherry-picking #6310 to 2.0 2019-08-01 18:05:57 +02:00
jfbu 763908c75a Update CHANGES for cherry-picked #6310 2019-08-01 17:52:28 +02:00
jfbu bfe921b3b2 Add Python3 type annotation to cherry-picked #6310 for 2.2.0 release 2019-08-01 17:52:28 +02:00
jfbu da3763170e Reorganize documentation of the imgmath configuration variables 2019-08-01 17:52:28 +02:00
jfbu 505ff622c2 More robust code for getting saved "depth" of svg inline math snippet 2019-08-01 17:52:28 +02:00
jfbu 1adf12bfa7 Make imgmath_use_preview work also for svg output 2019-08-01 17:52:28 +02:00
jfbu e028a6e34c Update CHANGES for PR #6533 2019-06-29 19:45:37 +02:00
Jean-François B 3eeec09dd5 Merge pull request #6533 from jfbu/latex_sphinxsetlistlabels
LaTeX: refactor visit_enumerated_list() to use \sphinxsetlistlabels
2019-06-29 19:41:01 +02:00
jfbu 65739a46ad LaTeX: refactor visit_enumerated_list() to use \sphinxsetlistlabels
Fixes: #6511
2019-06-29 19:27:40 +02:00
Jean-François B 80a34a4b98 Merge pull request #6443 from jfbu/latex_note_fixallowbreak
LaTeX: prevent pagebrak separating note from section title
2019-06-05 17:10:37 +02:00
jfbu 40678562df Merge branch '2.1.1' into latex_note_fixallowbreak 2019-06-05 17:09:56 +02:00
jfbu bf0ad9e80c LaTeX: prevent pagebrak separating note from section title
Fixes: #6442
2019-06-04 13:57:24 +02:00
jfbu fea3e639da Update CHANGES for PR #6364 2019-05-24 17:05:53 +02:00
Jean-François B 96da68d948 Merge pull request #6364 from wallento/fix-latex-figure-in-admonition
Fix latex figure in admonition
2019-05-24 16:56:09 +02:00
jfbu 3e5adaa225 Update CHANGES for #6303 2019-05-13 15:03:53 +09:00
jfbu 7cc1ebd28e Partially revert #6232, synchronize new Makefile with old (refs: #4092) 2019-05-13 15:00:32 +09:00
Jean-François B 2c68bba44c Merge pull request #6339 from jfbu/imgmath_template_cleanup
imgmath: Replace utf8x by utf8 in templates for latex snippets
2019-05-06 12:39:12 +02:00
jfbu f8c3c74638 imgmath: Replace utf8x by utf8 in templates for latex snippets 2019-05-06 12:31:21 +02:00
jfbu 1c45b0a186 Improve deprecation warning message (refs: #5878) 2019-04-28 09:59:37 +02:00
jfbu 80e50c1938 Fix template mark-up (refs: #6308) 2019-04-23 15:12:36 +02:00
jfbu 5371ef9c03 Fix capitalization to match other messages 2019-04-17 10:19:27 +02:00
jfbu 6009140f22 Fix a dvisvgm link in docs and add preview-latex link 2019-04-17 10:07:30 +02:00
jfbu 3cd9a74ab5 Update CHANGES for #6305 2019-04-15 16:49:37 +02:00
Jean-François B d0d883c9a3 Merge pull request #6305 from jfbu/fix_quickstart_string
Fix the string in quickstart for 'path' argument of parser
2019-04-15 16:46:38 +02:00
jfbu f1a8819c08 Fix the string in quickstart for 'path' argument of parser 2019-04-14 18:54:39 +02:00
jfbu a46d4c9bca Improve documentation formatting for Sphinx LaTeX environments 2019-04-12 19:30:31 +02:00
jfbu f8f4ce8bce Better format documentation of \sphinx... LaTeX macros 2019-04-12 19:21:34 +02:00
jfbu 9ecd42574d Documentation of smartquotes_excludes (and smartquotes_action) 2019-04-12 18:34:10 +02:00
Jean-François B ed86ada661 Merge pull request #5992 from jfbu/latex_safe_graphics
LaTeX: safer image inclusion
2019-02-05 18:03:07 +01:00
jfbu 87058e6783 Remove from test never executed print(result) debugging info 2019-02-05 17:51:13 +01:00
jfbu 0d72052141 Merge branch 'master' into latex_safe_graphics 2019-02-05 17:46:00 +01:00
jfbu 3e0c65a245 Merge branch '1.8' 2019-02-04 12:52:52 +01:00
Jean-François B b68d1d1066 Merge pull request #6005 from jfbu/latex_space_after_author
LaTeX: remove extra space after author on title page in PDF
2019-02-04 12:23:14 +01:00
jfbu decca71ef7 LaTeX: remove extra space after author on title page in PDF
Closes: #6004

Comment: \begin{tabular}[@{}c@{}] does not work in case of multiple
authors separated by \and in latex_documents, because latex has this
definition of \and :

macro:->\end {tabular}\hskip 1em \@plus .17fil\begin {tabular}[t]{c}

which means we would need to modify it to read

macro:->\end {tabular}\hskip 1em \@plus .17fil\begin {tabular}[t]{@{}c@{}}

(or only one @{} at end) modifying space between two authors.
2019-02-03 17:07:26 +01:00
jfbu 669f9c3a13 LaTeX: safer image inclusion
Closes: #5956
2019-01-29 11:15:49 +01:00
jfbu f2536b145e Merge branch '1.8' 2019-01-22 09:45:11 +01:00
Jean-François B a11a74287f Merge pull request #5964 from jfbu/latex_parskip
Closes: #5960
2019-01-22 09:35:44 +01:00
jfbu ff5031c96e Merge branch '1.8'
Resolved Conflicts:
	sphinx/writers/latex.py
2019-01-17 17:26:51 +01:00
jfbu 2a9bd41789 Closes: #5960
Mumble
2019-01-17 17:11:53 +01:00
Jean-François B 0fb0b41701 Merge pull request #5955 from jfbu/latex_remove_scalebox
LaTeX: remove usage of \scalebox by incorporating scale in height/width
2019-01-17 17:01:36 +01:00
jfbu ecf5d7622b Make mypy happy, but I protest !
modified:   sphinx/writers/latex.py
2019-01-14 16:44:35 +01:00
jfbu e7aee6e82a LaTeX: remove usage of \scalebox by incorporating scale in height/width
Closes: #5954
2019-01-14 16:04:04 +01:00
jfbu 7e851510eb Fix duplicate reference (my wrong, refs: #5919) 2019-01-13 10:52:42 +01:00
jfbu 75afed1549 Merge branch '1.8' 2019-01-13 10:37:34 +01:00
Jean-François B 6e7e069283 Merge pull request #5939 from jfbu/latex_fix_tall_image_in_admonition
LaTeX: \sphinxsafeincludegraphics for sphinxShadowBox/sphinxheavybox
2019-01-13 10:35:26 +01:00
jfbu 51a5447117 LaTeX: \sphinxsafeincludegraphics for sphinxShadowBox/sphinxheavybox
Fixes: #5936
2019-01-12 16:31:53 +01:00
Jean-François B a8feb0bec8 Merge pull request #5919 from jfbu/latex_docs
[DOC] Move description of latex_elements to latex.rst
2019-01-12 11:05:50 +01:00
jfbu ad8205bb0b [DOC] Move description of latex_elements to latex.rst 2019-01-10 16:48:03 +01:00
Jean-François B 214f75800f Merge pull request #5918 from jfbu/latex_verbatimenvironment_macro
LaTeX: no need for \sphinxVerbatimEnvironment (refactoring)
2019-01-10 14:43:57 +01:00