Hi Typst community!
I can use @bohnsack2013handbuchprint[p.~213] and “p. 213” will always be on the same page. But I have a custom cite command to also support a prefix (and optionally also a suffix).
#let settings = (citation-style: "apa",)
#let pre-cite(..args, prefix: none, suffix: none) = {
// If no prefix or suffix, call standard cite and stop.
if prefix == none and suffix == none {
cite(..args)
} else {
"("
// Optional Prefix: Removed the invalid # before 'if'
if prefix != none {
prefix
}
// The standard citation output: Removed the invalid # before 'cite'
cite(..args, form: "author")
", "
cite(..args, form: "year")
// Optional Suffix: Removed the invalid # before 'if'
if suffix != none {
", " + suffix
}
")"
}
}
#let cf = pre-cite.with(prefix: "cf. ")
2 problems with that approach
- Now I can use
#cf(<deckerernst2018>, suffix: "pp. 23-25")to nearly achieve the desired result: “(cf. Decker-Ernst, 2018, pp. 23-25)”. But If the “pp. 23-25” is at the end of the line, it may break into “pp.” on the end of the line and “23-25” on the next line - that’s not what I want. But it seems that I can also not include “~” because it’s simply printed in the resulting PDF.
I understand that there is currently no@deckerernst2018[prefix][suffix]but this would be really helpful here
- For normal citations, I can combine multiple
@entry1 @entry2 @entry3to result in a proper citation in text. If I use my custom#cf(<deckerernst2018>, suffix: "pp. 23-25"), I don’t find a way to add multiple other bibliography entries (easily). Currently, I am using a very cumbersome and hacky solution(cf. #cite(<Przyborski.2021>, form: "author"), #cite(<Przyborski.2021>, form: "year", style: "iso-690-author-date"); #cite(<Bohnsack2014>, form: "author"), #cite(<Bohnsack2014>, form: "year"); #cite(<Nohl.2017>, form: "author"), #cite(<Nohl.2017>, form: "year"))to achieve “(vgl. Przyborski & Wohlrab-Sahr, 2021; Bohnsack, 2014; Nohl, 2017)”.
Do you have any idea how to fix that situation?