diff options
author | Karl Berry <karl@freefriends.org> | 2024-03-13 20:08:51 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2024-03-13 20:08:51 +0000 |
commit | 062fe54d426465fe5a5450f7338ccbe2d165d5d1 (patch) | |
tree | cca835c8d7726dcbb808d24285af143e6fd995fd /Master/texmf-dist/source/latex | |
parent | 5d222c4c82ebf9488ab2e6ae6ba131a731658c0a (diff) |
listings (12mar24)
git-svn-id: svn://tug.org/texlive/trunk@70624 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex')
-rw-r--r-- | Master/texmf-dist/source/latex/listings/listings.dtx | 7 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/listings/lstdrvrs.dtx | 247 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/listings/lstdrvrs.ins | 3 |
3 files changed, 170 insertions, 87 deletions
diff --git a/Master/texmf-dist/source/latex/listings/listings.dtx b/Master/texmf-dist/source/latex/listings/listings.dtx index c336295db5c..06f881726bb 100644 --- a/Master/texmf-dist/source/latex/listings/listings.dtx +++ b/Master/texmf-dist/source/latex/listings/listings.dtx @@ -135,7 +135,7 @@ % Hoffmann became the maintainer of the \packagename{listings} % package in 2013; see the Preface for details.}~ % % \textless\lstemail\textgreater} -% \date{2024/02/21\enspace\enspace Version 1.10\ \box\abstractbox} +% \date{2024/03/11\enspace\enspace Version 1.10a\ \box\abstractbox} % \def\lstemail{\href{mailto:j.hoffmann@fh-aachen.de}{\texttt{j.hoffmann(at)fh-aachen.de}}} % \ifhyper % \hypersetup{pdftitle=The Listings Package, @@ -6122,8 +6122,8 @@ % All files will have same date and version. % \begin{macrocode} %<*kernel|misc|doc> -\def\filedate{2024/02/21} -\def\fileversion{1.10} +\def\filedate{2024/03/11} +\def\fileversion{1.10a} %</kernel|misc|doc> % \end{macrocode} % What we need and who we are. @@ -6165,6 +6165,7 @@ \ProvidesFile{lstpatch.sty} [\filedate\space\fileversion\space(Carsten Heinz)] \lst@CheckVersion\lst@version{} +%%% intentionally empty %</patch> % \end{macrocode} % \begin{macrocode} diff --git a/Master/texmf-dist/source/latex/listings/lstdrvrs.dtx b/Master/texmf-dist/source/latex/listings/lstdrvrs.dtx index 02dc1ea88ac..56c2a926424 100644 --- a/Master/texmf-dist/source/latex/listings/lstdrvrs.dtx +++ b/Master/texmf-dist/source/latex/listings/lstdrvrs.dtx @@ -1,6 +1,6 @@ % \iffalse % -% Time-stamp: <2024-02-17 18:25:08 ax006ho> +% Time-stamp: <2024-03-12 09:33:03 ax006ho> % %<*driver> \documentclass{ltxdoc} @@ -33,7 +33,7 @@ % \title{Language, Style and Format drivers\\ for \textsf{Listings}\\ % {\large by Carsten Heinz and individual authors:}} % \author{\InputIfFileExists{lstdrvrs.tmp}{}{}} -% \date{2024/02/21\enspace\enspace Version 1.10\ \box\abstractbox} +% \date{2024/03/11\enspace\enspace Version 1.10a\ \box\abstractbox} % % \ifhyper % \hypersetup{pdftitle={Language, Style and Format drivers for the @@ -113,6 +113,7 @@ \file{listings-hansl.prf}{\from{lstdrvrs.dtx}{hansl-prf}} \file{listings-lua.prf}{\from{lstdrvrs.dtx}{lua-prf}} \file{listings-python.prf}{\from{lstdrvrs.dtx}{python-prf}} + \file{listings-rexx.prf}{\from{lstdrvrs.dtx}{rexx-prf}} } @@ -137,7 +138,7 @@ % \endgroup % We mainly define default dialects. % \begin{macrocode} -\ProvidesFile{listings.cfg}[2024/02/21 1.10 listings configuration] +\ProvidesFile{listings.cfg}[2024/03/11 1.10a listings configuration] \def\lstlanguagefiles {lstlang0.sty,lstlang1.sty,lstlang2.sty,lstlang3.sty} \lstset{defaultdialect=[R/3 6.10]ABAP, @@ -184,7 +185,8 @@ %<+hansl-prf>\ProvidesFile{listings-hansl.prf} %<+lua-prf>\ProvidesFile{listings-lua.prf} %<+python-prf>\ProvidesFile{listings-python.prf} -%<-config> [2024/02/21 1.10 listings language file] +%<+rexx-prf>\ProvidesFile{listings-rexx.prf} +%<-config> [2024/03/11 1.10a listings language file] % \end{macrocode} % % @@ -320,7 +322,7 @@ morecomment=[l]{//},% morecomment=[s]{/*}{*/},% string=[b]{"},% -}[keywords,comments,strings]% +}[keywords,comments,strings] % \end{macrocode} % \begin{macrocode} %</lang2> @@ -343,7 +345,7 @@ Abs,Array,Clear,CreateObject,CStr,Err,ForReading,ForWriting,% OpenTextFile,Replace,WriteLine% }% -}[keywords,comments,strings]% +}[keywords,comments,strings] % \end{macrocode} % \begin{macrocode} %</lang2> @@ -462,7 +464,7 @@ morecomment=[l]--,% morestring=[m]",% percent not defined as stringizer so far morestring=[m]'% - }[keywords,comments,strings]% + }[keywords,comments,strings] % \end{macrocode} % \begin{macrocode} %</lang1> @@ -628,7 +630,7 @@ morecomment=[l]//,% morecomment=[s]{/*}{*/},% morestring=[b]"% - }[keywords,comments,strings]% + }[keywords,comments,strings] %</lang1> % \end{macrocode} % \endgroup @@ -809,7 +811,7 @@ morecomment=[l]//,% missing comma: Markus Pahlow morecomment=[n]{/*}{*/},% morestring=[b]"% - }[keywords,comments,strings]% + }[keywords,comments,strings] %</lang3> % \end{macrocode} % \endgroup @@ -990,7 +992,7 @@ morecomment=[s]{/*}{*/},% morecomment=[l]//,% morestring=[b]" - }[keywords,comments,strings]% + }[keywords,comments,strings] % \end{macrocode} % \begin{macrocode} %</lang1> @@ -1091,7 +1093,7 @@ sensitive=true,% morecomment=[l]{//},% morestring=[b]"% -}[keywords,comments,strings]% +}[keywords,comments,strings] % \end{macrocode} % \begin{macrocode} %</lang3> @@ -1173,7 +1175,7 @@ sensitive=f,% ??? morecomment=[f][commentstyle][6]*,% morestring=[d]"% ??? doubled - }[keywords,comments,strings]% + }[keywords,comments,strings] % \end{macrocode} % \texttt{commentstyle} (not the surrounding brackets) have been added after % a bug report by \lsthelper{Stephen Reindl}{Stephen.Reindl@vodafone.de} @@ -1208,7 +1210,7 @@ sensitive=f,% ??? morecomment=[l]//,% morestring=[d]"% - }[keywords,comments,strings]% + }[keywords,comments,strings] % \end{macrocode} % \begin{macrocode} %</lang3> @@ -1247,7 +1249,7 @@ morecomment=[l]{REm},% morecomment=[l]{REM},% morestring=[d]"% -}[keywords,comments,strings]% +}[keywords,comments,strings] % \end{macrocode} % \begin{macrocode} %</lang3> @@ -1369,7 +1371,7 @@ sensitive=false,% morecomment=[l]\%,% morestring=[m]'% - }[keywords,comments,strings]% + }[keywords,comments,strings] % \end{macrocode} % \begin{macrocode} %</lang3> @@ -1398,7 +1400,7 @@ sqrt,BEGIN,END},% morecomment=[l]\#,% morestring=[d]"% - }[keywords,comments,strings]% + }[keywords,comments,strings] % \end{macrocode} % Thanks to \lstthanks{Riccardo~Murri}{riccardo.murri@gmx.it}{2003/09/24} % for the following two @@ -1429,7 +1431,7 @@ morecomment=[l]\#,% morestring=[d]",% morestring=[d]'% - }[keywords,comments,strings]% + }[keywords,comments,strings] %</lang1> % \end{macrocode} % \endgroup @@ -1547,7 +1549,7 @@ morecomment=[s]{\{}{\}},% morecomment=[l]{//},% 2001 Christian Gudrian morestring=[d]'% - }[keywords,comments,strings]% + }[keywords,comments,strings] % \end{macrocode} % \begin{macrocode} %</lang2> @@ -1581,7 +1583,7 @@ sensitive,% morecomment=[l]--,% morestring=[d]",% - }[keywords,comments,strings]% + }[keywords,comments,strings] % \end{macrocode} % The key=value \texttt{stringtest=false} has been removed after a bug % report from \lsthelper{Xavier~Cr\'egut}{cregut@enseeiht.fr}{2002/09/09} @@ -1623,7 +1625,7 @@ replacerow,replacecolumn,replaceelement,transp,errorsstop,stop},% sensitive,% morestring=[d]"% - }[keywords,strings]% + }[keywords,strings] % \end{macrocode} % \begin{macrocode} %</lang3> @@ -1657,7 +1659,7 @@ morecomment=[l]\%,% morestring=[b]",% morestring=[b]'% - }[keywords,comments,strings]% + }[keywords,comments,strings] % \end{macrocode} % \begin{macrocode} %</lang3> @@ -1693,7 +1695,7 @@ morecomment=[l]--,% morestring=[d]',% morestring=[d]"% - }[keywords,comments,strings]% + }[keywords,comments,strings] % \end{macrocode} % \begin{macrocode} %</lang2> @@ -1888,7 +1890,7 @@ morecomment=[l]!% morecomment=[f]c,% morestring=[d]",%% not Fortran-77 standard, but allowed in Fortran-95 %% morestring=[d]'% - }[keywords,comments,strings]% + }[keywords,comments,strings] % \end{macrocode} % \begin{macrocode} %</lang1> @@ -2027,7 +2029,7 @@ morecomment=[l]!% morestring=[b]',% morestring=[b]",% morestring=[s]{`}{`},% -}[keywords,comments,strings]% +}[keywords,comments,strings] % \end{macrocode} % \begin{macrocode} %</lang3> @@ -2066,7 +2068,7 @@ morecomment=[l]!% sensitive=f,% morecomment=[s]{\{}{\}},% morestring=[d]'% - }[keywords,comments,strings]% + }[keywords,comments,strings] % \end{macrocode} % \begin{macrocode} %</lang2> @@ -2105,7 +2107,7 @@ morecomment=[l]!% comment=[l]\#,% morestring=[b]",% morestring=[b]',% - }[keywords,comments,strings]% + }[keywords,comments,strings] %</lang2> % \end{macrocode} % \endgroup @@ -2333,7 +2335,7 @@ morecomment=[l]!% morecomment=[l]--,% morecomment=[n]{\{-}{-\}},% morestring=[b]"% - }[keywords,comments,strings]% + }[keywords,comments,strings] % \end{macrocode} % \begin{macrocode} %</lang2> @@ -2425,7 +2427,7 @@ morecomment=[l]!% sensitive=f,% morecomment=[l];,% morestring=[d]'% - }[keywords,comments,strings]% + }[keywords,comments,strings] % \end{macrocode} % \begin{macrocode} %</lang2> @@ -2447,7 +2449,7 @@ morecomment=[l]!% %% %% Inform definition (c) 2003 Jonathan Sauer %% -\lst@definelanguage{inform}{% +\lst@definelanguage{Inform}{% % Language keywords morekeywords={breakdo,else,false,for,has,hasnt,if,% in,indirect,jump,notin,nothing,NULL,objectloop,ofclass,% @@ -2530,7 +2532,7 @@ morecomment=[l]!% sensitive=false,% morestring=[d]{"},% morecomment=[l]{!}% -}[keywords,comments,strings]% +}[keywords,comments,strings] % \end{macrocode} % \begin{macrocode} %</lang2> @@ -2606,7 +2608,7 @@ morecomment=[l]!% morecomment=[s]{/*}{*/},% morestring=[b]",% morestring=[b]',% - }[keywords,comments,strings]% + }[keywords,comments,strings] % \end{macrocode} % \lsthelper{Herbert Voss}{Herbert.Voss@alumni.TU-Berlin.de}{2002/07/30} % {missing keyword label} added the keyword \texttt{label}. @@ -2615,6 +2617,9 @@ morecomment=[l]!% % \end{macrocode} % \endgroup % +% +% \subsubsection[JVMIS---Java bytecode instructions]{JVMIS---The Java bytecode instructions} +% % \lstthanks{Martine~Gautier}{Martine.Gautier@loria.fr}{2004/03/30} made the % following contribution. % \begingroup @@ -2663,29 +2668,52 @@ morecomment=[l]!% % % \lstthanks{Bastian Germann}{bastian.germann@nordakademie.de}{2013/10/19} % asked to include the Scala definition provided by Frank Teubler -% (2009). Here it is: +% (2009). Here it is---the definition has got a small overhaul according to +% the Scala syntax published for version 2.13 +% (\url{https://scala-lang.org/files/archive/spec/2.13/spec.pdf}): % \begingroup % \begin{macrocode} %<*lang3> % \end{macrocode} % \begin{macrocode} -\lst@definelanguage{Scala}% - {morekeywords={abstract,case,catch,class,def,% +\lst@definelanguage{Scala}{% + morekeywords={abstract,case,catch,class,def,% do,else,extends,false,final,finally,% - for,if,implicit,import,lazy,match,mixin,% - new,null,object,override,package,% + for,forSome,if,implicit,import,lazy,macro,match,% + mixin,new,null,object,override,package,% private,protected,requires,return,sealed,% super,this,trait,true,try,% type,val,var,while,with,yield},%+ -% otherkeywords={_,:,=,=>,<<:,<\%,>:,\#,@},% - otherkeywords={=,=>,<-,<\%,<:,>:,\#,@},% - sensitive,% - morecomment=[l]//,% - morecomment=[n]{/*}{*/},% - morestring=[b]",% - morestring=[b]',% - morestring=[b]""",% - }[keywords,comments,strings]% + otherkeywords={_, :, =, =>, <-, <\%, <:, >:, \#, @},% + sensitive,% + morecomment=[l]//,% + morecomment=[n]{/*}{*/},% + morestring=[b]",% + morestring=[b]',% + morestring=[b]""",% +}[keywords,comments,strings] +% \end{macrocode} +% Remark: This definition contains the keywords |mixin| and |requires|, +% which don't belong to the official Scala 2.13 language definition, the +% keywords |forSome|, |macro|, and |throw|, which were missing in listings +% prior than v1.10a, are added silently. The Unicode operators |\u21D2| and +% |\u2190|, which have the ASCII equivalents |=>| and |<-|, are also +% reserved but cannot be used with PDF\TeX. +% +% \lstthanks{Deloo}{lucadelu97@gmail.com}{2024-03-02} asked for Scala 3.0 +% support. The following code according to +% \url{https://docs.scala-lang.org/scala3/reference/syntax.html} is a +% simple approach, \textsf{listings} cannot correctly support soft +% keywords, because they are context dependent. +% \begin{macrocode} +\lst@definelanguage[3.0]{Scala}[]{Scala}{% + morekeywords={as, derives, end, enum, export, extension, given}, + morekeywords=[2]{infix, inline, opaque, open, transparent} + otherkeywords={=>>, ?=>, =>}, % =>> isn't recognized, even after + % the keyword => is deleted + alsoletter={*, +, -, |}, + deletekeywords={<\%, _, forSome, macro, mixin, requires, this}, +}[keywords,comments,strings] % \end{macrocode} % \begin{macrocode} %</lang3> @@ -2715,7 +2743,8 @@ morecomment=[l]!% morestring=[d]",% morestring=[d]',% morestring=[d]`% - }[keywords,comments,strings]% + }[keywords,comments,strings] +% \end{macrocode} % \begin{macrocode} %</lang3> % \end{macrocode} @@ -2938,7 +2967,7 @@ morecomment=[l]!% sensitive=false,% morecomment=[l]{--},% morestring=[b]",% -}[keywords,comments,strings]% +}[keywords,comments,strings] % \begin{macrocode} %</lang3> % \end{macrocode} @@ -3011,7 +3040,7 @@ morecomment=[l]!% morecomment=[l];,% morecomment=[s]{\#|}{|\#},% 1997 Aslak Raanes morestring=[b]"% - }[keywords,comments,strings]% + }[keywords,comments,strings] % \end{macrocode} % \begin{macrocode} %</lang2> @@ -3120,7 +3149,7 @@ morecomment=[l]!% morecomment=[l];,% morecomment=[l];;,% morestring=[b]"% - }[keywords,comments,strings]% + }[keywords,comments,strings] % \end{macrocode} % \begin{macrocode} %</lang2> @@ -3148,7 +3177,7 @@ morecomment=[l]!% morecomment=[l];,% morecomment=[l];;,% morestring=[b]"% -}[keywords,comments,strings]% +}[keywords,comments,strings] % \end{macrocode} % \begin{macrocode} %</lang2> @@ -3399,7 +3428,7 @@ morecomment=[l]!% morestring=[b]',% % multi line strings morestring=[s]{[[}{]]},% -}[keywords,comments,strings]% +}[keywords,comments,strings] % \end{macrocode} % \endgroup % And here are the new definitions for Lua 5.1: @@ -3498,7 +3527,7 @@ morecomment=[l]!% morestring=[s]{[========[}{]========]},% morestring=[s]{[=========[}{]=========]},% morestring=[s]{[==========[}{]==========]},% -}[keywords,comments,strings]% +}[keywords,comments,strings] % \end{macrocode} % \endgroup % @@ -3582,7 +3611,7 @@ morecomment=[l]!% % and labels are also new in Lua 5.2 % \begin{macrocode} moredelim=[s][keywordstyle3]{::}{::},% -}[keywords,comments,strings]% +}[keywords,comments,strings] % \end{macrocode} % \endgroup % @@ -3642,7 +3671,7 @@ morecomment=[l]!% utf8, utf8.char, utf8.charpattern, utf8.codepoint, utf8.codes,% utf8.len, utf8.offset,% },% -}[keywords,comments,strings]% +}[keywords,comments,strings] % \end{macrocode} % \begin{macrocode} %</lang2> @@ -3816,7 +3845,7 @@ morecomment=[l]!% sensitive,% morecomment=[l]\%,% morestring=[m]'% - }[keywords,comments,strings]% + }[keywords,comments,strings] % \end{macrocode} % \begin{macrocode} %</lang1> @@ -5972,7 +6001,7 @@ morecomment=[l]!% sensitive,% morecomment=[s]{(*}{*)},% morestring=[d]"% - }[keywords,comments,strings]% + }[keywords,comments,strings] % \end{macrocode} % \begin{macrocode} %</lang1> @@ -6012,7 +6041,7 @@ morecomment=[l]!% morecomment=[s]{/*}{*/},% morestring=[bd]",% morestring=[bd]'% - }[keywords,comments,strings]% + }[keywords,comments,strings] % \end{macrocode} % \begin{macrocode} %</lang2> @@ -6131,7 +6160,7 @@ morecomment=[l]!% sensitive,% morecomment=[l]||,% morestring=[b]"% - }[keywords,comments,strings]% + }[keywords,comments,strings] % \end{macrocode} % \begin{macrocode} %</lang2> @@ -6201,7 +6230,7 @@ morecomment=[l]!% sensitive,% morecomment=[n]{(*}{*)},% morestring=[d]"% - }[keywords,comments,strings]% + }[keywords,comments,strings] % \end{macrocode} % \begin{macrocode} %</lang2> @@ -6237,7 +6266,7 @@ morecomment=[l]!% morecomment=[n]{(*}{*)},% morestring=[d]',% morestring=[d]"% - }[keywords,comments,strings]% + }[keywords,comments,strings] % \end{macrocode} % \begin{macrocode} %</lang3> @@ -6328,7 +6357,7 @@ morecomment=[l]!% morecomment=[n]{(*}{*)},% morestring=[d]',% morestring=[d]"% - }[keywords,comments,strings]% + }[keywords,comments,strings] % \end{macrocode} % \begin{macrocode} %</lang3> @@ -6406,7 +6435,7 @@ morecomment=[l]!% sensitive=t,% morecomment=[l]--,% morestring=[d]'% - }[keywords,comments,strings]% + }[keywords,comments,strings] % \end{macrocode} % After a bug report by \lsthelper{Martin~S\"u\ss kraut}{Edon.Myder@web.de} % {2003/01/30}{morerdkeywords doesn't exist any more} \texttt{morerdkeywords} @@ -6506,7 +6535,7 @@ morecomment=[l]!% morecomment=[l]\%,% morestring=[m]',% morestring=[m]"% - }[keywords,comments,strings]% + }[keywords,comments,strings] % \end{macrocode} % \begin{macrocode} %</lang1> @@ -6539,7 +6568,7 @@ morecomment=[l]!% morecomment=[s]{/*}{*/},% morestring=[b]",% morestring=[d]'% - }[keywords,comments,strings]% + }[keywords,comments,strings] % \end{macrocode} % \begin{macrocode} %</lang2> @@ -6617,7 +6646,7 @@ morecomment=[l]!% morecomment=[s]{(*}{*)},% morecomment=[s]{\{}{\}},% morestring=[d]'% - }[keywords,comments,strings]% + }[keywords,comments,strings] % \end{macrocode} % \begin{macrocode} %</lang1> @@ -6667,7 +6696,7 @@ morecomment=[l]!% morestring=[b]',% MoreSelectCharTable=% \lst@ReplaceInput{\$\#}{\lst@ProcessOther\$\lst@ProcessOther\#}% - }[keywords,comments,strings]% + }[keywords,comments,strings] % \end{macrocode} % \begin{macrocode} %</lang1> @@ -7268,7 +7297,7 @@ morecomment=[l]!% morecomment=[s]{/*}{*/},% morestring=[b]",% morestring=[b]'% - }[keywords,comments,strings]% + }[keywords,comments,strings] % \end{macrocode} % \begin{macrocode} %</lang2> @@ -7358,7 +7387,7 @@ morecomment=[l]!% morecomment=[s]{\%}{\%},% morestring=[b]',% literate={~}{{$\sim$}}{1} {^}{$\wedge$}{1},% - }[keywords,directives,comments,strings]% + }[keywords,directives,comments,strings] % \end{macrocode} % \begin{macrocode} %</lang3> @@ -7398,7 +7427,7 @@ morecomment=[l]!% sensitive=f,% morecomment=[s]{/*}{*/},% morestring=[d]'% -}[keywords,comments,strings]% +}[keywords,comments,strings] % \end{macrocode} % \begin{macrocode} %</lang3> @@ -7558,7 +7587,7 @@ morecomment=[l]!% morecomment=[l]//,% morecomment=[s]{/*}{*/},% morestring=[d]",% - }[keywords,directives,comments,strings]% + }[keywords,directives,comments,strings] % \end{macrocode} % \begin{macrocode} %</lang1> @@ -7593,7 +7622,7 @@ morecomment=[l]!% morecomment=[s]{/*}{*/},% morestring=[bd]",% morestring=[bd]'% - }[keywords,comments,strings]% + }[keywords,comments,strings] % \end{macrocode} % \begin{macrocode} %</lang2> @@ -7932,7 +7961,7 @@ morecomment=[l]!% morecomment=[n]{/*}{*/},% morestring=[d]{'},% morestring=[d]{"},% - }[keywords,comments,strings]% + }[keywords,comments,strings] % \end{macrocode} % \begin{macrocode} %</lang2> @@ -7971,11 +8000,15 @@ morecomment=[l]!% morestring=[d]",% morestring=[d]',% morecomment=[s]{/*}{*/},% -}[keywords,comments,strings]% +}[keywords,comments,strings] % \end{macrocode} % \begin{macrocode} %</lang2> % \end{macrocode} +% \lstthanks{Shmuel (Seymour J.) Metz}{smetz3@gmu.edu}{% +% 2023-10-30} pointed out the previously unsupported special variables +% |result| etc.. He also gave the advice to complete the definitions +% for OORexx in the following section. % \endgroup % % @@ -8002,6 +8035,54 @@ morecomment=[l]!% % \endgroup % % +% \begingroup +% Jobst Hoffmann added the following configuration for printing +% Rexx code which is similar to the colors used by the Fortran preferences file. +% \begin{macrocode} +%<*rexx-prf> +% \end{macrocode} +% \begin{macrocode} +\usepackage{xcolor} +\usepackage{textcomp} + +%% 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') +%\definecolor{IDLEorange}{RGB}{255,119,0} % pretty close to real orange +%\definecolor{IDLEpurple}{RGB}{144,0,144} +%\definecolor{IDLEgreen}{RGB}{0,170,0} +%\definecolor{IDLEred}{RGB}{221,0,0} +%% Corrected to ``web-safe'' +%\definecolor{orange2}{RGB}{255,102,0} +\definecolor{purple2}{RGB}{153,0,153} % there's actually no standard purple +\definecolor{green2}{RGB}{0,153,0} % a darker green +%\definecolor{red2}{RGB}{221,0,0} + +% Except for green and purple, the other colors are pretty good in standard +% hue +\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},% + upquote=true, % requires textcomp +} +% Unimplemented IDLE syntax: function/class names being defined should be +% blue +% \end{macrocode} +% This code is provided in the file |listings-rexx.prf|, see section +% 2.4.1 (Preferences) of the \packagename{listings} documentation. +% \begin{macrocode} +%</rexx-prf> +% \end{macrocode} +% \endgroup +% +% % \subsection{Reduce} % % was provided by \lstthanks{Geraint~Paul~Bevan}{geraint@users.sf.net} @@ -8064,7 +8145,7 @@ morecomment=[l]!% morecomment=[s]{COMMENT}{;},% morecomment=[s]{COMMENT}{$},% morestring="% - }[keywords,comments,strings]% + }[keywords,comments,strings] % \end{macrocode} % \begin{macrocode} %</lang3> @@ -8232,7 +8313,7 @@ literate=% morestring=[s]{\%Q(}{)},% morestring=[s]{\%Q[}{]},% morestring=[s]{\%Q-}{-}% - }[keywords,comments,strings]% + }[keywords,comments,strings] % \begin{macrocode} %</lang2> % \end{macrocode} @@ -8408,7 +8489,7 @@ literate=% morecomment=[l]//,% morestring=[b]",% morestring=[m]'% - }[keywords,comments,strings]% + }[keywords,comments,strings] % \end{macrocode} % \begin{macrocode} %</lang1> @@ -8485,7 +8566,7 @@ literate=% keywordcommentsemicolon={end}{else,end,otherwise,when}{comment},% morestring=[d]",% morestring=[d]'% - }[keywords,keywordcomments,strings]% + }[keywords,keywordcomments,strings] % \end{macrocode} % \begin{macrocode} %</lang3> @@ -8516,7 +8597,7 @@ literate=% morecomment=[l]\#,% morestring=[d]',% morestring=[d]"% - }[keywords,comments,strings]% + }[keywords,comments,strings] % \end{macrocode} % \begin{macrocode} %</lang3> @@ -8581,7 +8662,7 @@ literate=% morecomment=[s]{/*}{*/},% morestring=[d]',% morestring=[d]"% - }[keywords,comments,strings]% + }[keywords,comments,strings] % \end{macrocode} % \begin{macrocode} %</lang1> @@ -8743,7 +8824,7 @@ literate=% morecomment=[l]{;\#},% morecomment=[l]{[\#},% morecomment=[l]{\{\#}% - }[keywords,comments,strings]% + }[keywords,comments,strings] % \end{macrocode} % And after receiving a bug report from \lsthelper{Vitaly A. Repin} % {vitaly@radio.hop.stu.neva.ru}{2002/04/08}{undefined control sequence @@ -9188,7 +9269,7 @@ literate=% sensitive=f,% morecomment=[l]',% morestring=[d]"% - }[keywords,comments,strings]% + }[keywords,comments,strings] % \end{macrocode} % \begin{macrocode} %</lang2> @@ -9248,7 +9329,7 @@ literate=% morecomment=[s]{/*}{*/},% morecomment=[l]//,% nonstandard morestring=[b]"% - }[keywords,comments,strings]% + }[keywords,comments,strings] % \end{macrocode} % \begin{macrocode} %</lang3> @@ -9287,7 +9368,7 @@ literate=% sensitive=f,% 1998 Gaurav Aggarwal morecomment=[l]--,% morestring=[d]{"}% - }[keywords,comments,strings]% + }[keywords,comments,strings] % \end{macrocode} % The VHDL-AMS dialect has been added by \lstthanks{Steffen~Klupsch} % {steffen@vlsi.informatik.tu-darmstadt.de}{2001/10/05}. diff --git a/Master/texmf-dist/source/latex/listings/lstdrvrs.ins b/Master/texmf-dist/source/latex/listings/lstdrvrs.ins index 2489a4deb40..12234d80f90 100644 --- a/Master/texmf-dist/source/latex/listings/lstdrvrs.ins +++ b/Master/texmf-dist/source/latex/listings/lstdrvrs.ins @@ -44,6 +44,7 @@ \file{listings-hansl.prf}{\from{lstdrvrs.dtx}{hansl-prf}} \file{listings-lua.prf}{\from{lstdrvrs.dtx}{lua-prf}} \file{listings-python.prf}{\from{lstdrvrs.dtx}{python-prf}} + \file{listings-rexx.prf}{\from{lstdrvrs.dtx}{rexx-prf}} } \ifToplevel{ @@ -56,7 +57,7 @@ } \endbatchfile - [2024/02/21 1.10 listings language file] + [2024/03/11 1.10a listings language file] \endinput %% %% End of file `lstdrvrs.ins'. |