From e13a4bc41a7c5c5697b97a3cb5182ceba8ee0f66 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 8 Mar 2010 01:11:17 +0000 Subject: listing doc update, own package git-svn-id: svn://tug.org/texlive/trunk@17373 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/listing/listing.pdf | Bin 0 -> 265587 bytes Master/texmf-dist/doc/latex/listing/listing.tex | 109 +++++++++++++++++++ Master/texmf-dist/tex/latex/listing/listing.sty | 132 ++++++++++++++++++++++++ Master/texmf-dist/tex/latex/ltxmisc/listing.sty | 132 ------------------------ 4 files changed, 241 insertions(+), 132 deletions(-) create mode 100644 Master/texmf-dist/doc/latex/listing/listing.pdf create mode 100644 Master/texmf-dist/doc/latex/listing/listing.tex create mode 100644 Master/texmf-dist/tex/latex/listing/listing.sty delete mode 100644 Master/texmf-dist/tex/latex/ltxmisc/listing.sty (limited to 'Master/texmf-dist') diff --git a/Master/texmf-dist/doc/latex/listing/listing.pdf b/Master/texmf-dist/doc/latex/listing/listing.pdf new file mode 100644 index 00000000000..8a9ebc6ad92 Binary files /dev/null and b/Master/texmf-dist/doc/latex/listing/listing.pdf differ diff --git a/Master/texmf-dist/doc/latex/listing/listing.tex b/Master/texmf-dist/doc/latex/listing/listing.tex new file mode 100644 index 00000000000..21eeed4feba --- /dev/null +++ b/Master/texmf-dist/doc/latex/listing/listing.tex @@ -0,0 +1,109 @@ +\documentclass[DIV=9, parskip=half, pagesize=auto]{scrartcl} + +\usepackage{fixltx2e} +\usepackage{etex} +\usepackage{xspace} +\usepackage{lmodern} +\usepackage[T1]{fontenc} +\usepackage{textcomp} +\usepackage{array} +\usepackage{microtype} +\usepackage{hyperref} + +\newcommand*{\mail}[1]{\href{mailto:#1}{\texttt{#1}}} +\newcommand*{\pkg}[1]{\textsf{#1}} +\newcommand*{\cls}[1]{\textsf{#1}} +\newcommand*{\cs}[1]{\texttt{\textbackslash#1}} +\makeatletter +\newcommand*{\cmd}[1]{\cs{\expandafter\@gobble\string#1}} +\makeatother +\newcommand*{\env}[1]{\texttt{#1}} +\newcommand*{\opt}[1]{\texttt{#1}} +\newcommand*{\myllap}[1]{% + \quitvmode + \setbox0=\hbox{#1}% + \kern-\wd0 + #1% +} + +\deffootnote{1em}{0em}{\textsuperscript{\thefootnotemark}\,} +\addtokomafont{title}{\rmfamily} + +\title{The \pkg{listing} package\thanks{This manual corresponds to \pkg{listing}~V1.2, dated~1999/05/25.}} +\subtitle{\LaTeX\ package for typesetting listings.} +\author{% + Matthew Hebley\thanks{Matthew is no longer available for contact, email or otherwise}% + \and Volker Kuhlmann\thanks{University of Canterbury\newline EEE Dept\newline Christchurch, New Zealand\newline E-Mail: \mail{v.kuhlmann@elec.canterbury.ac.nz}}% +} +\date{1999/05/25} + + +\begin{document} + +\maketitle + +\begin{quote} + \footnotesize + This program can be redistributed and/or modified under the terms + of the \LaTeX\ Project Public License, distributed from CTAN + archives as \href{http://www.ctan.org/pub/tex-archive/macros/latex/base/lppl.txt}{\texttt{macros/latex/base/lppl.txt}}; either + version~1 of the License, or (at your option) any later version. +\end{quote} + + +\minisec{History:} + +\begin{tabular}{@{}ll>{\raggedright\arraybackslash}p{10cm}@{}} + 1.2 & 25 May 1999 & Re-published under the LPPL\@. No other change. \\ + 1.1 & 07 Feb 96 & Added setting of \cmd{\thelisting} with the \cls{book} and \cls{report} document classes. \\ + 1.0 & 19 Aug 94 & Created. +\end{tabular} + + +\minisec{Load with:} + +\verb+\usepackage{listing}+\\ +or\\ +\verb+\usepackage[bigcaptions]{listing}+ + + +\minisec{Package option:} + +\begin{labeling}{\opt{bigcaptions}} +\item[\opt{bigcaptions}] If present, captions appear as for sections + (or chapters when using the ``\cls{book}'' or ``\cls{report}'' + classes). + If not present, captions appear as for captions + in the \env{figure} or \env{table} environment. +\end{labeling} + + +\minisec{Available control sequences:} + +\begin{labeling}{\cmd{\listlistingname}} +\item[\cmd{\begin\{listing\}}] A new environment for listings is provided. + Unlike \env{figure} and \env{table}, listing is \textls[40]{NOT} + a floating environment. +\item[\cmd{\caption}] As usual. (only inside listing!) +\item[\cmd{\label}] As usual. (only inside listing; after \cmd{\caption}!) +\item[\cmd{\ref}] As usual. +\item[\cmd{\listoflistings}] As for \cmd{\listoftables}, \cmd{\listoffigures}. +\item[\cmd{\listingname}] Produces the ``Listing'' text for the caption. +\item[\cmd{\listlistingname}] Produces the ``List of Listings'' text. +\end{labeling} + +A \texttt{*.lol} file is produced similar to \texttt{*.lot}, \texttt{*.lof} files. + +Does not change \cmd{\@makecaption} (unless option ``bigcaptions'' is used), +so packages that change the layout of \cmd{\caption} still work. +\pkg{listing.sty} works together with \pkg{hangcaption.sty}. + +\begin{quote} + \myllap{``}Documentation is like sex. + If it is good, it is \textls[50]{REALLY} good, + and if it is bad, it is better than nothing!'' + + \hfill[Gabe Helou] +\end{quote} + +\end{document} diff --git a/Master/texmf-dist/tex/latex/listing/listing.sty b/Master/texmf-dist/tex/latex/listing/listing.sty new file mode 100644 index 00000000000..3592501e5b7 --- /dev/null +++ b/Master/texmf-dist/tex/latex/listing/listing.sty @@ -0,0 +1,132 @@ +%%---------------------------------------------------------------------- +%% listing.sty +% +% LaTeX package for typesetting listings. +% Documentation at end of file after \endinput. +% +% Requires LaTeX2e (or newer). +% +% +% (C) Copyright 1994, 1996, 1999 by: +% +% Matthew Hebley, Volker Kuhlmann +% University of Canterbury +% EEE Dept +% Christchurch, New Zealand +% E-Mail: v.kuhlmann@elec.canterbury.ac.nz +% (Matthew is no longer available for contact, email or otherwise) +% +% This program can be redistributed and/or modified under the terms +% of the LaTeX Project Public License, distributed from CTAN +% archives as macros/latex/base/lppl.txt; either +% version 1 of the License, or (at your option) any later version. +% +% +% HISTORY: +% +% 1.2 25 May 1999 Re-published under the LPPL. No other change. +% 1.1 07 Feb 96 Added setting of \thelisting with the book and +% report document classes. +% 1.0 19 Aug 94 Created. +% +%%---------------------------------------------------------------------- + +\def\filename{listing} +\def\fileversion{V1.2} +\def\filedate{1999/05/25} + + +\NeedsTeXFormat{LaTeX2e}[1994/06/01] +\ProvidesPackage{\filename}[\filedate] +\typeout{Package `\filename', \fileversion, <\filedate>} + + +\newcounter{listing} +\setcounter{listing}{0} + +\newenvironment{listing}{% + \newcommand{\@captype}{listing}% + \@ifundefined{@bigcaptionflag}{}{% + \def\@makecaption##1##2{% + \vskip \abovecaptionskip + \@listingsection*{##1:~##2}% + \vskip \belowcaptionskip + } + } + }% + {} + +\newcommand{\listingname}{Listing} +\newcommand{\listlistingname}{List of Listings} + +\newcommand{\ext@listing}{lol} +\newcommand{\fnum@listing}{\listingname ~\thelisting } +\newcommand{\l@listing}{\@dottedtocline {1}{1.5em}{2.3em}} +\newcommand{\listoflistings}{% + \@listingsection*{\listlistingname + \@mkboth{\uppercase{\listlistingname}}% + {\uppercase{\listlistingname}}}% + \@starttoc {lol}% + } +\@ifundefined{chapter}{% + \newcommand\@listingsection{\section}% + }{% + \newcommand\@listingsection{\chapter}% + \renewcommand\thelisting{\thechapter.\arabic{listing}}% + } + +\DeclareOption{bigcaptions}{% + \def\@bigcaptionflag{} +} + +\ProcessOptions + + +\endinput + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +Load with: + + \usepackage{listing} +or + \usepackage[bigcaptions]{listing} + + +Package option: + +bigcaptions If present, captions appear as for sections + (or chapters when using the "book" or "report" + classes). + If not present, captions appear as for captions + in the figure or table environment. + + +Available control sequences: + +\begin{listing} A new environment for listings is provided. + Unlike figure and table, listing is NOT + a floating environment. + +\caption As usual. (only inside listing!) +\label As usual. (only inside listing; after \caption!) +\ref As usual. +\listoflistings As for \listoftables, \listoffigures. +\listingname Produces the "Listing" text for the caption. +\listlistingname Produces the "List of Listings" text. + + +A *.lol file is produced similar to *.lot, *.lof files. + +Does not change \@makecaption (unless option "bigcaptions" is used), +so packages that change the layout of \caption still work. +listing.sty works together with hangcaption.sty. + + ``Documentation is like sex. + If it is good, it is REALLY good, + and if it is bad, it is better than nothing!'' + + [Gabe Helou] + +%% EOF listing.sty +%%---------------------------------------------------------------------- diff --git a/Master/texmf-dist/tex/latex/ltxmisc/listing.sty b/Master/texmf-dist/tex/latex/ltxmisc/listing.sty deleted file mode 100644 index 3592501e5b7..00000000000 --- a/Master/texmf-dist/tex/latex/ltxmisc/listing.sty +++ /dev/null @@ -1,132 +0,0 @@ -%%---------------------------------------------------------------------- -%% listing.sty -% -% LaTeX package for typesetting listings. -% Documentation at end of file after \endinput. -% -% Requires LaTeX2e (or newer). -% -% -% (C) Copyright 1994, 1996, 1999 by: -% -% Matthew Hebley, Volker Kuhlmann -% University of Canterbury -% EEE Dept -% Christchurch, New Zealand -% E-Mail: v.kuhlmann@elec.canterbury.ac.nz -% (Matthew is no longer available for contact, email or otherwise) -% -% This program can be redistributed and/or modified under the terms -% of the LaTeX Project Public License, distributed from CTAN -% archives as macros/latex/base/lppl.txt; either -% version 1 of the License, or (at your option) any later version. -% -% -% HISTORY: -% -% 1.2 25 May 1999 Re-published under the LPPL. No other change. -% 1.1 07 Feb 96 Added setting of \thelisting with the book and -% report document classes. -% 1.0 19 Aug 94 Created. -% -%%---------------------------------------------------------------------- - -\def\filename{listing} -\def\fileversion{V1.2} -\def\filedate{1999/05/25} - - -\NeedsTeXFormat{LaTeX2e}[1994/06/01] -\ProvidesPackage{\filename}[\filedate] -\typeout{Package `\filename', \fileversion, <\filedate>} - - -\newcounter{listing} -\setcounter{listing}{0} - -\newenvironment{listing}{% - \newcommand{\@captype}{listing}% - \@ifundefined{@bigcaptionflag}{}{% - \def\@makecaption##1##2{% - \vskip \abovecaptionskip - \@listingsection*{##1:~##2}% - \vskip \belowcaptionskip - } - } - }% - {} - -\newcommand{\listingname}{Listing} -\newcommand{\listlistingname}{List of Listings} - -\newcommand{\ext@listing}{lol} -\newcommand{\fnum@listing}{\listingname ~\thelisting } -\newcommand{\l@listing}{\@dottedtocline {1}{1.5em}{2.3em}} -\newcommand{\listoflistings}{% - \@listingsection*{\listlistingname - \@mkboth{\uppercase{\listlistingname}}% - {\uppercase{\listlistingname}}}% - \@starttoc {lol}% - } -\@ifundefined{chapter}{% - \newcommand\@listingsection{\section}% - }{% - \newcommand\@listingsection{\chapter}% - \renewcommand\thelisting{\thechapter.\arabic{listing}}% - } - -\DeclareOption{bigcaptions}{% - \def\@bigcaptionflag{} -} - -\ProcessOptions - - -\endinput - - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -Load with: - - \usepackage{listing} -or - \usepackage[bigcaptions]{listing} - - -Package option: - -bigcaptions If present, captions appear as for sections - (or chapters when using the "book" or "report" - classes). - If not present, captions appear as for captions - in the figure or table environment. - - -Available control sequences: - -\begin{listing} A new environment for listings is provided. - Unlike figure and table, listing is NOT - a floating environment. - -\caption As usual. (only inside listing!) -\label As usual. (only inside listing; after \caption!) -\ref As usual. -\listoflistings As for \listoftables, \listoffigures. -\listingname Produces the "Listing" text for the caption. -\listlistingname Produces the "List of Listings" text. - - -A *.lol file is produced similar to *.lot, *.lof files. - -Does not change \@makecaption (unless option "bigcaptions" is used), -so packages that change the layout of \caption still work. -listing.sty works together with hangcaption.sty. - - ``Documentation is like sex. - If it is good, it is REALLY good, - and if it is bad, it is better than nothing!'' - - [Gabe Helou] - -%% EOF listing.sty -%%---------------------------------------------------------------------- -- cgit v1.2.3