diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/listings/listings.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/listings/listings.sty | 77 |
1 files changed, 43 insertions, 34 deletions
diff --git a/Master/texmf-dist/tex/latex/listings/listings.sty b/Master/texmf-dist/tex/latex/listings/listings.sty index 4d75d821e7a..28fc678ad55 100644 --- a/Master/texmf-dist/tex/latex/listings/listings.sty +++ b/Master/texmf-dist/tex/latex/listings/listings.sty @@ -16,8 +16,8 @@ %% Send comments and ideas on the package, error reports and additional %% programming languages to Jobst Hoffmann at <j.hoffmann@fh-aachen.de>. %% -\def\filedate{2024/03/11} -\def\fileversion{1.10a} +\def\filedate{2024/05/25} +\def\fileversion{1.10b} \NeedsTeXFormat{LaTeX2e} \AtEndOfPackage{\ProvidesPackage{listings} [\filedate\space\fileversion\space(Carsten Heinz)]} @@ -1932,54 +1932,63 @@ \orig@float@addtolists{#1}}}% }{}% }% +\edef\lst@temp{\the\catcode`\^^@} +\catcode`\^^@=1 \newcommand\lstinline[1][]{% - \leavevmode\bgroup % \hbox\bgroup --> \bgroup - \def\lst@boxpos{b}% - \lsthk@PreSet\lstset{flexiblecolumns,#1}% - \lsthk@TextStyle - \@ifnextchar\bgroup{% - \afterassignment\lst@InlineG \let\@let@token}% - \lstinline@} + \leavevmode\bgroup % \hbox\bgroup --> \bgroup + \def\lst@boxpos{b}% + \lsthk@PreSet\lstset{flexiblecolumns,#1}% + \lsthk@TextStyle + \@ifnextchar\bgroup{% + \afterassignment\lst@InlineG \romannumeral`^^@\iffalse}\fi + \let\@let@token}% + \lstinline@} +\catcode`\^^@=\lst@temp \def\lstinline@#1{% - \lst@Init\relax - \lst@IfNextCharActive{\lst@InlineM#1}{\lst@InlineJ#1}} + \lst@Init\relax + \lst@IfNextCharActive{\lst@InlineM#1}{\lst@InlineJ#1}} \lst@AddToHook{TextStyle}{}% init \lst@AddToHook{SelectCharTable}{\lst@inlinechars} \global\let\lst@inlinechars\@empty -\def\lst@InlineM#1{\gdef\lst@inlinechars{% +\def\lst@InlineM#1{% + \gdef\lst@inlinechars{% \lst@Def{`#1}{\lst@DeInit\egroup\global\let\lst@inlinechars\@empty}% \lst@Def{13}{\lst@DeInit\egroup \global\let\lst@inlinechars\@empty - \PackageError{Listings}{lstinline ended by EOL}\@ehc}}% - \lst@inlinechars} + \PackageError{Listings}{lstinline ended by EOL}\@ehc}}% + \lst@inlinechars} \def\lst@InlineJ#1{% - \def\lst@temp##1#1{% - \let\lst@arg\@empty \lst@InsideConvert{##1}\lst@arg - \lst@DeInit\egroup}% - \lst@temp} + \def\lst@temp##1#1{% + \let\lst@arg\@empty \lst@InsideConvert{##1}\lst@arg + \lst@DeInit\egroup}% + \lst@temp} \def\lst@InlineG{% - \lst@Init\relax - \lst@IfNextCharActive{\lst@InlineM\}}% - {\let\lst@arg\@empty \lst@InlineGJ}} + \lst@Init\relax + \lst@IfNextCharActive{\lst@InlineM\}}{% + \let\lst@arg\@empty \lst@InlineGJ}} +\edef\lst@temp{\the\catcode`\^^@} +\catcode`\^^@=2 \def\lst@InlineGJ{\futurelet\@let@token\lst@InlineGJTest} \def\lst@InlineGJTest{% - \ifx\@let@token\egroup - \afterassignment\lst@InlineGJEnd - \expandafter\let\expandafter\@let@token + \ifx\@let@token\egroup + \iffalse{\fi\romannumeral`^^@ + \afterassignment\lst@InlineGJEnd + \expandafter\let\expandafter\@let@token + \else + \ifx\@let@token\@sptoken + \let\lst@next\lst@InlineGJReadSp \else - \ifx\@let@token\@sptoken - \let\lst@next\lst@InlineGJReadSp - \else - \let\lst@next\lst@InlineGJRead - \fi - \expandafter\lst@next + \let\lst@next\lst@InlineGJRead + \fi + \expandafter\lst@next \fi} +\catcode`\^^@=\lst@temp \def\lst@InlineGJEnd{\lst@arg\lst@DeInit\egroup} \def\lst@InlineGJRead#1{% - \lccode`\~=`#1\lowercase{\lst@lAddTo\lst@arg~}% - \lst@InlineGJ} + \lccode`\~=`#1\lowercase{\lst@lAddTo\lst@arg~}% + \lst@InlineGJ} \def\lst@InlineGJReadSp#1{% - \lccode`\~=`\ \lowercase{\lst@lAddTo\lst@arg~}% - \lst@InlineGJ#1} + \lccode`\~=`\ \lowercase{\lst@lAddTo\lst@arg~}% + \lst@InlineGJ#1} \newcommand\lstMakeShortInline[1][]{% \def\lst@shortinlinedef{\lstinline[#1]}% \lstMakeShortInline@}% |