5 The shortcode
This chapter uses position: inline. Nothing is injected automatically — every control you see below was placed by hand, with a shortcode. It also sets navbar: false, so the book’s top navigation disappears on this page and returns to its project default in the next chapter.
5.1 Placing a block
The shortcode takes no arguments in its simplest form:
{{< cite-this >}}@misc{jordao2026shortcode,
author = {Jordão, Lucas S. B.},
title = {The shortcode},
year = {2026},
month = {aug},
howpublished = {\url{https://lsbjordao.github.io/quarto-cite-this/shortcode.html}},
url = {https://lsbjordao.github.io/quarto-cite-this/shortcode.html},
urldate = {2026-08-02},
note = {In: cite-this. Accessed: Aug. 2, 2026}
}@misc{jordao2026citethis,
author = {Jordão, Lucas S. B.},
title = {cite-this},
year = {2026},
month = {aug},
howpublished = {\url{https://lsbjordao.github.io/quarto-cite-this/}},
url = {https://lsbjordao.github.io/quarto-cite-this/},
urldate = {2026-08-02},
note = {Accessed: Aug. 2, 2026}
}Unlike the injected positions, the inline block never collapses. In the body of your text it is content, not a trigger — hiding it would defeat the reason you placed it there.
5.2 Choosing the scope
Pass page or work to fix a single scope:
{{< cite-this work >}}@misc{jordao2026shortcode,
author = {Jordão, Lucas S. B.},
title = {The shortcode},
year = {2026},
month = {aug},
howpublished = {\url{https://lsbjordao.github.io/quarto-cite-this/shortcode.html}},
url = {https://lsbjordao.github.io/quarto-cite-this/shortcode.html},
urldate = {2026-08-02},
note = {In: cite-this. Accessed: Aug. 2, 2026}
}@misc{jordao2026citethis,
author = {Jordão, Lucas S. B.},
title = {cite-this},
year = {2026},
month = {aug},
howpublished = {\url{https://lsbjordao.github.io/quarto-cite-this/}},
url = {https://lsbjordao.github.io/quarto-cite-this/},
urldate = {2026-08-02},
note = {Accessed: Aug. 2, 2026}
}5.3 Choosing the style
style= overrides the default for that block alone, which is useful when a page discusses a specific style:
{{< cite-this page style=ieee >}}@misc{jordao2026shortcode,
author = {Jordão, Lucas S. B.},
title = {The shortcode},
year = {2026},
month = {aug},
howpublished = {\url{https://lsbjordao.github.io/quarto-cite-this/shortcode.html}},
url = {https://lsbjordao.github.io/quarto-cite-this/shortcode.html},
urldate = {2026-08-02},
note = {In: cite-this. Accessed: Aug. 2, 2026}
}@misc{jordao2026citethis,
author = {Jordão, Lucas S. B.},
title = {cite-this},
year = {2026},
month = {aug},
howpublished = {\url{https://lsbjordao.github.io/quarto-cite-this/}},
url = {https://lsbjordao.github.io/quarto-cite-this/},
urldate = {2026-08-02},
note = {Accessed: Aug. 2, 2026}
}5.4 Collapsing it
collapsed=true wraps the block in a <details>, closed on arrival. This is an explicit authoring choice, unrelated to the hover behaviour of the injected positions:
{{< cite-this collapsed=true >}}Cite this
@misc{jordao2026shortcode,
author = {Jordão, Lucas S. B.},
title = {The shortcode},
year = {2026},
month = {aug},
howpublished = {\url{https://lsbjordao.github.io/quarto-cite-this/shortcode.html}},
url = {https://lsbjordao.github.io/quarto-cite-this/shortcode.html},
urldate = {2026-08-02},
note = {In: cite-this. Accessed: Aug. 2, 2026}
}@misc{jordao2026citethis,
author = {Jordão, Lucas S. B.},
title = {cite-this},
year = {2026},
month = {aug},
howpublished = {\url{https://lsbjordao.github.io/quarto-cite-this/}},
url = {https://lsbjordao.github.io/quarto-cite-this/},
urldate = {2026-08-02},
note = {Accessed: Aug. 2, 2026}
}5.5 Combining with an injected position
inline is not required to use the shortcode. Any page can carry both an injected control and one or more inline blocks — the BibTeX and styles chapter does exactly that, with a floating pill and a block in the text.
Use inline when you want the citation to appear only where you decide, and nowhere else.
5.6 Other output formats
In PDF, Word and other non-HTML formats there is no widget to click. The shortcode falls back to a static block: the formatted citation followed by the BibTeX entry in a code block, so the information survives the format change.
Which formats get output at all is controlled by formats:
extensions:
cite-this:
formats: [html, pdf]Anything not listed produces nothing — no block, no injection.