Fix suppression of needed whiteline, encapsulate into \sphinxAtStartPar

Define it to do nothing with lualatex engine
This commit is contained in:
jfbu 2021-01-29 10:09:36 +01:00
parent 185a2d27fe
commit d6e11b89e9
28 changed files with 468 additions and 247 deletions

View File

@ -1024,6 +1024,14 @@ Environments
Miscellany
~~~~~~~~~~
- Every text paragraph in document body starts with `\sphinxAtStartPar`.
Currently, this is used to insert a zero width horizontal skip which
is a trick to allow TeX hyphenation of the first word of a paragraph
in a narrow context (like a table cell). For ``'lualatex'`` which
does not need the trick, the `\sphinxAtStartPar` does nothing.
.. versionadded:: 3.5.0
- The section, subsection, ... headings are set using *titlesec*'s
``\titleformat`` command.

View File

@ -410,6 +410,11 @@
\DisableKeyvalOption{sphinx}{numfigreset}
\DisableKeyvalOption{sphinx}{nonumfigreset}
\DisableKeyvalOption{sphinx}{mathnumfig}
% To allow hyphenation of first word in narrow contexts; no option,
% customization to be done via 'preamble' key
\newcommand*\sphinxAtStartPar{\hskip\z@skip}
% No need for the \hspace{0pt} trick (\hskip\z@skip) with luatex
\ifdefined\directlua\let\sphinxAtStartPar\@empty\fi
% user interface: options can be changed midway in a document!
\newcommand\sphinxsetup[1]{\setkeys{sphinx}{#1}}

View File

@ -1161,9 +1161,9 @@ class LaTeXTranslator(SphinxTranslator):
# (first one is label node)
pass
else:
# the \hskip0pt\relax is to allow hyphenation of first word of
# the \sphinxAtStartPar is to allow hyphenation of first word of
# a paragraph in narrow contexts such as in a table cell
self.body.append('\\hskip0pt\\relax\n')
self.body.append('\n\\sphinxAtStartPar\n')
def depart_paragraph(self, node: Element) -> None:
self.body.append('\n')

View File

@ -1,14 +1,18 @@
\hskip0pt\relax
\sphinxAtStartPar
Equation without a label.
\begin{equation*}
\begin{split}E = mc^2\end{split}
\end{equation*}\hskip0pt\relax
\end{equation*}
\sphinxAtStartPar
Equation with label.
\begin{equation}\label{equation:equations:test}
\begin{split}E = hv\end{split}
\end{equation}\hskip0pt\relax
\end{equation}
\sphinxAtStartPar
Second equation without label.
\begin{equation*}
\begin{split}c^2 = a^2 + b^2\end{split}
\end{equation*}\hskip0pt\relax
\end{equation*}
\sphinxAtStartPar
Equation with label \eqref{equation:equations:test} is important.

View File

@ -1,10 +1,13 @@
\label{\detokenize{complex:complex-spanning-cell}}\hskip0pt\relax
\label{\detokenize{complex:complex-spanning-cell}}
\sphinxAtStartPar
table having …
\begin{itemize}
\item {} \hskip0pt\relax
\item {}
\sphinxAtStartPar
consecutive multirow at top of row (1\sphinxhyphen{}1 and 1\sphinxhyphen{}2)
\item {} \hskip0pt\relax
\item {}
\sphinxAtStartPar
consecutive multirow at end of row (1\sphinxhyphen{}4 and 1\sphinxhyphen{}5)
\end{itemize}
@ -16,30 +19,35 @@ consecutive multirow at end of row (1\sphinxhyphen{}4 and 1\sphinxhyphen{}5)
\hline
\sphinxmultirow{3}{1}{%
\begin{varwidth}[t]{\sphinxcolwidth{1}{5}}
\hskip0pt\relax
\sphinxAtStartPar
cell1\sphinxhyphen{}1
\par
\vskip-\baselineskip\vbox{\hbox{\strut}}\end{varwidth}%
}%
&\sphinxmultirow{3}{2}{%
\begin{varwidth}[t]{\sphinxcolwidth{1}{5}}
\hskip0pt\relax
\sphinxAtStartPar
cell1\sphinxhyphen{}2
\par
\vskip-\baselineskip\vbox{\hbox{\strut}}\end{varwidth}%
}%
&\hskip0pt\relax
&
\sphinxAtStartPar
cell1\sphinxhyphen{}3
&\sphinxmultirow{3}{4}{%
\begin{varwidth}[t]{\sphinxcolwidth{1}{5}}
\hskip0pt\relax
\sphinxAtStartPar
cell1\sphinxhyphen{}4
\par
\vskip-\baselineskip\vbox{\hbox{\strut}}\end{varwidth}%
}%
&\sphinxmultirow{2}{5}{%
\begin{varwidth}[t]{\sphinxcolwidth{1}{5}}
\hskip0pt\relax
\sphinxAtStartPar
cell1\sphinxhyphen{}5
\par
\vskip-\baselineskip\vbox{\hbox{\strut}}\end{varwidth}%
@ -47,13 +55,15 @@ cell1\sphinxhyphen{}5
\\
\cline{3-3}\sphinxtablestrut{1}&\sphinxtablestrut{2}&\sphinxmultirow{2}{6}{%
\begin{varwidth}[t]{\sphinxcolwidth{1}{5}}
\hskip0pt\relax
\sphinxAtStartPar
cell2\sphinxhyphen{}3
\par
\vskip-\baselineskip\vbox{\hbox{\strut}}\end{varwidth}%
}%
&\sphinxtablestrut{4}&\sphinxtablestrut{5}\\
\cline{5-5}\sphinxtablestrut{1}&\sphinxtablestrut{2}&\sphinxtablestrut{6}&\sphinxtablestrut{4}&\hskip0pt\relax
\cline{5-5}\sphinxtablestrut{1}&\sphinxtablestrut{2}&\sphinxtablestrut{6}&\sphinxtablestrut{4}&
\sphinxAtStartPar
cell3\sphinxhyphen{}5
\\
\hline

View File

@ -4,51 +4,62 @@
\centering
\begin{tabulary}{\linewidth}[t]{|T|T|T|}
\hline
\sphinxstyletheadfamily \hskip0pt\relax
\sphinxstyletheadfamily
\sphinxAtStartPar
header1
&\sphinxstyletheadfamily \hskip0pt\relax
&\sphinxstyletheadfamily
\sphinxAtStartPar
header2
&\sphinxstyletheadfamily \hskip0pt\relax
&\sphinxstyletheadfamily
\sphinxAtStartPar
header3
\\
\hline\hskip0pt\relax
\hline
\sphinxAtStartPar
cell1\sphinxhyphen{}1
&\sphinxmultirow{2}{5}{%
\begin{varwidth}[t]{\sphinxcolwidth{1}{3}}
\hskip0pt\relax
\sphinxAtStartPar
cell1\sphinxhyphen{}2
\par
\vskip-\baselineskip\vbox{\hbox{\strut}}\end{varwidth}%
}%
&\hskip0pt\relax
&
\sphinxAtStartPar
cell1\sphinxhyphen{}3
\\
\cline{1-1}\cline{3-3}\sphinxmultirow{2}{7}{%
\begin{varwidth}[t]{\sphinxcolwidth{1}{3}}
\hskip0pt\relax
\sphinxAtStartPar
cell2\sphinxhyphen{}1
\par
\vskip-\baselineskip\vbox{\hbox{\strut}}\end{varwidth}%
}%
&\sphinxtablestrut{5}&\hskip0pt\relax
&\sphinxtablestrut{5}&
\sphinxAtStartPar
cell2\sphinxhyphen{}3
\\
\cline{2-3}\sphinxtablestrut{7}&\sphinxstartmulticolumn{2}%
\sphinxmultirow{2}{9}{%
\begin{varwidth}[t]{\sphinxcolwidth{2}{3}}
\hskip0pt\relax
\sphinxAtStartPar
cell3\sphinxhyphen{}2
\par
\vskip-\baselineskip\vbox{\hbox{\strut}}\end{varwidth}%
}%
\sphinxstopmulticolumn
\\
\cline{1-1}\hskip0pt\relax
\cline{1-1}
\sphinxAtStartPar
cell4\sphinxhyphen{}1
&\multicolumn{2}{l|}{\sphinxtablestrut{9}}\\
\hline\sphinxstartmulticolumn{3}%
\begin{varwidth}[t]{\sphinxcolwidth{3}{3}}
\hskip0pt\relax
\sphinxAtStartPar
cell5\sphinxhyphen{}1
\par
\vskip-\baselineskip\vbox{\hbox{\strut}}\end{varwidth}%

View File

@ -2,9 +2,11 @@
\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{|l|l|}
\hline
\sphinxstyletheadfamily \hskip0pt\relax
\sphinxstyletheadfamily
\sphinxAtStartPar
header1
&\sphinxstyletheadfamily \hskip0pt\relax
&\sphinxstyletheadfamily
\sphinxAtStartPar
header2
\\
\hline
@ -13,9 +15,11 @@ header2
\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline
\sphinxstyletheadfamily \hskip0pt\relax
\sphinxstyletheadfamily
\sphinxAtStartPar
header1
&\sphinxstyletheadfamily \hskip0pt\relax
&\sphinxstyletheadfamily
\sphinxAtStartPar
header2
\\
\hline
@ -26,19 +30,25 @@ header2
\endfoot
\endlastfoot
\hskip0pt\relax
\sphinxAtStartPar
cell1\sphinxhyphen{}1
&\hskip0pt\relax
&
\sphinxAtStartPar
cell1\sphinxhyphen{}2
\\
\hline\hskip0pt\relax
\hline
\sphinxAtStartPar
cell2\sphinxhyphen{}1
&\hskip0pt\relax
&
\sphinxAtStartPar
cell2\sphinxhyphen{}2
\\
\hline\hskip0pt\relax
\hline
\sphinxAtStartPar
cell3\sphinxhyphen{}1
&\hskip0pt\relax
&
\sphinxAtStartPar
cell3\sphinxhyphen{}2
\\
\hline

View File

@ -2,9 +2,11 @@
\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[r]{|l|l|}
\hline
\sphinxstyletheadfamily \hskip0pt\relax
\sphinxstyletheadfamily
\sphinxAtStartPar
header1
&\sphinxstyletheadfamily \hskip0pt\relax
&\sphinxstyletheadfamily
\sphinxAtStartPar
header2
\\
\hline
@ -13,9 +15,11 @@ header2
\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline
\sphinxstyletheadfamily \hskip0pt\relax
\sphinxstyletheadfamily
\sphinxAtStartPar
header1
&\sphinxstyletheadfamily \hskip0pt\relax
&\sphinxstyletheadfamily
\sphinxAtStartPar
header2
\\
\hline
@ -26,19 +30,25 @@ header2
\endfoot
\endlastfoot
\hskip0pt\relax
\sphinxAtStartPar
cell1\sphinxhyphen{}1
&\hskip0pt\relax
&
\sphinxAtStartPar
cell1\sphinxhyphen{}2
\\
\hline\hskip0pt\relax
\hline
\sphinxAtStartPar
cell2\sphinxhyphen{}1
&\hskip0pt\relax
&
\sphinxAtStartPar
cell2\sphinxhyphen{}2
\\
\hline\hskip0pt\relax
\hline
\sphinxAtStartPar
cell3\sphinxhyphen{}1
&\hskip0pt\relax
&
\sphinxAtStartPar
cell3\sphinxhyphen{}2
\\
\hline

View File

@ -4,9 +4,11 @@
\sphinxthelongtablecaptionisattop
\caption{caption for longtable\strut}\label{\detokenize{longtable:id1}}\\*[\sphinxlongtablecapskipadjust]
\hline
\sphinxstyletheadfamily \hskip0pt\relax
\sphinxstyletheadfamily
\sphinxAtStartPar
header1
&\sphinxstyletheadfamily \hskip0pt\relax
&\sphinxstyletheadfamily
\sphinxAtStartPar
header2
\\
\hline
@ -15,9 +17,11 @@ header2
\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline
\sphinxstyletheadfamily \hskip0pt\relax
\sphinxstyletheadfamily
\sphinxAtStartPar
header1
&\sphinxstyletheadfamily \hskip0pt\relax
&\sphinxstyletheadfamily
\sphinxAtStartPar
header2
\\
\hline
@ -28,19 +32,25 @@ header2
\endfoot
\endlastfoot
\hskip0pt\relax
\sphinxAtStartPar
cell1\sphinxhyphen{}1
&\hskip0pt\relax
&
\sphinxAtStartPar
cell1\sphinxhyphen{}2
\\
\hline\hskip0pt\relax
\hline
\sphinxAtStartPar
cell2\sphinxhyphen{}1
&\hskip0pt\relax
&
\sphinxAtStartPar
cell2\sphinxhyphen{}2
\\
\hline\hskip0pt\relax
\hline
\sphinxAtStartPar
cell3\sphinxhyphen{}1
&\hskip0pt\relax
&
\sphinxAtStartPar
cell3\sphinxhyphen{}2
\\
\hline

View File

@ -2,9 +2,11 @@
\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{|*{2}{\X{1}{2}|}}
\hline
\sphinxstyletheadfamily \hskip0pt\relax
\sphinxstyletheadfamily
\sphinxAtStartPar
header1
&\sphinxstyletheadfamily \hskip0pt\relax
&\sphinxstyletheadfamily
\sphinxAtStartPar
header2
\\
\hline
@ -13,9 +15,11 @@ header2
\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline
\sphinxstyletheadfamily \hskip0pt\relax
\sphinxstyletheadfamily
\sphinxAtStartPar
header1
&\sphinxstyletheadfamily \hskip0pt\relax
&\sphinxstyletheadfamily
\sphinxAtStartPar
header2
\\
\hline
@ -27,24 +31,31 @@ header2
\endlastfoot
\begin{itemize}
\item {} \hskip0pt\relax
\item {}
\sphinxAtStartPar
item1
\item {} \hskip0pt\relax
\item {}
\sphinxAtStartPar
item2
\end{itemize}
&\hskip0pt\relax
&
\sphinxAtStartPar
cell1\sphinxhyphen{}2
\\
\hline\hskip0pt\relax
\hline
\sphinxAtStartPar
cell2\sphinxhyphen{}1
&\hskip0pt\relax
&
\sphinxAtStartPar
cell2\sphinxhyphen{}2
\\
\hline\hskip0pt\relax
\hline
\sphinxAtStartPar
cell3\sphinxhyphen{}1
&\hskip0pt\relax
&
\sphinxAtStartPar
cell3\sphinxhyphen{}2
\\
\hline

View File

@ -2,11 +2,14 @@
\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{|*{3}{\X{1}{3}|}}
\hline
\sphinxstyletheadfamily \hskip0pt\relax
\sphinxstyletheadfamily
\sphinxAtStartPar
header1
&\sphinxstyletheadfamily \hskip0pt\relax
&\sphinxstyletheadfamily
\sphinxAtStartPar
header2
&\sphinxstyletheadfamily \hskip0pt\relax
&\sphinxstyletheadfamily
\sphinxAtStartPar
header3
\\
\hline
@ -15,11 +18,14 @@ header3
\multicolumn{3}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline
\sphinxstyletheadfamily \hskip0pt\relax
\sphinxstyletheadfamily
\sphinxAtStartPar
header1
&\sphinxstyletheadfamily \hskip0pt\relax
&\sphinxstyletheadfamily
\sphinxAtStartPar
header2
&\sphinxstyletheadfamily \hskip0pt\relax
&\sphinxstyletheadfamily
\sphinxAtStartPar
header3
\\
\hline
@ -31,23 +37,30 @@ header3
\endlastfoot
\sphinxstyletheadfamily \begin{itemize}
\item {} \hskip0pt\relax
\item {}
\sphinxAtStartPar
instub1\sphinxhyphen{}1a
\item {} \hskip0pt\relax
\item {}
\sphinxAtStartPar
instub1\sphinxhyphen{}1b
\end{itemize}
&\sphinxstyletheadfamily \hskip0pt\relax
&\sphinxstyletheadfamily
\sphinxAtStartPar
instub1\sphinxhyphen{}2
&\hskip0pt\relax
&
\sphinxAtStartPar
notinstub1\sphinxhyphen{}3
\\
\hline\sphinxstyletheadfamily \hskip0pt\relax
\hline\sphinxstyletheadfamily
\sphinxAtStartPar
cell2\sphinxhyphen{}1
&\sphinxstyletheadfamily \hskip0pt\relax
&\sphinxstyletheadfamily
\sphinxAtStartPar
cell2\sphinxhyphen{}2
&\hskip0pt\relax
&
\sphinxAtStartPar
cell2\sphinxhyphen{}3
\\
\hline

View File

@ -2,9 +2,11 @@
\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{|*{2}{\X{1}{2}|}}
\hline
\sphinxstyletheadfamily \hskip0pt\relax
\sphinxstyletheadfamily
\sphinxAtStartPar
header1
&\sphinxstyletheadfamily \hskip0pt\relax
&\sphinxstyletheadfamily
\sphinxAtStartPar
header2
\\
\hline
@ -13,9 +15,11 @@ header2
\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline
\sphinxstyletheadfamily \hskip0pt\relax
\sphinxstyletheadfamily
\sphinxAtStartPar
header1
&\sphinxstyletheadfamily \hskip0pt\relax
&\sphinxstyletheadfamily
\sphinxAtStartPar
header2
\\
\hline
@ -30,17 +34,22 @@ header2
\begin{sphinxVerbatimintable}[commandchars=\\\{\}]
\PYG{n}{hello} \PYG{n}{world}
\end{sphinxVerbatimintable}
&\hskip0pt\relax
&
\sphinxAtStartPar
cell1\sphinxhyphen{}2
\\
\hline\hskip0pt\relax
\hline
\sphinxAtStartPar
cell2\sphinxhyphen{}1
&\hskip0pt\relax
&
\sphinxAtStartPar
cell2\sphinxhyphen{}2
\\
\hline\hskip0pt\relax
\hline
\sphinxAtStartPar
cell3\sphinxhyphen{}1
&\hskip0pt\relax
&
\sphinxAtStartPar
cell3\sphinxhyphen{}2
\\
\hline

View File

@ -2,9 +2,11 @@
\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{|\X{30}{100}|\X{70}{100}|}
\hline\noalign{\phantomsection\label{\detokenize{longtable:namedlongtable}}\label{\detokenize{longtable:mylongtable}}}%
\sphinxstyletheadfamily \hskip0pt\relax
\sphinxstyletheadfamily
\sphinxAtStartPar
header1
&\sphinxstyletheadfamily \hskip0pt\relax
&\sphinxstyletheadfamily
\sphinxAtStartPar
header2
\\
\hline
@ -13,9 +15,11 @@ header2
\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline
\sphinxstyletheadfamily \hskip0pt\relax
\sphinxstyletheadfamily
\sphinxAtStartPar
header1
&\sphinxstyletheadfamily \hskip0pt\relax
&\sphinxstyletheadfamily
\sphinxAtStartPar
header2
\\
\hline
@ -26,22 +30,29 @@ header2
\endfoot
\endlastfoot
\hskip0pt\relax
\sphinxAtStartPar
cell1\sphinxhyphen{}1
&\hskip0pt\relax
&
\sphinxAtStartPar
cell1\sphinxhyphen{}2
\\
\hline\hskip0pt\relax
\hline
\sphinxAtStartPar
cell2\sphinxhyphen{}1
&\hskip0pt\relax
&
\sphinxAtStartPar
cell2\sphinxhyphen{}2
\\
\hline\hskip0pt\relax
\hline
\sphinxAtStartPar
cell3\sphinxhyphen{}1
&\hskip0pt\relax
&
\sphinxAtStartPar
cell3\sphinxhyphen{}2
\\
\hline
\end{longtable}\sphinxatlongtableend\end{savenotes}
\hskip0pt\relax
\sphinxAtStartPar
See {\hyperref[\detokenize{longtable:mylongtable}]{\sphinxcrossref{mylongtable}}}, same as {\hyperref[\detokenize{longtable:namedlongtable}]{\sphinxcrossref{\DUrole{std,std-ref}{this one}}}}.

View File

@ -2,9 +2,11 @@
\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{|\X{30}{100}|\X{70}{100}|}
\hline
\sphinxstyletheadfamily \hskip0pt\relax
\sphinxstyletheadfamily
\sphinxAtStartPar
header1
&\sphinxstyletheadfamily \hskip0pt\relax
&\sphinxstyletheadfamily
\sphinxAtStartPar
header2
\\
\hline
@ -13,9 +15,11 @@ header2
\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline
\sphinxstyletheadfamily \hskip0pt\relax
\sphinxstyletheadfamily
\sphinxAtStartPar
header1
&\sphinxstyletheadfamily \hskip0pt\relax
&\sphinxstyletheadfamily
\sphinxAtStartPar
header2
\\
\hline
@ -27,24 +31,31 @@ header2
\endlastfoot
\begin{itemize}
\item {} \hskip0pt\relax
\item {}
\sphinxAtStartPar
item1
\item {} \hskip0pt\relax
\item {}
\sphinxAtStartPar
item2
\end{itemize}
&\hskip0pt\relax
&
\sphinxAtStartPar
cell1\sphinxhyphen{}2
\\
\hline\hskip0pt\relax
\hline
\sphinxAtStartPar
cell2\sphinxhyphen{}1
&\hskip0pt\relax
&
\sphinxAtStartPar
cell2\sphinxhyphen{}2
\\
\hline\hskip0pt\relax
\hline
\sphinxAtStartPar
cell3\sphinxhyphen{}1
&\hskip0pt\relax
&
\sphinxAtStartPar
cell3\sphinxhyphen{}2
\\
\hline

View File

@ -2,9 +2,11 @@
\begin{savenotes}\sphinxatlongtablestart\begin{longtable}[c]{|c|c|}
\hline
\sphinxstyletheadfamily \hskip0pt\relax
\sphinxstyletheadfamily
\sphinxAtStartPar
header1
&\sphinxstyletheadfamily \hskip0pt\relax
&\sphinxstyletheadfamily
\sphinxAtStartPar
header2
\\
\hline
@ -13,9 +15,11 @@ header2
\multicolumn{2}{c}%
{\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} \textendash{} continued from previous page}}}\\
\hline
\sphinxstyletheadfamily \hskip0pt\relax
\sphinxstyletheadfamily
\sphinxAtStartPar
header1
&\sphinxstyletheadfamily \hskip0pt\relax
&\sphinxstyletheadfamily
\sphinxAtStartPar
header2
\\
\hline
@ -26,19 +30,25 @@ header2
\endfoot
\endlastfoot
\hskip0pt\relax
\sphinxAtStartPar
cell1\sphinxhyphen{}1
&\hskip0pt\relax
&
\sphinxAtStartPar
cell1\sphinxhyphen{}2
\\
\hline\hskip0pt\relax
\hline
\sphinxAtStartPar
cell2\sphinxhyphen{}1
&\hskip0pt\relax
&
\sphinxAtStartPar
cell2\sphinxhyphen{}2
\\
\hline\hskip0pt\relax
\hline
\sphinxAtStartPar
cell3\sphinxhyphen{}1
&\hskip0pt\relax
&
\sphinxAtStartPar
cell3\sphinxhyphen{}2
\\
\hline

