summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-11-01 20:58:35 +0000
committerKarl Berry <karl@freefriends.org>2019-11-01 20:58:35 +0000
commit89dbbe700a3907ad449d129bf84e04f8767b5f4d (patch)
tree32f06e2db54cbf34d85e5bff2383bc8a56237708 /Master/texmf-dist/tex
parente5d626f8ec98bd9ff45077e408d60d111e25e65d (diff)
circledsteps (1nov19)
git-svn-id: svn://tug.org/texlive/trunk@52600 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/circledsteps/circledsteps.sty49
1 files changed, 40 insertions, 9 deletions
diff --git a/Master/texmf-dist/tex/latex/circledsteps/circledsteps.sty b/Master/texmf-dist/tex/latex/circledsteps/circledsteps.sty
index f70e179cdfd..8949ec71cb3 100644
--- a/Master/texmf-dist/tex/latex/circledsteps/circledsteps.sty
+++ b/Master/texmf-dist/tex/latex/circledsteps/circledsteps.sty
@@ -1,6 +1,6 @@
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}[1996/06/01]
-\ProvidesPackage{circledsteps}[2019/06/19 v1.0 Circled steps that you can reference]
+\ProvidesPackage{circledsteps}[2019/11/01 v1.1 Circled steps that you can reference]
% \end{macrocode}
%
% Copyright (c) 2019 Romano Giannetti
@@ -14,12 +14,25 @@
\RequirePackage{pgfkeys} % for the pgfkeys
\pgfkeys{/csteps/inner ysep/.initial=4pt,
/csteps/inner xsep/.initial=4pt,
- /csteps/inner color/.initial=red,
- /csteps/outer color/.initial=blue,
+ /csteps/inner color/.initial=none,
+ /csteps/outer color/.initial=none,
}
+\DeclareOption{redblue}{
+ \tikzset{/csteps/inner color=red, /csteps/outer color=blue}%
+}
+\DeclareOption{legacy}{
+ \tikzset{/csteps/inner color=red, /csteps/outer color=blue}%
+}
+
+% end of options definitions
+\ProcessOptions\relax
+
\newsavebox\csteps@CBox
\newlength\csteps@XLength \newlength\csteps@YLength \newlength\csteps@YDepth \newlength\csteps@tmplen
\def\csteps@CircledParam#1#2{\sbox\csteps@CBox{#2}%
+ \edef\csteps@none{none}%
+ \edef\csteps@outercolor{\pgfkeysvalueof{/csteps/outer color}}%
+ \edef\csteps@innercolor{\pgfkeysvalueof{/csteps/inner color}}%
\csteps@XLength=\wd\csteps@CBox\advance\csteps@XLength by\pgfkeysvalueof{/csteps/inner xsep}\relax
\csteps@tmplen=\pgfkeysvalueof{/csteps/inner ysep}\relax
\csteps@YDepth=\dp\csteps@CBox\advance\csteps@YDepth by 0.5\csteps@tmplen\relax
@@ -29,18 +42,36 @@
\ifdim\csteps@XLength>\csteps@YLength
\makebox[\csteps@XLength]{% X bigger than Y
\makebox(0,\csteps@YLength){%
- \color{\pgfkeysvalueof{/csteps/outer color}}\put(0,0){\oval(\csteps@XLength,\csteps@YLength)}%
+ \ifx\csteps@outercolor\csteps@none\else
+ \color{\csteps@outercolor}%
+ \fi
+ \put(0,0){\oval(\csteps@XLength,\csteps@YLength)}%
}%
\makebox(0,\csteps@YLength){%
- \put(-.5\wd\csteps@CBox,0){\textcolor{\pgfkeysvalueof{/csteps/inner color}}{#2}}%
+ \put(-.5\wd\csteps@CBox,0){%
+ \ifx\csteps@outercolor\csteps@none
+ #2\relax%
+ \else
+ \textcolor{\csteps@innercolor}{#2}%
+ \fi
+ }%
}}%
\else
\makebox[\csteps@YLength]{%
\makebox(0,\csteps@YLength){%
- \color{\pgfkeysvalueof{/csteps/outer color}}\put(0,0){\circle{\csteps@YLength}}%
+ \ifx\csteps@outercolor\csteps@none\else
+ \color{\csteps@outercolor}%
+ \fi
+ \put(0,0){\circle{\csteps@YLength}}%
}%
\makebox(0,\csteps@YLength){%
- \put(-.5\wd\csteps@CBox,0){\textcolor{\pgfkeysvalueof{/csteps/inner color}}{#2}}%
+ \put(-.5\wd\csteps@CBox,0){%
+ \ifx\csteps@outercolor\csteps@none
+ #2\relax%
+ \else
+ \textcolor{\csteps@innercolor}{#2}%
+ \fi
+ }%
}}%
\fi
}%
@@ -52,7 +83,7 @@
\def\CircledTop#1{\csteps@CircledParam{0}{#1}}
\newcommand{\CircledText}[1]{%
\begingroup
- \tikzset{/csteps/inner color=., /csteps/outer color=.}%
+ \tikzset{/csteps/inner color=none, /csteps/outer color=none}%
\Circled{#1}%
\endgroup
}
@@ -66,7 +97,7 @@
\refstepcounter{cstepcnt}%
\Circled{\scriptsize\arabic{cstepcnt}}%
}
-\renewcommand{\thecstepcnt}{\textbf{\arabic{cstepcnt}:}}
+\renewcommand{\thecstepcnt}{\arabic{cstepcnt}}
% \end{macrocode}
%
%