texlive[52600] Master/texmf-dist: circledsteps (1nov19)
commits+karl at tug.org
commits+karl at tug.org
Fri Nov 1 21:58:36 CET 2019
Revision: 52600
http://tug.org/svn/texlive?view=revision&revision=52600
Author: karl
Date: 2019-11-01 21:58:35 +0100 (Fri, 01 Nov 2019)
Log Message:
-----------
circledsteps (1nov19)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/circledsteps/README.md
trunk/Master/texmf-dist/doc/latex/circledsteps/circledsteps-manual.pdf
trunk/Master/texmf-dist/doc/latex/circledsteps/circledsteps-manual.tex
trunk/Master/texmf-dist/doc/latex/circledsteps/ctikzexample.tex
trunk/Master/texmf-dist/tex/latex/circledsteps/circledsteps.sty
Modified: trunk/Master/texmf-dist/doc/latex/circledsteps/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/circledsteps/README.md 2019-11-01 20:58:21 UTC (rev 52599)
+++ trunk/Master/texmf-dist/doc/latex/circledsteps/README.md 2019-11-01 20:58:35 UTC (rev 52600)
@@ -6,7 +6,7 @@
### DOCUMENTATION
-See the included file `circledsteps-manual.tex`; you can compile it running (twice) `pdflatex` on it. If you want to have a look before buying, you can find a compiled copy on the [release page](https://github.com/Rmano/circledsteps/releases).
+See the included file `circledsteps-manual.tex`; you can compile it running (twice) `pdflatex` on it. If you want to have a look before buying, you can find a compiled copy on the [release page](https://github.com/Rmano/circledsteps/releases) or on [CTAN](https://ctan.org/pkg/circledsteps).
If you have already installed the package in your TeX distribution, use `texdoc circledsteps`; it should show you the manual of the installed version of the package.
Modified: trunk/Master/texmf-dist/doc/latex/circledsteps/circledsteps-manual.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/circledsteps/circledsteps-manual.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/circledsteps/circledsteps-manual.tex 2019-11-01 20:58:21 UTC (rev 52599)
+++ trunk/Master/texmf-dist/doc/latex/circledsteps/circledsteps-manual.tex 2019-11-01 20:58:35 UTC (rev 52600)
@@ -44,12 +44,13 @@
\toprule
Circled\{\} & circled text using the package colors, text on the baseline\\
CircledTop\{\} & circled text using the package colors, circle on the baseline\\
- CircledText\{\} & circled text using the current color (may fail\footnotemark{} in moving arguments)\\
+ CircledText\{\} & circled text using the current color (may fail\footnotemark{} across pages break in header or footers)\\
\bottomrule
\end{tabular}
\footnotetext{in the sense it can select the wrong color.}
The parameters for the output are controlled using \texttt{pgfkeys}; you can change them with \verb|\tikzset|; you can obviously limit the effect of change using normal \LaTeX{} scoping rules.
+The pseudo-color \texttt{none} means that the current color is used for both the text and the circle.
\begin{tabular}{>{\ttfamily}lll}
\toprule
@@ -57,8 +58,8 @@
\midrule
/csteps/inner ysep & vertical spacing & 4pt\\
/csteps/inner xsep & horizontal spacing & 4pt\\
- /csteps/inner color & color of the text & red\\
- /csteps/outer color & color of the circle & blue\\
+ /csteps/inner color & color of the text & none\\
+ /csteps/outer color & color of the circle & none\\
\bottomrule
\end{tabular}
@@ -102,6 +103,12 @@
\par\bigskip
\end{LTXexample}
+If you use the package option \texttt{redblue} or \texttt{legacy} you will have the same effect than
+
+\begin{lstlisting}[]
+ \tikzset{/csteps/inner color=red, /csteps/outer color=blue}
+\end{lstlisting}
+
\begin{LTXexample}
Or even you can have inline numbers like \CircledText{1} or
exponents\textsuperscript{\CircledText{2}} and so on.
@@ -108,13 +115,11 @@
\textcolor{red}{They follow the current color: \CircledText{1} and \CircledText{2} automatically,} as you can see: \CircledText{$1+1\approx3$}. In-text circled numbers look better when a bit smaller, though, as you can see in {\small\CircledText{1}} for example.
\end{LTXexample}
-Notice that \verb|\CircledText{}| uses the special ``\texttt{.}'' color defined by \texttt{xcolor}; when page breaks occurs it can get the wrong color.
-
No, you can't fill the circle/oval. Pull requests in that sense are welcome.
\section{Automatically generated numbers}
-The command \verb|\cstep| will generate a circled number, starting from \texttt{1}, that can be referenced with the normal \verb|\label| mechanism. You can reset the numbering with
+The command \verb|\cstep| will generate a circled number, starting from \texttt{1}, that can be referenced with the normal \verb|\label| mechanism. You can reset the numbering with
\verb|\startcstep|. For example:
\input{ctikzexample.tex}
@@ -125,12 +130,12 @@
\section{Personalize it!}
-The definition of \verb|CircledTexT| is simply the following one; you can get idea and define your own easily (beware of spaces at the end of the lines, though!):
+The definition of \verb|CircledTexT| is simply the following one; you can get idea and define your own easily (beware of spaces at the end of the lines, though!):
\begin{lstlisting}
\newcommand{\CircledText}[1]{%
\begingroup
- \tikzset{/csteps/inner color=., /csteps/outer color=.}%
+ \tikzset{/csteps/inner color=none, /csteps/outer color=none,}
\Circled{#1}%
\endgroup
}
@@ -147,7 +152,7 @@
\refstepcounter{cstepcnt}%
\Circled{\scriptsize\arabic{cstepcnt}}%
}
-\renewcommand{\thecstepcnt}{\textbf{\arabic{cstepcnt}:}}
+\renewcommand{\thecstepcnt}{\arabic{cstepcnt}}
\end{lstlisting}
Modified: trunk/Master/texmf-dist/doc/latex/circledsteps/ctikzexample.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/circledsteps/ctikzexample.tex 2019-11-01 20:58:21 UTC (rev 52599)
+++ trunk/Master/texmf-dist/doc/latex/circledsteps/ctikzexample.tex 2019-11-01 20:58:35 UTC (rev 52600)
@@ -1,3 +1,5 @@
+\tikzset{/csteps/inner color=red, /csteps/outer color=blue}
+\newcommand{\circref}[1]{\CircledText{\small\textbf{\ref{#1}}}:}
\begin{circuitikz}[scale=0.9, baseline=(VCC), transform shape]
\draw (0,0) node[ground](GND){} to[V=$v_s$] ++(0,2)
to[R, l2^=$R_1$ and \SI{1}{k\ohm}, l2 valign=b] ++(2,0) coordinate(firstb);
@@ -19,9 +21,9 @@
\begin{minipage}[t]{0.5\linewidth}
%% minipage reset these..
\parindent=0pt\parskip=6pt plus 6pt minus 2pt\relax
- \ref{c:b1} let's neglect (to be confirmed!) $I_B$, $V_B\approx\SI{0}{V}$;\par
- \ref{c:ie1} $I_{E1_Q}=(V_{E1_Q}-V_{EE})/R_3$;\par
- \ref{c:ic1} $I_{C1_Q} \approx\SI{0.93}{mA}$;\par
- \ref{c:g1} $V_{CC}-R_2I_{C2_Q}= \SI{5.35}{V}$; $V_{CE1_Q}=\SI{6.05}{V}$;\par
+ \circref{c:b1} let's neglect (to be confirmed!) $I_B$, $V_B\approx\SI{0}{V}$;\par
+ \circref{c:ie1} $I_{E1_Q}=(V_{E1_Q}-V_{EE})/R_3$;\par
+ \circref{c:ic1} $I_{C1_Q} \approx\SI{0.93}{mA}$;\par
+ \circref{c:g1} $V_{CC}-R_2I_{C2_Q}= \SI{5.35}{V}$; $V_{CE1_Q}=\SI{6.05}{V}$;\par
\end{minipage}
Modified: trunk/Master/texmf-dist/tex/latex/circledsteps/circledsteps.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/circledsteps/circledsteps.sty 2019-11-01 20:58:21 UTC (rev 52599)
+++ trunk/Master/texmf-dist/tex/latex/circledsteps/circledsteps.sty 2019-11-01 20:58:35 UTC (rev 52600)
@@ -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 at CBox
\newlength\csteps at XLength \newlength\csteps at YLength \newlength\csteps at YDepth \newlength\csteps at tmplen
\def\csteps at CircledParam#1#2{\sbox\csteps at CBox{#2}%
+ \edef\csteps at none{none}%
+ \edef\csteps at outercolor{\pgfkeysvalueof{/csteps/outer color}}%
+ \edef\csteps at innercolor{\pgfkeysvalueof{/csteps/inner color}}%
\csteps at XLength=\wd\csteps at CBox\advance\csteps at XLength by\pgfkeysvalueof{/csteps/inner xsep}\relax
\csteps at tmplen=\pgfkeysvalueof{/csteps/inner ysep}\relax
\csteps at YDepth=\dp\csteps at CBox\advance\csteps at YDepth by 0.5\csteps at tmplen\relax
@@ -29,18 +42,36 @@
\ifdim\csteps at XLength>\csteps at YLength
\makebox[\csteps at XLength]{% X bigger than Y
\makebox(0,\csteps at YLength){%
- \color{\pgfkeysvalueof{/csteps/outer color}}\put(0,0){\oval(\csteps at XLength,\csteps at YLength)}%
+ \ifx\csteps at outercolor\csteps at none\else
+ \color{\csteps at outercolor}%
+ \fi
+ \put(0,0){\oval(\csteps at XLength,\csteps at YLength)}%
}%
\makebox(0,\csteps at YLength){%
- \put(-.5\wd\csteps at CBox,0){\textcolor{\pgfkeysvalueof{/csteps/inner color}}{#2}}%
+ \put(-.5\wd\csteps at CBox,0){%
+ \ifx\csteps at outercolor\csteps at none
+ #2\relax%
+ \else
+ \textcolor{\csteps at innercolor}{#2}%
+ \fi
+ }%
}}%
\else
\makebox[\csteps at YLength]{%
\makebox(0,\csteps at YLength){%
- \color{\pgfkeysvalueof{/csteps/outer color}}\put(0,0){\circle{\csteps at YLength}}%
+ \ifx\csteps at outercolor\csteps at none\else
+ \color{\csteps at outercolor}%
+ \fi
+ \put(0,0){\circle{\csteps at YLength}}%
}%
\makebox(0,\csteps at YLength){%
- \put(-.5\wd\csteps at CBox,0){\textcolor{\pgfkeysvalueof{/csteps/inner color}}{#2}}%
+ \put(-.5\wd\csteps at CBox,0){%
+ \ifx\csteps at outercolor\csteps at none
+ #2\relax%
+ \else
+ \textcolor{\csteps at innercolor}{#2}%
+ \fi
+ }%
}}%
\fi
}%
@@ -52,7 +83,7 @@
\def\CircledTop#1{\csteps at 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}
%
%
More information about the tex-live-commits
mailing list