I am using Debian 10 and Lyx 2.3.2. In my thesis (2002) I used the algolyx package and it worked fine in 2002. But I have been updating my thesis to fix a few things (a bad idea i know) and in the updated version most of my algorithms printed properly but a few failed for reasons I do not understand. I seems like a Lyx or Latex error due to using upgraded Lyx/Latex software since I haven't changed the lyx code or latex code (not necessarily true of course but not the issue here anyway).
Rather than track this issue down I decided to use the enumitem package and rewrite the algorithms that Lyx/Latex could no longer handle. Unfortunately, this also failed because of what appeared to be a bug in the enumitem package. So I emailed the enumitem package maintainer with a sample piece of latex code generated by Lyx demonstrating the bug. (Lesson learned: Do not use Lyx to generate latex code demonstrating a bug in Latex.) Anyway the maintainer determined that there was a '\noindent' in the latex code that shouldn't be there and removing it solved the problem. So the problem is not a enumitem package bug! Alas, I do not know why Lyx added the '\noindent' code. I did not tell it to do so and so now I (foolishly?) assume I have found a Lyx bug! Can anyone tell me if this is a Lyx bug and if not then how do I get Lyx to not add the 'offending \noindent' code? I have attached the problematic Lyx file and the pdflatex tex file generated from it containing the 'noindent' code. While I'm here i'd like to point out that when I run Lyx on this file (and most other Lyx files) I get the message: 'step: Counter does not exist: enum' many times. If anyone can shed light on why I get this message that would me most helpful. Thanks for any help received. Ralph Boland rpbol...@gmail.com
enumItemBug.lyx
Description: application/lyx
%% LyX 2.3.2 created this file. For more info, see http://www.lyx.org/. %% Do not edit unless you really know what you are doing. \documentclass[12pt,oneside,english]{amsart} \usepackage[T1]{fontenc} \usepackage{geometry} \geometry{verbose,tmargin=0.3in,bmargin=0.5in,lmargin=1in,rmargin=1in} \usepackage{amsthm} \usepackage{amssymb} \usepackage{stmaryrd} \makeatletter %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands. \numberwithin{equation}{section} \numberwithin{figure}{section} \usepackage{changepage} \usepackage{enumitem} \newlist{algnum}{enumerate}{6} \setlist[algnum]{leftmargin=*} \setlist[algnum,1]{label=\arabic*:} \setlist[algnum,2]{label=\arabic*:,itemindent=-20pt} \setlist[algnum,3]{label=\arabic*:,itemindent=-30pt} \setlist[algnum,4]{label=\arabic*:,itemindent=-30pt} \setlist[algnum,5]{label=\arabic*:,itemindent=-30pt} \setlist[algnum,6]{label=\arabic*:,itemindent=-30pt} \newlist{algnum2}{enumerate}{6} \setlist[algnum2]{leftmargin=*} \setlist[algnum2,1]{label=\arabic*:} \setlist[algnum2,2]{label=\arabic*:,itemindent=-20pt} \setlist[algnum2,3]{label=\arabic*:,itemindent=-70pt} \setlist[algnum2,4]{label=\arabic*:,itemindent=-30pt} \setlist[algnum2,5]{label=\arabic*:,itemindent=-30pt} \setlist[algnum2,6]{label=\arabic*:,itemindent=-30pt} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands. \pagenumbering{gobble} \makeatother \usepackage{babel} \begin{document} \title{Enumitem Package itemindent Bug} \maketitle First the algnum list: \begin{algnum}{} \item If a then b \item \textbf{\emph{do~}} \begin{algnum}{} \item \noindent \textbf{if} \emph{c = d }\textbf{then} $\,\,$return B. \item does this line also add a \textbackslash noindent? \begin{algnum}{} \item \textbf{\emph{done}} \begin{algnum}{} \item junk \begin{algnum}{} \item deeper junk \begin{algnum}{} \item crazy deep \end{algnum} \end{algnum} \end{algnum} \end{algnum} \end{algnum} \item junk \end{algnum} End of algnum list. ~ Second the algnum2 list: \begin{algnum2}{} \item If a then b \item \textbf{\emph{do}} \begin{algnum2}{} \item \noindent \textbf{if} \emph{c = d }\textbf{then} $\,\,$return B \begin{algnum2}{} \item \textbf{\emph{done}} \begin{algnum2}{} \item junk \begin{algnum2}{} \item deeper junk \begin{algnum2}{} \item crazy deep \end{algnum2} \end{algnum2} \end{algnum2} \end{algnum2} \end{algnum2} \item junk \end{algnum2} End of algnum2 list \begin{description} \item [{~}]~ \item [{~}]~ \item [{~}]~ \item [{Bug~1}] indentation level 3 ignores the setting on how much to indent. Note that the algnum list and algnum2 list are the same except for differing in the amount of level 3 indentation. Yet the pdf shows the same amount of indentation. In my document where I discovered this bug I need level 3 indentation (and also 1 and 2) to work. \end{description} \end{document}
-- lyx-users mailing list lyx-users@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-users