From 35628c201434c7cf07ee3b270f4ff4763c0e1bc1 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 7 Feb 2018 00:04:03 +0000 Subject: texshade (6feb18) git-svn-id: svn://tug.org/texlive/trunk@46559 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/texshade/texshade.sty | 247 +++++++++++++++++++--- 1 file changed, 221 insertions(+), 26 deletions(-) (limited to 'Master/texmf-dist/tex/latex/texshade') diff --git a/Master/texmf-dist/tex/latex/texshade/texshade.sty b/Master/texmf-dist/tex/latex/texshade/texshade.sty index e22dae05130..615108bfd03 100644 --- a/Master/texmf-dist/tex/latex/texshade/texshade.sty +++ b/Master/texmf-dist/tex/latex/texshade/texshade.sty @@ -13,8 +13,8 @@ %% \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{texshade}[2011/05/13 LaTeX TeXshade (v1.24)] -\message{Package `texshade', Version 1.24 of 2011/12/01.} +\ProvidesPackage{texshade}[2018/01/17 LaTeX TeXshade (v1.25)] +\message{Package `texshade', Version 1.25 of 2018/01/17.} \PassOptionsToPackage{dvips}{color} \PassOptionsToPackage{dvips}{graphicx} @@ -94,6 +94,7 @@ \newlength\equal@height \newlength\temp@@length \newlength\vspace@legend \newlength\hspace@legend +\newlength\bar@length \newif\ifletter \newif\ifnumber \newif\ifnewres \newif\ifall@shade @@ -2593,7 +2594,6 @@ \expandafter\xdef\csname hide@@@seq\first@\endcsname{kill} \ifnum\first@=\cons@num \xdef\cons@num{0} \fi \advance\killseq@count by -1 - \seq@percent=100 \divide\seq@percent by \killseq@count \fi \fi\fi \xdef\first@{\first@@ @} @@ -2612,7 +2612,6 @@ \expandafter\xdef\csname hide@@@seq\fourth@\endcsname{kill} \ifnum\fourth@=\cons@num \xdef\cons@num{0} \fi \advance\killseq@count by -1 - \seq@percent=100 \divide\seq@percent by \killseq@count \fi \fi\fi \killseq@ @@ -3114,22 +3113,33 @@ \expandafter\xdef\csname stack@\bottop@\seq@\endcsname{\tmpstack} } \def\getarrow@shape#1#2#3#4&{% - \xdef\first@@{#1}\xdef\second@@{#2}\xdef\third@@{#3} - \if\first@@ v - \if\second@@ = - \else \xdef\style@{\first@@ v\third@@#4} \fi + \xdef\first@@{#1}\xdef\second@@{#2}\xdef\third@@{#3}\xdef\fourth@@{#4} + \ifx\temp@@\y@ + \if\first@@ ` \xdef\first@@{a} \else + \if\first@@ ' \xdef\first@@{a} \else + \if\first@@ , \xdef\first@@{b} \else + \if\first@@ S \xdef\first@@{c} \xdef\second@@{-} + \fi\fi\fi\fi + \if\third@@ ` \xdef\third@@{a} \else + \if\third@@ ' \xdef\third@@{a} \else + \if\third@@ , \xdef\third@@{b} \else + \if\third@@ S \xdef\third@@{c} \xdef\second@@{-} + \fi\fi\fi\fi + \xdef\style@{\first@@ -\third@@\fourth@@} + \fi + \if\first@@ S + \xdef\style@{\first@@ -\third@@\fourth@@} \else \if\first@@ v \if\second@@ = - \else \xdef\style@{\first@@ v\third@@#4} \fi + \else \xdef\style@{\first@@ v\third@@\fourth@@} \fi \else - \if\third@@ v - \if\second@@ = - \else \xdef\style@{\first@@ v\third@@#4} \fi + \if\third@@ S + \xdef\style@{\first@@ -\third@@\fourth@@} \else \if\third@@ v \if\second@@ = - \else \xdef\style@{\first@@ v\third@@#4} \fi + \else \xdef\style@{\first@@ v\third@@\fourth@@} \fi \fi\fi\fi\fi } \def\get@shape#1#2#3{% @@ -5894,7 +5904,11 @@ \fi \xdef\style@{cons[color]:cons[\f@color][0]} \else - \xdef\style@{#4} \expandafter\getarrow@shape\temp@ + \xdef\style@{#4} \xdef\temp@@{n} + \expandafter\get@firstfill\temp@ + \if\second@@ ^ \xdef\second@@{_} \fi + \if\second@@ _ \xdef\temp@{\fill@char} \xdef\temp@@{y}\fi + \expandafter\getarrow@shape\temp@ \fi \fi \fi @@ -7793,9 +7807,8 @@ \advance\pos@sum by 1 \fi \ifnum\innerloopcount<\seq@count \repeat - \multiply\pos@sum by \seq@percent \expandafter\xdef\csname pos\the\loopcount\endcsname{\the\pos@sum} - \expandafter\ifnum\csname pos\the\loopcount\endcsname<\thresh@ld + \expandafter\ifnum\csname pos\the\loopcount\endcsname<\thresh@ld@ \else \expandafter\ifnum\csname pos\the\loopcount\endcsname>\m@x \xdef\m@x{\csname pos\the\loopcount\endcsname} @@ -7843,13 +7856,12 @@ \expandafter\ifnum\csname pos\the\loopcount\endcsname=\seq@count \xdef\cons@seq{\the\loopcount} \xdef\match@case{2} \loopcount=1 \else - \multiply\pos@sum by \seq@percent \expandafter\xdef\csname pos\the\loopcount\endcsname{\the\pos@sum} - \expandafter\ifnum\csname pos\the\loopcount\endcsname<\thresh@ld + \expandafter\ifnum\csname pos\the\loopcount\endcsname<\thresh@ld@ \else \expandafter\ifnum\csname pos\the\loopcount\endcsname>\m@x \xdef\m@x{\csname pos\the\loopcount\endcsname} - \expandafter\ifnum\csname pos\the\loopcount\endcsname<\all@thresh@ld + \expandafter\ifnum\csname pos\the\loopcount\endcsname<\all@thresh@ld@ \xdef\cons@seq{\the\loopcount} \xdef\match@case{1} \else \xdef\cons@seq{\the\loopcount} \xdef\match@case{2} @@ -11373,7 +11385,7 @@ \textcolor{\legend@fg}{% \ifgerm@n\kern2ex\legend@size{nicht konserviert}% \else\ifsp@nish\kern2ex\legend@size{no conservado}% - \else\kern2ex\legend@size{non conserved}\fi\fi} + \else\kern2ex\legend@size{non-conserved}\fi\fi} \newline\hbox{}\noindent% \ifsimmode% \ifnames@\ifnames@right\else\hbox to \name@width{\hss}\fi\fi @@ -11862,6 +11874,7 @@ \def\get@tripletfill#1#2#3#4&{% \multiply\temp@count by -1% \def\second@@{#1}\def\second@@@{#2}\def\second@@@@{#3}\def\fill@char{#4&}} + \def\putfeature@style#1{% \residues@size% \setbox1=\hbox{\ensuremath{\overrightarrow{\hbox{}}}}% @@ -11967,6 +11980,7 @@ \fontseries{\featurestyles@series}% \fontshape{\featurestyles@shape}% \selectfont% + \xdef\last@{bottom}% \ifx\bottop@\temp@\xdef\last@{0.35}\else\xdef\last@{0}\fi% \kern0.15\box@width% \loopcount=0\relax% @@ -12137,6 +12151,7 @@ \ifx\bottop@\temp@ \xdef\last@{0.35}\else\xdef\last@{-0.55}\fi% \textcolor{\f@color}{% \raisebox{\last@\arrow@height}{% + \if\first@@ b \xdef\first@@{,}\fi% \if\first@@ ,% \rule{0.1\arrow@height}{\arrow@height}\kern-0.35\arrow@height% \else% @@ -12144,6 +12159,10 @@ \rule{0.1\arrow@height}{2\arrow@height}\kern-0.35\arrow@height% \else% \if\first@@ `\xdef\first@@{'}\fi% + \if\first@@ '% + \rule[\arrow@height]% + {0.1\arrow@height}{\arrow@height}\kern-0.35\arrow@height% + \else% \if\first@@ '% \rule[\arrow@height]% {0.1\arrow@height}{\arrow@height}\kern-0.35\arrow@height% @@ -12152,6 +12171,7 @@ \rule{0pt}{0pt}\kern-0.35\arrow@height% \fi% \fi% + \fi% \fi% \fi% \if\third@@ v% @@ -12212,6 +12232,7 @@ \xdef\last@{-0.25}\fi\fi\fi\fi% \textcolor{\f@color}{% \raisebox{\last@\arrow@height}{% + \if\first@@ b \xdef\first@@{,}\fi% \if\first@@ ,% \rule[-0.5\arrow@height]{0.1\arrow@height}{1.5\arrow@height}% \kern-0.1\arrow@height% @@ -12220,7 +12241,8 @@ \rule[-0.5\arrow@height]{0.1\arrow@height}{2.25\arrow@height}% \kern-0.1\arrow@height% \else% - \if\first@@ `\xdef\first@@{'}\fi% + \if\first@@ a \xdef\first@@{'}\fi% + \if\first@@ ` \xdef\first@@{'}\fi% \if\first@@ '% \rule[0.4\arrow@height]% {0.1\arrow@height}{1.5\arrow@height}% @@ -12245,6 +12267,7 @@ \rule[0.37\arrow@height]{\width@tmp}{0.1\arrow@height}% \kern-\width@tmp% \rule[0.9\arrow@height]{\width@tmp}{0.1\arrow@height}% + \if\first@@ b \xdef\first@@{,}\fi% \if\third@@ ,% \kern-0.05\arrow@height% \rule[-0.5\arrow@height]{0.1\arrow@height}{1.5\arrow@height}% @@ -12253,10 +12276,16 @@ \kern-0.05\arrow@height% \rule[-0.5\arrow@height]{0.1\arrow@height}{2.25\arrow@height}% \else% - \if\third@@ `\xdef\third@@{'}\fi% + \if\first@@ a \xdef\first@@{'}\fi% + \if\third@@ ` \xdef\third@@{'}\fi% \if\third@@ '% \kern-0.05\arrow@height% \rule[0.4\arrow@height]{0.1\arrow@height}{1.5\arrow@height}% + \else% + \if\third@@ a% + \kern-0.05\arrow@height% + \rule[0.4\arrow@height]{0.1\arrow@height}{1.5\arrow@height}% + \fi% \fi% \fi% \fi% @@ -12268,9 +12297,25 @@ \advance\width@tmp by -0.5\temp@@length% \if\first@@ o\xdef\first@@{O}\fi% \if\third@@ o\xdef\third@@{O}\fi% + \xdef\last@{bottom}% + \ifx\fe@turep@s\last@% + \vspace{-20pt}\message{(((-20pt)))}% + \fi% \textcolor{\f@color}{% \if\first@@ ,% - \rule{\temp@@length}{\arrow@height}\kern-\temp@@length% + \rule{\temp@@length}{\arrow@height}\kern-\temp@@length% + \else% + \if\first@@ b% + \xdef\last@{bottom}% + \ifx\fe@turep@s\last@% + \rule{\temp@@length}{\arrow@height}\kern-\temp@@length% + \else + \xdef\shift@feature{y}% + \kern-\temp@@length% + \rule[-\bar@length]{\temp@@length}{\bar@length}% + \kern-\temp@@length% + \rule{\temp@@length}{\arrow@height}\kern-\temp@@length% + \fi \else% \if\first@@ |% \rule{\temp@@length}{2\arrow@height}\kern-\temp@@length% @@ -12278,6 +12323,52 @@ \if\first@@ O% \raisebox{0.06ex}{\ensuremath{\bullet}}\kern-0.55ex% \rule[\width@tmp]{0.65ex}{\temp@@length}% + \else% + \if\first@@ S% + \xdef\last@{bottom}% + \ifx\fe@turep@s\last@% + \advance\width@tmp by 0.5\temp@@length% + \kern0.5\box@width% + \kern-2\temp@@length% + \rule[\width@tmp]{\temp@@length}{\arrow@height}% + \advance\width@tmp by -0.5\temp@@length% + \kern-\temp@@length% + \rule[\width@tmp]{0.5\temp@@length}{\temp@@length}% + \rule[\width@tmp]{0.5\box@width}{\temp@@length}% + \else% + \kern0.5\box@width% + \kern-2\temp@@length% + \rule{\temp@@length}{\arrow@height}% + \kern-\temp@@length% + \rule[\width@tmp]{0.5\temp@@length}{\temp@@length}% + \rule[\width@tmp]{0.5\box@width}{\temp@@length}% + \fi% + \else% + \if\first@@ c% + \xdef\last@{bottom}% + \ifx\fe@turep@s\last@% + \advance\width@tmp by 0.5\temp@@length% + \raisebox{\arrow@height}{\rule[\box@height]{0pt}{\bar@length}}%%%%%%%%%%%%%%%%%%%%%%% + \kern0.5\box@width% + \kern-2\temp@@length% + \rule[2\arrow@height]{\temp@@length}{\bar@length}%%%%%%%%%%%%%%%%%%%%%% + \kern-\temp@@length%%%%%%%%%%%%%%%%%%%%%%%%% + \rule[\width@tmp]{\temp@@length}{\arrow@height}% + \advance\width@tmp by -0.5\temp@@length% + \kern-\temp@@length% + \rule[\width@tmp]{0.5\temp@@length}{\temp@@length}% + \rule[\width@tmp]{0.5\box@width}{\temp@@length}% + \else% + \xdef\shift@feature{y}% + \kern0.5\box@width% + \kern-2\temp@@length% + \rule[-\bar@length]{\temp@@length}{\bar@length}% + \kern-\temp@@length% + \rule{\temp@@length}{\arrow@height}% + \kern-\temp@@length% + \rule[\width@tmp]{0.5\temp@@length}{\temp@@length}% + \rule[\width@tmp]{0.5\box@width}{\temp@@length}% + \fi% \else% \if\first@@ <% \raisebox{0.06ex}{\ensuremath{\blacktriangleleft}}\kern-0.35ex% @@ -12290,13 +12381,20 @@ \fi% \fi% \fi% + \fi% + \fi% \fi% \fi% + \fi% \loopcount=\second@% \if\first@@ <\advance\loopcount by -1\relax\ifnum\loopcount<0 \loopcount=0\fi\fi% \if\third@@ >\advance\loopcount by -1\relax\ifnum\loopcount<0 \loopcount=0\fi\fi% \if\first@@ O\advance\loopcount by -1\relax\ifnum\loopcount<0 \loopcount=0\fi\fi% \if\third@@ O\advance\loopcount by -1\relax\ifnum\loopcount<0 \loopcount=0\fi\fi% + \if\first@@ S\advance\loopcount by -1\relax\ifnum\loopcount<0 \loopcount=0\fi\fi% + \if\third@@ S\advance\loopcount by -1\relax\ifnum\loopcount<0 \loopcount=0\fi\fi% + \if\first@@ c\advance\loopcount by -1\relax\ifnum\loopcount<0 \loopcount=0\fi\fi% + \if\third@@ c\advance\loopcount by -1\relax\ifnum\loopcount<0 \loopcount=0\fi\fi% \xdef\second@{\the\loopcount}% \rule[\width@tmp]{\second@\box@width}{\temp@@length}% \setbox1=\hbox{\residues@size{\fill@char}}% @@ -12306,6 +12404,17 @@ \hbox to \second@\box@width{\textcolor{\frame@color}{\residues@size{\hss\fill@char\hss}}}% \if\third@@ ,% \kern-\temp@@length\rule{\temp@@length}{\arrow@height}% + \else% + \if\third@@ b% + \xdef\last@{bottom}% + \ifx\fe@turep@s\last@% + \kern-\temp@@length\rule{\temp@@length}{\arrow@height}% + \else + \xdef\shift@feature{y}% + \kern-\temp@@length% + \rule[-\bar@length]{\temp@@length}{\bar@length}% + \kern-\temp@@length\rule{\temp@@length}{\arrow@height}% + \fi \else% \if\third@@ |% \kern-\temp@@length\rule{\temp@@length}{2\arrow@height}% @@ -12313,6 +12422,31 @@ \if\third@@ O% \rule[\width@tmp]{0.65ex}{\temp@@length}% \kern-0.55ex\raisebox{0.06ex}{\ensuremath{\bullet}}% + \else% + \if\third@@ S% + \rule[\width@tmp]{0.5\box@width}{\temp@@length}% + \rule[\width@tmp]{0.5\temp@@length}{\temp@@length}% + \xdef\last@{bottom}% + \ifx\fe@turep@s\last@% + \advance\width@tmp by 0.5\temp@@length% + \kern-\temp@@length\rule[\width@tmp]{\temp@@length}{\arrow@height}% + \else + \kern-\temp@@length\rule{\temp@@length}{\arrow@height}% + \fi% + \else% + \if\third@@ c% + \xdef\shift@feature{y}% + \rule[\width@tmp]{0.5\box@width}{\temp@@length}% + \xdef\last@{bottom}% + \ifx\fe@turep@s\last@% + \kern-\temp@@length%%%%%%%%%%%%%%%%%%%%%%%%% + \rule[2\arrow@height]{\temp@@length}{\bar@length}%%%%%%%%%%%%%%%%%%%%%% + \advance\width@tmp by 0.5\temp@@length% + \kern-\temp@@length\rule[\width@tmp]{\temp@@length}{\arrow@height}% + \else + \kern-\temp@@length\rule[-\bar@length]{\temp@@length}{\bar@length}% + \kern-\temp@@length\rule{\temp@@length}{\arrow@height}% + \fi% \else% \if\third@@ >% \kern-0.35ex\raisebox{0.06ex}{\ensuremath{\blacktriangleright}}% @@ -12324,7 +12458,10 @@ \fi% \fi% \fi% - \fi + \fi% + \fi% + \fi% + \fi% \fi}% \fi \fi @@ -13125,10 +13262,23 @@ \xdef\featureposttttop{1} \xdef\featureposbbbbottom{1}% \findc@nsensus% \noindent% + \setlength{\bar@length}{0pt}% + \xdef\fe@turep@s{top}% \ifnum\feature@ttttop=1 + \advance\bar@length by \feature@tttop\baselineskip% + \advance\bar@length by \feature@ttop\baselineskip% + \advance\bar@length by \feature@top\baselineskip% + \multiply\bar@length by 2% + \advance\bar@length by \tttt@sp@ce% + \advance\bar@length by \ttt@sp@ce% + \advance\bar@length by \tt@sp@ce% \ifnum\featureonttttop=0 \xdef\feature@ttttop{0} \fi \xdef\bottop@{ttttop}% + \xdef\shift@feature{n}% \put@feature% + \advance\bar@length by -\baselineskip% + \ifx\shift@feature\y@ \vspace{-\bar@length}\fi% + \setlength{\bar@length}{0pt}% \vspace{\tttt@sp@ce}% \vspace{-\baselineskip}% \newline\hbox{}% @@ -13136,9 +13286,18 @@ \iffix@\ifttttopfeature \vspace{\tttt@sp@ce}\newline\hbox{}\newline\hbox{}\fi\fi \fi \ifnum\feature@tttop=1 + \advance\bar@length by \feature@ttop\baselineskip% + \advance\bar@length by \feature@top\baselineskip% + \multiply\bar@length by 2% + \advance\bar@length by \ttt@sp@ce% + \advance\bar@length by \tt@sp@ce% \ifnum\featureontttop=0 \xdef\feature@tttop{0} \fi \xdef\bottop@{tttop}% + \xdef\shift@feature{n}% \put@feature% + \advance\bar@length by -\baselineskip% + \ifx\shift@feature\y@ \vspace{-\bar@length}\fi% + \setlength{\bar@length}{0pt}% \vspace{\ttt@sp@ce}% \vspace{-\baselineskip}% \newline\hbox{}% @@ -13146,9 +13305,16 @@ \iffix@\iftttopfeature \vspace{\ttt@sp@ce}\newline\hbox{}\newline\hbox{}\fi\fi \fi \ifnum\feature@ttop=1 + \advance\bar@length by \feature@top\baselineskip% + \multiply\bar@length by 2% + \advance\bar@length by \tt@sp@ce\message{tt\the\bar@length tt}% \ifnum\featureonttop=0 \xdef\feature@ttop{0} \fi \xdef\bottop@{ttop}% + \xdef\shift@feature{n}% \put@feature% + \advance\bar@length by -\baselineskip% + \ifx\shift@feature\y@ \vspace{-\bar@length}\fi% + \setlength{\bar@length}{0pt}% \vspace{\tt@sp@ce}% \vspace{-\baselineskip}% \newline\hbox{}% @@ -13264,6 +13430,9 @@ \ifnum\ruler@rot=0 \vspace{0.25\baselineskip}\fi% \fi% \fi% + \xdef\fe@turep@s{bottom}% + \setlength{\bar@length}{0pt}% + \xdef\b@feature@count{0} \ifnum\feature@bottom=1 % \ifnum\featureonbottom=0 \xdef\feature@bottom{0}\fi% \xdef\bottop@{bottom}% @@ -13273,6 +13442,9 @@ \vspace{\b@r@stretch\box@height}% \fi% \put@feature% + \temp@@count=\b@feature@count% + \advance\temp@@count by 1% + \xdef\b@feature@count{\the\temp@@count}% \else \iffix@ \if\bottom@stretch y% @@ -13285,14 +13457,24 @@ \fi% \fi% \ifnum\feature@bbottom=1 % + \advance\bar@length by \b@feature@count \baselineskip% + \multiply\bar@length by \b@r@stretch% + \multiply\bar@length by 2% + \advance\bar@length by \bb@sp@ce\message{bb\the\bar@length bb}% \ifnum\featureonbbottom=0 \xdef\feature@bbottom{0}\fi% \xdef\bottop@{bbottom}% \vspace{\bb@sp@ce}% \if\bbottom@stretch y% + \advance\bar@length by -\box@height% + \advance\bar@length by \b@r@stretch\box@height% \vspace{-\box@height}% \vspace{\b@r@stretch\box@height}% \fi% + \setlength{\bar@length}{0pt}%%%%%%%%%%%%%%%%%%%%%%% \put@feature% + \temp@@count=\b@feature@count% + \advance\temp@@count by 1% + \xdef\b@feature@count{\the\temp@@count}% \else \iffix@ \if\bbottom@stretch y% @@ -13305,6 +13487,10 @@ \fi \fi \ifnum\feature@bbbottom=1 % + \advance\bar@length by \b@feature@count\baselineskip% + \multiply\bar@length by \b@r@stretch% + \multiply\bar@length by 2% + \advance\bar@length by \bbb@sp@ce\message{bbb\the\bar@length bbb}% \ifnum\featureonbbbottom=0 \xdef\feature@bbbottom{0}\fi% \xdef\bottop@{bbbottom}% \vspace{\bbb@sp@ce}% @@ -13313,6 +13499,9 @@ \vspace{\b@r@stretch\box@height}% \fi% \put@feature% + \temp@@count=\b@feature@count% + \advance\temp@@count by 1% + \xdef\b@feature@count{\the\temp@@count}% \else \iffix@ \if\bbbottom@stretch y% @@ -13325,6 +13514,10 @@ \fi \fi \ifnum\feature@bbbbottom=1 % + \advance\bar@length by \b@feature@count\baselineskip% + \multiply\bar@length by \b@r@stretch% + \multiply\bar@length by 2% + \advance\bar@length by \bbbb@sp@ce\message{bbbb\the\bar@length bbbb}% \ifnum\featureonbbbbottom=0 \xdef\feature@bbbbottom{0}\fi% \xdef\bottop@{bbbbottom}% \vspace{\bbbb@sp@ce}% @@ -14181,8 +14374,6 @@ \ifnum\loopcount<\seq@count \repeat \xdef\seq@order{\seq@order,@} \killseq@count=\seq@count - \seq@percent=100 - \ifnum\seq@count>0 \divide\seq@percent by \seq@count \fi \fi \fi } @@ -14450,6 +14641,10 @@ \caption[\c@pshort]{\c@p} \fi \fi + \loopcount = \thresh@ld \multiply\loopcount by \seq@count \divide\loopcount by 100 + \xdef\thresh@ld@{\the\loopcount} + \loopcount = \all@thresh@ld \multiply\loopcount by \seq@count \divide\loopcount by 100 + \xdef\all@thresh@ld@{\the\loopcount} \bgroup \ifx\out@put\y@\bigskip\fi \iffuncmode \show@consfalse \fi -- cgit v1.2.3