chrmatt / algpseudocodex

LaTeX package for typesetting pseudocode.
38 stars 2 forks source link

problem using algpseudocodex when breqn is loaded #18

Open nasser1 opened 1 year ago

nasser1 commented 1 year ago

Fyi;

I found a problem using algpseudocodex package with breqn package. I asked about at lualatex-compile-error-when-using-an-option-with-algpseudocodex-package-with-bre

May be there is a way to fix this?

Here is the content of the question from above

On latest TL 2023, this MWE below gives error

\documentclass[12pt]{article}

\usepackage{amsmath} 
\usepackage{breqn}

\usepackage[noEnd=false]{algpseudocodex}
\usepackage{algorithm}

\begin{document}
\begin{algorithm}
\begin{algorithmic}[0]
\Procedure{A}{x}
\State do something
\EndProcedure
\end{algorithmic}
\end{algorithm}

\end{document}

compiling with lualatex gives

/usr/local/texlive/2023/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg))

! LaTeX Error: \begin{varwidth} on input line 14 ended by \end{list}.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.15 \end{algorithmic}

? 

By changing the line \usepackage[noEnd=false]{algpseudocodex} to \usepackage[noEnd=true]{algpseudocodex} now it compiles with no error!

This only happens when breqn package is loaded. If I remove breqn package then both options compile with no error. But I have to use breqn package.

Is there a way to make it work with noEnd=false option and also use breqn package?