Package: pandoc-acro
This filter provides a means to manage acronyms inPandocflavored
Markdown sources.  It aims to do for Pandoc what theacropackage
does for LaTeX.  As such, it’s initial goal is to translate marked
acronyms into the appropriateacroLaTeX macros.  It does this by
extracting acronym definitions in the metadataacronymsmap and
looking for keys in the main text that begin with a ‘+’ such as+afaik.  The keys can be normal string words or they can use thenative spansyntax to override the local formatting.  For details,
see theUsagesection below.InstallationTo install, download the source and runpython setup.py installfrom
the top of the source tree.  Then passpandoc-acroas a filter toPandoce.g.pandoc-Fpandoc-acroinput.mdUsageAcronym DefinitionsTo define an acronym, place it in theacronymsmap in the metadata.
The syntax is designed to replicate that used by the LaTeXacropackage.  Each acronym must define alongandshortform.
Beyond the minimum, each acronym can define:short-plural: The plural ending of the short form.
Defaults to ‘s’.long-plural: The plural ending of the long form.
Defaults to ‘s’.An example metadata block would be:---acronyms:afaik:short:AFAIKlong:as far as I knowlol:short:lollong:laugh out loudshort-plural:es# Contrived for example purposeslong-plural:es# Contrived for example purposes...The only reserved acronym isoptionswhich is reserved for passing
additional options to the\acsetupmacro in LaTeX.  The options are
translated to the formkey=valueand are passed as a comma separated
option to\acsetup.  The filter will try to sanity check the
options.  If it cannot convert the option to a string or boolean, the
option is skipped and a warning is issued.  If it is a known option used
by the filter, it checks for a valid value and issues a warning if it is
not valid but it still passes the option to\acsetup.Inline UsageThe simplest usage in text is to prepend a key with ‘+’ such as+afaik.  This will expand to thelongform followed by theshortinside parentheses on first usage and by theshortform on
subsequent use.  The aim is to replicate the behavior of theacropackage from LaTeX.  The default behavior can be overridden by placing
the key in a span and specifying theshort,long, orfullclass.  To get the plural form, set thepluralclass in the span,
and to set the initial capitalization usecaps.  To be clear, the
mapping is:MarkdownLaTeXExpanded text+afaik\ac{afaik}as far as I know (AFAIK)+afaik\ac{afaik}AFAIK[+afaik]{.short}\acs{afaik}AFAIK[+afaik]{.short.plural}\acsp{afaik}AFAIKs[+afaik]{.long}\acl{afaik}as far as I know[+afaik]{.long.plural}\aclp{afaik}as far as I knows[+afaik]{.full}\acf{afaik}as far as I know (AFAIK)[+afaik]{.full.plural}\acfp{afaik}as far as I knows (AFAIKs)[+afaik]{.short.caps}\Acs{afaik}AFAIK[+afaik]{.short.plural .caps}\Acsp{afaik}AFAIKs[+afaik]{.long.caps}\Acl{afaik}As far as I know[+afaik]{.long.plural .caps}\Aclp{afaik}As far as I knows[+afaik]{.full.caps}\Acf{afaik}As far as I know (AFAIK)[+afaik]{.full.plural .caps}\Acfp{afaik}As far as I knows (AFAIKs)Additionally, one can specify the acronym with*after the+.
This sets the “starred” version of the LaTeX macro.  In the LaTeX
output, this places a*after the macro but before the opening{.  Per theacrodocumentation, this indicates “don’t count as
usage.”  Therefore, in the plain text output the rules are:Every usage respects the “full,” “short,” or “long” designation.Usages before the first one that “counts” are expanded to the full
form by default.The first usage that “counts” is respected as the first usage and
expanded as full by default.All usages after the first usage are expanded to the short form by
default.List of AcronymsA list of acronyms used can be generated by placing a div or header with
the idacronymsin the desired location::: {#acronyms}
:::orlast paragraph…

# AcronymsThis syntax mimics that used by Pandoc to place the bibliography;
however, the list of acronyms is not printed by default.In the LaTeX output, the div or header is replaced with\printacronymswith the following options:name: The text of the header (header version only).sort: The value of thesortattribute (trueorfalse) indicating if the acronyms should be sorted.level: The desired section level for the title (plain text
output for div version only).In the plain text output, the div or header is replaced with a bulleted
list of acronyms in thedescriptionstyle ofacro.  For the
header style, the list is placed under a heading of the appropriate
level using the header’s text.  For the div style, the list is created
under a new level 1 header with the text “Acronyms.”  The list is sorted
(default) or not based on thesortattribute of the div or header.Full and Single Use FormsTheacropackage accepts thefirst-styleoption which sets the
form of the first and full usages of an acronym.  The valid options are:long-short(default),short-long,long,short, andfootnote.  For the LaTeX output, this option is passed to\acsetup.  For all other outputs, the filter respects the
selected style except forfootnotewhich is not supported.The default behavior is to typeset a single use of an acronym using the
first usage.  However, this can be changed using thesingleoption.
Setting this to true typesets a single usage using the style passed to
thesingle-styleoption which accepts the same styles asfirst-stylebut defaults tolong.  The single option can also be
set to an integer which sets the number of non-starred times an acronym
must be used before it is considered a “single” use.  If the use goes
above this value, the first typesetting reverts to the usual method.
Settingsingle=trueis equivalent tosingle=1.Output Format NotesLaTeXThe acronyms definitions in the metadata are transformed to\DeclareAcronymcommands and are added to theheader-includesmetadata field after\usepackage{acro}and the\acsetupcommand.
These are entered as raw LaTeX Inlines.  The running text markup is
translated to the appropriateacromacro as described in the above
table.