使用 dgruyter.sty 算法环境时控制序列未定义

使用 dgruyter.sty 算法环境时控制序列未定义

我需要使用 dgruyter 模板编写文档。当我包含算法环境时,我收到以下错误。

Undefined control sequence.

<write> ...\protect \numberline {\plist@algorithm 
                                                  1}{\ignorespaces Alg\relax... l.32 \end{document}
                    The control sequence at the end of the top line of your error message was never \def'ed. If you have misspelled it (e.g.,
`\hobx'), type `I' and the correct spelling (e.g., `I\hbox').
Otherwise just continue, and I'll forget about whatever was undefined.

梅威瑟:

\documentclass[USenglish]{article}  

\usepackage[big,online]{dgruyter}

\usepackage{algorithm,algpseudocode}

\begin{document}
    
\begin{algorithm}[t]
\caption{Alg}
\begin{algorithmic}[1]
    \State Test
\end{algorithmic}
\end{algorithm}

\end{document}

包含文件的 overleaf 项目可在此处找到:https://www.overleaf.com/read/gnrtmsvxbsgt

答案1

唉,你应该向出版商抱怨,他们应该解决这个问题

https://cs.uwaterloo.ca/twiki/view/CrySP/LaTeXSnippets

讨论了该文件中的几个错误,包括这个。

这有效

\documentclass[USenglish]{article}  

\usepackage[big,online]{dgruyter}

\usepackage{algorithm,algpseudocode}
\makeatletter
\def\plist@algorithm{Alg.\space}
\makeatother
\begin{document}
    
\begin{algorithm}[t]
\caption{Alg}
\begin{algorithmic}[1]
    \State Test
\end{algorithmic}
\end{algorithm}

\end{document}

相关内容