Files
sphinx/tests/roots/test-latex-table/expects/simple_table.tex
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

31 lines
435 B
TeX

\label{\detokenize{tabular:simple-table}}
\begin{savenotes}\sphinxattablestart
\centering
\begin{tabulary}{\linewidth}[t]{|T|T|}
\hline
\sphinxstyletheadfamily
header1
&\sphinxstyletheadfamily
header2
\\
\hline
cell1\sphinxhyphen{}1
&
cell1\sphinxhyphen{}2
\\
\hline
cell2\sphinxhyphen{}1
&
cell2\sphinxhyphen{}2
\\
\hline
cell3\sphinxhyphen{}1
&
cell3\sphinxhyphen{}2
\\
\hline
\end{tabulary}
\par
\sphinxattableend\end{savenotes}