7

enter image description here

See the example above, I want to indent the second paragraph.

The generated .tex file is

%% LyX 2.0.4 created this file.  For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[english]{article}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{babel}
\begin{document}
First paragraph.
\begin{itemize}
\item item 1
\item item 2
\end{itemize}
Second paragraph.

Third paragraph.
\end{document}

Simply add a blank line after the line \end{itemize} will do what I want. But how can I do this in LyX?

One possible way is to add a box of TeX code (Evil Red Text) containing one blank line before second paragraph. But I want to know if there are ways without invoving Evil Red Text. Thanks.

11
  • add a blank line after the \end{itemize}
    – Seamus
    Aug 16, 2012 at 9:00
  • 1
    @Seamus I know I can simply add a blank line in the generated .tex file, but this is a question about LyX and I'm seeking a direct and elegant solution within LyX.
    – Tianyi Cui
    Aug 16, 2012 at 9:30
  • Hmm, moving the cursor to the start of the second paragraph and hitting enter doesn't work, it just jumps back when you move the cursor again. Might be a bug in LyX. In any case that behavior seems silly. Aug 16, 2012 at 10:52
  • Hope this work. I just add a "separator". You click in the scroll bar under File and Edit Menu... Another thing is, you need to view always the source code/tex code for you to be able to know that you are in the next paragraph.
    – jeecabz
    Aug 16, 2012 at 10:54
  • 1
    @TianyiCui There's nothing direct or elegant about LyX. Why not just join the dark side and write directly in LaTeX? With editors like TeXshop or Gummi you can get auto-updating output anyway, so why stick with LyX's awkward restrictions?
    – Seamus
    Aug 16, 2012 at 12:05

3 Answers 3

2

This works without any ERT. Redefine itemize environment as showed int the preamble of this MWE:

\documentclass[english]{article}
\let\olditemize\itemize
\renewenvironment{itemize}
{\begin{olditemize}}
{\par
\end{olditemize}
\vspace{0.7\baselineskip}
\par}

\begin{document}
First paragraph 
\begin{itemize}
\item item 1
\item item 2
\item item 3
\end{itemize}
First paragraph  

Third paragraph 
\end{document}

Change 0.7\baselineskip if you want more space after the last item.

4
  • The OP specifically asked if he could do this without an ERT. (And personally, I don't think \setlength\parindent{0pt} is a good idea, though it does at least hide the problem.) Aug 17, 2012 at 21:05
  • Torbjørn, I agreed. Change \parident is not a good idea for any real article. Insert a ERT could be not elegant but it is less problematic.
    – Fran
    Aug 17, 2012 at 22:03
  • Currently I'm using this solution: i.stack.imgur.com/7380b.png. Empty ERT in a blank paragraph, less intrusive and easier to type than ERT code.
    – Tianyi Cui
    Aug 18, 2012 at 9:44
  • I changed completely my answer because I have found the way to redefine itemize and this solve the problem without ERT.
    – Fran
    Aug 19, 2012 at 10:49
2

The solution works for all lists environments (itemize, enumerate, description) and should work as well for all other environments.

Credits go to Günter Milde who posted it in LyX users mailinglist.

2
  • In your first bullet point, does the user then need to change the layout from "itemize" (which is the result of "Start New Environment (Itemize)" to "Standard"?
    – scottkosty
    Mar 11, 2015 at 18:51
  • @scottkosty You're right. I just tested it with an itemize where already a paragraph follows. Without a following paragraph, at the first option you need to delete the new item and type an Enter to get the standard layout. So, the second option would then be the easier option.
    – Dominik
    Mar 12, 2015 at 12:59
1

to end items and go back to your normal paragraph press enter and you l be put in a new item righ? look up to the icon "implicite" next to "liste numeroté",, it looks like a paper with lines in it ,, press it and bamm ! problem solved.

1
  • Could you correct your grammar and punctuation to conform to English? It's not really clear what you mean as it stands.
    – Werner
    Jun 21, 2016 at 0:15

You must log in to answer this question.

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