1

I need to write a document using the dgruyter template. When I include an algorithm environment I get the following error.

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.

MWE:

\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}

An overleaf project with the files can be found here: https://www.overleaf.com/read/gnrtmsvxbsgt

1 Answer 1

4

Sigh, you should moan to the publishers, they should fix this

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

discusses several errors in this file including this one.

This works

\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}
7
  • 1
    The package still has \p@=1bp\relax after all these years and multiple reports so it basically breaks latex arithmetic. Sep 24, 2023 at 20:49
  • 1
    I once complained about that. Answer: "Most LaTeX experts say that's OK."
    – campa
    Sep 24, 2023 at 20:52
  • 1
    I have complained more than once and I didn't say it was OK:-) @campa Sep 24, 2023 at 20:54
  • It seems not OK if it breaks a basic package :'( I'll try to find out where to file a bug report. And thank you very much! Sep 24, 2023 at 20:59
  • @AlexbGoode the 1bp thing isn't the cause of this error, but it does break \includegraphics, tabularx, .... Sep 24, 2023 at 22:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .