summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/bodeplot/bodeplot.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2024-02-07 21:01:06 +0000
committerKarl Berry <karl@freefriends.org>2024-02-07 21:01:06 +0000
commit1784bc5e8b88f9df6b0bbf9df2770ed0dbb31474 (patch)
tree824bfa86ab1543fa97e0a2c115f6eaef019ab9c3 /Master/texmf-dist/tex/latex/bodeplot/bodeplot.sty
parentec1b08786a649cad08267ce8188b67a1d58db1a2 (diff)
bodeplot (7feb24)
git-svn-id: svn://tug.org/texlive/trunk@69732 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/bodeplot/bodeplot.sty')
-rw-r--r--Master/texmf-dist/tex/latex/bodeplot/bodeplot.sty165
1 files changed, 89 insertions, 76 deletions
diff --git a/Master/texmf-dist/tex/latex/bodeplot/bodeplot.sty b/Master/texmf-dist/tex/latex/bodeplot/bodeplot.sty
index 114fc469a50..df2f6103611 100644
--- a/Master/texmf-dist/tex/latex/bodeplot/bodeplot.sty
+++ b/Master/texmf-dist/tex/latex/bodeplot/bodeplot.sty
@@ -69,11 +69,19 @@
\fi
\fi
\fi
-\newif\if@babel@french\@babel@frenchfalse
-\AtBeginDocument{
- \ifdefined\frenchbsetup
- \@babel@frenchtrue
- \fi
+\newif\if@babel\@babelfalse
+\AtBeginDocument{%
+ \@ifpackageloaded{babel}{%
+ \@babeltrue
+ \let\shorthand@list\@empty
+ \def\do#1{%
+ \begingroup
+ \lccode`\~=`#1\relax
+ \lowercase{\ifbabelshorthand~{\g@addto@macro\shorthand@list{~}}{}}
+ \endgroup
+ }
+ \dospecials
+ }{}
}
\pgfplotsset{
bode@style/.style = {
@@ -291,17 +299,17 @@
\end{groupplot}
\end{tikzpicture}
}
-\AtBeginDocument{
- \if@babel@french
- \let\Orig@BodeZPK\BodeZPK
- \renewcommand{\BodeZPK}{%
- \shorthandoff{;:!?}%
- \BodeZPK@Shorthandoff
- }
- \newcommand{\BodeZPK@Shorthandoff}[4][]{%
- \Orig@BodeZPK[#1]{#2}{#3}{#4}%
- \shorthandon{;:!?}%
- }
+\AtBeginDocument{%
+ \if@babel
+ \let\Orig@BodeZPK\BodeZPK
+ \renewcommand{\BodeZPK}{%
+ \expandafter\shorthandoff\expandafter{\shorthand@list}
+ \BodeZPK@Shorthandoff
+ }
+ \newcommand{\BodeZPK@Shorthandoff}[4][]{%
+ \Orig@BodeZPK[#1]{#2}{#3}{#4}
+ \expandafter\shorthandon\expandafter{\shorthand@list}
+ }
\fi
}
\newcommand{\BodeTF}[4][]{
@@ -361,16 +369,16 @@
\end{tikzpicture}
}
\AtBeginDocument{
- \if@babel@french
- \let\Orig@BodeTF\BodeTF
- \renewcommand{\BodeTF}{%
- \shorthandoff{;:!?}%
- \BodeTF@Shorthandoff
- }
- \newcommand{\BodeTF@Shorthandoff}[4][]{%
- \Orig@BodeTF[#1]{#2}{#3}{#4}%
- \shorthandon{;:!?}%
- }
+ \if@babel
+ \let\Orig@BodeTF\BodeTF
+ \renewcommand{\BodeTF}{%
+ \expandafter\shorthandoff\expandafter{\shorthand@list}
+ \BodeTF@Shorthandoff
+ }
+ \newcommand{\BodeTF@Shorthandoff}[4][]{%
+ \Orig@BodeTF[#1]{#2}{#3}{#4}
+ \expandafter\shorthandon\expandafter{\shorthand@list}
+ }
\fi
}
\newcommand{\addBodeZPKPlots}[3][true/{}]{
@@ -462,9 +470,10 @@
};
\fi
}
-\AtBeginDocument{
- \if@babel@french
- \AddToHook{env/BodePhPlot/begin}{\shorthandoff{;:!?}}
+\AtBeginDocument{%
+ \if@babel
+ \AddToHook{env/BodePhPlot/begin}{\expandafter\shorthandoff\expandafter{\shorthand@list}}
+ \AddToHook{env/BodePhPlot/end}{\expandafter\shorthandon\expandafter{\shorthand@list}}
\fi
}
\NewDocumentEnvironment{BodePhPlot}{O{}mm+b}{
@@ -486,9 +495,10 @@
\end{semilogxaxis}
\end{tikzpicture}
}{}
-\AtBeginDocument{
- \if@babel@french
- \AddToHook{env/BodeMagPlot/begin}{\shorthandoff{;:!?}}
+\AtBeginDocument{%
+ \if@babel
+ \AddToHook{env/BodeMagPlot/begin}{\expandafter\shorthandoff\expandafter{\shorthand@list}}
+ \AddToHook{env/BodeMagPlot/end}{\expandafter\shorthandon\expandafter{\shorthand@list}}
\fi
}
\NewDocumentEnvironment{BodeMagPlot}{O{}mm+b}{
@@ -510,9 +520,10 @@
\end{semilogxaxis}
\end{tikzpicture}
}{}
-\AtBeginDocument{
- \if@babel@french
- \AddToHook{env/BodePlot/begin}{\shorthandoff{;:!?}}
+\AtBeginDocument{%
+ \if@babel
+ \AddToHook{env/BodePlot/begin}{\expandafter\shorthandoff\expandafter{\shorthand@list}}
+ \AddToHook{env/BodePlot/end}{\expandafter\shorthandon\expandafter{\shorthand@list}}
\fi
}
\NewDocumentEnvironment{BodePlot}{O{}mm+b}{
@@ -781,17 +792,17 @@
\end{axis}
\end{tikzpicture}
}
-\AtBeginDocument{
- \if@babel@french
- \let\Orig@NyquistZPK\NyquistZPK
- \renewcommand{\NyquistZPK}{%
- \shorthandoff{;:!?}%
- \NyquistZPK@Shorthandoff
- }
- \newcommand{\NyquistZPK@Shorthandoff}[4][]{%
- \Orig@NyquistZPK[#1]{#2}{#3}{#4}%
- \shorthandon{;:!?}%
- }
+\AtBeginDocument{%
+ \if@babel
+ \let\Orig@NyquistZPK\NyquistZPK
+ \renewcommand{\NyquistZPK}{%
+ \expandafter\shorthandoff\expandafter{\shorthand@list}
+ \NyquistZPK@Shorthandoff
+ }
+ \newcommand{\NyquistZPK@Shorthandoff}[4][]{%
+ \Orig@NyquistZPK[#1]{#2}{#3}{#4}
+ \expandafter\shorthandon\expandafter{\shorthand@list}
+ }
\fi
}
\newcommand{\NyquistTF}[4][]{
@@ -828,17 +839,17 @@
\end{axis}
\end{tikzpicture}
}
-\AtBeginDocument{
- \if@babel@french
- \let\Orig@NyquistTF\NyquistTF
- \renewcommand{\NyquistTF}{%
- \shorthandoff{;:!?}%
- \NyquistTF@Shorthandoff
- }
- \newcommand{\NyquistTF@Shorthandoff}[4][]{%
- \Orig@NyquistTF[#1]{#2}{#3}{#4}%
- \shorthandon{;:!?}%
- }
+\AtBeginDocument{%
+ \if@babel
+ \let\Orig@NyquistTF\NyquistTF
+ \renewcommand{\NyquistTF}{%
+ \expandafter\shorthandoff\expandafter{\shorthand@list}
+ \NyquistTF@Shorthandoff
+ }
+ \newcommand{\NyquistTF@Shorthandoff}[4][]{%
+ \Orig@NyquistTF[#1]{#2}{#3}{#4}
+ \expandafter\shorthandon\expandafter{\shorthand@list}
+ }
\fi
}
\newcommand{\addNyquistZPKPlot}[2][]{
@@ -875,9 +886,10 @@
};
\fi
}
-\AtBeginDocument{
- \if@babel@french
- \AddToHook{env/NyquistPlot/begin}{\shorthandoff{;:!?}}
+\AtBeginDocument{%
+ \if@babel
+ \AddToHook{env/NyquistPlot/begin}{\expandafter\shorthandoff\expandafter{\shorthand@list}}
+ \AddToHook{env/NyquistPlot/end}{\expandafter\shorthandon\expandafter{\shorthand@list}}
\fi
}
\NewDocumentEnvironment{NyquistPlot}{O{}mm+b}{
@@ -963,17 +975,17 @@
\end{axis}
\end{tikzpicture}
}
-\AtBeginDocument{
- \if@babel@french
- \let\Orig@NicholsZPK\NicholsZPK
- \renewcommand{\NicholsZPK}{%
- \shorthandoff{;:!?}%
- \NicholsZPK@Shorthandoff
- }
- \newcommand{\NicholsZPK@Shorthandoff}[4][]{%
- \Orig@NicholsZPK[#1]{#2}{#3}{#4}%
- \shorthandon{;:!?}%
- }
+\AtBeginDocument{%
+ \if@babel
+ \let\Orig@NicholsZPK\NicholsZPK
+ \renewcommand{\NicholsZPK}{%
+ \expandafter\shorthandoff\expandafter{\shorthand@list}
+ \NicholsZPK@Shorthandoff
+ }
+ \newcommand{\NicholsZPK@Shorthandoff}[4][]{%
+ \Orig@NicholsZPK[#1]{#2}{#3}{#4}
+ \expandafter\shorthandon\expandafter{\shorthand@list}
+ }
\fi
}
\newcommand{\NicholsTF}[4][]{
@@ -1018,17 +1030,18 @@
\end{tikzpicture}
}
\AtBeginDocument{
- \if@babel@french
+ \if@babel
\let\Orig@NicholsTF\NicholsTF
\renewcommand{\NicholsTF}{%
- \shorthandoff{;:!?}%
+ \expandafter\shorthandoff\expandafter{\shorthand@list}
\NicholsTF@Shorthandoff
}
\newcommand{\NicholsTF@Shorthandoff}[4][]{%
- \Orig@NicholsTF[#1]{#2}{#3}{#4}%
- \shorthandon{;:!?}%
+ \Orig@NicholsTF[#1]{#2}{#3}{#4}
+ \expandafter\shorthandon\expandafter{\shorthand@list}
}
- \AddToHook{env/NicholsChart/begin}{\shorthandoff{;:!?}}
+ \AddToHook{env/NicholsChart/begin}{\expandafter\shorthandoff\expandafter{\shorthand@list}}
+ \AddToHook{env/NicholsChart/end}{\expandafter\shorthandon\expandafter{\shorthand@list}}
\fi
}
\NewDocumentEnvironment{NicholsChart}{O{}mm+b}{