Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 87dfd3c commit fa1ccebCopy full SHA for fa1cceb
1 file changed
Doc/texinputs/python.sty
@@ -626,8 +626,14 @@
626
\newcommand{\samp}[1]{`\code{#1}'}
627
% This weird definition of \var{} allows it to always appear in roman
628
% italics, and won't get funky in code fragments when we play around
629
-% with fonts.
630
-\newcommand{\var}[1]{\normalsize\textrm{\textit{#1\/}}}
+% with fonts. This also works directly in math mode.
+\newcommand{\var}[1]{%
631
+ \ifmmode%
632
+ \hbox{\normalsize\textrm{\textit{#1\/}}}%
633
+ \else%
634
+ \normalsize\textrm{\textit{#1\/}}%
635
+ \fi%
636
+}
637
\renewcommand{\emph}[1]{{\em #1}}
638
\newcommand{\dfn}[1]{\emph{#1}}
639
\newcommand{\strong}[1]{{\bf #1}}
0 commit comments