1

Is it possible with LyX and without having to use ERT everytime to inhibit indentation in standard text after (short) block quotes? (similar question) When the quote environment is using a spacing environment, LyX adds a blank line and thus starts a new paragraph. I redefined the environment like this:

\let\oldquote\quote
\let\oldendquote\endquote
\renewenvironment{quote}
{\vspace{\dimexpr-12pt-\topsep+\baselineskip\relax}\begin{spacing}{1.2}\oldquote}
{\oldendquote\end{spacing}\vspace{\dimexpr-12pt-\topsep+\baselineskip\relax}}

When I use the following in the preamble, the indent after the quote becomes much smaller, but there is still one:

\let\oldquote\quote
\let\oldendquote\endquote
\renewenvironment{quote}
{\begin{spacing}{1.2}\oldquote}
{\oldendquote\end{spacing}\noindent}

Is it possible to adjust this in the preamble in order to remove the indent after every quotation?

1

2 Answers 2

1

You can use the noindentafter package. \NoIndentAfterEnv{quote} should lead to the requested behaviour.

5
  • This does not work in my case, maybe because of the adjustments in the preamble?
    – johnny7
    Jun 26, 2019 at 11:36
  • Where do you add \NoIndentAfterEnv{quote}? Before or after your adjustments? I guess it should work if you put it after your renewed definition of the quote-environment, but I can't test here...
    – Denis
    Jun 26, 2019 at 13:43
  • Also: Have you seen this question: tex.stackexchange.com/questions/23265/… Adding \par\aftergroup\@afterindentfalse\aftergroup\@afterheading to your new definition could help...
    – Denis
    Jun 26, 2019 at 13:47
  • That does indeed lead to the desired behaviour. I don't really understand this code, does it also affect other parts?
    – johnny7
    Jun 26, 2019 at 14:13
  • It shouldn't. This is basically how LaTeX suppresses indentation after heading, and it should only affect the next paragraph.
    – Denis
    Jun 26, 2019 at 14:27
1

By default, LyX do not indent any extra black line (i.e, \par) after the quote, and do not indent the following text. Is you which force this, quoting inside a spacing environment.

So yo have at least three options:

1) Keep it simple. Remove all that code of the preamble.

2) Put spacing nested inside quote, not at the inverse.

3) Do not use the spacing environment. If you want quotes with a different interline space but without too much vertical spacing after, maybe is enough for you change the \baselineskip, like here:

mwe

\documentclass{book}
\let\oldquote\quote
\let\oldendquote\endquote
\renewenvironment{quote}{%
\oldquote\baselineskip14pt%
}{%
\oldendquote}

\begin{document}
Bah bah bah bah bah bah bah bah bah 
bah bah bah bah bah bah bah bah bah
bah bah bah bah bah bah bah bah bah:
\begin{quote}
Foo foo foo. Foo foo foo. Foo foo foo. Foo foo foo. Foo foo foo. Foo foo foo. Foo foo foo. Foo foo foo. Foo foo foo. Foo foo foo. 

Foo foo foo. Foo foo foo. Foo foo foo. Foo foo foo. Foo foo foo. Foo foo foo. Foo foo foo. Foo foo foo. Foo foo foo. Foo foo foo. 
\end{quote}
Bah bah bah bah bah bah bah bah bah 
bah bah bah bah bah bah bah bah bah
bah bah bah bah bah bah bah bah bah:
\end{document}
3
  • Another simple way could be some like \def\quote{\list{}{\rightmargin100pt\leftmargin50pt\topsep0pt}\item[]\baselineskip20pt}.
    – Fran
    Jun 24, 2019 at 19:59
  • You are right, without my preamble LyX does not indent the text after blockquotes. However, I want them to have a smaller line spacing. In your example I can hardly see a difference. The third option works fine, but just for clarification, could you give me the code for the second option? This way I can control the spacing with the same unit as the main text.
    – johnny7
    Jun 26, 2019 at 11:52
  • @johnny7 Point 2 is only redefine the environment as \begin{quote}\begin{spacing} ... \end{spacing}\end{quote} instead of \begin{spacing}..\begin{quote} ... \end{quote}\end{spacing} (what you've actually triedt). But quote is really a hidden list, nearly defined as in my above comment. So first learn to make your own lists and maybe you will not need fix it with \vspace or similar tricks.
    – Fran
    Jun 26, 2019 at 18:06

You must log in to answer this question.

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