diff options
author | Karl Berry <karl@freefriends.org> | 2014-09-07 21:02:21 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2014-09-07 21:02:21 +0000 |
commit | aa82b39fdf2a2273eea8f0f990ebf8c51cbc7d19 (patch) | |
tree | b05c6021356f1d21250fb08224b9d04a7e50bad5 /Master/texmf-dist/source | |
parent | ff0be2556ec1f7fbde7f75caeed672f326246d37 (diff) |
listings
git-svn-id: svn://tug.org/texlive/trunk@35124 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r-- | Master/texmf-dist/source/latex/listings/listings.dtx | 21 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/listings/lstdrvrs.dtx | 138 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/listings/lstdrvrs.ins | 3 |
3 files changed, 138 insertions, 24 deletions
diff --git a/Master/texmf-dist/source/latex/listings/listings.dtx b/Master/texmf-dist/source/latex/listings/listings.dtx index 4767819937f..4c715bef717 100644 --- a/Master/texmf-dist/source/latex/listings/listings.dtx +++ b/Master/texmf-dist/source/latex/listings/listings.dtx @@ -30,9 +30,9 @@ % % The package has the LPPL maintenance status "maintained". % -% $Id: listings.dtx 125 2014-03-04 19:53:21Z j_hoffmann $ +% $Id: listings.dtx 149 2014-09-06 17:17:38Z j_hoffmann $ % -% The Current Maintainer is Jobst Hoffmann <j.hoffmann-(at)-fh-aachen.de>. +% The Current Maintainer is Jobst Hoffmann <j.hoffmann(at)fh-aachen.de>. % % end of software license % @@ -115,10 +115,10 @@ % Hoffmann became the maintainer of the \packagename{listings} % package in 2013; see the Preface for details.}~ % % \textless\lstemail\textgreater} -% \date{2014/03/04\enspace\enspace Version 1.5c\ \box\abstractbox} -% \def\lstemail{\href{mailto:j.hoffmann@fh-aachen.de}{\texttt{j.hoffmann-(at)-fh-aachen.de}}} +% \date{2014/09/06\enspace\enspace Version 1.5e\ \box\abstractbox} +% \def\lstemail{\href{mailto:j.hoffmann@fh-aachen.de}{\texttt{j.hoffmann(at)fh-aachen.de}}} % \ifhyper -% \hypersetup{pdfsubject=Package guide,pdfauthor=Jobst Hoffmann <j.hoffmann-(at)-fh-aachen.de>} +% \hypersetup{pdfsubject=Package guide,pdfauthor=Jobst Hoffmann <j.hoffmann(at)fh-aachen.de>} % \fi % % \csname @twocolumntrue\endcsname @@ -900,7 +900,7 @@ % % Sometimes authors of language support provide their own configuration % preferences. These may come either from their personal experience or -% from the settings in an IDE and can be defined as a \packagename{listing} +% from the settings in an IDE and can be defined as a \packagename{listings} % style. From version 1.5b of the \packagename{listings} package on these % styles are provided as files with the name % |listings-|\meta{language}|.prf|, \meta{language} is the name of the @@ -915,8 +915,11 @@ % file |listings-python.prf| resides in the \TeX{} search path. Of course % that file can be changed according to the user's preferences. % -% At the moment there are two such preferences files: +% At the moment there are five such preferences files: % \begin{enumerate} +% \item |listings-acm.prf| +% \item |listings-bash.prf| +% \item |listings-fortran.prf| % \item |listings-lua.prf| % \item |listings-python.prf| % \end{enumerate} @@ -5672,8 +5675,8 @@ % \paragraph{Identification} % All files will have same date and version. % \begin{macrocode} -\def\filedate{2014/03/04} -\def\fileversion{1.5c} +\def\filedate{2014/09/06} +\def\fileversion{1.5e} % \end{macrocode} % What we need and who we are. % \begin{macrocode} diff --git a/Master/texmf-dist/source/latex/listings/lstdrvrs.dtx b/Master/texmf-dist/source/latex/listings/lstdrvrs.dtx index 10253633a27..3dd876c7aa2 100644 --- a/Master/texmf-dist/source/latex/listings/lstdrvrs.dtx +++ b/Master/texmf-dist/source/latex/listings/lstdrvrs.dtx @@ -1,6 +1,6 @@ % \iffalse % -% $Id: lstdrvrs.dtx 126 2014-03-04 19:53:34Z j_hoffmann $ +% $Id: lstdrvrs.dtx 151 2014-09-06 17:21:33Z j_hoffmann $ % %<*driver> \documentclass{ltxdoc} @@ -32,7 +32,7 @@ % % \title{Language, Style and Format drivers\\ for \textsf{Listings}\\ {\large by Carsten Heinz and individual authors:}} % \author{\InputIfFileExists{lstdrvrs.tmp}{}{}} -% \date{2014/03/04\enspace\enspace Version 1.5c\ \box\abstractbox} +% \date{2014/09/06\enspace\enspace Version 1.5e\ \box\abstractbox} % % \hypersetup{pdfsubject=Language definitions,pdfauthor=Jobst Hoffmann % <j.hoffmann-(at)-fh-aachen.de>} @@ -101,6 +101,7 @@ \generate{ \file{listings-acm.prf}{\from{lstdrvrs.dtx}{acm-prf}} + \file{listings-bash.prf}{\from{lstdrvrs.dtx}{bash-prf}} \file{listings-fortran.prf}{\from{lstdrvrs.dtx}{fortran-prf}} \file{listings-lua.prf}{\from{lstdrvrs.dtx}{lua-prf}} \file{listings-python.prf}{\from{lstdrvrs.dtx}{python-prf}} @@ -128,7 +129,7 @@ % \endgroup % We mainly define default dialects. % \begin{macrocode} -\ProvidesFile{listings.cfg}[2014/03/04 1.5c listings configuration] +\ProvidesFile{listings.cfg}[2014/09/06 1.5e listings configuration] \def\lstlanguagefiles {lstlang0.sty,lstlang1.sty,lstlang2.sty,lstlang3.sty} \lstset{defaultdialect=[R/3 6.10]ABAP, @@ -170,10 +171,11 @@ %<+lang2>\ProvidesFile{lstlang2.sty} %<+lang3>\ProvidesFile{lstlang3.sty} %<+acm-prf>\ProvidesFile{listings-acm.prf} +%<+bash-prf>\ProvidesFile{listings-bash.prf} %<+fortran-prf>\ProvidesFile{listings-fortran.prf} %<+lua-prf>\ProvidesFile{listings-lua.prf} %<+python-prf>\ProvidesFile{listings-python.prf} -%<-config> [2014/03/04 1.5c listings language file] +%<-config> [2014/09/06 1.5e listings language file] % \end{macrocode} % % @@ -831,6 +833,16 @@ SUBX,SWAP,TAS,TRAP,TRAPV,TST,UNLK},% % \begin{macrocode} %<*lang1> % \end{macrocode} +% \lstthanks{Michael Fiedler}{post@michael-fiedler.net}{2014/09/04} +% provided the following list of new introduced keywords for C++11. +% \begin{macrocode} +\lst@definelanguage[11]{C++}[ISO]{C++}% + {morekeywords={alignas,alignof,char16_t,char32_t,constexpr,% + decltype,noexcept,nullptr,static_assert,thread_local},% + }% +% \end{macrocode} +% \lstthanks{Michael Piefel}{piefel@informatik.hu-berlin.de}{2001/11/21} +% suggested some more changes and added GNU C++. % For compatibility the `ANSI' language is defined in terms of ISO. % \begin{macrocode} \lst@definelanguage[ANSI]{C++}[ISO]{C++}{}% @@ -1369,22 +1381,30 @@ SUBX,SWAP,TAS,TRAP,TRAPV,TST,UNLK},% }[keywords,comments,strings]% % \end{macrocode} % Thanks to \lstthanks{Riccardo~Murri}{riccardo.murri@gmx.it}{2003/09/24} -% for the following two definitions. +% for the following two +% definitions. \lstthanks{Scott~Pakin}{scott@pakin.org}{2014/08/08} pointed +% out some missing keywords (|elif|, |in| for |sh|, |caller|, |compopt|, +% |coproc|, |dirs|, |help|, |mapfile|, |readarray| for |bash|) to the +% current maintainer. The |sh| list of keywords was checkead against the +% ``Manual of the Bourne Shell on Version 7'', found at +% \url{http://www.in-ulm.de/~mascheck/bourne/v7/}, last visited on +% 2014/09/06. % \begin{macrocode} %% %% bash,sh definition (c) 2003 Riccardo Murri <riccardo.murri@gmx.it> %% \lst@definelanguage{bash}[]{sh}% - {morekeywords={alias,bg,bind,builtin,command,compgen,complete,% - declare,disown,enable,fc,fg,history,jobs,et,local,logout,printf,% - pushd,popd,select,set,suspend,shopt,source,times,type,typeset,% - ulimit,unalias,wait},% + {morekeywords={alias,bg,bind,builtin,caller,command,compgen,compopt,% + complete,coproc,declare,disown,dirs,enable,fc,fg,help,history,% + jobs,let,local,logout,mapfile,printf,pushd,popd,readarray,select,% + set,suspend,shopt,source,times,type,typeset,ulimit,unalias,wait},% }% \lst@definelanguage{sh}% - {morekeywords={awk,break,case,cat,cd,continue,do,done,echo,else,% - env,eval,exec,expr,exit,export,false,fi,for,function,getopts,% - hash,history,if,kill,nice,nohup,ps,pwd,read,readonly,return,% - sed,shift,test,then,times,trap,true,umask,unset,until,while},% + {morekeywords={awk,break,case,cat,cd,continue,do,done,echo,elif,else,% + env,esac,eval,exec,exit,export,expr,false,fi,for,function,getopts,% + hash,history,if,in,kill,login,newgrp,nice,nohup,ps,pwd,read,% + readonly,return,set,sed,shift,test,then,times,trap,true,type,% + ulimit,umask,unset,until,wait,while},% morecomment=[l]\#,% morestring=[d]"% }[keywords,comments,strings]% @@ -1392,6 +1412,62 @@ SUBX,SWAP,TAS,TRAP,TRAPV,TST,UNLK},% % \end{macrocode} % \endgroup % +% \begingroup +% Jobst Hoffmann copied the definition of a style for printing Fortran code +% to a style for printing shell programs: +% \begin{macrocode} +%<*bash-prf> +% \end{macrocode} +% \begin{macrocode} +\usepackage[rgb, x11names]{xcolor} + +% common settings +\lstset{% + frame=tlb,% the frame is open on the right side + resetmargins=false,% + rulesepcolor=\color{black},% + numbers=left,% % left + numberstyle=\tiny,% + numbersep=5pt,% + firstnumber=1,% + stepnumber=5,% + columns=fixed,% % to prevent inserting spaces + fontadjust=true,% + keepspaces=true,% + basewidth=0.5em,% + captionpos=t,% + abovecaptionskip=\smallskipamount,% same amount as default + belowcaptionskip=\smallskipamount,% in caption package +} +% settings for colored printing +\lstdefinestyle{bash}{% + backgroundcolor=\color{yellow!10},% + basicstyle=\small\ttfamily,% + identifierstyle=\color{black},% + keywordstyle=\color{blue},% + keywordstyle={[2]\color{cyan}},% + keywordstyle={[3]\color{olive}},% + stringstyle=\color{teal},% + commentstyle=\itshape\color{orange},% +}% +% settings for back and white printing +\lstdefinestyle{bashbw}{% + backgroundcolor={},% + basicstyle=\small\ttfamily,% + identifierstyle={},% + keywordstyle=\bfseries,% + stringstyle=\itshape,% + commentstyle=\slshape,% + rulesepcolor=\color{black},% +}% +% \end{macrocode} +% This code is provided in the file |listings-bash.prf|, see section +% 2.4.1 (Preferences) of the \packagename{listings} documentation. +% \begin{macrocode} +%</bash-prf> +% \end{macrocode} +% \endgroup +% % % \subsection{Delphi} % @@ -2327,7 +2403,7 @@ SUBX,SWAP,TAS,TRAP,TRAPV,TST,UNLK},% % \endgroup % % -% \subsection{Java} +% \subsection{Java and other JVM based languages} % % \lstthanks{Robert~Wenner}{robert.wenner@gmx.de}{2003/03/27} sent in the % first of the following two definitions. @@ -2448,6 +2524,40 @@ SUBX,SWAP,TAS,TRAP,TRAPV,TST,UNLK},% % \endgroup % % +% \subsubsection{Scala} +% +% \lstthanks{Bastian Germann}{bastian.germann@nordakademie.de}{2013/10/19} +% asked to include the Scala definition provided by Frank Teubler +% (2009). Here it is: +% \begingroup +% \begin{macrocode} +%<*lang3> +% \end{macrocode} +% \begin{macrocode} +\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,% + 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]% +% \end{macrocode} +% \begin{macrocode} +%</lang3> +% \end{macrocode} +% \endgroup +% +% % \subsection{ksh} % % Thanks to \lstthanks{Jeffrey Ratcliffe}{Jeffrey.Ratcliffe@m.eads.net} diff --git a/Master/texmf-dist/source/latex/listings/lstdrvrs.ins b/Master/texmf-dist/source/latex/listings/lstdrvrs.ins index 35958a9f1b5..510673ad8d0 100644 --- a/Master/texmf-dist/source/latex/listings/lstdrvrs.ins +++ b/Master/texmf-dist/source/latex/listings/lstdrvrs.ins @@ -39,6 +39,7 @@ \generate{ \file{listings-acm.prf}{\from{lstdrvrs.dtx}{acm-prf}} + \file{listings-bash.prf}{\from{lstdrvrs.dtx}{bash-prf}} \file{listings-fortran.prf}{\from{lstdrvrs.dtx}{fortran-prf}} \file{listings-lua.prf}{\from{lstdrvrs.dtx}{lua-prf}} \file{listings-python.prf}{\from{lstdrvrs.dtx}{python-prf}} @@ -54,7 +55,7 @@ } \endbatchfile - [2014/03/04 1.5c listings language file] + [2014/09/06 1.5e listings language file] \endinput %% %% End of file `lstdrvrs.ins'. |