Hi,

I've been playing with LyX lately. I can say that I am impressed! It has much improved since the last time I looked at it, 6 years ago. It really looks as a nice alternative to writing painful plain LaTeX by hand.

Now, I have possibly found a little problem. I can't figure out if I missed some workaround in the documentation or if it is an "undocumented feature" (i.e. a bug that I should submit in the bug tracker). When I write using LyX 1.5.5 on OSX 10.15.3:

Some text followed by an itemized list:

   * Some item.
   * Another item.

Then some text that follows.

LyX generates the following LaTeX code:

Some text followed by an itemized list:

\begin{itemize}
\item Some item.
\item Another item.
\end{itemize}
Then some text that follows.

Why does LyX generate a blank line between "list:" and "\begin{itemize}"? I have not been able to prevent LyX from doing so. Yes, it does make a small difference in the output, that you might not have noticed. It becomes more visible when you play with spacing (e.g. \tightlists when using a memoir class). To get the itemized list to be considered as part of the preceding paragraph, I came up with the following ugly workarounds:

  1. don't use LyX lists at all; instead, write all of
     "\[begin|item|end]" commands as embedded TeX (ERT), or
  2. use the verbatim package to add multi-line comments using ERT:
     "... list:[[ \begin{comment}]]
         * [[\end{comment} \begin{itemize} \item]] Some item.
         * Another Item.
     Then..."

Of course, neither is satisfactory. This is quite annoying, as lists are rather common in my texts. Have I missed something? How hard would it be for me to change whatever template LyX uses to generate the list header (I know programming, but I am not a LyX/TeX/LaTeX expert)? Should I file a bug report about this?

Etienne
P.S. Note that LyX seems quite inconsistent in putting a blank line before the item list, but not after it! As it is quite easy to add a blank line using ERT, maybe LyX shouldn't add a blank line, neither above nor below the list?

--
Etienne M. Gagnon, Ph.D.
SableCC:                                            http://sablecc.org
SableVM:                                            http://sablevm.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to