I am writing a large report with many acronyms, some of which include each other. I asked about a way to let them do this in a specific way and got a very nice answer. Acronyms that include other acronyms
Now I find that i would like my acronyms to start with a capital letter in the list and I found a way to do this, Capitalize the first letter in acronym list, but when I try to use these together I get two errors
Argument of \@acx has an extra }
and Paragraph ended before \@acx was completed
Here is a minimal example
\documentclass[a4paper, 10pt]{report}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel} % English language/hyphenation
\usepackage{amsmath,amsfonts,amsthm} % Math packages
\usepackage[pdftex]{graphicx} % Enable pdflatex
\usepackage[printonlyused]{acronym}
\usepackage{etoolbox}
\makeatletter
\patchcmd{\AC@@acro}{] #3}{] \MakeUppercase #3}{}{}
\patchcmd{\AC@@acro}{] #3}{] \MakeUppercase #3}{}{}
\makeatother
\makeatletter
\newcommand{\acx}{\protect\@acx}%
\newcommand{\@acx}[1]{%
\ifAC@dua
\acf{#1}%
\else
\expandafter\ifx\csname ac@#1\endcsname\AC@used
\acs{#1}%
\else
\acl{#1}%
\fi
\fi
}
\makeatother
\begin{document}
\begin{acronym}
\acro{q}[$Q$]{\acx{rms}reactive power}
\acro{rms}{root mean square}
\end{acronym}
\section{Text}
The \ac{q} is..... \ac{rms}...
\end{document}
EDIT:
I want the result to look like:
Why is this happening? How can I solve it?
\MakeUppercase\acx
, which of course fails. It's not really clear what you want\acx
to do. – egreg Aug 11 '15 at 17:20\acx
macro and this works perfectly without the upper case code. Yes I would like to do\MakeUppercase \acx
why is this not possible? Could it be solve by forcing\acx
to expand first? – Kajsa Aug 11 '15 at 21:20