2

I'm using LyX. Would it be possible to format something as "quotation" in a way in which the first paragraph doesn't get indented but the subsequent paragraphs does, like the way in which text formatted as "standard" in most classes doesn't indent first paragraphs?

I read somewhere than indentation of quotations is language specific but I've tried formatting the text as Danish, German and English with the same result.

1
  • Have you tried using \noindent? I don't know if it's possible to write it on LyX, nor if it's possible to set a macro using it for the first paragraph. Apr 23, 2013 at 9:59

1 Answer 1

2

My quoting package provides a consolidated environment for displayed text with control over first-line indentation. Without LyX, one simply doesn't add a blank line before the start of the environment and hereby prevents indentation:

\documentclass{article}

\usepackage{quoting}

\newcommand*{\sometext}{Hello, here is some text without a meaning. This
    text should show, how a printed text will look like at this place.
    If you read this text, you will get no information.}

\begin{document}

\sometext
% <-- No indentation of first `quoting` line
\begin{quoting}
\sometext

\sometext
\end{quoting}

\sometext

\end{document}

With LyX it may be difficult to avoid "blank lines", but you may use the indentfirst=false option when adding the package to your LaTeX preamble:

\documentclass{article}

\usepackage[indentfirst=false]{quoting}

\newcommand*{\sometext}{Hello, here is some text without a meaning. This
    text should show, how a printed text will look like at this place.
    If you read this text, you will get no information.}

\begin{document}

\sometext

\begin{quoting}
\sometext

\sometext
\end{quoting}

\sometext

\end{document}

Output for both examples:

enter image description here

14
  • Thanks for answering. I tried adding '\usepackage[indentfirst=false]{quoting}' to the LaTeX preamble via the LyX settings but that doesn't change anything. Should I add anything else? Apr 23, 2013 at 11:24
  • @Andreas I'm afraid that you'll also have to add \begin{quoting} and \end{quoting} at the appropriate locations in the document body (as LaTeX code/"evil red text").
    – lockstep
    Apr 23, 2013 at 11:28
  • @Andreas I'm not familiar with LyX, but it may be possible to add a new environment (here: quoting) to the ones available with the LyX interface.
    – lockstep
    Apr 23, 2013 at 11:30
  • 1
    @Andreas Sure. :-) \usepackage[indentfirst=false,font=small]{quoting}
    – lockstep
    Apr 23, 2013 at 12:04
  • 2
    @lockstep and Andreas: Regarding "I'm not familiar with LyX, but it may be possible to add a new environment". Yes, it's pretty easy but does require some reading. What you would want to do is make a module. See Help > Customization > 5.2 Types of layout files and 5.3 The layout file format. There are many examples to go off of.
    – scottkosty
    Apr 23, 2013 at 18:39

You must log in to answer this question.

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