View File

@ -4,24 +4,32 @@
\centering
\begin{tabulary}{\linewidth}[t]{|T|T|}
\hline
\sphinxstyletheadfamily \hskip0pt\relax
\sphinxstyletheadfamily
\sphinxAtStartPar
header1
&\sphinxstyletheadfamily \hskip0pt\relax
&\sphinxstyletheadfamily
\sphinxAtStartPar
header2
\\
\hline\hskip0pt\relax
\hline
\sphinxAtStartPar
cell1\sphinxhyphen{}1
&\hskip0pt\relax
&
\sphinxAtStartPar
cell1\sphinxhyphen{}2
\\
\hline\hskip0pt\relax
\hline
\sphinxAtStartPar
cell2\sphinxhyphen{}1
&\hskip0pt\relax
&
\sphinxAtStartPar
cell2\sphinxhyphen{}2
\\
\hline\hskip0pt\relax
\hline
\sphinxAtStartPar
cell3\sphinxhyphen{}1
&\hskip0pt\relax
&
\sphinxAtStartPar
cell3\sphinxhyphen{}2
\\
\hline

View File

@ -8,24 +8,32 @@
\sphinxaftertopcaption
\begin{tabulary}{\linewidth}[t]{|T|T|}
\hline
\sphinxstyletheadfamily \hskip0pt\relax
\sphinxstyletheadfamily
\sphinxAtStartPar
header1
&\sphinxstyletheadfamily \hskip0pt\relax
&\sphinxstyletheadfamily
\sphinxAtStartPar
header2
\\
\hline\hskip0pt\relax
\hline
\sphinxAtStartPar
cell1\sphinxhyphen{}1
&\hskip0pt\relax
&
\sphinxAtStartPar
cell1\sphinxhyphen{}2
\\
\hline\hskip0pt\relax
\hline
\sphinxAtStartPar
cell2\sphinxhyphen{}1
&\hskip0pt\relax
&
\sphinxAtStartPar
cell2\sphinxhyphen{}2
\\
\hline\hskip0pt\relax
\hline
\sphinxAtStartPar
cell3\sphinxhyphen{}1
&\hskip0pt\relax
&
\sphinxAtStartPar
cell3\sphinxhyphen{}2
\\
\hline

