I want to have a full width list of acronyms.
With the longtabu
from the tabu
package it is possible to combine the features from longtable
and tabularx
with the construction:
\begin{longtabu}to\linewidth{@{}lX@{}} ... \end{longtabu}
However I do not know how to implement that for acro
package.
\documentclass{article}
\usepackage{tabu,longtable}
\usepackage{acro}
\usepackage{showframe}
\DeclareInstance{acro-page-number}{dotfill}{default}{
punct = true ,
punct-symbol = \dotfill
}
\acsetup{
list-type = table ,
list-style = longtable,
list-table-width=\linewidth,
pages = first,
page-name = ,
pages-name = ,
page-ref = dotfill
}
\ExplSyntaxOn
\DeclareTemplateInterface {acro-list} {table} { 3 }
{
table : tokenlist = longtable ,
table-spec : tokenlist = @{}l@{\hspace{10pt}}p{\l__acro_table_width_dim}@{} ,
foreign-sep : tokenlist = { ~ }
}
\DeclareInstance { acro-list } { longtable }
{ table }
{ table = longtable }
\ExplSyntaxOff
\DeclareAcronym{bar}{ short = bar, long = {barbar} }
\DeclareAcronym{foo}{ short = foo, long = {foofoo} }
\begin{document}
%\noindent
\printacronyms
\noindent
\ac{foo}\\
\ac{bar}\\
\ac{foo}
\end{document}
\acsetup{ list-type = table, list-style = longtabu }
with\DeclareInstance{acro-list}{longtabu}{table}{ table = longtabu, table-spec = @{}lX@{} }
but sadly this throws the error\begin{longtabu}
ended by\end{longtabu}
due to the way the table is built. I have a fix which I'll include in v2.0. (v2.0 will be published some time in the next week. I'll add an answer then)acro
's current code are changed… it would look very much like a hack. But if you can wait two weeks…