diff options
author | Karl Berry <karl@freefriends.org> | 2021-11-08 23:15:33 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-11-08 23:15:33 +0000 |
commit | 1bdd5014f9f4029097eb3c1204c99dc65d5459b1 (patch) | |
tree | a0775418f1fa2351d6883e86787cfd9d57c2d250 | |
parent | 60cd34775e85aa3f7e970857f7a4c5dd2f863a2a (diff) |
bodeplot (9nov21)
git-svn-id: svn://tug.org/texlive/trunk@60996 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Master/texmf-dist/doc/latex/bodeplot/bodeplot.pdf | bin | 498384 -> 498916 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/latex/bodeplot/bodeplot.dtx | 94 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/bodeplot/bodeplot.sty | 87 |
3 files changed, 94 insertions, 87 deletions
diff --git a/Master/texmf-dist/doc/latex/bodeplot/bodeplot.pdf b/Master/texmf-dist/doc/latex/bodeplot/bodeplot.pdf Binary files differindex 64592fd6ec4..bd20ff3dd5d 100644 --- a/Master/texmf-dist/doc/latex/bodeplot/bodeplot.pdf +++ b/Master/texmf-dist/doc/latex/bodeplot/bodeplot.pdf diff --git a/Master/texmf-dist/source/latex/bodeplot/bodeplot.dtx b/Master/texmf-dist/source/latex/bodeplot/bodeplot.dtx index 350e523ff60..7ebfd3b754c 100644 --- a/Master/texmf-dist/source/latex/bodeplot/bodeplot.dtx +++ b/Master/texmf-dist/source/latex/bodeplot/bodeplot.dtx @@ -41,17 +41,18 @@ %</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} % % \DoNotIndex{\newcommand,\xdef,\gdef,\def,\edef,\addplot,\approx,\arabic,\opt,\typ,\obj,\else,\if@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@gmail.com}} % % \maketitle @@ -758,7 +759,7 @@ % \end{macrocode} % The |\noexpand| macros below are needed to so that only the macro |\opt@group| is expanded. \changes{v1.0.3}{2021/11/03}{Added Tikz option} % \begin{macrocode} - \edef\temp@cmd{\noexpand\begin{tikzpicture}[\opt@tikz]% + \edef\temp@cmd{\noexpand\begin{tikzpicture}[\unexpanded\expandafter{\opt@tikz}]% \noexpand\begin{groupplot}[% bodeStyle, xmin={#3}, @@ -815,7 +816,7 @@ \gdef\func@mag{}% \gdef\func@ph{}% \build@TF@plot{\func@mag}{\func@ph}{#2}% - \edef\temp@cmd{\noexpand\begin{tikzpicture}[\opt@tikz]% + \edef\temp@cmd{\noexpand\begin{tikzpicture}[\unexpanded\expandafter{\opt@tikz}]% \noexpand\begin{groupplot}[% bodeStyle, xmin={#3}, @@ -920,7 +921,7 @@ % \begin{macrocode} \newenvironment{BodePlot}[3][]{% \parse@env@opt{#1}% - \edef\temp@cmd{\noexpand\begin{tikzpicture}[\opt@tikz] + \edef\temp@cmd{\noexpand\begin{tikzpicture}[\unexpanded\expandafter{\opt@tikz}] \noexpand\begin{semilogxaxis}[% bodeStyle, xmin={#2}, @@ -928,7 +929,7 @@ domain=#2:#3, height=2.5cm, xlabel={Frequency (rad/s)}, - \opt@axes + \unexpanded\expandafter{\opt@axes} ]% }% \temp@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@commands{}% \gdef\opt@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@plot{\unexpanded\expandafter{\opt}}% \else - \ifnum\pdfstrcmp{\typ}{ph}=0 + \ifnum\pdfstrcmp{\unexpanded\expandafter{\typ}}{ph}=0 \xdef\optph@plot{\unexpanded\expandafter{\opt}}% \else \xdef\optmag@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@axes{\unexpanded\expandafter{\opt}}% \else - \ifnum\pdfstrcmp{\typ}{ph}=0 + \ifnum\pdfstrcmp{\unexpanded\expandafter{\typ}}{ph}=0 \xdef\optph@axes{\unexpanded\expandafter{\opt}}% \else \xdef\optmag@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@group{\unexpanded\expandafter{\opt}}% \else - \ifnum\pdfstrcmp{\obj}{approx}=0 + \ifnum\pdfstrcmp{\unexpanded\expandafter{\obj}}{approx}=0 \xdef\opt@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@commands{\unexpanded\expandafter{\opt}}% \else \xdef\optmag@commands{\unexpanded\expandafter{\opt}}% \fi \else - \ifnum\pdfstrcmp{\obj}{tikz}=0 + \ifnum\pdfstrcmp{\unexpanded\expandafter{\obj}}{tikz}=0 \xdef\opt@tikz{\unexpanded\expandafter{\opt}}% \else - \xdef\optmag@plot{\optmag@plot,\unexpanded\expandafter{\obj}}% - \xdef\optph@plot{\optph@plot,\unexpanded\expandafter{\obj}}% + \xdef\optmag@plot{\unexpanded\expandafter{\optmag@plot}, + \unexpanded\expandafter{\obj}}% + \xdef\optph@plot{\unexpanded\expandafter{\optph@plot}, + \unexpanded\expandafter{\obj}}% \fi \fi \fi @@ -1162,13 +1165,14 @@ \gdef\opt@axes{}% \gdef\opt@tikz{}% \foreach \obj/\opt in {#1} {% - \ifnum\pdfstrcmp{\obj}{axes}=0 + \ifnum\pdfstrcmp{\unexpanded\expandafter{\obj}}{axes}=0 \xdef\opt@axes{\unexpanded\expandafter{\opt}}% \else - \ifnum\pdfstrcmp{\obj}{tikz}=0 + \ifnum\pdfstrcmp{\unexpanded\expandafter{\obj}}{tikz}=0 \xdef\opt@tikz{\unexpanded\expandafter{\opt}}% \else - \xdef\opt@axes{\opt@axes,\unexpanded\expandafter{\obj}}% + \xdef\opt@axes{\unexpanded\expandafter{\opt@axes}, + \unexpanded\expandafter{\obj}}% \fi \fi }% @@ -1185,7 +1189,7 @@ \gdef\func@mag{}% \gdef\func@ph{}% \build@ZPK@plot{\func@mag}{\func@ph}{}{#2}% - \edef\temp@cmd{\noexpand\begin{tikzpicture}[\opt@tikz]% + \edef\temp@cmd{\noexpand\begin{tikzpicture}[\unexpanded\expandafter{\opt@tikz}]% \noexpand\begin{axis}[% bodeStyle, domain=#3:#4, @@ -1193,7 +1197,7 @@ xlabel={$\Re$}, ylabel={$\Im$}, samples=500, - \opt@axes + \unexpanded\expandafter{\opt@axes} ]% }% \temp@cmd @@ -1223,7 +1227,7 @@ \gdef\func@mag{}% \gdef\func@ph{}% \build@TF@plot{\func@mag}{\func@ph}{#2}% - \edef\temp@cmd{\noexpand\begin{tikzpicture}[\opt@tikz]% + \edef\temp@cmd{\noexpand\begin{tikzpicture}[\unexpanded\expandafter{\opt@tikz}]% \noexpand\begin{axis}[% bodeStyle, domain=#3:#4, @@ -1231,7 +1235,7 @@ xlabel={$\Re$}, ylabel={$\Im$}, samples=500, - \opt@axes + \unexpanded\expandafter{\opt@axes} ]% }% \temp@cmd @@ -1295,15 +1299,15 @@ % 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@env@opt{#1}% - \edef\temp@cmd{\noexpand\begin{tikzpicture}[\opt@tikz]% + \parse@env@opt{#1}% + \edef\temp@cmd{\noexpand\begin{tikzpicture}[\unexpanded\expandafter{\opt@tikz}]% \noexpand\begin{axis}[% bodeStyle, height=5cm, domain=#2:#3, xlabel={$\Re$}, ylabel={$\Im$}, - \opt@axes + \unexpanded\expandafter{\opt@axes} ]% }% \temp@cmd @@ -1324,19 +1328,20 @@ \gdef\opt@commands{}% \gdef\opt@tikz{} \foreach \obj/\opt in {#1} {% - \ifnum\pdfstrcmp{\obj}{axes}=0 + \ifnum\pdfstrcmp{\unexpanded\expandafter{\obj}}{axes}=0 \xdef\opt@axes{\unexpanded\expandafter{\opt}}% \else - \ifnum\pdfstrcmp{\obj}{plot}=0 + \ifnum\pdfstrcmp{\unexpanded\expandafter{\obj}}{plot}=0 \xdef\opt@plot{\unexpanded\expandafter{\opt}}% \else - \ifnum\pdfstrcmp{\obj}{commands}=0 + \ifnum\pdfstrcmp{\unexpanded\expandafter{\obj}}{commands}=0 \xdef\opt@commands{\unexpanded\expandafter{\opt}}% \else - \ifnum\pdfstrcmp{\obj}{tikz}=0 + \ifnum\pdfstrcmp{\unexpanded\expandafter{\obj}}{tikz}=0 \xdef\opt@tikz{\unexpanded\expandafter{\opt}}% \else - \xdef\opt@plot{\opt@plot,\unexpanded\expandafter{\obj}}% + \xdef\opt@plot{\unexpanded\expandafter{\opt@plot}, + \unexpanded\expandafter{\obj}}% \fi \fi \fi @@ -1361,7 +1366,7 @@ \gdef\func@mag{}% \gdef\func@ph{}% \build@ZPK@plot{\func@mag}{\func@ph}{}{#2}% - \edef\temp@cmd{\noexpand\begin{tikzpicture}[\opt@tikz]% + \edef\temp@cmd{\noexpand\begin{tikzpicture}[\unexpanded\expandafter{\opt@tikz}]% \noexpand\begin{axis}[% bodeStyle, domain=#3:#4, @@ -1369,7 +1374,7 @@ xlabel={Phase (degrees)}, ylabel={Gain (dB)}, samples=500, - \opt@axes + \unexpanded\expandafter{\opt@axes} ]% }% \temp@cmd @@ -1391,7 +1396,7 @@ \gdef\func@mag{}% \gdef\func@ph{}% \build@TF@plot{\func@mag}{\func@ph}{#2}% - \edef\temp@cmd{\noexpand\begin{tikzpicture}[\opt@tikz]% + \edef\temp@cmd{\noexpand\begin{tikzpicture}[\unexpanded\expandafter{\opt@tikz}]% \noexpand\begin{axis}[% bodeStyle, domain=#3:#4, @@ -1399,7 +1404,7 @@ xlabel={Phase (degrees)}, ylabel={Gain (dB)}, samples=500, - \opt@axes + \unexpanded\expandafter{\opt@axes} ]% }% \temp@cmd @@ -1417,16 +1422,15 @@ \end{tikzpicture} } \newenvironment{NicholsChart}[3][]{% - \edef\temp@cmd{\noexpand\begin{tikzpicture}[\opt@tikz]% + \parse@env@opt{#1}% + \edef\temp@cmd{\noexpand\begin{tikzpicture}[\unexpanded\expandafter{\opt@tikz}]% \noexpand\begin{axis}[% bodeStyle, domain=#2:#3, height=5cm, - ytick distance=20, - xtick distance=15, xlabel={Phase (degrees)}, ylabel={Gain (dB)}, - \opt@axes + \unexpanded\expandafter{\opt@axes} ]% }% \temp@cmd diff --git a/Master/texmf-dist/tex/latex/bodeplot/bodeplot.sty b/Master/texmf-dist/tex/latex/bodeplot/bodeplot.sty index 6c2eb9d5798..b567edc9713 100644 --- a/Master/texmf-dist/tex/latex/bodeplot/bodeplot.sty +++ b/Master/texmf-dist/tex/latex/bodeplot/bodeplot.sty @@ -172,7 +172,7 @@ \gdef\func@mag{}% \gdef\func@ph{}% \build@ZPK@plot{\func@mag}{\func@ph}{\opt@approx}{#2}% - \edef\temp@cmd{\noexpand\begin{tikzpicture}[\opt@tikz]% + \edef\temp@cmd{\noexpand\begin{tikzpicture}[\unexpanded\expandafter{\opt@tikz}]% \noexpand\begin{groupplot}[% bodeStyle, xmin={#3}, @@ -218,7 +218,7 @@ \gdef\func@mag{}% \gdef\func@ph{}% \build@TF@plot{\func@mag}{\func@ph}{#2}% - \edef\temp@cmd{\noexpand\begin{tikzpicture}[\opt@tikz]% + \edef\temp@cmd{\noexpand\begin{tikzpicture}[\unexpanded\expandafter{\opt@tikz}]% \noexpand\begin{groupplot}[% bodeStyle, xmin={#3}, @@ -303,7 +303,7 @@ } \newenvironment{BodePlot}[3][]{% \parse@env@opt{#1}% - \edef\temp@cmd{\noexpand\begin{tikzpicture}[\opt@tikz] + \edef\temp@cmd{\noexpand\begin{tikzpicture}[\unexpanded\expandafter{\opt@tikz}] \noexpand\begin{semilogxaxis}[% bodeStyle, xmin={#2}, @@ -311,7 +311,7 @@ domain=#2:#3, height=2.5cm, xlabel={Frequency (rad/s)}, - \opt@axes + \unexpanded\expandafter{\opt@axes} ]% }% \temp@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@commands{}% \gdef\opt@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@plot{\unexpanded\expandafter{\opt}}% \else - \ifnum\pdfstrcmp{\typ}{ph}=0 + \ifnum\pdfstrcmp{\unexpanded\expandafter{\typ}}{ph}=0 \xdef\optph@plot{\unexpanded\expandafter{\opt}}% \else \xdef\optmag@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@axes{\unexpanded\expandafter{\opt}}% \else - \ifnum\pdfstrcmp{\typ}{ph}=0 + \ifnum\pdfstrcmp{\unexpanded\expandafter{\typ}}{ph}=0 \xdef\optph@axes{\unexpanded\expandafter{\opt}}% \else \xdef\optmag@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@group{\unexpanded\expandafter{\opt}}% \else - \ifnum\pdfstrcmp{\obj}{approx}=0 + \ifnum\pdfstrcmp{\unexpanded\expandafter{\obj}}{approx}=0 \xdef\opt@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@commands{\unexpanded\expandafter{\opt}}% \else \xdef\optmag@commands{\unexpanded\expandafter{\opt}}% \fi \else - \ifnum\pdfstrcmp{\obj}{tikz}=0 + \ifnum\pdfstrcmp{\unexpanded\expandafter{\obj}}{tikz}=0 \xdef\opt@tikz{\unexpanded\expandafter{\opt}}% \else - \xdef\optmag@plot{\optmag@plot,\unexpanded\expandafter{\obj}}% - \xdef\optph@plot{\optph@plot,\unexpanded\expandafter{\obj}}% + \xdef\optmag@plot{\unexpanded\expandafter{\optmag@plot}, + \unexpanded\expandafter{\obj}}% + \xdef\optph@plot{\unexpanded\expandafter{\optph@plot}, + \unexpanded\expandafter{\obj}}% \fi \fi \fi @@ -519,13 +521,14 @@ \gdef\opt@axes{}% \gdef\opt@tikz{}% \foreach \obj/\opt in {#1} {% - \ifnum\pdfstrcmp{\obj}{axes}=0 + \ifnum\pdfstrcmp{\unexpanded\expandafter{\obj}}{axes}=0 \xdef\opt@axes{\unexpanded\expandafter{\opt}}% \else - \ifnum\pdfstrcmp{\obj}{tikz}=0 + \ifnum\pdfstrcmp{\unexpanded\expandafter{\obj}}{tikz}=0 \xdef\opt@tikz{\unexpanded\expandafter{\opt}}% \else - \xdef\opt@axes{\opt@axes,\unexpanded\expandafter{\obj}}% + \xdef\opt@axes{\unexpanded\expandafter{\opt@axes}, + \unexpanded\expandafter{\obj}}% \fi \fi }% @@ -535,7 +538,7 @@ \gdef\func@mag{}% \gdef\func@ph{}% \build@ZPK@plot{\func@mag}{\func@ph}{}{#2}% - \edef\temp@cmd{\noexpand\begin{tikzpicture}[\opt@tikz]% + \edef\temp@cmd{\noexpand\begin{tikzpicture}[\unexpanded\expandafter{\opt@tikz}]% \noexpand\begin{axis}[% bodeStyle, domain=#3:#4, @@ -543,7 +546,7 @@ xlabel={$\Re$}, ylabel={$\Im$}, samples=500, - \opt@axes + \unexpanded\expandafter{\opt@axes} ]% }% \temp@cmd @@ -568,7 +571,7 @@ \gdef\func@mag{}% \gdef\func@ph{}% \build@TF@plot{\func@mag}{\func@ph}{#2}% - \edef\temp@cmd{\noexpand\begin{tikzpicture}[\opt@tikz]% + \edef\temp@cmd{\noexpand\begin{tikzpicture}[\unexpanded\expandafter{\opt@tikz}]% \noexpand\begin{axis}[% bodeStyle, domain=#3:#4, @@ -576,7 +579,7 @@ xlabel={$\Re$}, ylabel={$\Im$}, samples=500, - \opt@axes + \unexpanded\expandafter{\opt@axes} ]% }% \temp@cmd @@ -625,15 +628,15 @@ \fi } \newenvironment{NyquistPlot}[3][]{% -\parse@env@opt{#1}% - \edef\temp@cmd{\noexpand\begin{tikzpicture}[\opt@tikz]% + \parse@env@opt{#1}% + \edef\temp@cmd{\noexpand\begin{tikzpicture}[\unexpanded\expandafter{\opt@tikz}]% \noexpand\begin{axis}[% bodeStyle, height=5cm, domain=#2:#3, xlabel={$\Re$}, ylabel={$\Im$}, - \opt@axes + \unexpanded\expandafter{\opt@axes} ]% }% \temp@cmd @@ -648,19 +651,20 @@ \gdef\opt@commands{}% \gdef\opt@tikz{} \foreach \obj/\opt in {#1} {% - \ifnum\pdfstrcmp{\obj}{axes}=0 + \ifnum\pdfstrcmp{\unexpanded\expandafter{\obj}}{axes}=0 \xdef\opt@axes{\unexpanded\expandafter{\opt}}% \else - \ifnum\pdfstrcmp{\obj}{plot}=0 + \ifnum\pdfstrcmp{\unexpanded\expandafter{\obj}}{plot}=0 \xdef\opt@plot{\unexpanded\expandafter{\opt}}% \else - \ifnum\pdfstrcmp{\obj}{commands}=0 + \ifnum\pdfstrcmp{\unexpanded\expandafter{\obj}}{commands}=0 \xdef\opt@commands{\unexpanded\expandafter{\opt}}% \else - \ifnum\pdfstrcmp{\obj}{tikz}=0 + \ifnum\pdfstrcmp{\unexpanded\expandafter{\obj}}{tikz}=0 \xdef\opt@tikz{\unexpanded\expandafter{\opt}}% \else - \xdef\opt@plot{\opt@plot,\unexpanded\expandafter{\obj}}% + \xdef\opt@plot{\unexpanded\expandafter{\opt@plot}, + \unexpanded\expandafter{\obj}}% \fi \fi \fi @@ -672,7 +676,7 @@ \gdef\func@mag{}% \gdef\func@ph{}% \build@ZPK@plot{\func@mag}{\func@ph}{}{#2}% - \edef\temp@cmd{\noexpand\begin{tikzpicture}[\opt@tikz]% + \edef\temp@cmd{\noexpand\begin{tikzpicture}[\unexpanded\expandafter{\opt@tikz}]% \noexpand\begin{axis}[% bodeStyle, domain=#3:#4, @@ -680,7 +684,7 @@ xlabel={Phase (degrees)}, ylabel={Gain (dB)}, samples=500, - \opt@axes + \unexpanded\expandafter{\opt@axes} ]% }% \temp@cmd @@ -702,7 +706,7 @@ \gdef\func@mag{}% \gdef\func@ph{}% \build@TF@plot{\func@mag}{\func@ph}{#2}% - \edef\temp@cmd{\noexpand\begin{tikzpicture}[\opt@tikz]% + \edef\temp@cmd{\noexpand\begin{tikzpicture}[\unexpanded\expandafter{\opt@tikz}]% \noexpand\begin{axis}[% bodeStyle, domain=#3:#4, @@ -710,7 +714,7 @@ xlabel={Phase (degrees)}, ylabel={Gain (dB)}, samples=500, - \opt@axes + \unexpanded\expandafter{\opt@axes} ]% }% \temp@cmd @@ -728,16 +732,15 @@ \end{tikzpicture} } \newenvironment{NicholsChart}[3][]{% - \edef\temp@cmd{\noexpand\begin{tikzpicture}[\opt@tikz]% + \parse@env@opt{#1}% + \edef\temp@cmd{\noexpand\begin{tikzpicture}[\unexpanded\expandafter{\opt@tikz}]% \noexpand\begin{axis}[% bodeStyle, domain=#2:#3, height=5cm, - ytick distance=20, - xtick distance=15, xlabel={Phase (degrees)}, ylabel={Gain (dB)}, - \opt@axes + \unexpanded\expandafter{\opt@axes} ]% }% \temp@cmd |