View File

@ -4,30 +4,39 @@
\centering
\begin{tabular}[t]{|*{2}{\X{1}{2}|}}
\hline
\sphinxstyletheadfamily \hskip0pt\relax
\sphinxstyletheadfamily
\sphinxAtStartPar
header1
&\sphinxstyletheadfamily \hskip0pt\relax
&\sphinxstyletheadfamily
\sphinxAtStartPar
header2
\\
\hline\begin{itemize}
\item {} \hskip0pt\relax
\item {}
\sphinxAtStartPar
item1
\item {} \hskip0pt\relax
\item {}
\sphinxAtStartPar
item2
\end{itemize}
&\hskip0pt\relax
&
\sphinxAtStartPar
cell1\sphinxhyphen{}2
\\
\hline\hskip0pt\relax
\hline
\sphinxAtStartPar
cell2\sphinxhyphen{}1
&\hskip0pt\relax
&
\sphinxAtStartPar
cell2\sphinxhyphen{}2
\\
\hline\hskip0pt\relax
\hline
\sphinxAtStartPar
cell3\sphinxhyphen{}1
&\hskip0pt\relax
&
\sphinxAtStartPar
cell3\sphinxhyphen{}2
\\
\hline

View File

@ -4,31 +4,41 @@
\centering
\begin{tabular}[t]{|*{3}{\X{1}{3}|}}
\hline
\sphinxstyletheadfamily \hskip0pt\relax
\sphinxstyletheadfamily
\sphinxAtStartPar
header1
&\sphinxstyletheadfamily \hskip0pt\relax
&\sphinxstyletheadfamily
\sphinxAtStartPar
header2
&\sphinxstyletheadfamily \hskip0pt\relax
&\sphinxstyletheadfamily
\sphinxAtStartPar
header3
\\
\hline\sphinxstyletheadfamily \begin{itemize}
\item {} \hskip0pt\relax
\item {}
\sphinxAtStartPar
instub1\sphinxhyphen{}1a
\item {} \hskip0pt\relax
\item {}
\sphinxAtStartPar
instub1\sphinxhyphen{}1b
\end{itemize}
&\sphinxstyletheadfamily \hskip0pt\relax
&\sphinxstyletheadfamily
\sphinxAtStartPar
instub1\sphinxhyphen{}2
&\hskip0pt\relax
&
\sphinxAtStartPar
notinstub1\sphinxhyphen{}3
\\
\hline\sphinxstyletheadfamily \hskip0pt\relax
\hline\sphinxstyletheadfamily
\sphinxAtStartPar
cell2\sphinxhyphen{}1
&\sphinxstyletheadfamily \hskip0pt\relax
&\sphinxstyletheadfamily
\sphinxAtStartPar
cell2\sphinxhyphen{}2
&\hskip0pt\relax
&
\sphinxAtStartPar
cell2\sphinxhyphen{}3
\\
\hline

