|
229 | 229 | \@namedef{PYG@tok@k-cpp}{%
|
230 | 230 | \def\PYG@tc##1{\textcolor[RGB]{0,0,"FF}{##1}}%
|
231 | 231 | }%
|
| 232 | +\@namedef{PYG@tok@d}{% default desc style uses \sphinxcodestyle (i.e. \texttt) |
| 233 | + \def\PYG@ff##1{\sphinxcodestyle{##1}}% |
| 234 | +}% |
232 | 235 |
|
233 | 236 | %% OPTIONS
|
234 | 237 | %
|
|
1443 | 1446 | %
|
1444 | 1447 | \newlength{\py@argswidth}
|
1445 | 1448 | \newcommand{\py@sigparams}[2]{%
|
1446 |
| - \parbox[t]{\py@argswidth}{#1\sphinxcode{)}#2}} |
| 1449 | + \parbox[t]{\py@argswidth}{#1\sphinxcodestyle{)}#2}} |
1447 | 1450 | \newcommand{\pysigline}[1]{\item[{#1}]}
|
1448 | 1451 | \newcommand{\pysiglinewithargsret}[3]{%
|
1449 |
| - \settowidth{\py@argswidth}{#1\sphinxcode{(}}% |
| 1452 | + \settowidth{\py@argswidth}{#1\sphinxcodestyle{(}}% |
1450 | 1453 | \addtolength{\py@argswidth}{-2\py@argswidth}%
|
1451 | 1454 | \addtolength{\py@argswidth}{\linewidth}%
|
1452 |
| - \item[{#1\sphinxcode{(}\py@sigparams{#2}{#3}}]} |
| 1455 | + \item[{#1\sphinxcodestyle{(}\py@sigparams{#2}{#3}}]} |
1453 | 1456 | \newcommand{\pysigstartmultiline}{%
|
1454 | 1457 | \def\pysigstartmultiline{\vskip\smallskipamount\parskip\z@skip\itemsep\z@skip}%
|
1455 | 1458 | \edef\pysigstopmultiline
|
|
1551 | 1554 | % breakable at non-escaped . , ; ? ! / using \sphinxbreaksviaactive.
|
1552 | 1555 | % the macro must be protected if it ends up used in moving arguments,
|
1553 | 1556 | % in 'alltt' \@noligs is done already, and the \scantokens must be avoided.
|
1554 |
| -\protected\def\sphinxcode#1{{\def\@tempa{alltt}% |
| 1557 | +\protected\def\sphinxliteraltext#1{{\def\@tempa{alltt}% |
1555 | 1558 | \ifx\@tempa\@currenvir\else
|
1556 | 1559 | \ifspx@opt@inlineliteralwraps
|
1557 | 1560 | \sphinxbreaksviaactive\let\sphinxafterbreak\empty
|
|
1562 | 1565 | \let\do@noligs\sphinx@do@noligs
|
1563 | 1566 | \@noligs\endlinechar\m@ne\everyeof{}% (<- in case inside \sphinxhref)
|
1564 | 1567 | \expandafter\scantokens
|
1565 |
| - \fi {\texttt{#1}}}} |
| 1568 | + \fi {#1}}} |
1566 | 1569 | \def\sphinx@do@noligs #1{\catcode`#1\active\begingroup\lccode`\~`#1\relax
|
1567 | 1570 | \lowercase{\endgroup\def~{\leavevmode\kern\z@\char`#1 }}}
|
1568 | 1571 | \def\sphinx@literal@nolig@list {\do\`\do\<\do\>\do\'\do\-}%
|
1569 | 1572 |
|
1570 |
| -\protected\def\sphinxbfcode#1{\sphinxcode{\bfseries{}#1}} |
| 1573 | +\protected\def\sphinxcodestyle#1{\texttt{#1}} |
| 1574 | +\protected\def\sphinxcode#1{\sphinxcodestyle{\sphinxliteraltext{#1}}} |
| 1575 | +\protected\def\sphinxbfcode#1{\textbf{\sphinxcode{#1}}} |
1571 | 1576 | \protected\def\sphinxemail#1{\textsf{#1}}
|
1572 | 1577 | \protected\def\sphinxtablecontinued#1{\textsf{#1}}
|
1573 | 1578 | \protected\def\sphinxtitleref#1{\emph{#1}}
|
|
0 commit comments