summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/bodeplot
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-11-08 23:15:33 +0000
committerKarl Berry <karl@freefriends.org>2021-11-08 23:15:33 +0000
commit1bdd5014f9f4029097eb3c1204c99dc65d5459b1 (patch)
treea0775418f1fa2351d6883e86787cfd9d57c2d250 /Master/texmf-dist/tex/latex/bodeplot
parent60cd34775e85aa3f7e970857f7a4c5dd2f863a2a (diff)
bodeplot (9nov21)
git-svn-id: svn://tug.org/texlive/trunk@60996 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/bodeplot')
-rw-r--r--Master/texmf-dist/tex/latex/bodeplot/bodeplot.sty87
1 files changed, 45 insertions, 42 deletions
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