View File

@ -4,14 +4,18 @@
\centering
\begin{tabulary}{\linewidth}[t]{|T|}
\hline
\sphinxstyletheadfamily \hskip0pt\relax
\sphinxstyletheadfamily
\sphinxAtStartPar
header1
\\
\hline\hskip0pt\relax
\hline
\sphinxAtStartPar
cell1\sphinxhyphen{}1\sphinxhyphen{}par1
\hskip0pt\relax
\sphinxAtStartPar
cell1\sphinxhyphen{}1\sphinxhyphen{}par2
\hskip0pt\relax
\sphinxAtStartPar
cell1\sphinxhyphen{}1\sphinxhyphen{}par3
\\
\hline

View File

@ -4,26 +4,33 @@
\centering
\begin{tabular}[t]{|*{2}{\X{1}{2}|}}
\hline
\sphinxstyletheadfamily \hskip0pt\relax
\sphinxstyletheadfamily
\sphinxAtStartPar
header1
&\sphinxstyletheadfamily \hskip0pt\relax
&\sphinxstyletheadfamily
\sphinxAtStartPar
header2
\\
\hline
\begin{sphinxVerbatimintable}[commandchars=\\\{\}]
\PYG{n}{hello} \PYG{n}{world}
\end{sphinxVerbatimintable}
&\hskip0pt\relax
&
\sphinxAtStartPar
cell1\sphinxhyphen{}2
\\
\hline\hskip0pt\relax
\hline
\sphinxAtStartPar
cell2\sphinxhyphen{}1
&\hskip0pt\relax
&
\sphinxAtStartPar
cell2\sphinxhyphen{}2
\\
\hline\hskip0pt\relax
\hline
\sphinxAtStartPar
cell3\sphinxhyphen{}1
&\hskip0pt\relax
&
\sphinxAtStartPar
cell3\sphinxhyphen{}2
\\
\hline

