texlive[69442] Master/texmf-dist: bodeplot (15jan24)

commits+karl at tug.org commits+karl at tug.org
Mon Jan 15 22:02:35 CET 2024


Revision: 69442
          https://tug.org/svn/texlive?view=revision&revision=69442
Author:   karl
Date:     2024-01-15 22:02:34 +0100 (Mon, 15 Jan 2024)
Log Message:
-----------
bodeplot (15jan24)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/bodeplot/README.md
    trunk/Master/texmf-dist/doc/latex/bodeplot/bodeplot-doc.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/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/bodeplot/README.md	2024-01-15 21:02:25 UTC (rev 69441)
+++ trunk/Master/texmf-dist/doc/latex/bodeplot/README.md	2024-01-15 21:02:34 UTC (rev 69442)
@@ -7,9 +7,8 @@
 License: [LPPL-1.3c](https://github.com/rlkamalapurkar/bodeplot/blob/main/LICENSE)
 
 ## Limitations
- 1. If `bable` is used with the French language option, it needs to be loaded before `bodeplot` is loaded. Also, the `french` option to `babel` has to be passed locally, not via class options.
- 2. TF commands are wrapped between -180 and 180 degrees in `pgf` mode.
- 3. Version 1.0.8 and newer store `gnuplot` temporary files in the working directory. Use class option `declutter` to restore pre-v1.0.8 behavior. Option `declutter` can cause errors if used with a `tikzexternalize` prefix.
+ 1. TF commands are wrapped between -180 and 180 degrees in `pgf` mode.
+ 2. Version 1.0.8 and newer store `gnuplot` temporary files in the working directory. Use class option `declutter` to restore pre-v1.0.8 behavior. Option `declutter` can cause errors if used with a `tikzexternalize` prefix.
 
 ## Compilation instructions
 1) `latex bodeplot.ins` to generate `bodeplot.sty`

Modified: trunk/Master/texmf-dist/doc/latex/bodeplot/bodeplot-doc.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/bodeplot/bodeplot.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/bodeplot/bodeplot.dtx	2024-01-15 21:02:25 UTC (rev 69441)
+++ trunk/Master/texmf-dist/source/latex/bodeplot/bodeplot.dtx	2024-01-15 21:02:34 UTC (rev 69442)
@@ -30,7 +30,7 @@
 \usepackage{cprotect}
 \usepackage[declutter]{bodeplot}
 \usepackage[colorlinks]{hyperref}
-\usepackage{fancyvrb }
+\usepackage{fancyvrb}
 \usepackage{iftex}
   \iftutex % LuaTeX, XeTeX
     \usepackage{fontspec}
@@ -69,7 +69,7 @@
 %</driver>
 % \fi
 %
-% \CheckSum{1758}
+% \CheckSum{1769}
 %
 % \changes{v1.0}{2021/10/25}{Initial release}
 % \changes{v1.0.4}{2021/11/05}{Fixed unintended optional argument macro expansion}
