diff options
author | Norbert Preining <preining@logic.at> | 2007-11-20 07:35:30 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2007-11-20 07:35:30 +0000 |
commit | 828dca72870dee898c05516d748c3108ebd79a8f (patch) | |
tree | d64d0e539956d43b7d6a10cb7c529c88a762fb2c /Master | |
parent | 05a46ca1f7bede5c9e2b7ee6e06c545a91589b53 (diff) |
update gmverb (07-11-20)
git-svn-id: svn://tug.org/texlive/trunk@5522 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/doc/latex/gmverb/README | 11 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/gmverb/gmverbDoc.pdf | bin | 461228 -> 241611 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/gmverb/gmverbDoc.tex | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/gmverb/gmverb.sty | 205 |
4 files changed, 114 insertions, 104 deletions
diff --git a/Master/texmf-dist/doc/latex/gmverb/README b/Master/texmf-dist/doc/latex/gmverb/README index e930f6fca1b..388990e51ec 100644 --- a/Master/texmf-dist/doc/latex/gmverb/README +++ b/Master/texmf-dist/doc/latex/gmverb/README @@ -3,7 +3,7 @@ is a work of Grzegorz `Natror' Murzynowski, <natror at o2 dot pl> -1. Copyright 2006 by Grzegorz `Natror' Murzynowski +1. Copyright 2006, 2007 by Grzegorz `Natror' Murzynowski This program is subject to the LaTeX Project Public License. See http://www.ctan.org/tex-archive/help/Catalogue/licenses.lppl.html @@ -25,9 +25,10 @@ a `short verb' e.g., to write |\a\verbatim\example| instead of 3. Installation -Just put the gmverb.sty somewhere in the texmf/tex/latex -branch. Creating a /texmf/tex/latex/gm directory may be advisable if -you consider using other packages written by me. +Unpack the gmverb-tds.zip in a texmf directory or put the gmverb.sty +somewhere in the texmf/tex/latex branch on your own. Creating a +/texmf/tex/latex/gm directory may be advisable if you consider using +other packages written by me. Then you should refresh your TeX distribution's files' database most probably. @@ -41,7 +42,7 @@ gmverb.sty README gmverbDoc.tex gmverbDoc.pdf - +gmverb-tds.zip 5. Documentation diff --git a/Master/texmf-dist/doc/latex/gmverb/gmverbDoc.pdf b/Master/texmf-dist/doc/latex/gmverb/gmverbDoc.pdf Binary files differindex dd69536dab0..3c0ea15a168 100644 --- a/Master/texmf-dist/doc/latex/gmverb/gmverbDoc.pdf +++ b/Master/texmf-dist/doc/latex/gmverb/gmverbDoc.pdf diff --git a/Master/texmf-dist/doc/latex/gmverb/gmverbDoc.tex b/Master/texmf-dist/doc/latex/gmverb/gmverbDoc.tex index c937fc7cf62..f9f6a8b0f46 100644 --- a/Master/texmf-dist/doc/latex/gmverb/gmverbDoc.tex +++ b/Master/texmf-dist/doc/latex/gmverb/gmverbDoc.tex @@ -1,4 +1,4 @@ -\documentclass{gmdocc} +\documentclass[pagella]{gmdocc} \twocoltoc \begin{document} \DocInput{gmverb.sty}%e:/texmf/tex/latex/gm/ diff --git a/Master/texmf-dist/tex/latex/gmverb/gmverb.sty b/Master/texmf-dist/tex/latex/gmverb/gmverb.sty index 52f407cb682..66af1efd33e 100644 --- a/Master/texmf-dist/tex/latex/gmverb/gmverb.sty +++ b/Master/texmf-dist/tex/latex/gmverb/gmverb.sty @@ -16,7 +16,7 @@ %%Written by Natror (Grzegorz Murzynowski), %% natror at o2 dot pl %% -%% \copyright\,2005, 2006 by Natror (Grzegorz Murzynowski). +%% \copyright\,2005, 2006, 2007 by Natror (Grzegorz Murzynowski). %% %% This program is subject to the \LaTeX\ Project Public License. %% See \url{http://www.ctan.org/tex-archive/help/Catalogue/licenses.lppl.html} ^^A @@ -24,7 +24,7 @@ %% %% LPPL status: "author-maintained".\par %% -%% Many thanks to my \TeX\ Guru Marcin Woli\'nski for his \TeX nical ^^A +%% Many thanks to my \TeX\ Guru Marcin Woli\nacute ski for his \TeX nical ^^A %% support.\par %\end{copyrnote} % @@ -41,11 +41,13 @@ % \chschange{v0.80}{07/3/2}{683} % \chschange{v0.80}{07/3/30}{667} % \chschange{v0.82}{2007/4/26}{663} +% \chschange{v0.83}{2007/11/9}{666} +% \chschange{v0.84}{2007/11/13}{658} % \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{gmverb} - [2007/04/24 v0.82 After shortvrb (FM) but my way (GM)] + [2007/11/13 v0.84 After shortvrb (FM) but my way (GM)] % % \tableofcontents @@ -140,9 +142,12 @@ % \begin{gmlonely} % \subdivision{Installation} % -% Just put the \pk{gmverb.sty} somewhere in the \file{texmf/\:tex/\:latex} -% branch. Creating a~\file{texmf/\:tex/\:latex/\:gm} directory may be advisable -% if you consider using other packages written by me. +% Unpack the \file{gmverb-tds.zip} archive (this is an archive +% conforming the \acro{TDS} standard, see \file{CTAN/tds/tds.pdf}) +% in a~\file {texmf} directory or put the \pk{gmverb.sty} somewhere +% in the \file{texmf/\:tex/\:latex} branch on your own. Creating +% a~\file{texmf/\:tex/\:latex/\:gm} directory may be advisable if +% you consider using other packages written by me. % % Then you should refresh your \TeX\ distribution's files' database % most probably. @@ -151,12 +156,13 @@ % \subdivision{Contents of the \pk{gmverb.zip} Archive} % % The distribution of the \pk{gmverb} package consists of the -% following four files. +% following four files and a~\acro{TDS}-compliant archive. % \begin{verse} % \pk{gmverb.sty}\\ % \pk{README}\\ % \pk{gmverbDoc.tex}\\ -% \pk{gmverbDoc.pdf} +% \pk{gmverbDoc.pdf}\\ +% \pk{gmverb.tds.zip} % \end{verse} % % \begin{gmlonely} @@ -199,29 +205,26 @@ % \subdivision{Preliminaries} % \RequirePackage{gmutils}[2007/04/24] -% For |\firstofone|, |\afterfi|, |\gmobeyspaces|, |\@ifnextcat| and +% For |\firstofone|, |\afterfi|, |\gmobeyspaces|, |\@ifnextcat|, |\foone| and % |\noexpand|'s and |\expandafter|'s shorthands |\@nx| and |\@xa| resp. -% \CodeDefine\twelvepercent % \begin{oldmc} -\bgroup -\@makeother\% -\firstofone{\egroup - \def\twelvepercent{%}} +\foone{\@makeother\%} +{\def\xiipercent{%}} % \end{oldmc} % Someone may want to use another char for comment, but we assume here % `orthodoxy'. Other assumptions in \pk{gmdoc} are made. The `knowledge' % what char is the comment char is used to put proper `hyphen' when % a~\env{verbatim} line is broken. -% \CodeDefine\verbhyphen +% \Define\verbhyphen % \changes{v0.75}{06/9/8}{renamed from a~rather confusing % \cs{commentchar}} -\let\verbhyphen\twelvepercent +\let\verbhyphen\xiipercent % Provide a~declaration for easy changing it. Its argument should be % of |\|\<char> form (of course, a~\<char>\catother is also allowed). -% \CodeDefine\VerbHyphen +% \Define\VerbHyphen % \changes{v0.78}{06/12/1}{added} \def\VerbHyphen#1{% {\escapechar\m@ne @@ -234,80 +237,83 @@ % Let's define a~|\discretionary| left brace such that if it breaks, % it turns |{%| at the end of line. We'll use it in almost Knuthian % |\ttverbatim|---it's part of this `almost'. -% \CodeDefine\breaklbrace \CodeDefine\twelvelbrace -\bgroup \catcode`\<=1 \@makeother\{ \catcode`\>=2 % -\firstofone<\egroup - \def\breaklbrace<\discretionary<{\verbhyphen><><{>>% - \def\twelvelbrace<{>%^^A]] ->% of |\firstofone| - -% \CodeDefIndex\dobreaklbrace -\bgroup \catcode`\<=1 \catcode`\{=\active \catcode`\>=2 -\firstofone<\egroup - \def\dobreaklbrace<\catcode`\{=\active \def{<\breaklbrace>>% ->% end of |\firstofone|. \iffalse|}}}}|\fi +\foone{\catcode`\[=1 \@makeother\{ \catcode`\]=2 }% +[% + \def\breaklbrace[\discretionary[{%^^A} + \verbhyphen][][{%^^A} + ]]% + \def\xiilbrace[{%^^A} + ]% +]% of |\firstofone| + + +\foone{\catcode`\[=1 \catcode`\{=\active \catcode`\]=2 }% +[% + \def\dobreaklbrace[\catcode`\{=\active + \def{%^^A} + [\breaklbrace\gm@lbracehook]]%\label{gm@lbracehook} +] + +% Now we only initialize the hook. Real use of it will be made in +% \pk{gmdoc}. +\relaxen\gm@lbracehook % The |\bslash| macro defined below I~use also in more `normal' \TeX ing, e.g., % to |\typeout| some |\outer| macro's name. -%\CodeDefine\bslash \CodeDefine\breakbslash -{\catcode`\!=0 \@makeother\\%\CodeEscapeChar\! -!gdef!bslash{\}%^^A] -!gdef!breakbslash{!discretionary{!verbhyphen}{\}{\}}%^^A]] +%\Define\bslash \Define\breakbslash +\foone{\catcode`\!=0 \@makeother\\}%\CodeEscapeChar\! +{% + !def!bslash{\}%^^A} + !def!breakbslash{!discretionary{!verbhyphen}{\}{\}}%^^A}} } %\CodeEscapeChar\\ % % Sometimes linebreaking at a~backslash may be unwelcome. The basic % case, when the first CS in a~verbatim breaks at the lineend leaving % there |%|, is covered by line \ref{special opening bslash}. For the -% others let's give the user a~countercrank: \CodeDefine\fixbslash +% others let's give the user a~countercrank: \newcommand*\fixbslash{\let\breakbslash=\bslash}% to use due to the % common scoping rules. But for the special case of a~backslash % opening a~verbatim scope, we deal specially in the line % \ref{special opening bslash}. % % Analogously, let's provide a~possibility of `fixing' the left brace: -% \CodeDefine\fixlbrace -\newcommand*\fixlbrace{\let\breaklbrace=\twelvelbrace} - -% \CodeDefIndex\dobreakbslash -{\catcode`\!=0 %\CodeEscapeChar\!^^A[ -%^^A~One rbrace is turned off for Emacs by |\{|. -!catcode`!\=!active -!gdef!dobreakbslash{!catcode`!\=!active !def\{!breakbslash}}% +\newcommand*\fixlbrace{\let\breaklbrace=\xiilbrace} + + +\foone{\catcode`\!=0 \catcode`\\=\active}%%\CodeEscapeChar\!^^A + % ^^A~One rbrace is turned off for Emacs by |\{|. +{%^^A{ + !def!dobreakbslash{!catcode`!\=!active !def\{!breakbslash}}% } %\CodeEscapeChar\\ -% The macros defined below, |\visiblebreakspaces| and |\twelveclub| +% The macros defined below, |\visiblebreakspaces| and |\xiiclub| % we'll use in the almost Knuthian macro making verbatim. This `almost' % makes a~difference. -% \CodeDefine\twelvespace -% \CodeDefIndex\breakabletwelvespace -\bgroup\catcode`\ =12 % -\firstofone{\egroup% -\def\twelvespace{ }% -\def\breakabletwelvespace{\discretionary{ }{}{ }}} - -\bgroup\obeyspaces% it's just re|\catcode|'ing. -% \CodeDefine\activespace -% \CodeDefIndex\dobreakvisiblespace -% \CodeDefIndex\dobreakblankspace -\firstofone{\egroup% +\foone{\catcode`\ =12 }% note this space is ${}_{10}$ and is gobbled +% by parsing the number. +{\def\xiispace{ }% +\def\breakablexiispace{\discretionary{ }{}{ }}} + +\foone\obeyspaces% it's just re|\catcode|'ing. +{% \newcommand*\activespace{ }% -\newcommand*\dobreakvisiblespace{\let =\breakabletwelvespace\obeyspaces}%^^A -% |%\def|ing it caused a~stack overflow disaster with \pk{gmdoc}. +\newcommand*\dobreakvisiblespace{\def {\breakablexiispace}\obeyspaces}%^^A +% |%| |\def|ing it caused a~stack overflow disaster with \pk{gmdoc}. \newcommand*\dobreakblankspace{\let =\space\obeyspaces}% } -% \CodeDefine\twelveclub +% \Define\xiiclub \bgroup\@makeother\| -\firstofone{\egroup\def\twelveclub{|}} +\firstofone{\egroup\def\xiiclub{|}} % \subdivision{Almost-Knuthian \cs{ttverbatim}} % % |\ttverbatim| comes from \TeXbook\ too, but I~add into it a~\LaTeX\ % macro changing the |\catcode|s and make spaces visible and breakable % and left braces too. -% \CodeDefine\ttverbatim +% \Define\ttverbatim % \changes{v0.80}{2007/2/27}{\cs{ttverbatim@hook} added} \newcommand*\ttverbatim{% \let\do=\do@noligs \verbatim@nolig@list @@ -324,11 +330,11 @@ % fontencoding for instance. \@emptify\ttverbatim@hook -% \CodeDefine{\VerbT1} +% \Define*{\VerbT1} \def\VerbT1{\def\ttverbatim@hook{\fontencoding{T1}\selectfont}} % We wish the visible spaces to be the default. -% \CodeDefIndex\dobreakspace +% \DefIndex\dobreakspace \let\dobreakspace=\dobreakvisiblespace % %^^A~|\meta| and pals moved to \pk{gmutils} @@ -337,14 +343,14 @@ % % The below is copied verbatim ;-) from % \file{doc.pdf} and then is added my slight changes. -% \CodeDefine\MakeShortVerb \CodeDefine*\MakeShortVerb* +% \Define\MakeShortVerb \Define*\MakeShortVerb* \def\MakeShortVerb{% \@ifstar {\def\@shortvrbdef{\verb*}\@MakeShortVerb}% {\def\@shortvrbdef{\verb}\@MakeShortVerb}} -% \CodeDefine\@MakeShortVerb +% \Define\@MakeShortVerb \def\@MakeShortVerb#1{% \@xa\ifx\csname cc\string#1\endcsname\relax \@shortvrbinfo{Made }{#1}\@shortvrbdef @@ -369,7 +375,7 @@ \@shortvrbinfo\@empty{#1 already}{\@empty\verb(*)}% \fi} -% \CodeDefine\DeleteShortVerb +% \Define\DeleteShortVerb \def\DeleteShortVerb#1{% \@xa\ifx\csname cc\string#1\endcsname\relax \@shortvrbinfo\@empty{#1 not}{\@empty\verb(*)}% @@ -387,18 +393,18 @@ \endgroup \fi \fi} % My little addition -% \CodeDefIndex\gmv@packname +% \DefIndex\gmv@packname \@ifpackageloaded{gmdoc}{% \def\gmv@packname{gmdoc}}{% \def\gmv@packname{gmverb}} -% \CodeDefine\@shortvrbinfo +% \Define\@shortvrbinfo \def\@shortvrbinfo#1#2#3{% \PackageInfo{\gmv@packname}{% ^^J\@empty #1\@xa\@gobble\string#2 a short reference for \@xa\string#3}} -% \CodeDefine\add@special +% \Define\add@special \def\add@special#1{% \rem@special{#1}% \@xa\gdef\@xa\dospecials\@xa @@ -414,7 +420,7 @@ % otherwise. With |\do| defined this way the entire list is just % globally expanded itself. Analogous hack is done to the |\@sanitize| % list. -% \CodeDefine\rem@special +% \Define\rem@special \def\rem@special#1{% \def\do##1{% \ifnum`#1=`##1 \else \@nx\do\@nx##1\fi}% @@ -435,18 +441,18 @@ % necessarily |\endverbatim| in its enddef. Of course (or maybe % surprisingly), the commands written in the begdef after |\verbatim| % will also be executed at \cs{begin\marg{environment}}. -% \CodeDefine\verbatim -% \CodeDefine*{verbatim} +% \Define\verbatim +% \Define*{verbatim} \def\verbatim{\@beginparpenalty \predisplaypenalty \@verbatim \frenchspacing \gmobeyspaces \@xverbatim}% in the \LaTeX\ version % there's |%\@vobeyspaces| instead of |\gmobeyspaces|. % \changes{v0.73}{06/09/06}{\cs{@vobeyspaces} changed to % \cs{obeyspaces} to make the blank \cs{verb/atim} spaces breakable} -% \CodeDefine*{verbatim*} +% \Define*{verbatim*} \@namedef{verbatim*}{\@beginparpenalty \predisplaypenalty \@verbatim \@sxverbatim} -% \CodeDefine\endverbatim +% \Define\endverbatim \def\endverbatim{\@@par \ifdim\lastskip >\z@ \@tempskipa\lastskip \vskip -\lastskip @@ -456,10 +462,10 @@ \addvspace\@topsepadd \@endparenv} -% \CodeDefine\endverbatim* +% \Define\endverbatim* \n@melet{endverbatim*}{endverbatim} -% \CodeDefine\@xverbatim +% \Define\@xverbatim \begingroup \catcode `!=0 % \catcode `[= 1 \catcode`]=2 % \catcode`\{=\active @@ -475,12 +481,12 @@ !endgroup % \CodeEscapeChar\\ -% \CodeDefine\@sxverbatim +% \Define\@sxverbatim \let\@sxverbatim=\@xverbatim -% \CodeDefine\@verbatim +% \Define\@verbatim % F.\,Mittelbach says the below is copied almost verbatim from \LaTeX\ -% source, modulo |\check@percent|.\CodeDefine\@verbatim +% source, modulo |\check@percent|.\Define\@verbatim \def\@verbatim{% % \changes{v0.71}{06/09/04}{trivlist substituted with % chosen explicit macros. Analog. in endverbatim.} @@ -530,7 +536,7 @@ \@ifundefined{stanzaskip}{\newlength\stanzaskip}{} \stanzaskip=\medskipamount -% \CodeDefine\verbatimhangindent +% \Define\verbatimhangindent % \changes{v0.71}{06/09/04}{added to verbatim parameters.} \newlength\verbatimhangindent \verbatimhangindent=3em @@ -550,7 +556,7 @@ % Let's define the `short' verbatim command. % -% \CodeDefine\verb \CodeDefine*\verb* +% \Define*\verb* \def\verb{\relax\ifmmode\hbox\else\leavevmode\null\fi \bgroup \ttverbatim @@ -558,26 +564,26 @@ \@ifstar{\@sverb@chbsl}{\gmobeyspaces\frenchspacing\@sverb@chbsl}}%^^A % in the \LaTeX\ version there's |\@vobeyspaces| instead of % |\gmobeyspaces|. -% \CodeDefIndex\@sverb@chbsl +% \DefIndex\@sverb@chbsl \def\@sverb@chbsl#1{\@sverb#1\check@bslash} -% \CodeDefIndex\@def@breakbslash +% \DefIndex\@def@breakbslash \def\@def@breakbslash{\breakbslash}% because |\| is |\def|ined -% as \cs{break\-b\-slash} not |\let|. +% as \cs{break\-b\-slash} not \inverb|\let|. % For the special case of a~backslash opening a~(short) verbatim, in % which it shouldn't be breakable, we define the checking macro. -% \CodeDefine\check@bslash +% \Define\check@bslash \def\check@bslash{\@ifnextchar{\@def@breakbslash}{\bslash\@gobble}{}} % \label{special opening bslash} % \changes{v0.70}{06/09/02}{Opening backslash made unbreakable.} \let\verb@balance@group\@empty -% \CodeDefine\verb@egroup +% \Define\verb@egroup \def\verb@egroup{\global\let\verb@balance@group\@empty\egroup} -% \CodeDefine\gm@verb@eol +% \Define\gm@verb@eol %\changes[\verb]{v0.74}{06/09/07}{line end forbidden inside \*} \let\gm@verb@eol\verb@eol@error % The latter is a~\LaTeXe\ kernel macro that |\active|ates line end @@ -591,7 +597,6 @@ % However, let's leave my former `permissive' definition under the % |\verb@eol| name. % -% \CodeDefine\verb@eolOK \begingroup \obeylines\obeyspaces% \gdef\verb@eolOK{\obeylines% @@ -602,11 +607,9 @@ % \pk{gmdoc} employed shall it be. % % Let us leave (give?) a~user freedom of choice: -% \CodeDefine\verbeolOK -% \changes{v0.74}{06/09/07}{added} \def\verbeolOK{\let\gm@verb@eol\verb@eolOK} +% \changes{v0.74}{06/09/07}{added} % And back to the main matter, -% \CodeDefIndex\@sverb \CodeDefIndex\verb@balance@group \def\@sverb#1{% \catcode`#1\active \lccode`\~`#1% \gdef\verb@balance@group{\verb@egroup @@ -614,10 +617,8 @@ \aftergroup\verb@balance@group \lowercase{\let~\verb@egroup}} -% \CodeDefine\verbatim@nolig@list \def\verbatim@nolig@list{\do\`\do\<\do\>\do\,\do\'\do\-} -% \CodeDefine\do@noligs \def\do@noligs#1{% \catcode`#1\active \begingroup @@ -627,12 +628,12 @@ % And finally, what I~thought to be so smart and clever, now is just % one of many possible uses of a~general almost Rainer Sch\"opf's % macro: -% \CodeDefine\dekclubs +% \Define\dekclubs \def\dekclubs{\@ifstar{\OldMakeShortVerb*\|}{\MakeShortVerb*\|}} % But even if a~shortverb is unconditional, the spaces in the math % mode are not printed. So, -%\CodeDefine\edverbs +%\Define\edverbs % \changes{v0.79}{2007/01/01}{added} % \changes{v0.80}{2007/02/27}{debugged, i.e. \cs{hbox} added back and % redefinition of \cs{[}}%^^A] @@ -656,7 +657,7 @@ % thanks to |\string|. \pk{doc/shortvrb}'s concept is different, there % a~`shortverb' char should work as usual in the math mode. So let it % may be as they wish: -% \CodeDefine\old@MakeShortVerb +% \Define\old@MakeShortVerb \def\old@MakeShortVerb#1{% \@xa\ifx\csname cc\string#1\endcsname\relax @@ -678,20 +679,28 @@ \@shortvrbinfo\@empty{#1 already}{\@empty\verb(*)}% \fi} -% \CodeDefine\OldMakeShortVerb +% \Define\OldMakeShortVerb \def\OldMakeShortVerb{\begingroup \let\@MakeShortVerb=\old@MakeShortVerb \@ifstar{\eg@MakeShortVerbStar}{\eg@MakeShortVerb}} -% \CodeDefine\eg@MakeShortVerbStar \CodeDefine\eg@MakeShortVerb +% \Define\eg@MakeShortVerbStar \Define\eg@MakeShortVerb \def\eg@MakeShortVerbStar#1{\MakeShortVerb*#1\endgroup} \def\eg@MakeShortVerb#1{\MakeShortVerb#1\endgroup} \endinput% for the Tradition. -% \changes{v0.81}{2007/04/13}{\cs{afterfi} made two-argument} +% \ChangesGeneral +% +% \changes{v0.81}{2007/04/13}{\cs{afterfi} made two-argument (first +% undelimited, the stuff to be put after \cs{fi}, and the other, +% delimited with \cs{fi}, to be discarded} + +% \changes{v0.83}{2007/11/09}{added a~hook in the active left brace +% definition intended for \pk{gmdoc} automatic detection of +% definitions (in line \protect\ref{gm@lbracehook})} % \PrintChanges \PrintIndex % \Finale |