Wie kann ich mit dem Tabu-Paket eine Akronymtabelle in voller Breite erstellen?

Wie kann ich mit dem Tabu-Paket eine Akronymtabelle in voller Breite erstellen?

Ich möchte eine vollständige Liste mit Akronymen haben.

Mit dem longtabuaus dem tabuPaket ist es möglich, die Funktionen aus longtableund tabularxmit der Konstruktion zu kombinieren:

\begin{longtabu}to\linewidth{@{}lX@{}} ... \end{longtabu}

Ich weiß jedoch nicht, wie ich das für acrodas Paket implementieren soll.

\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}

Antwort1

Ich habe v2.0 am 16.08.2015 an CTAN gesendet. Damit funktioniert nun Folgendes wie erwartet:

  1. deklarieren Sie zuerst eine acro-listInstanz longtabu:

    \DeclareInstance{acro-list}{longtabu}{table}{
      table = longtabu ,
      table-spec = @{}>{\bfseries}lX@{}
    }
    
  2. Legen Sie die Option list-stylezur Verwendung der neuen Instanz fest:

    \acsetup{ 
      list-type = table ,
      list-style = longtabu
    }
    

Ein vollständiges Beispiel:

% http://tex.stackexchange.com/q/258646/
\documentclass{article} 
\usepackage{tabu,longtable} 
\usepackage{acro}[2015/08/16]
\usepackage{showframe}

\DeclareInstance{acro-page-number}{dotfill}{default}{ 
  punct = true ,
  punct-symbol = \dotfill
} 

\DeclareInstance{acro-list}{longtabu}{table}{
  table = longtabu ,
  table-spec = @{}>{\bfseries}lX@{}
}

\acsetup{ 
  list-type = table ,
  list-style = longtabu ,
  pages = first ,
  page-name = ,
  pages-name = ,
  page-ref = dotfill
}

\DeclareAcronym{bar}{ short = bar, long = {barbar} } 
\DeclareAcronym{foo}{ short = foo, long = {foofoo} } 

\begin{document}

\printacronyms

\ac{foo} \par
\ac{bar} \par
\ac{foo}

\end{document}

Bildbeschreibung hier eingeben

verwandte Informationen