@@ -82,9 +82,9 @@
 % \changes{v1.1.5}{2024/01/11}{Detect `babel-french' to handle active characters}
 %
 % \GetFileInfo{bodeplot.sty}
-% \DoNotIndex{\newcommand,\xdef,\gdef,\def,\edef,\addplot,\approx,\arabic,\opt,\typ,\obj,\else,\if at pgfarg,\if at Hzarg,\if at radarg,\if at declutterarg,\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}
+% \DoNotIndex{\newcommand,\xdef,\gdef,\def,\edef,\addplot,\approx,\arabic,\opt,\typ,\obj,\else,\if at pgfarg,\if at Hzarg,\if at radarg,\if at declutterarg,\if at babel@french,\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\\version 1.1.5}
+% \title{The \textsf{bodeplot} package\\version 1.1.6}
 % \author{Rushikesh Kamalapurkar \\ \texttt{rlkamalapurkar at gmail.com}}
 %
 % \maketitle
@@ -105,7 +105,6 @@
 % Since version 1.0.8, the |bodeplot| package places all |gnuplot| temporary files in the working directory. The package option |declutter| restores the original behavior where the temporary files are placed in a folder called |gnuplot|.
 % \subsection{Limitations} 
 % \begin{itemize}
-%   \item If French language support is needed through the |babel| package, \textbf{the |babel| package has to be loaded before the |bodeplot| package}. The options |french| or |main=french| need to be passed to |babel| locally, and not via class options.
 %   \item In |pgf| mode, Bode phase plots and Nichols charts in TF form wrap angles so that they are always between -180 and 180$^\circ$ or $-\pi$ and $-\pi$ radian. As such, these plots will show phase wrapping discontinuities. Since v1.1.1, in |gnuplot| mode, the package uses the |smooth unwrap| filter to correct wrapping discontinuities. As of now, I have not found a way to do this in |pgf| mode, any merge requests or ideas you may have are welcome! Since v1.1.4, you can redefine the |n at mod| macro using the commands |\makeatletter\renewcommand{\n at mod}{\n at mod@p}\makeatother| to wrap the phase between 0 and 360$^\circ$ or $0$ and $2\pi$ radian. The commands |\makeatletter\renewcommand{\n at mod}{\n at mod@n}\makeatother| will wrap the phase between -360 and 0$^\circ$ or $-2\pi$ and $0$ radian.
 %   \item Use of the |declutter| option with other directory management tools such as a |tikzexternalize| prefix is not recommended.
 % \end{itemize}
@@ -906,11 +905,14 @@
 % \end{macro}
 % \end{macro}
 % \begin{macro}{\if at babel@french}
-% Check if the |babel| package is loaded with French language option. 
+% Check if the |babel| package is loaded with French language option.\changes{v1.1.6}{2024/01/14}{Detect `babel-french' using `frenchbsetup'}
 %    \begin{macrocode}
 \newif\if at babel@french\@babel at frenchfalse
-\@ifpackagewith{babel}{french}{\@babel at frenchtrue}{}
-\@ifpackagewith{babel}{main=french}{\@babel at frenchtrue}{}
+\AtBeginDocument{
+  \ifdefined\frenchbsetup
+    \@babel at frenchtrue
+  \fi
+}
 %    \end{macrocode}
 % \end{macro}
 % \begin{macro}{bode at style}
@@ -1325,17 +1327,19 @@
 %    \end{macrocode}
 % The following code handles active characters to avoid conflicts with `babel.'\changes{v1.1.5}{2023/01/11}{Added code to handle active characters}
 %    \begin{macrocode}
-\if at babel@french
-  \let\Orig at BodeZPK\BodeZPK
-  \renewcommand{\BodeZPK}{%
-    \shorthandoff{;:!?}%
-    \BodeZPK at Shorthandoff
-  }
-  \newcommand{\BodeZPK at Shorthandoff}[4][]{%
-    \Orig at BodeZPK[#1]{#2}{#3}{#4}%
-    \shorthandon{;:!?}%
-  }
-\fi
+\AtBeginDocument{
+  \if at babel@french
+    \let\Orig at BodeZPK\BodeZPK
+    \renewcommand{\BodeZPK}{%
+      \shorthandoff{;:!?}%
+      \BodeZPK at Shorthandoff
+    }
+    \newcommand{\BodeZPK at Shorthandoff}[4][]{%
+      \Orig at BodeZPK[#1]{#2}{#3}{#4}%
+      \shorthandon{;:!?}%
+    }
+  \fi
+}
 %    \end{macrocode}
 % \end{macro}
 % \begin{macro}{\BodeTF}
@@ -1400,17 +1404,19 @@
 %    \end{macrocode}
 % The following code handles active characters to avoid conflicts with `babel.'\changes{v1.1.5}{2023/01/11}{Added code to handle active characters}
 %    \begin{macrocode}
