diff options
author | Karl Berry <karl@freefriends.org> | 2009-03-19 16:39:43 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2009-03-19 16:39:43 +0000 |
commit | b2b633e01d06322e0aa769988f0ea7320d9f9a37 (patch) | |
tree | 04d8e0e02eac6cbb7b0f7c9caf4697a0ebfa2537 /Master | |
parent | 44fd9c60eecdeb03f545d4c6199921b9ea71fa28 (diff) |
guitar update (17mar09)
git-svn-id: svn://tug.org/texlive/trunk@12435 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/doc/latex/guitar/README | 18 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/guitar/guitar.txt | 6 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/guitar/guitar.dtx | 99 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/guitar/guitar.sty | 36 |
4 files changed, 105 insertions, 54 deletions
diff --git a/Master/texmf-dist/doc/latex/guitar/README b/Master/texmf-dist/doc/latex/guitar/README deleted file mode 100644 index f9130e55b0d..00000000000 --- a/Master/texmf-dist/doc/latex/guitar/README +++ /dev/null @@ -1,18 +0,0 @@ -README for the packages - eqlist: consisting of eqlist.dtx and eqlist.ins - varindex: consisting of varindex.dtx and varindex.ins - toolbox: consisting of toolbox.dtx and toolbox.ins - ushort: consisting of ushort.dtx and ushort.ins - guitar: consisting of guitar.dtx and guitar.ins - ziffer: consisting of ziffer.sty - -The above mentioned packages are - Copyright 2001--2002 Martin Vaeth -except for toolbox, which is - Copyright 2001--2004 Martin Vaeth - -and may be distributed and/or modified under the conditions of the -LaTeX Project Public License, either version 1.3c of this license or (at -your option) any later version. The latest version of this license is in: -http://www.latex-project.org/lppl.txt, and version 1.3c or later is part of -all distributions of LaTeX version 2005/12/01 or later. diff --git a/Master/texmf-dist/doc/latex/guitar/guitar.txt b/Master/texmf-dist/doc/latex/guitar/guitar.txt index 25c0fecd1b9..edba6e29592 100644 --- a/Master/texmf-dist/doc/latex/guitar/guitar.txt +++ b/Master/texmf-dist/doc/latex/guitar/guitar.txt @@ -1,14 +1,18 @@ %%# -%%# Author: +%%# Author and copyright 2001,2009: %%# %%# M. V\"ath vaeth@mathematik.uni-wuerzburg.de %%# %%# The author thanks %%# Donald Arseneau <asnd@triumf.ca> %%# Dan Luecking <luecking@uark.edu> +%%# Heiko Oberdiek <oberdiek@uni-freiburg.de> %%# and a colleague who does not want to be named here. +%%# The package may be distributed and/or modified under the conditions of +%%# the LaTeX Project Public License (version 1.3c or later). + %%############################################################################# %%# %%# guitar.sty - typesetting guitar chords over song texts. diff --git a/Master/texmf-dist/source/latex/guitar/guitar.dtx b/Master/texmf-dist/source/latex/guitar/guitar.dtx index 230dff9db7a..342e97deef6 100644 --- a/Master/texmf-dist/source/latex/guitar/guitar.dtx +++ b/Master/texmf-dist/source/latex/guitar/guitar.dtx @@ -1,17 +1,21 @@ -% \def\fileversion{1.5}\def\filedate{2001/10/08}\def\docdate{2001/10/08} +% \def\fileversion{1.6}\def\filedate{2009/03/17}\def\docdate{2009/03/17} %\iffalse These lines are necessary for the doc and docstrip utilities %<*asciidocu> %%# -%%# Author: +%%# Author and copyright 2001,2009: %%# %%# M. V\"ath vaeth@mathematik.uni-wuerzburg.de %%# %%# The author thanks %%# Donald Arseneau <asnd@triumf.ca> %%# Dan Luecking <luecking@uark.edu> +%%# Heiko Oberdiek <oberdiek@uni-freiburg.de> %%# and a colleague who does not want to be named here. +%%# The package may be distributed and/or modified under the conditions of +%%# the LaTeX Project Public License (version 1.3c or later). + %%############################################################################# %%# %%# guitar.sty - typesetting guitar chords over song texts. @@ -368,7 +372,7 @@ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} -% \CheckSum{485} +% \CheckSum{532} % \iffalse % \RecordChanges @@ -381,6 +385,9 @@ % \newcommand{\cmdcite}[1]{\texttt{\textbackslash#1}} % \newcommand{\filecite}[1]{\texttt{#1}} % +% \changes{1.6}{2009/03/17}{Do not redefine commands on new catcodes globally. +% Instead save and restore the original definition when changing catcodes. +% Thanks to Heiko Oberdiek for pointing out this bug} % \changes{1.5}{2001/08/27}{Included references to other packages in % documentation; slightly modified the \cmdcite{typeout} of the package name} % \changes{1.4}{2001/08/27}{Introduced \texttt{*} versions to avoid changing @@ -842,10 +849,10 @@ \def\tbx@tmp{\immediate\write17}\expandafter\tbx@tmp \else \expandafter\typeout -\fi{guitar.sty by M. Vaeth: Guitar chords over song texts 1.5} +\fi{guitar.sty by M. Vaeth: Guitar chords over song texts 1.6} \ifx\ProvidesPackage\undefined\else - \ProvidesPackage{guitar}[2001/10/08 v1.5] + \ProvidesPackage{guitar}[2009/03/17 v1.6] \fi \ifx\RequirePackage\undefined \ifx\toolboxDef\undefined @@ -1105,20 +1112,34 @@ \let\gtr@magicCondOn\toolboxEmpty} % \end{macrocode} % \end{macro} +% \begin{macro}{\gtr@braceOnDef} +% "\gtr@braceOnDef" will later save/redefine the "[" command. +% For the very first call below we must make it a dummy command now. +% \begin{macrocode} +\let\gtr@magicOnDef\toolboxEmpty +% \end{macrocode} +% \end{macro} % \begin{macro}{\gtr@magicOnCat}\nocomment % \begin{macrocode} -\def\gtr@magicOnCat{\catcode`\[=13\relax} +\def\gtr@magicOnCat{\catcode`\[=13\gtr@magicOnDef} % \end{macrocode} % \end{macro} -% \begin{macro}{[}\nocomment +% \begin{macro}{gtr@magicSave}\nocomment +% "\gtr@magicSave" is the content of the original "[" command % \begin{macrocode} -\gtr@magicOnCat\def[{\gtr@chordTest\gtr@scanBrace} +\gtr@magicOnCat\def\gtr@magicOnDef{\let\gtr@magicSave[\let[\gtr@magicNew}% +% \end{macrocode} +% \end{macro} +% \begin{macro}{\gtr@magicNew}\nocomment +% "\gtr@magicNew" is the magic new "[" command +% \begin{macrocode} +\def\gtr@magicNew{\gtr@chordTest\gtr@scanBrace} % \end{macrocode} % \end{macro} % \begin{macro}{\gtr@magicOffCat}\nocomment % \begin{macrocode} -\def\gtr@magicOffCat{\catcode`\[=12\relax} -\gtr@magicOff +\def\gtr@magicOffCat{\let[\gtr@magicSave\catcode`\[=12\relax} +\gtr@magicOnDef\gtr@magicOff % \end{macrocode} % \end{macro} @@ -1149,10 +1170,11 @@ % following space (gobbling). Depending on what it finds, it expands the % corresponding "\guitarPut..." command. % \begin{macrocode} -\def\gtr@parse#1{\gtr@normal +\def\gtr@parse#1{\gtr@normal\gtr@changeDef \guitarSplitDist{#1}\guitarAccord\gtr@dist \expandafter \guitarSplitMerge\expandafter{\guitarAccord}\guitarAccord\gtr@merge + \gtr@changeUndef \toolboxIfNextGobbling\toolboxSpaceToken {\gtr@crMagicCondOn\guitarPutOnSpace}\gtr@para} % \end{macrocode} @@ -1177,20 +1199,41 @@ \def\gtr@change{\catcode`\#=13\catcode`b=13\relax} % \end{macrocode} % \end{macro} -% \begin{macro}{#}\nocomment +% \begin{macro}{gtr@sharpSave} +% "\gtr@sharpSave" is the content of the original sharp command +% \end{macro} +% \begin{macro}{gtr@flatSave} +% "\gtr@flatSave" is the content of the original flat command +% \end{macro} +% \begin{macro}{\gtr@changeDef} +% "\gtr@changeDef" will later save/redefine the sharp and flat command. % \begin{macrocode} -\gtr@change\def#{\guitarSharp} +\gtr@change\def\gtr@changeDef{\let\gtr@sharpSave#\let#\gtr@sharpNew + \let\gtr@flatSave b\let b\gtr@flatNew} % \end{macrocode} % \end{macro} -% \begin{macro}{b}\nocomment +% \begin{macro}{gtr@ChangeUndef} +% "\gtr@ChangeUndef" restores the change made by "\gtr@changeDef" % \begin{macrocode} -\def b{\guitarFlat} +\def\gtr@changeUndef{\let#\gtr@sharpSave\let b\gtr@flatSave} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\gtr@sharpNew}\nocomment +% "\gtr@sharpNew" is the magic new "#" command +% \begin{macrocode} +\def\gtr@sharpNew{\guitarSharp} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\gtr@flatNew}\nocomment +% "\gtr@flatNew" is the magic new "#" command +% \begin{macrocode} +\def\gtr@flatNew{\guitarFlat} % \end{macrocode} % \end{macro} % \begin{macro}{\gtr@normal}\nocomment % \begin{macrocode} \def\gtr@normal{\catcode`\#=6\catcode`b=11\relax} -\gtr@normal +\gtr@changeDef\gtr@normal % \end{macrocode} % \end{macro} @@ -1218,14 +1261,28 @@ \let\gtr@crCondOn\toolboxEmpty} % \end{macrocode} % \end{macro} +% \begin{macro}{\gtr@crOnDef} +% "\gtr@crOnDef" will later save/redefine the linefeed command. +% For the very first call below we must make it a dummy command now. +% \begin{macrocode} +\let\gtr@crOnDef\toolboxEmpty +% \end{macrocode} +% \end{macro} % \begin{macro}{\gtr@crOnCat}\nocomment % \begin{macrocode} -\def\gtr@crOnCat{\catcode`\^^M=13\relax} +\def\gtr@crOnCat{\catcode`\^^M=13\gtr@crOnDef} +% \end{macrocode} +% \end{macro} +% \begin{macro}{gtr@crSave}\nocomment +% "\gtr@crSave" is the content of the original linefeed command +% \begin{macrocode} +\gtr@crOnCat\def\gtr@crOnDef{\let\gtr@crSave^^M\let^^M\gtr@crNew}% % \end{macrocode} % \end{macro} -% \begin{macro}{linefeed}\nocomment +% \begin{macro}{gtr@crNew}\nocomment +% "\gtr@crNew" is the special new linefeed command % \begin{macrocode} -\gtr@crOnCat\def^^M{\toolboxIfNextGobbling^^M\gtr@par\guitarEndLine}% +\def\gtr@crNew{\toolboxIfNextGobbling^^M\gtr@par\guitarEndLine}% % \end{macrocode} % \end{macro} % \begin{macro}{gtr@par}\nocomment @@ -1245,8 +1302,8 @@ % \end{macro} % \begin{macro}{gtr@crOffCat}\nocomment % \begin{macrocode} -\def\gtr@crOffCat{\catcode`\^^M=5\relax}% -\gtr@crOff +\def\gtr@crOffCat{\let^^M\gtr@crSave\catcode`\^^M=5\relax}% +\gtr@crOnDef\gtr@crOff % \end{macrocode} % \end{macro} diff --git a/Master/texmf-dist/tex/latex/guitar/guitar.sty b/Master/texmf-dist/tex/latex/guitar/guitar.sty index 20d6deaf272..78eaa5fc45c 100644 --- a/Master/texmf-dist/tex/latex/guitar/guitar.sty +++ b/Master/texmf-dist/tex/latex/guitar/guitar.sty @@ -12,10 +12,10 @@ \def\tbx@tmp{\immediate\write17}\expandafter\tbx@tmp \else \expandafter\typeout -\fi{guitar.sty by M. Vaeth: Guitar chords over song texts 1.5} +\fi{guitar.sty by M. Vaeth: Guitar chords over song texts 1.6} \ifx\ProvidesPackage\undefined\else - \ProvidesPackage{guitar}[2001/10/08 v1.5] + \ProvidesPackage{guitar}[2009/03/17 v1.6] \fi \ifx\RequirePackage\undefined \ifx\toolboxDef\undefined @@ -138,20 +138,23 @@ \def\gtr@magicOff{\gtr@magicOffCat \let\gtr@magicCondOff\toolboxEmpty \let\gtr@magicCondOn\toolboxEmpty} -\def\gtr@magicOnCat{\catcode`\[=13\relax} -\gtr@magicOnCat\def[{\gtr@chordTest\gtr@scanBrace} -\def\gtr@magicOffCat{\catcode`\[=12\relax} -\gtr@magicOff +\let\gtr@magicOnDef\toolboxEmpty +\def\gtr@magicOnCat{\catcode`\[=13\gtr@magicOnDef} +\gtr@magicOnCat\def\gtr@magicOnDef{\let\gtr@magicSave[\let[\gtr@magicNew}% +\def\gtr@magicNew{\gtr@chordTest\gtr@scanBrace} +\def\gtr@magicOffCat{\let[\gtr@magicSave\catcode`\[=12\relax} +\gtr@magicOnDef\gtr@magicOff \def\gtr@scanBrace#1]{\gtr@parse{#1}} \def\guitarChord{\gtr@chordTest\gtr@parse} \def\gtr@chordTest#1{\gtr@crMagicCondOff\gtr@change \toolboxIfNextGobbling*{\gtr@normal#1}{#1}} -\def\gtr@parse#1{\gtr@normal +\def\gtr@parse#1{\gtr@normal\gtr@changeDef \guitarSplitDist{#1}\guitarAccord\gtr@dist \expandafter \guitarSplitMerge\expandafter{\guitarAccord}\guitarAccord\gtr@merge + \gtr@changeUndef \toolboxIfNextGobbling\toolboxSpaceToken {\gtr@crMagicCondOn\guitarPutOnSpace}\gtr@para} \def\gtr@para#1{\gtr@crMagicCondOn @@ -166,10 +169,13 @@ \fi\gtr@tmp{#1}} \def\gtr@change{\catcode`\#=13\catcode`b=13\relax} -\gtr@change\def#{\guitarSharp} -\def b{\guitarFlat} +\gtr@change\def\gtr@changeDef{\let\gtr@sharpSave#\let#\gtr@sharpNew + \let\gtr@flatSave b\let b\gtr@flatNew} +\def\gtr@changeUndef{\let#\gtr@sharpSave\let b\gtr@flatSave} +\def\gtr@sharpNew{\guitarSharp} +\def\gtr@flatNew{\guitarFlat} \def\gtr@normal{\catcode`\#=6\catcode`b=11\relax} -\gtr@normal +\gtr@changeDef\gtr@normal \def\guitarCrOn{\guitarCrOnHook\gtr@crOn\gtr@ignorespaces} \def\guitarCrOff{\gtr@crOff\guitarCrOffHook} @@ -179,13 +185,15 @@ \def\gtr@crOff{\gtr@crOffCat \let\gtr@crCondOff\toolboxEmpty \let\gtr@crCondOn\toolboxEmpty} -\def\gtr@crOnCat{\catcode`\^^M=13\relax} -\gtr@crOnCat\def^^M{\toolboxIfNextGobbling^^M\gtr@par\guitarEndLine}% +\let\gtr@crOnDef\toolboxEmpty +\def\gtr@crOnCat{\catcode`\^^M=13\gtr@crOnDef} +\gtr@crOnCat\def\gtr@crOnDef{\let\gtr@crSave^^M\let^^M\gtr@crNew}% +\def\gtr@crNew{\toolboxIfNextGobbling^^M\gtr@par\guitarEndLine}% \def\gtr@par{\toolboxIfNextGobbling^^M\gtr@dblpar\guitarEndPar}% \def\gtr@dblpar{\toolboxIfNextGobbling^^M\gtr@dblpar\guitarEndDoublePar}% \def\gtr@ignorespaces{\toolboxIfNextGobbling^^M\gtr@ignorespaces\ignorespaces}% -\def\gtr@crOffCat{\catcode`\^^M=5\relax}% -\gtr@crOff +\def\gtr@crOffCat{\let^^M\gtr@crSave\catcode`\^^M=5\relax}% +\gtr@crOnDef\gtr@crOff \endinput %% |