View File

@ -5,29 +5,38 @@
\phantomsection\label{\detokenize{tabular:namedtabular}}\label{\detokenize{tabular:mytabular}}\nobreak
\begin{tabular}[t]{|\X{30}{100}|\X{70}{100}|}
\hline
\sphinxstyletheadfamily \hskip0pt\relax
\sphinxstyletheadfamily
\sphinxAtStartPar
header1
&\sphinxstyletheadfamily \hskip0pt\relax
&\sphinxstyletheadfamily
\sphinxAtStartPar
header2
\\
\hline\hskip0pt\relax
\hline
\sphinxAtStartPar
cell1\sphinxhyphen{}1
&\hskip0pt\relax
&
\sphinxAtStartPar
cell1\sphinxhyphen{}2
\\
\hline\hskip0pt\relax
\hline
\sphinxAtStartPar
cell2\sphinxhyphen{}1
&\hskip0pt\relax
&
\sphinxAtStartPar
cell2\sphinxhyphen{}2
\\
\hline\hskip0pt\relax
\hline
\sphinxAtStartPar
cell3\sphinxhyphen{}1
&\hskip0pt\relax
&
\sphinxAtStartPar
cell3\sphinxhyphen{}2
\\
\hline
\end{tabular}
\par
\sphinxattableend\end{savenotes}
\hskip0pt\relax
\sphinxAtStartPar
See {\hyperref[\detokenize{tabular:mytabular}]{\sphinxcrossref{\DUrole{std,std-ref}{this}}}}, same as {\hyperref[\detokenize{tabular:namedtabular}]{\sphinxcrossref{namedtabular}}}.

View File

@ -4,30 +4,39 @@
\centering
\begin{tabular}[t]{|\X{30}{100}|\X{70}{100}|}
\hline
\sphinxstyletheadfamily \hskip0pt\relax
\sphinxstyletheadfamily
\sphinxAtStartPar
header1
&\sphinxstyletheadfamily \hskip0pt\relax
&\sphinxstyletheadfamily
\sphinxAtStartPar
header2
\\
\hline\begin{itemize}
\item {} \hskip0pt\relax
\item {}
\sphinxAtStartPar
item1
\item {} \hskip0pt\relax
\item {}
\sphinxAtStartPar
item2
\end{itemize}
&\hskip0pt\relax
&
\sphinxAtStartPar
cell1\sphinxhyphen{}2
\\
\hline\hskip0pt\relax
\hline
\sphinxAtStartPar
cell2\sphinxhyphen{}1
&\hskip0pt\relax
&
\sphinxAtStartPar
cell2\sphinxhyphen{}2
\\
\hline\hskip0pt\relax
\hline
\sphinxAtStartPar
cell3\sphinxhyphen{}1
&\hskip0pt\relax
&
\sphinxAtStartPar
cell3\sphinxhyphen{}2
\\
\hline

View File

@ -4,24 +4,32 @@
\raggedright
\begin{tabular}[t]{|\X{30}{100}|\X{70}{100}|}
\hline
\sphinxstyletheadfamily \hskip0pt\relax
\sphinxstyletheadfamily
\sphinxAtStartPar
header1
&\sphinxstyletheadfamily \hskip0pt\relax
&\sphinxstyletheadfamily
\sphinxAtStartPar
header2
\\
\hline\hskip0pt\relax
\hline
\sphinxAtStartPar
cell1\sphinxhyphen{}1
&\hskip0pt\relax
&
\sphinxAtStartPar
cell1\sphinxhyphen{}2
\\
\hline\hskip0pt\relax
\hline
\sphinxAtStartPar
cell2\sphinxhyphen{}1
&\hskip0pt\relax
&
\sphinxAtStartPar
cell2\sphinxhyphen{}2
\\
\hline\hskip0pt\relax
\hline
\sphinxAtStartPar
cell3\sphinxhyphen{}1
&\hskip0pt\relax
&
\sphinxAtStartPar
cell3\sphinxhyphen{}2
\\
\hline

