Others ⇒ Acro package: Handling possessive case (apostrophe s)
-
- Posts: 42
- Joined: Tue Jul 23, 2013 6:48 pm
Acro package: Handling possessive case (apostrophe s)
Would this be trivial for someone to adapt for the acro package?
This has been posted to:
http://latex-community.org/forum/viewto ... 15&t=24989
http://tex.stackexchange.com/questions/ ... ostrophe-s
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
Acro package: Handling possessive case (apostrophe s)
Since v2.0acro
has a concept of endings. It handles the plural forms this way and allows the definition of additional endings:
This defines a lower level commandCode: Select all
\ProvideAcroEnding{possessive}{'s}{'s}
\acro_possessive:
which can be used to define newacro
commands and defines a number of options to set the endings individually for certain acronyms.
Here is a complete example that also shows how to define suitable commands foracro
.
Note that several endings can't really be applied to an acronym. If we were to defineCode: Select all
\documentclass{article} \usepackage{acro} \ProvideAcroEnding {possessive} {'s} {'s} \ExplSyntaxOn \NewAcroCommand \acg { \acro_possessive: \acro_use:n {#1} } \NewAcroCommand \acsg { \acro_possessive: \acro_short:n {#1} } \NewAcroCommand \aclg { \acro_possessive: \acro_long:n {#1} } \ExplSyntaxOff \DeclareAcronym{MP}{ short = MP , long = Member of Parliament , long-plural-form = Members of Parliament , long-possessive-form = Member's of Parliament } \DeclareAcronym{cd}{ short = CD , long = compact disc } \begin{document} first: \acg{cd}; \acg{MP} short: \acsg{cd}; \acsg{MP} long: \aclg{cd}; \aclg{MP} \end{document}
we'd get CDs's…Code: Select all
\NewAcroCommand \acpg { \acro_possessive: \acro_plural: \acro_use:n {#1} }
- EnriqueVilla
- Posts: 20
- Joined: Thu Jun 26, 2025 10:31 pm