Skip to content

Commit

Permalink
Added \counterwithin to laTeXML.ltx. Disabled chngcntr package since …
Browse files Browse the repository at this point in the history
…it is now redundant.
  • Loading branch information
davidmjones committed May 24, 2024
1 parent 0477bf0 commit f7c9941
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
Binary file modified lib/perl/TeX/Interpreter/FMT/laTeXML.fmt
Binary file not shown.
24 changes: 24 additions & 0 deletions lib/perl/TeX/Interpreter/FMT/laTeXML.ltx
Original file line number Diff line number Diff line change
Expand Up @@ -2920,6 +2920,30 @@ Type H <return> for immediate help.}%
}%
}

% \NewDocumentCommand \counterwithin {sO{\arabic}mm}{%
% \@ifbothcounters{#3}{#4}{%
% \@addtoreset{#3}{#4}%
% \IfBooleanF #1%
% {\expandafter
% \gdef\csname the#3\expandafter\endcsname
% \expandafter
% {\csname the#4\endcsname .#2{#3}}}%
% }%
% }

\def\counterwithin{\maybe@st@rred\@counterwithin}

\newcommand{\@counterwithin}[3][\arabic]{
\@ifbothcounters{#2}{#3}{%
\@addtoreset{#2}{#3}%
\ifst@rred\else
\expandafter \gdef\csname the#2\endcsname {%
\csname the#3\endcsname.#1{#2}%
}%
\fi
}%
}

\def\arabic#1{\expandafter\@arabic\csname c@#1\endcsname}
\def\roman#1{\expandafter\@roman\csname c@#1\endcsname}
\def\Roman#1{\expandafter\@Roman\csname c@#1\endcsname}
Expand Down
1 change: 1 addition & 0 deletions lib/perl/TeX/Interpreter/LaTeX/Package/DisablePackages.pm
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ __DATA__
\DisablePackage{amstixbb}
\DisablePackage{backrefs}
\DisablePackage{breakurl}
\DisablePackage{chngcntr}
\DisablePackage{circuitikz}
\DisablePackage{ctable}
\DisablePackage{dutchcal}
Expand Down

0 comments on commit f7c9941

Please sign in to comment.