lvjr / tabularray

Typeset tabulars and arrays with LaTeX3
https://ctan.org/pkg/tabularray
247 stars 22 forks source link

Acronyms are not expanded #399

Closed user0000815 closed 1 year ago

user0000815 commented 1 year ago

In my tabularray tables acronyms (with the acronym package) are not expanded like expected. Only the short form is printed, also if the acronym appears for the first time in the document. What I can see is that lines containing an \ac command are extended like in my MWE line No. 1 and 2. Is this an issue of tabularray or do I have to change something in my latex code to get usual expanding behaviour?

\documentclass[12pt]{article}
\usepackage{tabularray}
\usepackage[printonlyused]{acronym}
\usepackage{hyperref} 

\begin{document}
    I lost my \ac{USB} stick.

    \begin{tblr}[long]{ 
        colspec = {c Q[0.6\textwidth] c},
        vlines, hlines}
        No. & Interface & Year\\
        1 & \ac{HDMI} is a proprietary audio/video interface for transmitting \ldots & 2002\\
        2 & \ac{DVI} is a video display interface developed by the \ac{DDWG}. & 1999\\
        3 & \acl{SATA} (\ac{SATA}) is a computer bus interface \ldots & 2000

    \end{tblr}
    I found my \ac{USB} stick!

    \section{Abbreviations}

    \begin{acronym}[TDMA]
        \acro{USB}{Universal Serial Bus}
        \acro{DVI}{Digital Visual Interface}
        \acro{DDWG}{Digital Display Working Group}
        \acro{SATA}{Serial AT Attachment}
        \acro{HDMI}{High Definition Multimedia Interface}
    \end{acronym}
\end{document}
acroTabularray
muzimuzhi commented 1 year ago

Caused by the fact that tabularray typesets each table cell multiple times. See #179.

user0000815 commented 1 year ago

@muzimuzhi Thanks for the quick reply!

From my point of view tabularray now (since 2023A) has a hook so that packages like acro (and acronym) can interrupt the measuring phase until the acronyms have reached their final length. Then tabularray can finish its measuring phase and gets the correct length. If I want to use the tabularray package in combination with acronym package the acronym package needs to be changed in the way that it uses the provided tabularray hook. Did I get it right?

lvjr commented 1 year ago

I have done what I can do in tabularray package. Please ask the developers of acro and acronym for updates of their packages.