-\if at babel@french
-  \let\Orig at BodeTF\BodeTF
-  \renewcommand{\BodeTF}{%
-    \shorthandoff{;:!?}%
-    \BodeTF at Shorthandoff
-  }
-  \newcommand{\BodeTF at Shorthandoff}[4][]{%
-    \Orig at BodeTF[#1]{#2}{#3}{#4}%
-    \shorthandon{;:!?}%
-  }
-\fi
+\AtBeginDocument{
+  \if at babel@french
+    \let\Orig at BodeTF\BodeTF
+    \renewcommand{\BodeTF}{%
+      \shorthandoff{;:!?}%
+      \BodeTF at Shorthandoff
+    }
+    \newcommand{\BodeTF at Shorthandoff}[4][]{%
+      \Orig at BodeTF[#1]{#2}{#3}{#4}%
+      \shorthandon{;:!?}%
+    }
+  \fi
+}
 %    \end{macrocode}
 % \end{macro}
 % \begin{macro}{\addBodeZPKPlots}
@@ -1520,9 +1526,11 @@
 % \begin{environment}{BodePhPlot}
 % An environment to host phase plot macros that pass parametric functions to |\addplot| macros. Uses the defaults specified in |bode at style| to create a shortcut that includes the |tikzpicture| and |semilogaxis| environments.\changes{v1.1.0}{2022/07/20}{Added separate environments for phase and magnitude plots}\changes{v1.1.1}{2022/07/31}{Enabled `Hz' and `rad' units for frequency and phase, respectively}\changes{v1.1.2}{2022/10/29}{Defined using the `NewEnviron' command from the `environ' package to fix conflicts with externalization}\changes{v1.1.5}{2023/01/11}{Defined using the `NewDocumentEnvironment' command from the `xparse' package and added a hook to handle active characters}
 %    \begin{macrocode}
-\if at babel@french
-  \AddToHook{env/BodePhPlot/begin}{\shorthandoff{;:!?}}
-\fi
+\AtBeginDocument{
+  \if at babel@french
+    \AddToHook{env/BodePhPlot/begin}{\shorthandoff{;:!?}}
+  \fi
+}
 \NewDocumentEnvironment{BodePhPlot}{O{}mm+b}{
   \parse at env@opt{#1}
   \edef\temp at cmd{\noexpand\begin{tikzpicture} [\unexpanded\expandafter{\opt at tikz}]}
@@ -1547,9 +1555,11 @@
 % \begin{environment}{BodeMagPlot}
 % An environment to host magnitude plot macros that pass parametric functions to |\addplot| macros. Uses the defaults specified in |bode at style| to create a shortcut that includes the |tikzpicture| and |semilogaxis| environments.\changes{v1.1.0}{2022/07/20}{Added separate environments for phase and magnitude plots}\changes{v1.1.1}{2022/07/31}{Enabled `Hz' and `rad' units for frequency and phase, respectively}\changes{v1.1.2}{2022/10/29}{Defined using the `NewEnviron' command from the `environ' package to fix conflicts with externalization}\changes{v1.1.5}{2023/01/11}{Defined using the `NewDocumentEnvironment' command from the `xparse' package and added a hook to handle active characters}
 %    \begin{macrocode}
-\if at babel@french
-  \AddToHook{env/BodeMagPlot/begin}{\shorthandoff{;:!?}}
-\fi
+\AtBeginDocument{
+  \if at babel@french
+    \AddToHook{env/BodeMagPlot/begin}{\shorthandoff{;:!?}}
+  \fi
+}
 \NewDocumentEnvironment{BodeMagPlot}{O{}mm+b}{
   \parse at env@opt{#1}
   \edef\temp at cmd{\noexpand\begin{tikzpicture} [\unexpanded\expandafter{\opt at tikz}]}
@@ -1574,9 +1584,11 @@
 % \begin{environment}{BodePlot}
 % Same as |BodeMagPlot|. The |BodePlot| environment is deprecated as of v1.1.0, please use the |BodePhPlot| and |BodeMagPlot| environments instead.\changes{v1.0.3}{2021/11/03}{Added tikz option to environments}\changes{v1.1.0}{2022/02/20}{Deprecated BodePlot environment}\changes{v1.1.1}{2022/07/31}{Enabled `Hz' and `rad' units for frequency and phase, respectively}\changes{v1.1.2}{2022/10/29}{Defined using the `NewEnviron' command from the `environ' package to fix conflicts with externalization}\changes{v1.1.5}{2023/01/11}{Defined using the `NewDocumentEnvironment' command from the `xparse' package and added a hook to handle active characters}
 %    \begin{macrocode}
-\if at babel@french
-  \AddToHook{env/BodePlot/begin}{\shorthandoff{;:!?}}
-\fi
+\AtBeginDocument{
+  \if at babel@french
+    \AddToHook{env/BodePlot/begin}{\shorthandoff{;:!?}}
+  \fi
+}
 \NewDocumentEnvironment{BodePlot}{O{}mm+b}{
   \parse at env@opt{#1}
   \edef\temp at cmd{\noexpand\begin{tikzpicture} [\unexpanded\expandafter{\opt at tikz}]}
@@ -1879,17 +1891,19 @@
 %    \end{macrocode}
 % The following code handles active characters to avoid conflicts with `babel.'\changes{v1.1.5}{2023/01/11}{Added code to handle active characters}
 %    \begin{macrocode}
-\if at babel@french
-  \let\Orig at NyquistZPK\NyquistZPK
-  \renewcommand{\NyquistZPK}{%
-    \shorthandoff{;:!?}%
-    \NyquistZPK at Shorthandoff
-  }
-  \newcommand{\NyquistZPK at Shorthandoff}[4][]{%
-    \Orig at NyquistZPK[#1]{#2}{#3}{#4}%
-    \shorthandon{;:!?}%
-  }
-\fi
+\AtBeginDocument{
+  \if at babel@french
+    \let\Orig at NyquistZPK\NyquistZPK
+    \renewcommand{\NyquistZPK}{%
+      \shorthandoff{;:!?}%
+      \NyquistZPK at Shorthandoff
+    }
+    \newcommand{\NyquistZPK at Shorthandoff}[4][]{%
+      \Orig at NyquistZPK[#1]{#2}{#3}{#4}%
+      \shorthandon{;:!?}%
+    }
+  \fi
+}
 %    \end{macrocode}
 % \end{macro}
 % \begin{macro}{\NyquistTF}
@@ -1932,17 +1946,19 @@
 %    \end{macrocode}
 % The following code handles active characters to avoid conflicts with `babel.'\changes{v1.1.5}{2023/01/11}{Added code to handle active characters}
 %    \begin{macrocode}
-\if at babel@french
-  \let\Orig at NyquistTF\NyquistTF
-  \renewcommand{\NyquistTF}{%
-    \shorthandoff{;:!?}%
-    \NyquistTF at Shorthandoff
-  }
-  \newcommand{\NyquistTF at Shorthandoff}[4][]{%
-    \Orig at NyquistTF[#1]{#2}{#3}{#4}%
-    \shorthandon{;:!?}%
-  }
-\fi
+\AtBeginDocument{
+  \if at babel@french
+    \let\Orig at NyquistTF\NyquistTF
+    \renewcommand{\NyquistTF}{%
+      \shorthandoff{;:!?}%
+      \NyquistTF at Shorthandoff
+    }
+    \newcommand{\NyquistTF at Shorthandoff}[4][]{%
+      \Orig at NyquistTF[#1]{#2}{#3}{#4}%
+      \shorthandon{;:!?}%
+    }
+  \fi
+}
 %    \end{macrocode}
 % \end{macro}
 % \begin{macro}{\addNyquistZPKPlot}
@@ -1992,9 +2008,11 @@
 %\begin{macro}{NyquistPlot}
 % An environment to host |\addNyquist...| macros that pass parametric functions to |\addplot|. Uses the defaults specified in |bode at style| to create a shortcut that includes the |tikzpicture| and |axis| environments. \changes{v1.0.3}{2021/11/03}{Added tikz option to environments}\changes{v1.1.2}{2022/10/29}{Defined using the `NewEniron' command from the `environ' package to fix conflicts with externalization}\changes{v1.1.5}{2023/01/11}{Defined using the `NewDocumentEnvironment' command from the `xparse' package and added a hook to handle active characters}
 %    \begin{macrocode}
-\if at babel@french
-  \AddToHook{env/NyquistPlot/begin}{\shorthandoff{;:!?}}
-\fi
+\AtBeginDocument{
+  \if at babel@french
+    \AddToHook{env/NyquistPlot/begin}{\shorthandoff{;:!?}}
+  \fi
+}
 \NewDocumentEnvironment{NyquistPlot}{O{}mm+b}{
   \parse at env@opt{#1}
   \edef\temp at cmd{\noexpand\begin{tikzpicture} [\unexpanded\expandafter{\opt at tikz}]}
@@ -2098,17 +2116,19 @@
     \end{axis}
   \end{tikzpicture}
 }
-\if at babel@french
-  \let\Orig at NicholsZPK\NicholsZPK
-  \renewcommand{\NicholsZPK}{%
-    \shorthandoff{;:!?}%
-    \NicholsZPK at Shorthandoff
-  }
-  \newcommand{\NicholsZPK at Shorthandoff}[4][]{%
-    \Orig at NicholsZPK[#1]{#2}{#3}{#4}%
-    \shorthandon{;:!?}%
-  }
-\fi
+\AtBeginDocument{
+  \if at babel@french
+    \let\Orig at NicholsZPK\NicholsZPK
+    \renewcommand{\NicholsZPK}{%
+      \shorthandoff{;:!?}%
+      \NicholsZPK at Shorthandoff
+    }
+    \newcommand{\NicholsZPK at Shorthandoff}[4][]{%
+      \Orig at NicholsZPK[#1]{#2}{#3}{#4}%
+      \shorthandon{;:!?}%
+    }
+  \fi
+}
 \newcommand{\NicholsTF}[4][]{
   \parse at N@opt{#1}
   \gdef\func at mag{}
@@ -2150,18 +2170,20 @@
     \end{axis}
   \end{tikzpicture}
 }
-\if at babel@french
-  \let\Orig at NicholsTF\NicholsTF
-  \renewcommand{\NicholsTF}{%
-    \shorthandoff{;:!?}%
-    \NicholsTF at Shorthandoff
-  }
-  \newcommand{\NicholsTF at Shorthandoff}[4][]{%
-    \Orig at NicholsTF[#1]{#2}{#3}{#4}%
-    \shorthandon{;:!?}%
-  }
-  \AddToHook{env/NicholsChart/begin}{\shorthandoff{;:!?}}
-\fi
+\AtBeginDocument{
+  \if at babel@french
+    \let\Orig at NicholsTF\NicholsTF
+    \renewcommand{\NicholsTF}{%
+      \shorthandoff{;:!?}%
+      \NicholsTF at Shorthandoff
+    }
+    \newcommand{\NicholsTF at Shorthandoff}[4][]{%
+      \Orig at NicholsTF[#1]{#2}{#3}{#4}%
+      \shorthandon{;:!?}%
+    }
+    \AddToHook{env/NicholsChart/begin}{\shorthandoff{;:!?}}
+  \fi
+}
 \NewDocumentEnvironment{NicholsChart}{O{}mm+b}{
   \parse at env@opt{#1}
   \edef\temp at cmd{\noexpand\begin{tikzpicture} [\unexpanded\expandafter{\opt at tikz}]}

Modified: trunk/Master/texmf-dist/tex/latex/bodeplot/bodeplot.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/bodeplot/bodeplot.sty	2024-01-15 21:02:25 UTC (rev 69441)
+++ trunk/Master/texmf-dist/tex/latex/bodeplot/bodeplot.sty	2024-01-15 21:02:34 UTC (rev 69442)
@@ -70,8 +70,11 @@
   \fi
 \fi
 \newif\if at babel@french\@babel at frenchfalse
-\@ifpackagewith{babel}{french}{\@babel at frenchtrue}{}
-\@ifpackagewith{babel}{main=french}{\@babel at frenchtrue}{}
+\AtBeginDocument{
+  \ifdefined\frenchbsetup
+    \@babel at frenchtrue
+  \fi
+}
 \pgfplotsset{
   bode at style/.style = {
     label style={font=\footnotesize},
@@ -288,17 +291,19 @@
     \end{groupplot}
   \end{tikzpicture}
 }
-\if at babel@french
-  \let\Orig at BodeZPK\BodeZPK
-  \renewcommand{\BodeZPK}{%
-    \shorthandoff{;:!?}%
-    \BodeZPK at Shorthandoff
-  }
-  \newcommand{\BodeZPK at Shorthandoff}[4][]{%
-    \Orig at BodeZPK[#1]{#2}{#3}{#4}%
-    \shorthandon{;:!?}%
-  }
-\fi
+\AtBeginDocument{
+  \if at babel@french
+    \let\Orig at BodeZPK\BodeZPK
+    \renewcommand{\BodeZPK}{%
+      \shorthandoff{;:!?}%
+      \BodeZPK at Shorthandoff
+    }
+    \newcommand{\BodeZPK at Shorthandoff}[4][]{%
+      \Orig at BodeZPK[#1]{#2}{#3}{#4}%
+      \shorthandon{;:!?}%
+    }
+  \fi
+}
 \newcommand{\BodeTF}[4][]{
   \parse at opt{#1}
   \gdef\func at mag{}
@@ -355,17 +360,19 @@
     \end{groupplot}
   \end{tikzpicture}
 }
-\if at babel@french
-  \let\Orig at BodeTF\BodeTF
-  \renewcommand{\BodeTF}{%
-    \shorthandoff{;:!?}%
-    \BodeTF at Shorthandoff
-  }
-  \newcommand{\BodeTF at Shorthandoff}[4][]{%
-    \Orig at BodeTF[#1]{#2}{#3}{#4}%
-    \shorthandon{;:!?}%
-  }
-\fi
+\AtBeginDocument{
+  \if at babel@french
+    \let\Orig at BodeTF\BodeTF
+    \renewcommand{\BodeTF}{%
+      \shorthandoff{;:!?}%
+      \BodeTF at Shorthandoff
+    }
+    \newcommand{\BodeTF at Shorthandoff}[4][]{%
+      \Orig at BodeTF[#1]{#2}{#3}{#4}%
+      \shorthandon{;:!?}%
+    }
+  \fi
+}
 \newcommand{\addBodeZPKPlots}[3][true/{}]{
   \foreach \approx/\opt in {#1} {
     \gdef\plot at macro{}
@@ -455,9 +462,11 @@
     };
   \fi
 }
-\if at babel@french
-  \AddToHook{env/BodePhPlot/begin}{\shorthandoff{;:!?}}
-\fi
+\AtBeginDocument{
+  \if at babel@french
+    \AddToHook{env/BodePhPlot/begin}{\shorthandoff{;:!?}}
+  \fi
+}
 \NewDocumentEnvironment{BodePhPlot}{O{}mm+b}{
   \parse at env@opt{#1}
   \edef\temp at cmd{\noexpand\begin{tikzpicture} [\unexpanded\expandafter{\opt at tikz}]}
@@ -477,9 +486,11 @@
     \end{semilogxaxis}
   \end{tikzpicture}
 }{}
-\if at babel@french
-  \AddToHook{env/BodeMagPlot/begin}{\shorthandoff{;:!?}}
-\fi
+\AtBeginDocument{
+  \if at babel@french
+    \AddToHook{env/BodeMagPlot/begin}{\shorthandoff{;:!?}}
+  \fi
+}
 \NewDocumentEnvironment{BodeMagPlot}{O{}mm+b}{
   \parse at env@opt{#1}
   \edef\temp at cmd{\noexpand\begin{tikzpicture} [\unexpanded\expandafter{\opt at tikz}]}
@@ -499,9 +510,11 @@
     \end{semilogxaxis}
   \end{tikzpicture}
 }{}
-\if at babel@french
-  \AddToHook{env/BodePlot/begin}{\shorthandoff{;:!?}}
-\fi
+\AtBeginDocument{
+  \if at babel@french
+    \AddToHook{env/BodePlot/begin}{\shorthandoff{;:!?}}
+  \fi
+}
 \NewDocumentEnvironment{BodePlot}{O{}mm+b}{
   \parse at env@opt{#1}
   \edef\temp at cmd{\noexpand\begin{tikzpicture} [\unexpanded\expandafter{\opt at tikz}]}
@@ -768,17 +781,19 @@
     \end{axis}
   \end{tikzpicture}
 }
-\if at babel@french
-  \let\Orig at NyquistZPK\NyquistZPK
-  \renewcommand{\NyquistZPK}{%
-    \shorthandoff{;:!?}%
-    \NyquistZPK at Shorthandoff
-  }
-  \newcommand{\NyquistZPK at Shorthandoff}[4][]{%
-    \Orig at NyquistZPK[#1]{#2}{#3}{#4}%
-    \shorthandon{;:!?}%
-  }
-\fi
+\AtBeginDocument{
+  \if at babel@french
+    \let\Orig at NyquistZPK\NyquistZPK
+    \renewcommand{\NyquistZPK}{%
+      \shorthandoff{;:!?}%
+      \NyquistZPK at Shorthandoff
+    }
+    \newcommand{\NyquistZPK at Shorthandoff}[4][]{%
+      \Orig at NyquistZPK[#1]{#2}{#3}{#4}%
+      \shorthandon{;:!?}%
+    }
+  \fi
+}
 \newcommand{\NyquistTF}[4][]{
   \parse at N@opt{#1}
   \gdef\func at mag{}
@@ -813,17 +828,19 @@
     \end{axis}
   \end{tikzpicture}
 }
-\if at babel@french
-  \let\Orig at NyquistTF\NyquistTF
-  \renewcommand{\NyquistTF}{%
-    \shorthandoff{;:!?}%
-    \NyquistTF at Shorthandoff
-  }
-  \newcommand{\NyquistTF at Shorthandoff}[4][]{%
-    \Orig at NyquistTF[#1]{#2}{#3}{#4}%
-    \shorthandon{;:!?}%
-  }
-\fi
+\AtBeginDocument{
+  \if at babel@french
+    \let\Orig at NyquistTF\NyquistTF
+    \renewcommand{\NyquistTF}{%
+      \shorthandoff{;:!?}%
+      \NyquistTF at Shorthandoff
+    }
+    \newcommand{\NyquistTF at Shorthandoff}[4][]{%
+      \Orig at NyquistTF[#1]{#2}{#3}{#4}%
+      \shorthandon{;:!?}%
+    }
+  \fi
+}
 \newcommand{\addNyquistZPKPlot}[2][]{
   \gdef\func at mag{}
   \gdef\func at ph{}
@@ -858,9 +875,11 @@
     };
   \fi
 }
-\if at babel@french
-  \AddToHook{env/NyquistPlot/begin}{\shorthandoff{;:!?}}
-\fi
+\AtBeginDocument{
+  \if at babel@french
+    \AddToHook{env/NyquistPlot/begin}{\shorthandoff{;:!?}}
+  \fi
+}
 \NewDocumentEnvironment{NyquistPlot}{O{}mm+b}{
   \parse at env@opt{#1}
   \edef\temp at cmd{\noexpand\begin{tikzpicture} [\unexpanded\expandafter{\opt at tikz}]}
@@ -944,17 +963,19 @@
     \end{axis}
   \end{tikzpicture}
 }
-\if at babel@french
-  \let\Orig at NicholsZPK\NicholsZPK
-  \renewcommand{\NicholsZPK}{%
-    \shorthandoff{;:!?}%
-    \NicholsZPK at Shorthandoff
-  }
-  \newcommand{\NicholsZPK at Shorthandoff}[4][]{%
-    \Orig at NicholsZPK[#1]{#2}{#3}{#4}%
-    \shorthandon{;:!?}%
-  }
-\fi
+\AtBeginDocument{
+  \if at babel@french
+    \let\Orig at NicholsZPK\NicholsZPK
+    \renewcommand{\NicholsZPK}{%
+      \shorthandoff{;:!?}%
+      \NicholsZPK at Shorthandoff
+    }
+    \newcommand{\NicholsZPK at Shorthandoff}[4][]{%
+      \Orig at NicholsZPK[#1]{#2}{#3}{#4}%
+      \shorthandon{;:!?}%
+    }
+  \fi
+}
 \newcommand{\NicholsTF}[4][]{
   \parse at N@opt{#1}
   \gdef\func at mag{}
@@ -996,18 +1017,20 @@
     \end{axis}
   \end{tikzpicture}
 }
-\if at babel@french
-  \let\Orig at NicholsTF\NicholsTF
-  \renewcommand{\NicholsTF}{%
-    \shorthandoff{;:!?}%
-    \NicholsTF at Shorthandoff
-  }
-  \newcommand{\NicholsTF at Shorthandoff}[4][]{%
-    \Orig at NicholsTF[#1]{#2}{#3}{#4}%
-    \shorthandon{;:!?}%
-  }
-  \AddToHook{env/NicholsChart/begin}{\shorthandoff{;:!?}}
-\fi
+\AtBeginDocument{
+  \if at babel@french
+    \let\Orig at NicholsTF\NicholsTF
+    \renewcommand{\NicholsTF}{%
+      \shorthandoff{;:!?}%
+      \NicholsTF at Shorthandoff
+    }
+    \newcommand{\NicholsTF at Shorthandoff}[4][]{%
+      \Orig at NicholsTF[#1]{#2}{#3}{#4}%
+      \shorthandon{;:!?}%
+    }
+    \AddToHook{env/NicholsChart/begin}{\shorthandoff{;:!?}}
+  \fi
+}
 \NewDocumentEnvironment{NicholsChart}{O{}mm+b}{
   \parse at env@opt{#1}
   \edef\temp at cmd{\noexpand\begin{tikzpicture} [\unexpanded\expandafter{\opt at tikz}]}



More information about the tex-live-commits mailing list.