View File

@ -4,24 +4,32 @@
\centering
\begin{tabulary}{\linewidth}[t]{|c|c|}
\hline
\sphinxstyletheadfamily \hskip0pt\relax
\sphinxstyletheadfamily
\sphinxAtStartPar
header1
&\sphinxstyletheadfamily \hskip0pt\relax
&\sphinxstyletheadfamily
\sphinxAtStartPar
header2
\\
\hline\hskip0pt\relax
\hline
\sphinxAtStartPar
cell1\sphinxhyphen{}1
&\hskip0pt\relax
&
\sphinxAtStartPar
cell1\sphinxhyphen{}2
\\
\hline\hskip0pt\relax
\hline
\sphinxAtStartPar
cell2\sphinxhyphen{}1
&\hskip0pt\relax
&
\sphinxAtStartPar
cell2\sphinxhyphen{}2
\\
\hline\hskip0pt\relax
\hline
\sphinxAtStartPar
cell3\sphinxhyphen{}1
&\hskip0pt\relax
&
\sphinxAtStartPar
cell3\sphinxhyphen{}2
\\
\hline

View File

@ -4,24 +4,32 @@
\raggedleft
\begin{tabulary}{\linewidth}[t]{|T|T|}
\hline
\sphinxstyletheadfamily \hskip0pt\relax
\sphinxstyletheadfamily
\sphinxAtStartPar
header1
&\sphinxstyletheadfamily \hskip0pt\relax
&\sphinxstyletheadfamily
\sphinxAtStartPar
header2
\\
\hline\hskip0pt\relax
\hline
\sphinxAtStartPar
cell1\sphinxhyphen{}1
&\hskip0pt\relax
&
\sphinxAtStartPar
cell1\sphinxhyphen{}2
\\
\hline\hskip0pt\relax
\hline
\sphinxAtStartPar
cell2\sphinxhyphen{}1
&\hskip0pt\relax
&
\sphinxAtStartPar
cell2\sphinxhyphen{}2
\\
\hline\hskip0pt\relax
\hline
\sphinxAtStartPar
cell3\sphinxhyphen{}1
&\hskip0pt\relax
&
\sphinxAtStartPar
cell3\sphinxhyphen{}2
\\
\hline

View File

@ -730,14 +730,14 @@ def test_footnote(app, status, warning):
'\\end{footnote}') in result
assert '\\begin{footnote}[3]\\sphinxAtStartFootnote\nnamed\n%\n\\end{footnote}' in result
assert '\\sphinxcite{footnote:bar}' in result
assert ('\\bibitem[bar]{footnote:bar}\\hskip0pt\\relax\ncite\n') in result
assert ('\\bibitem[bar]{footnote:bar}\n\\sphinxAtStartPar\ncite\n') in result
assert '\\sphinxcaption{Table caption \\sphinxfootnotemark[4]' in result
assert ('\\hline%\n\\begin{footnotetext}[4]\\sphinxAtStartFootnote\n'
'footnote in table caption\n%\n\\end{footnotetext}\\ignorespaces %\n'
'\\begin{footnotetext}[5]\\sphinxAtStartFootnote\n'
'footnote in table header\n%\n\\end{footnotetext}\\ignorespaces '
'\\hskip0pt\\relax\n'
'VIDIOC\\_CROPCAP\n&\\hskip0pt\\relax\n') in result
'\n\\sphinxAtStartPar\n'
'VIDIOC\\_CROPCAP\n&\n\\sphinxAtStartPar\n') in result
assert ('Information about VIDIOC\\_CROPCAP %\n'
'\\begin{footnote}[6]\\sphinxAtStartFootnote\n'
'footnote in table not in header\n%\n\\end{footnote}\n\\\\\n\\hline\n'
@ -777,7 +777,7 @@ def test_reference_in_caption_and_codeblock_in_footnote(app, status, warning):
assert ('This is a reference to the code\\sphinxhyphen{}block in the footnote:\n'
'{\\hyperref[\\detokenize{index:codeblockinfootnote}]'
'{\\sphinxcrossref{\\DUrole{std,std-ref}{I am in a footnote}}}}') in result
assert ('&\\hskip0pt\\relax\nThis is one more footnote with some code in it %\n'
assert ('&\n\\sphinxAtStartPar\nThis is one more footnote with some code in it %\n'
'\\begin{footnote}[11]\\sphinxAtStartFootnote\n'
'Third footnote in longtable\n') in result
assert ('\\end{sphinxVerbatim}\n%\n\\end{footnote}.\n') in result
@ -818,14 +818,14 @@ def test_latex_show_urls_is_inline(app, status, warning):
'(http://sphinx\\sphinxhyphen{}doc.org/\\textasciitilde{}test/)') in result
assert ('\\item[{\\sphinxhref{http://sphinx-doc.org/}{URL in term} '
'(http://sphinx\\sphinxhyphen{}doc.org/)}] '
'\\leavevmode\\hskip0pt\\relax\nDescription' in result)
'\\leavevmode\n\\sphinxAtStartPar\nDescription' in result)
assert ('\\item[{Footnote in term \\sphinxfootnotemark[6]}] '
'\\leavevmode%\n\\begin{footnotetext}[6]\\sphinxAtStartFootnote\n'
'Footnote in term\n%\n\\end{footnotetext}\\ignorespaces '
'\\hskip0pt\\relax\nDescription') in result
'\n\\sphinxAtStartPar\nDescription') in result
assert ('\\item[{\\sphinxhref{http://sphinx-doc.org/}{Term in deflist} '
'(http://sphinx\\sphinxhyphen{}doc.org/)}] '
'\\leavevmode\\hskip0pt\\relax\nDescription') in result
'\\leavevmode\n\\sphinxAtStartPar\nDescription') in result
assert '\\sphinxurl{https://github.com/sphinx-doc/sphinx}\n' in result
assert ('\\sphinxhref{mailto:sphinx-dev@googlegroups.com}'
'{sphinx\\sphinxhyphen{}dev@googlegroups.com}') in result
@ -870,16 +870,16 @@ def test_latex_show_urls_is_footnote(app, status, warning):
'{URL in term}\\sphinxfootnotemark[9]}] '
'\\leavevmode%\n\\begin{footnotetext}[9]\\sphinxAtStartFootnote\n'
'\\sphinxnolinkurl{http://sphinx-doc.org/}\n%\n'
'\\end{footnotetext}\\ignorespaces \\hskip0pt\\relax\nDescription') in result
'\\end{footnotetext}\\ignorespaces \n\\sphinxAtStartPar\nDescription') in result
assert ('\\item[{Footnote in term \\sphinxfootnotemark[11]}] '
'\\leavevmode%\n\\begin{footnotetext}[11]\\sphinxAtStartFootnote\n'
'Footnote in term\n%\n\\end{footnotetext}\\ignorespaces '
'\\hskip0pt\\relax\nDescription') in result
'\n\\sphinxAtStartPar\nDescription') in result
assert ('\\item[{\\sphinxhref{http://sphinx-doc.org/}{Term in deflist}'
'\\sphinxfootnotemark[10]}] '
'\\leavevmode%\n\\begin{footnotetext}[10]\\sphinxAtStartFootnote\n'
'\\sphinxnolinkurl{http://sphinx-doc.org/}\n%\n'
'\\end{footnotetext}\\ignorespaces \\hskip0pt\\relax\nDescription') in result
'\\end{footnotetext}\\ignorespaces \n\\sphinxAtStartPar\nDescription') in result
assert ('\\sphinxurl{https://github.com/sphinx-doc/sphinx}\n' in result)
assert ('\\sphinxhref{mailto:sphinx-dev@googlegroups.com}'
'{sphinx\\sphinxhyphen{}dev@googlegroups.com}\n') in result
@ -916,13 +916,13 @@ def test_latex_show_urls_is_no(app, status, warning):
'Footnote inside footnote\n%\n\\end{footnotetext}\\ignorespaces') in result
assert '\\sphinxhref{http://sphinx-doc.org/~test/}{URL including tilde}' in result
assert ('\\item[{\\sphinxhref{http://sphinx-doc.org/}{URL in term}}] '
'\\leavevmode\\hskip0pt\\relax\nDescription') in result
'\\leavevmode\n\\sphinxAtStartPar\nDescription') in result
assert ('\\item[{Footnote in term \\sphinxfootnotemark[6]}] '
'\\leavevmode%\n\\begin{footnotetext}[6]\\sphinxAtStartFootnote\n'
'Footnote in term\n%\n\\end{footnotetext}\\ignorespaces '
'\\hskip0pt\\relax\nDescription') in result
'\n\\sphinxAtStartPar\nDescription') in result
assert ('\\item[{\\sphinxhref{http://sphinx-doc.org/}{Term in deflist}}] '
'\\leavevmode\\hskip0pt\\relax\nDescription') in result
'\\leavevmode\n\\sphinxAtStartPar\nDescription') in result
assert ('\\sphinxurl{https://github.com/sphinx-doc/sphinx}\n' in result)
assert ('\\sphinxhref{mailto:sphinx-dev@googlegroups.com}'
'{sphinx\\sphinxhyphen{}dev@googlegroups.com}\n') in result
@ -1357,7 +1357,7 @@ def test_latex_index(app, status, warning):
'\\index{equation@\\spxentry{equation}}equation:\n' in result)
assert ('\n\\index{Einstein@\\spxentry{Einstein}}'
'\\index{relativity@\\spxentry{relativity}}'
'\\ignorespaces \\hskip0pt\\relax\nand') in result
'\\ignorespaces \n\\sphinxAtStartPar\nand') in result
assert ('\n\\index{main \\sphinxleftcurlybrace{}@\\spxentry{'
'main \\sphinxleftcurlybrace{}}}\\ignorespaces ' in result)
@ -1406,7 +1406,7 @@ def test_latex_thebibliography(app, status, warning):
result = (app.outdir / 'python.tex').read_text()
print(result)
assert ('\\begin{sphinxthebibliography}{AuthorYe}\n'
'\\bibitem[AuthorYear]{index:authoryear}\\hskip0pt\\relax\n'
'\\bibitem[AuthorYear]{index:authoryear}\n\\sphinxAtStartPar\n'
'Author, Title, Year\n'
'\\end{sphinxthebibliography}\n' in result)
assert '\\sphinxcite{index:authoryear}' in result
@ -1450,7 +1450,7 @@ def test_latex_labels(app, status, warning):
r'\end{figure}' in result)
assert (r'\caption{labeled figure}'
'\\label{\\detokenize{index:figure3}}\n'
'\\begin{sphinxlegend}\\hskip0pt\\relax\n'
'\\begin{sphinxlegend}\n\\sphinxAtStartPar\n'
'with a legend\n\\end{sphinxlegend}\n'
r'\end{figure}' in result)

