我有一个紧急问题。我正在写一篇文档,我有方程式(但它们超过 26 个)。我收到错误“计数器太大”。我在其他主题中看到我需要使用alphalph
包,但它不起作用,我仍然收到相同的错误。如果您能帮助我解决这个问题,我将不胜感激。我已经复制并粘贴了我的代码和我正在使用的所有包的最小示例:
\documentclass {article}
\usepackage[T1,T5]{fontenc}
\usepackage{amsthm}
\usepackage{latexsym}
\usepackage[cmex10]{amsmath}
\usepackage{amsfonts,amssymb,amsthm}
\usepackage{graphicx}
\usepackage{psfrag,balance,arydshln}
\usepackage{rotating}
\usepackage{mempatch}
\usepackage{ifdraft}
\usepackage[cp1252]{inputenc}
\usepackage{acronym}
\usepackage{textcomp}
\usepackage[swedish,english]{babel}
\usepackage{cleveref}
\usepackage{xr}
\usepackage{nomencl}
\usepackage{bibentry}
\usepackage{color}
\usepackage{url}
\usepackage{bbold}
\usepackage{paralist}
\usepackage{enumitem}
\usepackage{bm}
\usepackage{pgfplots}
\usepackage{epstopdf}
\usepackage{nameref}
\usepackage{dsfont}
\usepackage{verbatim}
\usepackage{glossaries}
\usepackage{gensymb}
\usepackage{algorithmic}
\usepackage{enumerate}
\usepackage{booktabs}
\usepackage{amsmath}
\usepackage{epsfig}
\usepackage{cite}
\usepackage{hhline}
\usepackage{multirow}
\usepackage{framed}
\usepackage{lipsum}
\usepackage{enumerate}
\usepackage{graphicx}
\usepackage{subcaption}
\usepackage{capt-of}
\usepackage{makecell}
\usepackage{appendix}
\usepackage[none]{hyphenat}
\usepackage{pgfplots}
\usepackage{pgfplotstable}
\usepackage{mathtools}
\usepackage{tikz}
\usepackage{xcolor}
\usepackage{alphalph,etoolbox}
\allowdisplaybreaks
\begin{document}
\section{section 1}
\begin{subequations}
\label{equation1}
\begin{align}
& a=b+c \\
& a=b+c \\
& a=b+c \\
& a=b+c \\
& a=b+c \\
& a=b+c \\
& a=b+c \\
& a=b+c \\
& a=b+c \\
& a=b+c \\
& a=b+c \\
& a=b+c \\
& a=b+c \\
& a=b+c \\
& a=b+c \\
& a=b+c \\
& a=b+c \\
& a=b+c \\
& a=b+c \\
& a=b+c \\
& a=b+c \\
& a=b+c \\
& a=b+c \\
& a=b+c \\
& a=b+c \\
& a=b+c \\
& a=b+c
\end{align}
\end{subequations}
\end{document}
谢谢
答案1
你的代码有点乱。有几个包重复了……
不管怎样,我很快就尝试用 alphalph 和 etoolbox 来修复。
尝试这个:
\documentclass {article}
\usepackage[T1,T5]{fontenc}
\usepackage[cp1252]{inputenc}%%%lemme convince you to use utf8 here...
\usepackage[swedish,english]{babel}
\usepackage{amsthm, latexsym, amsfonts,amssymb, psfrag,balance,arydshln, bbold, pgfplots, epstopdf, dsfont}
\usepackage[cmex10]{amsmath}
\usepackage{graphicx, rotating, mempatch, ifdraft, color, enumitem, verbatim, gensymb, enumerate, epsfig, hhline}
\usepackage{textcomp, acronym, cleveref, xr, nomencl, url, paralist, bm, glossaries, algorithmic, pgfplots}
\usepackage{bibentry, nameref, booktabs, cite, multirow, framed, lipsum}
\usepackage{subcaption, capt-of, makecell, appendix, pgfplotstable, mathtools, xcolor, alphalph,etoolbox}
\usepackage[none]{hyphenat}
\usepackage{tikz}
%%
%% I don't remember from where i got this
%% probably from Werner user
%%
\usepackage{alphalph}
\usepackage{etoolbox}
\newcommand{\alphalphval}[1]{\alphalph{\value{#1}}}
\AtBeginDocument{%
\AtBeginEnvironment{subequations}{%
\let\alph\alphalphval%
}
}
%%
%% Probable Werner's code.
%% Who knows please provide link here.
%%
\allowdisplaybreaks
\begin{document}
\section{section 1}
\begin{subequations}\label{equation1}
\begin{align}
& a=b+c \\
& a=b+c \\
& a=b+c \\
& a=b+c \\
& a=b+c \\
& a=b+c \\
& a=b+c \\
& a=b+c \\
& a=b+c \\
& a=b+c \\
& a=b+c \\
& a=b+c \\
& a=b+c \\
& a=b+c \\
& a=b+c \\
& a=b+c \\
& a=b+c \\
& a=b+c \\
& a=b+c \\
& a=b+c \\
& a=b+c \\
& a=b+c \\
& a=b+c \\
& a=b+c \\
& a=b+c \\
& a=b+c \\
& a=b+c
\end{align}
\end{subequations}
\end{document}
答案2
仅仅加载中该alphalph
软件包还不够。您还需要在之后\begin{subequations}
和之前提供以下说明\begin{align}
:
\renewcommand{\theequation}{\theparentequation \alphalph{\value{equation}}}
完整的 MWE:
\documentclass{article}
\usepackage[T1,T5]{fontenc}
\usepackage[cmex10]{amsmath}
\allowdisplaybreaks
\usepackage[cp1252]{inputenc} % why not 'utf8'?
\usepackage{alphalph}
\begin{document}
\begin{subequations}
\label{equation1}
\renewcommand{\theequation}{\theparentequation\alphalph{\value{equation}}}
\begin{align}
& a=b+c \\
& a=b+c \\
& a=b+c \\
& a=b+c \\
& a=b+c \\
& a=b+c \\
& a=b+c \\
& a=b+c \\
& a=b+c \\
& a=b+c \\
& a=b+c \\
& a=b+c \\
& a=b+c \\
& a=b+c \\
& a=b+c \\
& a=b+c \\
& a=b+c \\
& a=b+c \\
& a=b+c \\
& a=b+c \\
& a=b+c \\
& a=b+c \\
& a=b+c \\
& a=b+c \\
& a=b+c \\
& a=b+c \\
& a=b+c
\end{align}
\end{subequations}
\end{document}