使用 \MakeLowercase 与 fmtcount 命令时出错

使用 \MakeLowercase 与 fmtcount 命令时出错

当我尝试使用\MakeLowercasefmtcount的不同数字格式命令时,我遇到了各种错误。我主要想摆脱 的第一个版本中的错误消息\printpartnum,但也希望得到有关其他版本的帮助。

\documentclass{memoir}
\usepackage{fmtcount}
\renewcommand*{\partnumfont}{\MakeLowercase}

\renewcommand*{\printpartnum}{\partnumfont \ordinalstringnum{\thepart}}
% TeX STOPPED: Incomplete \ifx; all text was ignored after line 9.

% \renewcommand*{\printpartnum}{\partnumfont \ordinalstring{part}}
% c:\texlive\2021\texmf-dist\tex\latex\memoir\memoir.cls:9: You can't use `\relax' after \the. [  \part{Title}]
% c:\texlive\2021\texmf-dist\tex\latex\memoir\memoir.cls:9: Paragraph ended before \@skipmath was complete. [  \part{Title}]

% \renewcommand*{\printpartnum}{\partnumfont \numberstringnum{\thepart}}
% c:\texlive\2021\texmf-dist\tex\latex\memoir\memoir.cls:9: Missing number, treated as zero. [  \part{Title}]
% c:\texlive\2021\texmf-dist\tex\latex\memoir\memoir.cls:9: Missing = inserted for \ifnum. [  \part{Title}]
% c:\texlive\2021\texmf-dist\tex\latex\memoir\memoir.cls:9: Missing number, treated as zero. [  \part{Title}]
% c:\texlive\2021\texmf-dist\tex\latex\memoir\memoir.cls:9: Missing number, treated as zero. [  \part{Title}]
% c:\texlive\2021\texmf-dist\tex\latex\memoir\memoir.cls:9: Missing = inserted for \ifnum. [  \part{Title}]
% c:\texlive\2021\texmf-dist\tex\latex\memoir\memoir.cls:9: Missing number, treated as zero. [  \part{Title}]
% TeX STOPPED: Incomplete \ifx; all text was ignored after line 9.

% \renewcommand*{\printpartnum}{\partnumfont \numberstring{part}}
% c:\texlive\2021\texmf-dist\tex\latex\memoir\memoir.cls:19: You can't use `\relax' after \the. [  \part{Title}]
% c:\texlive\2021\texmf-dist\tex\latex\memoir\memoir.cls:19: Paragraph ended before \@skipmath was complete. [  \part{Title}]
\begin{document}
  \part{Title}
\end{document}

答案1

命令\MakeLowercase不是字体更改命令:它接受一个参数并尝试对其进行完全扩展。

您传递的第一个代码\ordinalstringnum\MakeLowercase没有意义的。

第二次尝试也有同样的缺陷:

\renewcommand*{\printpartnum}{\partnumfont \ordinalstring{part}}

您再次传递\ordinalstring\MakeLowercase这是错误的。

你只需要做

\renewcommand{\printpartnum}{\ordinalstring{part}}

在此处输入图片描述

相关内容