You can test if the first character of a paragraph is a quatation mark with
#show par: it =>{
if not it.body.has("children") or it.body.children.first().func() != smartquote {
return it
}
// else
}
the trickier part is how to indent the lines not caught by the above to the left. Simply adding set par(first-line-indent: <len>) does not work, see the explanation by @Andrew here: Is it possible to have a function in set rule that are inside a show rule? - #7 by Andrew
Luckily, @bluss in the same thread has a workaround: Is it possible to have a function in set rule that are inside a show rule? - #16 by bluss
which we can adapt:
#show par: it => {
if not it.body.has("children") or it.body.children.first().func() != smartquote {
return it
}
context {
let len = measure("\"").width
let fields = it.fields()
let fli = fields.remove("first-line-indent")
let body = fields.remove("body")
if fli.amount == -len {
return it
}
par(
..fields,
first-line-indent: (
amount: -len,
all: true,
),
body
)
}
}