rchaput / acronyms

Adds support for Acronyms, and List of Acronyms, to Quarto documents.
GNU General Public License v3.0
20 stars 2 forks source link

Acronyms: List of Acronyms support for Quarto documents

Author: rchaput rchaput.pro@gmail.com

GitHub License GitHub Latest Release GitHub Release Date Documentation Status Automatic tests Status

Description

This Quarto extension adds the ability to automatically handle acronyms inside Quarto (qmd) documents.

Throughout the document, acronyms are replaced by either their short name, or their long name, depending on whether they appear for the first time. They also may be linked to their corresponding definition in an automatically generated List of Acronyms, so that readers can access the definition in one click.

It is based on the previous Acronymsdown package, which provided the same features, but for RMarkdown documents.

Example of acronyms document

:fire: Now with the Quarto shortcode syntax!

Features

Installation

In a terminal, in the same directory as your Quarto document (or project), enter the following command:

quarto add rchaput/acronyms@master

This will automatically install the latest version from GitHub into your _extensions/ folder. (You may also specify a version tag instead of master; see the list of releases). Then, in your Quarto document (or project configuration), add the following lines to your YAML metadata:

---
filters:
  - acronyms
---

If you already have a filters: block, simply add the - acronyms line at the end of the list.

Usage

Using this package requires 2 simple steps:

  1. Define your acronyms in the YAML metadata.
---
acronyms:
  keys:
    - shortname: qmd
      longname: Quarto documents
    - shortname: YAML
      longname: YAML Ain't Markup Language
---
  1. Use your acronyms in your qmd document. You may use the older syntax with the \acr{KEY} special command:

\acr{qmd} can be used to write technical content. \acr{qmd} use \acr{YAML}.

or the newer shortcode syntax {{{< acr KEY >}}}:

{{{< acr qmd >}}} can be used to write technical content. {{{< acr qmd >}}} use {{{< acr YAML >}}}.

Both syntaxes render as (using default options):

Quarto documents can be used to write technical content. qmd use YAML Ain't Markup Language.

Credits

This package was inspired from: