答案1
您可以輕鬆地調整其定義\alph
,如下所示latex.ltx
:
\def\alph#1{\expandafter\@alph\csname c@#1\endcsname}
\def\@alph#1{%
\ifcase#1\or a\or b\or c\or d\or e\or f\or g\or h\or i\or j\or
k\or l\or m\or n\or o\or p\or q\or r\or s\or t\or u\or v\or w\or x\or
y\or z\else\@ctrerr\fi}
這是自訂序列的 MWE。
\documentclass{article}
\makeatletter
\def\mysequence#1{\expandafter\@mysequence\csname c@#1\endcsname}
\def\@mysequence#1{%
\ifcase#1\or AAA\or BBB\or CCC\else\@ctrerr\fi}
\makeatother
\renewcommand\thesection{\mysequence{section}}
\begin{document}
\section{Section}
\section{Section}
\section{Section}
%\section{Section} % --> LaTeX Error: Counter too large
\end{document}
請注意,如果計數器值太高(在我的範例 4 中),此實作將停止工作。因此請確保定義了足夠的符號。