diff options
author | Karl Berry <karl@freefriends.org> | 2024-05-25 19:35:23 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2024-05-25 19:35:23 +0000 |
commit | 6598ac5d55fa97a9bc30503e24cf560bd1f31b7e (patch) | |
tree | a40f6a32674e0123d70bc3d4e6fd172820426d33 /Master/texmf-dist/tex | |
parent | 40834c5a5192dc289a67333b621a28265ebb5290 (diff) |
listings (25may24)
git-svn-id: svn://tug.org/texlive/trunk@71355 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
14 files changed, 136 insertions, 88 deletions
diff --git a/Master/texmf-dist/tex/latex/listings/listings-acm.prf b/Master/texmf-dist/tex/latex/listings/listings-acm.prf index 9c3ebd57d2a..dc28dfa2298 100644 --- a/Master/texmf-dist/tex/latex/listings/listings-acm.prf +++ b/Master/texmf-dist/tex/latex/listings/listings-acm.prf @@ -22,7 +22,7 @@ %% programming languages to Jobst Hoffmann at <j.hoffmann@fh-aachen.de>. %% \ProvidesFile{listings-acm.prf} - [2024/03/11 1.10a listings language file] + [2024/05/25 1.10b listings language file] \usepackage[rgb, x11names]{xcolor} \definecolor{Comments}{rgb}{0.00,0.50,0.00} diff --git a/Master/texmf-dist/tex/latex/listings/listings-bash.prf b/Master/texmf-dist/tex/latex/listings/listings-bash.prf index 27d22ea3208..f79b2e4152a 100644 --- a/Master/texmf-dist/tex/latex/listings/listings-bash.prf +++ b/Master/texmf-dist/tex/latex/listings/listings-bash.prf @@ -22,7 +22,7 @@ %% programming languages to Jobst Hoffmann at <j.hoffmann@fh-aachen.de>. %% \ProvidesFile{listings-bash.prf} - [2024/03/11 1.10a listings language file] + [2024/05/25 1.10b listings language file] \usepackage[rgb, x11names]{xcolor} \lstset{% diff --git a/Master/texmf-dist/tex/latex/listings/listings-fortran.prf b/Master/texmf-dist/tex/latex/listings/listings-fortran.prf index e2e1673efe6..52a2a0db65e 100644 --- a/Master/texmf-dist/tex/latex/listings/listings-fortran.prf +++ b/Master/texmf-dist/tex/latex/listings/listings-fortran.prf @@ -22,7 +22,7 @@ %% programming languages to Jobst Hoffmann at <j.hoffmann@fh-aachen.de>. %% \ProvidesFile{listings-fortran.prf} - [2024/03/11 1.10a listings language file] + [2024/05/25 1.10b listings language file] \usepackage[rgb, x11names]{xcolor} \lstset{% diff --git a/Master/texmf-dist/tex/latex/listings/listings-hansl.prf b/Master/texmf-dist/tex/latex/listings/listings-hansl.prf index eebc2c9dabc..f5e3d6bb9d6 100644 --- a/Master/texmf-dist/tex/latex/listings/listings-hansl.prf +++ b/Master/texmf-dist/tex/latex/listings/listings-hansl.prf @@ -22,7 +22,7 @@ %% programming languages to Jobst Hoffmann at <j.hoffmann@fh-aachen.de>. %% \ProvidesFile{listings-hansl.prf} - [2024/03/11 1.10a listings language file] + [2024/05/25 1.10b listings language file] \usepackage[rgb, x11names]{xcolor} \lstdefinestyle{hanslbw}{% diff --git a/Master/texmf-dist/tex/latex/listings/listings-lua.prf b/Master/texmf-dist/tex/latex/listings/listings-lua.prf index 49c4dd300aa..7fdeea59d81 100644 --- a/Master/texmf-dist/tex/latex/listings/listings-lua.prf +++ b/Master/texmf-dist/tex/latex/listings/listings-lua.prf @@ -22,7 +22,7 @@ %% programming languages to Jobst Hoffmann at <j.hoffmann@fh-aachen.de>. %% \ProvidesFile{listings-lua.prf} - [2024/03/11 1.10a listings language file] + [2024/05/25 1.10b listings language file] \usepackage[rgb, x11names]{xcolor} \lstdefinestyle{Lua}{% language=[5.2]Lua, diff --git a/Master/texmf-dist/tex/latex/listings/listings-python.prf b/Master/texmf-dist/tex/latex/listings/listings-python.prf index 82f0285871d..3d8ef9a3c9f 100644 --- a/Master/texmf-dist/tex/latex/listings/listings-python.prf +++ b/Master/texmf-dist/tex/latex/listings/listings-python.prf @@ -22,12 +22,14 @@ %% programming languages to Jobst Hoffmann at <j.hoffmann@fh-aachen.de>. %% \ProvidesFile{listings-python.prf} - [2024/03/11 1.10a listings language file] + [2024/05/25 1.10b listings language file] \usepackage{xcolor} \usepackage{textcomp} %% Actual colors from idlelib/config-highlight.def %% --> corrected to ``web-safe'' +%% Unimplemented IDLE syntax: function/class names being +%% defined should be blue %% strings = #00aa00 / 0,170,0 (a darker green) %% builtins = #900090 / 144,0,144 (purple-ish) %% keywords = #FF7700 / 255,119,0 (quite close to plain `orange') diff --git a/Master/texmf-dist/tex/latex/listings/listings-rexx.prf b/Master/texmf-dist/tex/latex/listings/listings-rexx.prf index d29a0751c01..0548072e97e 100644 --- a/Master/texmf-dist/tex/latex/listings/listings-rexx.prf +++ b/Master/texmf-dist/tex/latex/listings/listings-rexx.prf @@ -22,27 +22,21 @@ %% programming languages to Jobst Hoffmann at <j.hoffmann@fh-aachen.de>. %% \ProvidesFile{listings-rexx.prf} - [2024/03/11 1.10a listings language file] -\usepackage{xcolor} -\usepackage{textcomp} + [2024/05/25 1.10b listings language file] +\usepackage{xcolor} % needed for colors like yellow!10 +\usepackage{textcomp} % needed for upquote -%% Actual colors from idlelib/config-highlight.def -%% --> corrected to ``web-safe'' -%% strings = #00aa00 / 0,170,0 (a darker green) -%% builtins = #900090 / 144,0,144 (purple-ish) -%% keywords = #FF7700 / 255,119,0 (quite close to plain `orange') -%% Corrected to ``web-safe'' -\definecolor{purple2}{RGB}{153,0,153} % there's actually no standard purple -\definecolor{green2}{RGB}{0,153,0} % a darker green - -\lstdefinestyle{python-idle-code}{% - language=Python, % the language - basicstyle=\normalsize\ttfamily, % size of the fonts for the code - % Color settings to match IDLE style - keywordstyle=\color{orange}, % core keywords - keywordstyle={[2]\color{purple2}}, % built-ins - stringstyle=\color{green2},% - commentstyle=\color{red},% +\lstdefinestyle{rexx-colored}{% + language=oorexx, % the language + backgroundcolor=\color{yellow!10}, + basicstyle=\normalsize\ttfamily, % size of the fonts for + % the code + % Color settings to match JHf's preferred style + keywordstyle=\color{blue}, % core keywords + keywordstyle={[2]\color{cyan}}, % built-ins + keywordstyle={[3]\color{olive}}, % special keywords + stringstyle=\color{teal},% + commentstyle=\color{orange},% upquote=true, % requires textcomp } \endinput diff --git a/Master/texmf-dist/tex/latex/listings/listings.cfg b/Master/texmf-dist/tex/latex/listings/listings.cfg index cf27aefe593..3024c431afa 100644 --- a/Master/texmf-dist/tex/latex/listings/listings.cfg +++ b/Master/texmf-dist/tex/latex/listings/listings.cfg @@ -21,7 +21,7 @@ %% Send comments and ideas on the package, error reports and additional %% programming languages to Jobst Hoffmann at <j.hoffmann@fh-aachen.de>. %% -\ProvidesFile{listings.cfg}[2024/03/11 1.10a listings configuration] +\ProvidesFile{listings.cfg}[2024/05/25 1.10b listings configuration] \def\lstlanguagefiles {lstlang0.sty,lstlang1.sty,lstlang2.sty,lstlang3.sty} \lstset{defaultdialect=[R/3 6.10]ABAP, @@ -37,6 +37,7 @@ defaultdialect=[11.0]Mathematica, defaultdialect=[OMG]OCL, defaultdialect=[Standard]Pascal, + defaultdialect=[2]Python, defaultdialect=[67]Simula, defaultdialect=[plain]TeX, defaultdialect=[97]VRML} 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@}% diff --git a/Master/texmf-dist/tex/latex/listings/lstdoc.sty b/Master/texmf-dist/tex/latex/listings/lstdoc.sty index 0eae560d662..5de8d7ec5ab 100644 --- a/Master/texmf-dist/tex/latex/listings/lstdoc.sty +++ b/Master/texmf-dist/tex/latex/listings/lstdoc.sty @@ -6,8 +6,8 @@ %% %% listings.dtx (with options: `doc') %% -\def\filedate{2024/03/11} -\def\fileversion{1.10a} +\def\filedate{2024/05/25} +\def\fileversion{1.10b} \ProvidesPackage{lstdoc} [\filedate\space\fileversion\space(Carsten Heinz)] \let\lstdoc@currversion\fileversion diff --git a/Master/texmf-dist/tex/latex/listings/lstlang1.sty b/Master/texmf-dist/tex/latex/listings/lstlang1.sty index 938f7ef1405..97481e7d77b 100644 --- a/Master/texmf-dist/tex/latex/listings/lstlang1.sty +++ b/Master/texmf-dist/tex/latex/listings/lstlang1.sty @@ -22,7 +22,7 @@ %% programming languages to Jobst Hoffmann at <j.hoffmann@fh-aachen.de>. %% \ProvidesFile{lstlang1.sty} - [2024/03/11 1.10a listings language file] + [2024/05/25 1.10b listings language file] %% %% ACSL definition (c) 2000 by Andreas Matthias %% @@ -2944,12 +2944,16 @@ morecomment=[l]!% %% %% Python definition (c) 1998 Michael Weber %% Additional definitions (2013) Alexis Dimitriadis +%% small corrections based on +%% https://docs.python.org/2/reference/lexical_analysis.html#identifiers %% -\lst@definelanguage{Python}{% - morekeywords={access, and, break, class, continue, def, del, elif, else,% - except, exec, finally, for, from, global, if, import, in, is, lambda,% - not, or, pass, print, raise, return, try, while},% - % Built-ins +\lst@definelanguage[2]{Python}{% + morekeywords={and, as, assert, break, class, continue, def, del, elif,% + else, except, exec, finally, for, from, global, if, import, in, is,% + lambda, not, or, pass, print, raise, return, try, while, with, yield},% + % Built-ins according to + % http://docs.python.org/2/library/functions.html, + % the last five entries are known as advanced or not essential morekeywords=[2]{abs, all, any, basestring, bin, bool, bytearray,% callable, chr, classmethod, cmp, compile, complex, delattr, dict, dir,% divmod, enumerate, eval, execfile, file, filter, float, format,% @@ -2958,22 +2962,60 @@ morecomment=[l]!% memoryview, min, next, object, oct, open, ord, pow, property, range,% raw_input, reduce, reload, repr, reversed, round, set, setattr, slice,% sorted, staticmethod, str, sum, super, tuple, type, unichr, unicode,% - vars, xrange, zip, apply, buffer, coerce, intern},% + vars, xrange, zip, __import__, apply, buffer, coerce, intern},% sensitive=true,% morecomment=[l]\#,% + morestring=[s]{'''}{'''},% used for documentation text + % (multiline strings) + morestring=[s]{"""}{"""},% added by Philipp Matthias Hahn morestring=[b]',% - morestring=[b]",% - morecomment=[s]{'''}{'''},% used for documentation text - % (mulitiline strings) - morecomment=[s]{"""}{"""},% added by Philipp Matthias Hahn - morestring=[s]{r'}{'},% `raw' strings - morestring=[s]{r"}{"},% - morestring=[s]{r'''}{'''},% - morestring=[s]{r"""}{"""},% - morestring=[s]{u'}{'},% unicode strings - morestring=[s]{u"}{"},% - morestring=[s]{u'''}{'''},% - morestring=[s]{u"""}{"""}% + morestring=[b]"% +} +\lst@definelanguage[3]{Python}[2]{Python}{% + % keywords + deletekeywords={exec, print}, + morekeywords={False, None, True, async, await, nonlocal, + match, case}, + % built-in functions + deletekeywords=[2]{apply, basestring, buffer, cmp, coerce, execfile, % + file, intern, long, raw_input, reduce, reload, unichr, unicode, xrange}, + morekeywords=[2]{aiter, anext, ascii, breakpoint, bytes, exec}, + % `raw' strings + morestring=[s]{r'}{'}, + morestring=[s]{r"}{"}, + morestring=[s]{r'''}{'''}, + morestring=[s]{r"""}{"""}, + morestring=[s]{R'}{'}, + morestring=[s]{R"}{"}, + morestring=[s]{R'''}{'''}, + morestring=[s]{R"""}{"""}, + % Unicode strings + morestring=[s]{u'}{'}, + morestring=[s]{u"}{"}, + morestring=[s]{u'''}{'''}, + morestring=[s]{u"""}{"""}, + morestring=[s]{U'}{'}, + morestring=[s]{U"}{"}, + morestring=[s]{U'''}{'''}, + morestring=[s]{U"""}{"""}, + % Format strings + morestring=[s]{f'}{'}, + morestring=[s]{f"}{"}, + morestring=[s]{f'''}{'''}, + morestring=[s]{f"""}{"""}, + morestring=[s]{F'}{'}, + morestring=[s]{F"}{"}, + morestring=[s]{F'''}{'''}, + morestring=[s]{F"""}{"""}, + % Byte literals + morestring=[s]{b'}{'}, + morestring=[s]{b"}{"}, + morestring=[s]{b'''}{'''}, + morestring=[s]{b"""}{"""}, + morestring=[s]{B'}{'}, + morestring=[s]{B"}{"}, + morestring=[s]{B'''}{'''}, + morestring=[s]{B"""}{"""}, }% %% %% Scilab definition (c) 2002,2003 Jean-Philippe Grivet diff --git a/Master/texmf-dist/tex/latex/listings/lstlang2.sty b/Master/texmf-dist/tex/latex/listings/lstlang2.sty index 020d30ac310..711754208fa 100644 --- a/Master/texmf-dist/tex/latex/listings/lstlang2.sty +++ b/Master/texmf-dist/tex/latex/listings/lstlang2.sty @@ -22,7 +22,7 @@ %% programming languages to Jobst Hoffmann at <j.hoffmann@fh-aachen.de>. %% \ProvidesFile{lstlang2.sty} - [2024/03/11 1.10a listings language file] + [2024/05/25 1.10b listings language file] %% %% Abap definition by Knut Lickert %% @@ -1620,6 +1620,7 @@ procedure,pull,push,queue,return,say,select,signal,then,% to,trace,when},% sensitive=false,% + morecomment=[l]{--},% morecomment=[n]{/*}{*/},% morestring=[d]{'},% morestring=[d]{"},% @@ -1643,7 +1644,6 @@ sensitive=false,% morestring=[d]",% morestring=[d]',% - morecomment=[s]{/*}{*/},% }[keywords,comments,strings] %% %% ooREXX keywords (http://www.oorexx.org/) @@ -1652,7 +1652,7 @@ ::options, ::requires, ::resource, ::routine,% forward, guard, local, loop, raise, strict,% },% - alsoletter={:},% + alsoletter={:} }[keywords,comments,strings] \lst@definelanguage{Ruby}% {morekeywords={__FILE__,__LINE__,BEGIN,END,alias,and,begin,break,% diff --git a/Master/texmf-dist/tex/latex/listings/lstlang3.sty b/Master/texmf-dist/tex/latex/listings/lstlang3.sty index 2eaced05fd3..751259d95d7 100644 --- a/Master/texmf-dist/tex/latex/listings/lstlang3.sty +++ b/Master/texmf-dist/tex/latex/listings/lstlang3.sty @@ -22,7 +22,7 @@ %% programming languages to Jobst Hoffmann at <j.hoffmann@fh-aachen.de>. %% \ProvidesFile{lstlang3.sty} - [2024/03/11 1.10a listings language file] + [2024/05/25 1.10b listings language file] \lst@definelanguage[68]{Algol}% {morekeywords={abs,and,arg,begin,bin,bits,bool,by,bytes,case,channel,% char,co,comment,compl,conj,divab,do,down,elem,elif,else,empty,% diff --git a/Master/texmf-dist/tex/latex/listings/lstmisc.sty b/Master/texmf-dist/tex/latex/listings/lstmisc.sty index b39168f2717..9e663303727 100644 --- a/Master/texmf-dist/tex/latex/listings/lstmisc.sty +++ b/Master/texmf-dist/tex/latex/listings/lstmisc.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} \ProvidesFile{lstmisc.sty} [\filedate\space\fileversion\space(Carsten Heinz)] \lst@CheckVersion\fileversion% |