Skip to content

Instantly share code, notes, and snippets.

@lf-araujo
Last active March 31, 2019 10:39
Show Gist options
  • Select an option

  • Save lf-araujo/a93e5f927acb025efd81baed29a372d3 to your computer and use it in GitHub Desktop.

Select an option

Save lf-araujo/a93e5f927acb025efd81baed29a372d3 to your computer and use it in GitHub Desktop.
Acronyms Addon for Mighty_Make

In large documents it is often useful to have a page reserved for the list of acronyms. I've tried several approaches to this and after a discussion at pandoc-discuss the following solution was suggested. The author suggested the use of the package acronyms, but I found it easier to work with the package acro.

It will look like:

![]( /images/Captura de tela de 2017-12-26 20-22-44.png )

This solution comes in the form of a mighty_make theme. The steps to get this going is to download mighty_make's testing branch:

wget http://tiny.cc/mighty_test -O Makefile

Then adding the theme and the dependencies (panflute) with:

make fetch THEME="https://github.com/lf-araujo/pandoc-acronyms"
sudo apt install python-pip
pip install panflute

In the yaml metadata the following should be added:

---
acronyms: yes
---

In the body of your document the syntax to follow is: [WHO](acro "World Health Organization") will include a line in the Acronyms page with World Health Organization. Whenever you want to refer to WHO again in the body, you should use [WHO](acro). You can use this syntax as many times as needed, you can even reorganize the contents of your text (like move one chapter up the document) and the tool will detect this change and expand WHO only in the first time it appears in the document.

Finally, include the following where you want to add the list of acronyms in your document:

\newpage 
\printacronyms
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment