How can I control paragraph parameters within a quote?

Here is an MWE in which there are 3 consecutive short quotes. What I want is to have them separated from preceding and following text by a single line, with each quote having standard paragraph spacing, but with no first line indent. I have managed to achieve this using the following code:

#set page(width: 7cm, height: auto)
#set par(first-line-indent: 1em, spacing: 0.5em, justify: false)

#set quote(block: true)

#lorem(20)
#block(spacing: 1em)[
#set par(first-line-indent: 0em)
#quote[Man cannot live by bread alone.

What goes up must come down.

Fools rush in where angels fear to tread.]
]
#set par(first-line-indent: 1em)
#lorem(20)

However that seems to me a rather kludgy work-around. I have failed completely to find a way to set the spacing and first-line-indent parameters within the #set(quote) rule, or create a show-set rule for either quote or block as spacing is not an argument of quote and par is not an argument of either. I’m afraid I have found the examples in the tutorial and the reference docs to have been no help.

Please advise. I would rather be able to set quotes globally, rather than having to use that code for every quote I have.

:slight_smile:
Mark

#show quote: set par(first-line-indent: 0pt)
#show quote: set block(spacing: 1em)

#set page(width: 7cm, height: auto)
#set par(first-line-indent: 1em, spacing: 0.5em, justify: false)
#set quote(block: true)
#show quote: set par(first-line-indent: 0pt)
#show quote: set block(spacing: 1em)

#lorem(20)
#quote[
  Man cannot live by bread alone.

  What goes up must come down.

  Fools rush in where angels fear to tread.
]
#lorem(20)

#set page(width: 7cm, height: auto)
#set par(first-line-indent: 1em, spacing: 0.5em, justify: false)

#set quote(block: true)

#lorem(20)
#block(spacing: 1em, {
  set par(first-line-indent: 0em)
  quote[
    Man cannot live by bread alone.

    What goes up must come down.

    Fools rush in where angels fear to tread.
  ]
})
#set par(first-line-indent: 1em)
#lorem(20)

#show quote: set par(first-line-indent: 0pt)
#show quote: set block(spacing: 1em)

#quote[
  Man cannot live by bread alone.

  What goes up must come down.

  Fools rush in where angels fear to tread.
]

#lorem(20)

If you count leading then 1 em works, but in terms of line spacing it equals to 1.65 em. Wrong leading formatting in Paragraph · Issue #159 · typst/typst · GitHub, Proposal: change `leading` option to `line-height` · Issue #4224 · typst/typst · GitHub

1 Like

Thank you @Andrew. Every time I trid something like this:

#show quote: set par(first-line-indent: 0pt)
#show quote: set block(spacing: 1em)

I got error messages which didn’t make sense. I’ll try it in my real project and will mark it as solution when I see the result.

:slight_smile:
Mark

1 Like