View File

@ -158,7 +158,7 @@ def get_verifier(verify, verify_re):
':pep:`8`',
('<p><span class="target" id="index-0"></span><a class="pep reference external" '
'href="http://www.python.org/dev/peps/pep-0008"><strong>PEP 8</strong></a></p>'),
('\\hskip0pt\\relax\n'
('\\sphinxAtStartPar\n'
'\\index{Python Enhancement Proposals@\\spxentry{Python Enhancement Proposals}'
'!PEP 8@\\spxentry{PEP 8}}\\sphinxhref{http://www.python.org/dev/peps/pep-0008}'
'{\\sphinxstylestrong{PEP 8}}')
@ -170,7 +170,7 @@ def get_verifier(verify, verify_re):
('<p><span class="target" id="index-0"></span><a class="pep reference external" '
'href="http://www.python.org/dev/peps/pep-0008#id1">'
'<strong>PEP 8#id1</strong></a></p>'),
('\\hskip0pt\\relax\n'
('\\sphinxAtStartPar\n'
'\\index{Python Enhancement Proposals@\\spxentry{Python Enhancement Proposals}'
'!PEP 8\\#id1@\\spxentry{PEP 8\\#id1}}\\sphinxhref'
'{http://www.python.org/dev/peps/pep-0008\\#id1}'
@ -182,7 +182,7 @@ def get_verifier(verify, verify_re):
':rfc:`2324`',
('<p><span class="target" id="index-0"></span><a class="rfc reference external" '
'href="http://tools.ietf.org/html/rfc2324.html"><strong>RFC 2324</strong></a></p>'),
('\\hskip0pt\\relax\n'
('\\sphinxAtStartPar\n'
'\\index{RFC@\\spxentry{RFC}!RFC 2324@\\spxentry{RFC 2324}}'
'\\sphinxhref{http://tools.ietf.org/html/rfc2324.html}'
'{\\sphinxstylestrong{RFC 2324}}')
@ -194,7 +194,7 @@ def get_verifier(verify, verify_re):
('<p><span class="target" id="index-0"></span><a class="rfc reference external" '
'href="http://tools.ietf.org/html/rfc2324.html#id1">'
'<strong>RFC 2324#id1</strong></a></p>'),
('\\hskip0pt\\relax\n'
('\\sphinxAtStartPar\n'
'\\index{RFC@\\spxentry{RFC}!RFC 2324\\#id1@\\spxentry{RFC 2324\\#id1}}'
'\\sphinxhref{http://tools.ietf.org/html/rfc2324.html\\#id1}'
'{\\sphinxstylestrong{RFC 2324\\#id1}}')
@ -205,14 +205,14 @@ def get_verifier(verify, verify_re):
'``code sample``',
('<p><code class="(samp )?docutils literal notranslate"><span class="pre">'
'code</span>&#160;&#160; <span class="pre">sample</span></code></p>'),
r'\\hskip0pt\\relax\n\\sphinxcode{\\sphinxupquote{code sample}}',
r'\\sphinxAtStartPar\n\\sphinxcode{\\sphinxupquote{code sample}}',
),
(
# interpolation of arrows in menuselection
'verify',
':menuselection:`a --> b`',
('<p><span class="menuselection">a \N{TRIANGULAR BULLET} b</span></p>'),
'\\hskip0pt\\relax\n\\sphinxmenuselection{a \\(\\rightarrow\\) b}',
'\\sphinxAtStartPar\n\\sphinxmenuselection{a \\(\\rightarrow\\) b}',
),
(
# interpolation of ampersands in menuselection
@ -220,7 +220,7 @@ def get_verifier(verify, verify_re):
':menuselection:`&Foo -&&- &Bar`',
('<p><span class="menuselection"><span class="accelerator">F</span>oo '
'-&amp;- <span class="accelerator">B</span>ar</span></p>'),
('\\hskip0pt\\relax\n'
('\\sphinxAtStartPar\n'
r'\sphinxmenuselection{\sphinxaccelerator{F}oo \sphinxhyphen{}'
r'\&\sphinxhyphen{} \sphinxaccelerator{B}ar}'),
),
@ -230,7 +230,7 @@ def get_verifier(verify, verify_re):
':guilabel:`&Foo -&&- &Bar`',
('<p><span class="guilabel"><span class="accelerator">F</span>oo '
'-&amp;- <span class="accelerator">B</span>ar</span></p>'),
('\\hskip0pt\\relax\n'
('\\sphinxAtStartPar\n'
r'\sphinxguilabel{\sphinxaccelerator{F}oo \sphinxhyphen{}\&\sphinxhyphen{} \sphinxaccelerator{B}ar}'),
),
(
@ -238,14 +238,14 @@ def get_verifier(verify, verify_re):
'verify',
':guilabel:`Foo`',
'<p><span class="guilabel">Foo</span></p>',
'\\hskip0pt\\relax\n\\sphinxguilabel{Foo}',
'\\sphinxAtStartPar\n\\sphinxguilabel{Foo}',
),
(
# kbd role
'verify',
':kbd:`space`',
'<p><kbd class="kbd docutils literal notranslate">space</kbd></p>',
'\\hskip0pt\\relax\n\\sphinxkeyboard{\\sphinxupquote{space}}',
'\\sphinxAtStartPar\n\\sphinxkeyboard{\\sphinxupquote{space}}',
),
(
# kbd role
@ -256,7 +256,7 @@ def get_verifier(verify, verify_re):
'+'
'<kbd class="kbd docutils literal notranslate">X</kbd>'
'</kbd></p>'),
'\\hskip0pt\\relax\n\\sphinxkeyboard{\\sphinxupquote{Control+X}}',
'\\sphinxAtStartPar\n\\sphinxkeyboard{\\sphinxupquote{Control+X}}',
),
(
# kbd role
@ -267,7 +267,7 @@ def get_verifier(verify, verify_re):
'+'
'<kbd class="kbd docutils literal notranslate">^</kbd>'
'</kbd></p>'),
('\\hskip0pt\\relax\n'
('\\sphinxAtStartPar\n'
'\\sphinxkeyboard{\\sphinxupquote{Alt+\\textasciicircum{}}}'),
),
(
@ -283,7 +283,7 @@ def get_verifier(verify, verify_re):
'-'
'<kbd class="kbd docutils literal notranslate">s</kbd>'
'</kbd></p>'),
('\\hskip0pt\\relax\n'
('\\sphinxAtStartPar\n'
'\\sphinxkeyboard{\\sphinxupquote{M\\sphinxhyphen{}x M\\sphinxhyphen{}s}}'),
),
(
@ -291,7 +291,7 @@ def get_verifier(verify, verify_re):
'verify',
':kbd:`-`',
'<p><kbd class="kbd docutils literal notranslate">-</kbd></p>',
('\\hskip0pt\\relax\n'
('\\sphinxAtStartPar\n'
'\\sphinxkeyboard{\\sphinxupquote{\\sphinxhyphen{}}}'),
),
(
@ -299,7 +299,7 @@ def get_verifier(verify, verify_re):
'verify',
':kbd:`Caps Lock`',
'<p><kbd class="kbd docutils literal notranslate">Caps Lock</kbd></p>',
('\\hskip0pt\\relax\n'
('\\sphinxAtStartPar\n'
'\\sphinxkeyboard{\\sphinxupquote{Caps Lock}}'),
),
(
@ -308,7 +308,7 @@ def get_verifier(verify, verify_re):
':option:`--with-option`',
('<p><code( class="xref std std-option docutils literal notranslate")?>'
'<span class="pre">--with-option</span></code></p>$'),
(r'\\hskip0pt\\relax\n'
(r'\\sphinxAtStartPar\n'
r'\\sphinxcode{\\sphinxupquote{\\sphinxhyphen{}\\sphinxhyphen{}with\\sphinxhyphen{}option}}$'),
),
(
@ -316,7 +316,7 @@ def get_verifier(verify, verify_re):
'verify',
'"John"',
'<p>“John”</p>',
"\\hskip0pt\\relax\n“John”",
"\\sphinxAtStartPar\n“John”",
),
(
# ... but not in literal text
@ -324,21 +324,21 @@ def get_verifier(verify, verify_re):
'``"John"``',
('<p><code class="docutils literal notranslate"><span class="pre">'
'&quot;John&quot;</span></code></p>'),
'\\hskip0pt\\relax\n\\sphinxcode{\\sphinxupquote{"John"}}',
'\\sphinxAtStartPar\n\\sphinxcode{\\sphinxupquote{"John"}}',
),
(
# verify classes for inline roles
'verify',
':manpage:`mp(1)`',
'<p><em class="manpage">mp(1)</em></p>',
'\\hskip0pt\\relax\n\\sphinxstyleliteralemphasis{\\sphinxupquote{mp(1)}}',
'\\sphinxAtStartPar\n\\sphinxstyleliteralemphasis{\\sphinxupquote{mp(1)}}',
),
(
# correct escaping in normal mode
'verify',
'Γ\\\\∞$',
None,
'\\hskip0pt\\relax\nΓ\\textbackslash{}\\(\\infty\\)\\$',
'\\sphinxAtStartPar\nΓ\\textbackslash{}\\(\\infty\\)\\$',
),
(
# in verbatim code fragments
@ -354,7 +354,7 @@ def get_verifier(verify, verify_re):
'verify_re',
'`test <https://www.google.com/~me/>`_',
None,
r'\\hskip0pt\\relax\n\\sphinxhref{https://www.google.com/~me/}{test}.*',
r'\\sphinxAtStartPar\n\\sphinxhref{https://www.google.com/~me/}{test}.*',
),
(
# description list: simple