I am using LyX to answer questions for an assignment. Specifically, I am using the numbered list tool to number my answers. Some of the answers are quite long and go over multiple paragraphs, so I am using the following method to have multiple paragraphs inside a single numbered item:

  1. Click the "numbered list" button.
  2. Type first the paragraph.
  3. Hit return to start a new paragraph. This automatically starts a new numbered item.
  4. Type the second paragraph.
  5. Click the "default" button next to the "numbered list" button, or change the type to standard. This removes the undesired number from the start of the paragraph and indents the first line, but the entire paragraph is unaligned with the first paragraph.
  6. Hit tab, or hit alt+shift+right, or click the "increase depth" button. This aligns the second paragraph with the first, but removes the indent from the first line.

The result of the above steps looks likes this:

1. This is the first paragraph.
   This is the second paragraph,
   here it is wrapped around,
   and wrapped around some more.

This is what I would like it to look like:

1. This is the first paragraph.
      This is the second paragraph,
   here it is wrapped around,
   and wrapped around some more.

I can achieve the desired result by hitting ctrl+space a couple times before each new paragraph, but would like a better (less duplication of effort) method. This is similar to this question, except that I want indentation inside the list, not after. At the time of posting, the other question has no accepted solution.

Note that this requirement is self-imposed purely to make for easy reading. Alternative suggestions to the same end will also be appreciated!

EDIT: The tex source, copied and pasted:

\item This is a paragraph.

This is another paragraph.\end{enumerate}


Running through pdf-latex gives the original result, i.e. no first-line indentation.

  • By the way, I am using LyX version on Ubunbtu 10.04 (Old,I know, but so is my laptop) – Phil Bosmn Sep 18 '13 at 15:37

Within LaTeX's default list environments, paragraphs have no indent. The definition of \list from the LaTeX kernel identifies this:

  \ifnum \@listdepth >5\relax
  \listparindent\z@% <------------------ No \listparindent
  \csname @list\romannumeral\the\@listdepth\endcsname
  \parindent\listparindent% <----------- No \parindent
  \advance\linewidth -\rightmargin
  \advance\linewidth -\leftmargin
  \advance\@totalleftmargin \leftmargin
  \parshape \@ne \@totalleftmargin \linewidth

So you either have to insert this manually via an ERT that contains \hspace*{20pt} (where 20pt is the default \parindent) or "fix" \list to not set this value to zero (\z@) via an etoolbox patch:

\usepackage{etoolbox}% http://ctan.org/pkg/etoolbox
% \patchcmd{<cmd>}{<search>}{<replace>}{<success>}{<failure>}

Include the above in your LaTeX preamble.

enter image description here

\usepackage{lipsum,etoolbox}% http://ctan.org/pkg/{lipsum,etoolbox}
  \item \lipsum[1-2]

| improve this answer | |

When you set paragraph separation or indentation for normal text in Lyx, in the non editable preamble is writed some like:




In plain LaTeX you can simple insert similar commands in the enumerate environment, but before of the first item, to obtain what you want.

In LyX this is not possible, but you can edit the preamble to redefine the enumerate environment to include indentation, paragraph separations or another modifications as color:



% paragraph settings  

% redefined enumerate 

\item \lipsum[1]\lipsum[2]
\item \lipsum[3]
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.