如何使用acronym
包裝處理首字母縮寫的所有格形式?
縮寫定義:
\begin{acronym}
\acro{FBI}{Federal Bureau of Investigation}
\end{acronym}
用法:
The \ac{FBI}'s plan. The \ac{FBI}'s plan.
結果:
The Federal Bureau of Investigation (FBI)'s plan. The FBI's plan.
短形式是正確的,但長形式是錯誤的。
答案1
這是一個定義命令的方法,\acposs
該命令將擴展為長的的(短的)第一次使用時和短的下次使用時:
\documentclass{article}
\usepackage{acronym}
\makeatletter
\newcommand{\acposs}[1]{%
\expandafter\ifx\csname AC@\AC@prefix#1\endcsname\AC@used
\acs{#1}'s%
\else
\aclu{#1}'s (\acs{#1})%
\fi
}
\makeatother
\begin{document}
\begin{acronym}
\acro{FBI}{Federal Bureau of Investigation}
\end{acronym}
The \acposs{FBI} plan. The \acposs{FBI} plan.
\end{document}
如果你更喜歡長的的(短的's) 然後使用以下定義:
\newcommand{\acposs}[1]{%
\expandafter\ifx\csname AC@#1\endcsname\AC@used
\acs{#1}'s%
\else
\aclu{#1}'s (\acs{#1}'s)%
\fi
}