texlive[60996] Master/texmf-dist: bodeplot (9nov21)
commits+karl at tug.org
commits+karl at tug.org
Tue Nov 9 00:15:34 CET 2021
Revision: 60996
http://tug.org/svn/texlive?view=revision&revision=60996
Author: karl
Date: 2021-11-09 00:15:33 +0100 (Tue, 09 Nov 2021)
Log Message:
-----------
bodeplot (9nov21)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/bodeplot/bodeplot.pdf
trunk/Master/texmf-dist/source/latex/bodeplot/bodeplot.dtx
trunk/Master/texmf-dist/tex/latex/bodeplot/bodeplot.sty
Modified: trunk/Master/texmf-dist/doc/latex/bodeplot/bodeplot.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/source/latex/bodeplot/bodeplot.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/bodeplot/bodeplot.dtx 2021-11-08 22:49:44 UTC (rev 60995)
+++ trunk/Master/texmf-dist/source/latex/bodeplot/bodeplot.dtx 2021-11-08 23:15:33 UTC (rev 60996)
@@ -41,9 +41,10 @@
%</driver>
% \fi
%
-% \CheckSum{1287}
+% \CheckSum{1362}
%
% \changes{v1.0}{2021/10/25}{Initial release}
+% \changes{v1.0.4}{2021/11/05}{Fixed unintended optional argument macro expansion}
%
% \GetFileInfo{bodeplot.sty}
%
@@ -50,8 +51,8 @@
% \DoNotIndex{\newcommand,\xdef,\gdef,\def,\edef,\addplot,\approx,\arabic,\opt,\typ,\obj,\else,\if at pgfarg,\fi,\begin,\end,\feature,\footnotesize,\draw,\detokenize,\DeclareOption,\foreach,\ifdim,\ifodd,\Im,\Re,\let,\newif,\nextgroupplot,\noexpand,\expandafter,\unexpanded,\PackageError,\PackageWarning,\relax,\RequirePackage,\tikzset,\pgfmathsetmacro,\pgfmathtruncatemacro,\ProcessOptions}
%
% \title{The \textsf{bodeplot} package\thanks{This document
-% corresponds to \textsf{bodeplot}~v1.0.3,
-% dated November 3, 2021.}}
+% corresponds to \textsf{bodeplot}~v1.0.4,
+% dated November 5, 2021.}}
% \author{Rushikesh Kamalapurkar \\ \texttt{rlkamalapurkar at gmail.com}}
%
% \maketitle
@@ -758,7 +759,7 @@
% \end{macrocode}
% The |\noexpand| macros below are needed to so that only the macro |\opt at group| is expanded. \changes{v1.0.3}{2021/11/03}{Added Tikz option}
% \begin{macrocode}
- \edef\temp at cmd{\noexpand\begin{tikzpicture}[\opt at tikz]%
+ \edef\temp at cmd{\noexpand\begin{tikzpicture}[\unexpanded\expandafter{\opt at tikz}]%
\noexpand\begin{groupplot}[%
bodeStyle,
xmin={#3},
@@ -815,7 +816,7 @@
\gdef\func at mag{}%
\gdef\func at ph{}%
\build at TF@plot{\func at mag}{\func at ph}{#2}%
- \edef\temp at cmd{\noexpand\begin{tikzpicture}[\opt at tikz]%
+ \edef\temp at cmd{\noexpand\begin{tikzpicture}[\unexpanded\expandafter{\opt at tikz}]%
\noexpand\begin{groupplot}[%
bodeStyle,
xmin={#3},
@@ -920,7 +921,7 @@
% \begin{macrocode}
\newenvironment{BodePlot}[3][]{%
\parse at env@opt{#1}%
- \edef\temp at cmd{\noexpand\begin{tikzpicture}[\opt at tikz]
+ \edef\temp at cmd{\noexpand\begin{tikzpicture}[\unexpanded\expandafter{\opt at tikz}]
\noexpand\begin{semilogxaxis}[%
bodeStyle,
xmin={#2},
@@ -928,7 +929,7 @@
domain=#2:#3,
height=2.5cm,
xlabel={Frequency (rad/s)},
- \opt at axes
+ \unexpanded\expandafter{\opt at axes}
]%
}%
\temp at cmd
@@ -1012,11 +1013,11 @@
\ifnum\pdfstrcmp{\feature}{d}=0
\ifnum\pdfstrcmp{#3}{linear}=0
\PackageError {bodeplot} {Linear approximation for pure delays is not
- supported.} {Plot the true Bode plot using 'true' instead of 'linear'.}
+ supported.} {Plot the true Bode plot using `true' instead of `linear'.}
\else
\ifnum\pdfstrcmp{#3}{asymptotic}=0
\PackageError {bodeplot} {Asymptotic approximation for pure delays is not
- supported.} {Plot the true Bode plot using 'true' instead of 'asymptotic'.}
+ supported.} {Plot the true Bode plot using `true' instead of `asymptotic'.}
\else
\ifdim\values pt < 0pt
\PackageError {bodeplot} {Delay needs to be a positive number.}
@@ -1103,11 +1104,11 @@
\gdef\optmag at commands{}%
\gdef\opt at tikz{}%
\foreach \obj/\typ/\opt in {#1} {%
- \ifnum\pdfstrcmp{\obj}{plot}=0
- \ifnum\pdfstrcmp{\typ}{mag}=0
+ \ifnum\pdfstrcmp{\unexpanded\expandafter{\obj}}{plot}=0
+ \ifnum\pdfstrcmp{\unexpanded\expandafter{\typ}}{mag}=0
\xdef\optmag at plot{\unexpanded\expandafter{\opt}}%
\else
- \ifnum\pdfstrcmp{\typ}{ph}=0
+ \ifnum\pdfstrcmp{\unexpanded\expandafter{\typ}}{ph}=0
\xdef\optph at plot{\unexpanded\expandafter{\opt}}%
\else
\xdef\optmag at plot{\unexpanded\expandafter{\opt}}%
@@ -1115,11 +1116,11 @@
\fi
\fi
\else
- \ifnum\pdfstrcmp{\obj}{axes}=0
- \ifnum\pdfstrcmp{\typ}{mag}=0
+ \ifnum\pdfstrcmp{\unexpanded\expandafter{\obj}}{axes}=0
+ \ifnum\pdfstrcmp{\unexpanded\expandafter{\typ}}{mag}=0
\xdef\optmag at axes{\unexpanded\expandafter{\opt}}%
\else
- \ifnum\pdfstrcmp{\typ}{ph}=0
+ \ifnum\pdfstrcmp{\unexpanded\expandafter{\typ}}{ph}=0
\xdef\optph at axes{\unexpanded\expandafter{\opt}}%
\else
\xdef\optmag at axes{\unexpanded\expandafter{\opt}}%
@@ -1127,24 +1128,26 @@
\fi
\fi
\else
- \ifnum\pdfstrcmp{\obj}{group}=0
+ \ifnum\pdfstrcmp{\unexpanded\expandafter{\obj}}{group}=0
\xdef\opt at group{\unexpanded\expandafter{\opt}}%
\else
- \ifnum\pdfstrcmp{\obj}{approx}=0
+ \ifnum\pdfstrcmp{\unexpanded\expandafter{\obj}}{approx}=0
\xdef\opt at approx{\unexpanded\expandafter{\opt}}%
\else
- \ifnum\pdfstrcmp{\obj}{commands}=0
- \ifnum\pdfstrcmp{\typ}{phase}=0
+ \ifnum\pdfstrcmp{\unexpanded\expandafter{\obj}}{commands}=0
+ \ifnum\pdfstrcmp{\unexpanded\expandafter{\typ}}{phase}=0
\xdef\optph at commands{\unexpanded\expandafter{\opt}}%
\else
\xdef\optmag at commands{\unexpanded\expandafter{\opt}}%
\fi
\else
- \ifnum\pdfstrcmp{\obj}{tikz}=0
+ \ifnum\pdfstrcmp{\unexpanded\expandafter{\obj}}{tikz}=0
\xdef\opt at tikz{\unexpanded\expandafter{\opt}}%
\else
- \xdef\optmag at plot{\optmag at plot,\unexpanded\expandafter{\obj}}%
- \xdef\optph at plot{\optph at plot,\unexpanded\expandafter{\obj}}%
+ \xdef\optmag at plot{\unexpanded\expandafter{\optmag at plot},
+ \unexpanded\expandafter{\obj}}%
+ \xdef\optph at plot{\unexpanded\expandafter{\optph at plot},
+ \unexpanded\expandafter{\obj}}%
\fi
\fi
\fi
@@ -1162,13 +1165,14 @@
\gdef\opt at axes{}%
\gdef\opt at tikz{}%
\foreach \obj/\opt in {#1} {%
- \ifnum\pdfstrcmp{\obj}{axes}=0
+ \ifnum\pdfstrcmp{\unexpanded\expandafter{\obj}}{axes}=0
\xdef\opt at axes{\unexpanded\expandafter{\opt}}%
\else
- \ifnum\pdfstrcmp{\obj}{tikz}=0
+ \ifnum\pdfstrcmp{\unexpanded\expandafter{\obj}}{tikz}=0
\xdef\opt at tikz{\unexpanded\expandafter{\opt}}%
\else
- \xdef\opt at axes{\opt at axes,\unexpanded\expandafter{\obj}}%
+ \xdef\opt at axes{\unexpanded\expandafter{\opt at axes},
+ \unexpanded\expandafter{\obj}}%
\fi
\fi
}%
@@ -1185,7 +1189,7 @@
\gdef\func at mag{}%
\gdef\func at ph{}%
\build at ZPK@plot{\func at mag}{\func at ph}{}{#2}%
- \edef\temp at cmd{\noexpand\begin{tikzpicture}[\opt at tikz]%
+ \edef\temp at cmd{\noexpand\begin{tikzpicture}[\unexpanded\expandafter{\opt at tikz}]%
\noexpand\begin{axis}[%
bodeStyle,
domain=#3:#4,
@@ -1193,7 +1197,7 @@
xlabel={$\Re$},
ylabel={$\Im$},
samples=500,
- \opt at axes
+ \unexpanded\expandafter{\opt at axes}
]%
}%
\temp at cmd
@@ -1223,7 +1227,7 @@
\gdef\func at mag{}%
\gdef\func at ph{}%
\build at TF@plot{\func at mag}{\func at ph}{#2}%
- \edef\temp at cmd{\noexpand\begin{tikzpicture}[\opt at tikz]%
+ \edef\temp at cmd{\noexpand\begin{tikzpicture}[\unexpanded\expandafter{\opt at tikz}]%
\noexpand\begin{axis}[%
bodeStyle,
domain=#3:#4,
@@ -1231,7 +1235,7 @@
xlabel={$\Re$},
ylabel={$\Im$},
samples=500,
- \opt at axes
+ \unexpanded\expandafter{\opt at axes}
]%
}%
\temp at cmd
@@ -1295,8 +1299,8 @@
% An environment to host |\addNyquist...| macros that pass parametric functions to |\addplot|. Uses the defaults specified in |bodeStyle| to create a shortcut that includes the |tikzpicture| and |axis| environments. \changes{v1.0.3}{2021/11/03}{Added tikz option to environments}
% \begin{macrocode}
\newenvironment{NyquistPlot}[3][]{%
-\parse at env@opt{#1}%
- \edef\temp at cmd{\noexpand\begin{tikzpicture}[\opt at tikz]%
+ \parse at env@opt{#1}%
+ \edef\temp at cmd{\noexpand\begin{tikzpicture}[\unexpanded\expandafter{\opt at tikz}]%
\noexpand\begin{axis}[%
bodeStyle,
height=5cm,
@@ -1303,7 +1307,7 @@
domain=#2:#3,
xlabel={$\Re$},
ylabel={$\Im$},
- \opt at axes
+ \unexpanded\expandafter{\opt at axes}
]%
}%
\temp at cmd
@@ -1324,19 +1328,20 @@
\gdef\opt at commands{}%
\gdef\opt at tikz{}
\foreach \obj/\opt in {#1} {%
- \ifnum\pdfstrcmp{\obj}{axes}=0
+ \ifnum\pdfstrcmp{\unexpanded\expandafter{\obj}}{axes}=0
\xdef\opt at axes{\unexpanded\expandafter{\opt}}%
\else
- \ifnum\pdfstrcmp{\obj}{plot}=0
+ \ifnum\pdfstrcmp{\unexpanded\expandafter{\obj}}{plot}=0
\xdef\opt at plot{\unexpanded\expandafter{\opt}}%
\else
- \ifnum\pdfstrcmp{\obj}{commands}=0
+ \ifnum\pdfstrcmp{\unexpanded\expandafter{\obj}}{commands}=0
\xdef\opt at commands{\unexpanded\expandafter{\opt}}%
\else
- \ifnum\pdfstrcmp{\obj}{tikz}=0
+ \ifnum\pdfstrcmp{\unexpanded\expandafter{\obj}}{tikz}=0
\xdef\opt at tikz{\unexpanded\expandafter{\opt}}%
\else
- \xdef\opt at plot{\opt at plot,\unexpanded\expandafter{\obj}}%
+ \xdef\opt at plot{\unexpanded\expandafter{\opt at plot},
+ \unexpanded\expandafter{\obj}}%
\fi
\fi
\fi
@@ -1361,7 +1366,7 @@
\gdef\func at mag{}%
\gdef\func at ph{}%
\build at ZPK@plot{\func at mag}{\func at ph}{}{#2}%
- \edef\temp at cmd{\noexpand\begin{tikzpicture}[\opt at tikz]%
+ \edef\temp at cmd{\noexpand\begin{tikzpicture}[\unexpanded\expandafter{\opt at tikz}]%
\noexpand\begin{axis}[%
bodeStyle,
domain=#3:#4,
@@ -1369,7 +1374,7 @@
xlabel={Phase (degrees)},
ylabel={Gain (dB)},
samples=500,
- \opt at axes
+ \unexpanded\expandafter{\opt at axes}
]%
}%
\temp at cmd
@@ -1391,7 +1396,7 @@
\gdef\func at mag{}%
\gdef\func at ph{}%
\build at TF@plot{\func at mag}{\func at ph}{#2}%
- \edef\temp at cmd{\noexpand\begin{tikzpicture}[\opt at tikz]%
+ \edef\temp at cmd{\noexpand\begin{tikzpicture}[\unexpanded\expandafter{\opt at tikz}]%
\noexpand\begin{axis}[%
bodeStyle,
domain=#3:#4,
@@ -1399,7 +1404,7 @@
xlabel={Phase (degrees)},
ylabel={Gain (dB)},
samples=500,
- \opt at axes
+ \unexpanded\expandafter{\opt at axes}
]%
}%
\temp at cmd
@@ -1417,16 +1422,15 @@
\end{tikzpicture}
}
\newenvironment{NicholsChart}[3][]{%
- \edef\temp at cmd{\noexpand\begin{tikzpicture}[\opt at tikz]%
+ \parse at env@opt{#1}%
+ \edef\temp at cmd{\noexpand\begin{tikzpicture}[\unexpanded\expandafter{\opt at tikz}]%
\noexpand\begin{axis}[%
bodeStyle,
domain=#2:#3,
height=5cm,
- ytick distance=20,
- xtick distance=15,
xlabel={Phase (degrees)},
ylabel={Gain (dB)},
- \opt at axes
+ \unexpanded\expandafter{\opt at axes}
]%
}%
\temp at cmd
Modified: trunk/Master/texmf-dist/tex/latex/bodeplot/bodeplot.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/bodeplot/bodeplot.sty 2021-11-08 22:49:44 UTC (rev 60995)
+++ trunk/Master/texmf-dist/tex/latex/bodeplot/bodeplot.sty 2021-11-08 23:15:33 UTC (rev 60996)
@@ -172,7 +172,7 @@
\gdef\func at mag{}%
\gdef\func at ph{}%
\build at ZPK@plot{\func at mag}{\func at ph}{\opt at approx}{#2}%
- \edef\temp at cmd{\noexpand\begin{tikzpicture}[\opt at tikz]%
+ \edef\temp at cmd{\noexpand\begin{tikzpicture}[\unexpanded\expandafter{\opt at tikz}]%
\noexpand\begin{groupplot}[%
bodeStyle,
xmin={#3},
@@ -218,7 +218,7 @@
\gdef\func at mag{}%
\gdef\func at ph{}%
\build at TF@plot{\func at mag}{\func at ph}{#2}%
- \edef\temp at cmd{\noexpand\begin{tikzpicture}[\opt at tikz]%
+ \edef\temp at cmd{\noexpand\begin{tikzpicture}[\unexpanded\expandafter{\opt at tikz}]%
\noexpand\begin{groupplot}[%
bodeStyle,
xmin={#3},
@@ -303,7 +303,7 @@
}
\newenvironment{BodePlot}[3][]{%
\parse at env@opt{#1}%
- \edef\temp at cmd{\noexpand\begin{tikzpicture}[\opt at tikz]
+ \edef\temp at cmd{\noexpand\begin{tikzpicture}[\unexpanded\expandafter{\opt at tikz}]
\noexpand\begin{semilogxaxis}[%
bodeStyle,
xmin={#2},
@@ -311,7 +311,7 @@
domain=#2:#3,
height=2.5cm,
xlabel={Frequency (rad/s)},
- \opt at axes
+ \unexpanded\expandafter{\opt at axes}
]%
}%
\temp at cmd
@@ -384,11 +384,11 @@
\ifnum\pdfstrcmp{\feature}{d}=0
\ifnum\pdfstrcmp{#3}{linear}=0
\PackageError {bodeplot} {Linear approximation for pure delays is not
- supported.} {Plot the true Bode plot using 'true' instead of 'linear'.}
+ supported.} {Plot the true Bode plot using `true' instead of `linear'.}
\else
\ifnum\pdfstrcmp{#3}{asymptotic}=0
\PackageError {bodeplot} {Asymptotic approximation for pure delays is not
- supported.} {Plot the true Bode plot using 'true' instead of 'asymptotic'.}
+ supported.} {Plot the true Bode plot using `true' instead of `asymptotic'.}
\else
\ifdim\values pt < 0pt
\PackageError {bodeplot} {Delay needs to be a positive number.}
@@ -465,11 +465,11 @@
\gdef\optmag at commands{}%
\gdef\opt at tikz{}%
\foreach \obj/\typ/\opt in {#1} {%
- \ifnum\pdfstrcmp{\obj}{plot}=0
- \ifnum\pdfstrcmp{\typ}{mag}=0
+ \ifnum\pdfstrcmp{\unexpanded\expandafter{\obj}}{plot}=0
+ \ifnum\pdfstrcmp{\unexpanded\expandafter{\typ}}{mag}=0
\xdef\optmag at plot{\unexpanded\expandafter{\opt}}%
\else
- \ifnum\pdfstrcmp{\typ}{ph}=0
+ \ifnum\pdfstrcmp{\unexpanded\expandafter{\typ}}{ph}=0
\xdef\optph at plot{\unexpanded\expandafter{\opt}}%
\else
\xdef\optmag at plot{\unexpanded\expandafter{\opt}}%
@@ -477,11 +477,11 @@
\fi
\fi
\else
- \ifnum\pdfstrcmp{\obj}{axes}=0
- \ifnum\pdfstrcmp{\typ}{mag}=0
+ \ifnum\pdfstrcmp{\unexpanded\expandafter{\obj}}{axes}=0
+ \ifnum\pdfstrcmp{\unexpanded\expandafter{\typ}}{mag}=0
\xdef\optmag at axes{\unexpanded\expandafter{\opt}}%
\else
- \ifnum\pdfstrcmp{\typ}{ph}=0
+ \ifnum\pdfstrcmp{\unexpanded\expandafter{\typ}}{ph}=0
\xdef\optph at axes{\unexpanded\expandafter{\opt}}%
\else
\xdef\optmag at axes{\unexpanded\expandafter{\opt}}%
@@ -489,24 +489,26 @@
\fi
\fi
\else
- \ifnum\pdfstrcmp{\obj}{group}=0
+ \ifnum\pdfstrcmp{\unexpanded\expandafter{\obj}}{group}=0
\xdef\opt at group{\unexpanded\expandafter{\opt}}%
\else
- \ifnum\pdfstrcmp{\obj}{approx}=0
+ \ifnum\pdfstrcmp{\unexpanded\expandafter{\obj}}{approx}=0
\xdef\opt at approx{\unexpanded\expandafter{\opt}}%
\else
- \ifnum\pdfstrcmp{\obj}{commands}=0
- \ifnum\pdfstrcmp{\typ}{phase}=0
+ \ifnum\pdfstrcmp{\unexpanded\expandafter{\obj}}{commands}=0
+ \ifnum\pdfstrcmp{\unexpanded\expandafter{\typ}}{phase}=0
\xdef\optph at commands{\unexpanded\expandafter{\opt}}%
\else
\xdef\optmag at commands{\unexpanded\expandafter{\opt}}%
\fi
\else
- \ifnum\pdfstrcmp{\obj}{tikz}=0
+ \ifnum\pdfstrcmp{\unexpanded\expandafter{\obj}}{tikz}=0
\xdef\opt at tikz{\unexpanded\expandafter{\opt}}%
\else
- \xdef\optmag at plot{\optmag at plot,\unexpanded\expandafter{\obj}}%
- \xdef\optph at plot{\optph at plot,\unexpanded\expandafter{\obj}}%
+ \xdef\optmag at plot{\unexpanded\expandafter{\optmag at plot},
+ \unexpanded\expandafter{\obj}}%
+ \xdef\optph at plot{\unexpanded\expandafter{\optph at plot},
+ \unexpanded\expandafter{\obj}}%
\fi
\fi
\fi
@@ -519,13 +521,14 @@
\gdef\opt at axes{}%
\gdef\opt at tikz{}%
\foreach \obj/\opt in {#1} {%
- \ifnum\pdfstrcmp{\obj}{axes}=0
+ \ifnum\pdfstrcmp{\unexpanded\expandafter{\obj}}{axes}=0
\xdef\opt at axes{\unexpanded\expandafter{\opt}}%
\else
- \ifnum\pdfstrcmp{\obj}{tikz}=0
+ \ifnum\pdfstrcmp{\unexpanded\expandafter{\obj}}{tikz}=0
\xdef\opt at tikz{\unexpanded\expandafter{\opt}}%
\else
- \xdef\opt at axes{\opt at axes,\unexpanded\expandafter{\obj}}%
+ \xdef\opt at axes{\unexpanded\expandafter{\opt at axes},
+ \unexpanded\expandafter{\obj}}%
\fi
\fi
}%
@@ -535,7 +538,7 @@
\gdef\func at mag{}%
\gdef\func at ph{}%
\build at ZPK@plot{\func at mag}{\func at ph}{}{#2}%
- \edef\temp at cmd{\noexpand\begin{tikzpicture}[\opt at tikz]%
+ \edef\temp at cmd{\noexpand\begin{tikzpicture}[\unexpanded\expandafter{\opt at tikz}]%
\noexpand\begin{axis}[%
bodeStyle,
domain=#3:#4,
@@ -543,7 +546,7 @@
xlabel={$\Re$},
ylabel={$\Im$},
samples=500,
- \opt at axes
+ \unexpanded\expandafter{\opt at axes}
]%
}%
\temp at cmd
@@ -568,7 +571,7 @@
\gdef\func at mag{}%
\gdef\func at ph{}%
\build at TF@plot{\func at mag}{\func at ph}{#2}%
- \edef\temp at cmd{\noexpand\begin{tikzpicture}[\opt at tikz]%
+ \edef\temp at cmd{\noexpand\begin{tikzpicture}[\unexpanded\expandafter{\opt at tikz}]%
\noexpand\begin{axis}[%
bodeStyle,
domain=#3:#4,
@@ -576,7 +579,7 @@
xlabel={$\Re$},
ylabel={$\Im$},
samples=500,
- \opt at axes
+ \unexpanded\expandafter{\opt at axes}
]%
}%
\temp at cmd
@@ -625,8 +628,8 @@
\fi
}
\newenvironment{NyquistPlot}[3][]{%
-\parse at env@opt{#1}%
- \edef\temp at cmd{\noexpand\begin{tikzpicture}[\opt at tikz]%
+ \parse at env@opt{#1}%
+ \edef\temp at cmd{\noexpand\begin{tikzpicture}[\unexpanded\expandafter{\opt at tikz}]%
\noexpand\begin{axis}[%
bodeStyle,
height=5cm,
@@ -633,7 +636,7 @@
domain=#2:#3,
xlabel={$\Re$},
ylabel={$\Im$},
- \opt at axes
+ \unexpanded\expandafter{\opt at axes}
]%
}%
\temp at cmd
@@ -648,19 +651,20 @@
\gdef\opt at commands{}%
\gdef\opt at tikz{}
\foreach \obj/\opt in {#1} {%
- \ifnum\pdfstrcmp{\obj}{axes}=0
+ \ifnum\pdfstrcmp{\unexpanded\expandafter{\obj}}{axes}=0
\xdef\opt at axes{\unexpanded\expandafter{\opt}}%
\else
- \ifnum\pdfstrcmp{\obj}{plot}=0
+ \ifnum\pdfstrcmp{\unexpanded\expandafter{\obj}}{plot}=0
\xdef\opt at plot{\unexpanded\expandafter{\opt}}%
\else
- \ifnum\pdfstrcmp{\obj}{commands}=0
+ \ifnum\pdfstrcmp{\unexpanded\expandafter{\obj}}{commands}=0
\xdef\opt at commands{\unexpanded\expandafter{\opt}}%
\else
- \ifnum\pdfstrcmp{\obj}{tikz}=0
+ \ifnum\pdfstrcmp{\unexpanded\expandafter{\obj}}{tikz}=0
\xdef\opt at tikz{\unexpanded\expandafter{\opt}}%
\else
- \xdef\opt at plot{\opt at plot,\unexpanded\expandafter{\obj}}%
+ \xdef\opt at plot{\unexpanded\expandafter{\opt at plot},
+ \unexpanded\expandafter{\obj}}%
\fi
\fi
\fi
@@ -672,7 +676,7 @@
\gdef\func at mag{}%
\gdef\func at ph{}%
\build at ZPK@plot{\func at mag}{\func at ph}{}{#2}%
- \edef\temp at cmd{\noexpand\begin{tikzpicture}[\opt at tikz]%
+ \edef\temp at cmd{\noexpand\begin{tikzpicture}[\unexpanded\expandafter{\opt at tikz}]%
\noexpand\begin{axis}[%
bodeStyle,
domain=#3:#4,
@@ -680,7 +684,7 @@
xlabel={Phase (degrees)},
ylabel={Gain (dB)},
samples=500,
- \opt at axes
+ \unexpanded\expandafter{\opt at axes}
]%
}%
\temp at cmd
@@ -702,7 +706,7 @@
\gdef\func at mag{}%
\gdef\func at ph{}%
\build at TF@plot{\func at mag}{\func at ph}{#2}%
- \edef\temp at cmd{\noexpand\begin{tikzpicture}[\opt at tikz]%
+ \edef\temp at cmd{\noexpand\begin{tikzpicture}[\unexpanded\expandafter{\opt at tikz}]%
\noexpand\begin{axis}[%
bodeStyle,
domain=#3:#4,
@@ -710,7 +714,7 @@
xlabel={Phase (degrees)},
ylabel={Gain (dB)},
samples=500,
- \opt at axes
+ \unexpanded\expandafter{\opt at axes}
]%
}%
\temp at cmd
@@ -728,16 +732,15 @@
\end{tikzpicture}
}
\newenvironment{NicholsChart}[3][]{%
- \edef\temp at cmd{\noexpand\begin{tikzpicture}[\opt at tikz]%
+ \parse at env@opt{#1}%
+ \edef\temp at cmd{\noexpand\begin{tikzpicture}[\unexpanded\expandafter{\opt at tikz}]%
\noexpand\begin{axis}[%
bodeStyle,
domain=#2:#3,
height=5cm,
- ytick distance=20,
- xtick distance=15,
xlabel={Phase (degrees)},
ylabel={Gain (dB)},
- \opt at axes
+ \unexpanded\expandafter{\opt at axes}
]%
}%
\temp at cmd
More information about the tex-live-commits
mailing list.