I am trying to compile a document on two systems (one is Overleaf) and they appear to have differences in their texlive installation, specifically in the version of the acro
package. On one system, I can compile if I use \acroifusedTF{}
. On the other, I must use \acifused{}
in the same place. Can I put something in my preamble to the effect of "acifused means acroifusedTF if you can't find acifused"?
I want it to work with the Overleaf compiler to make it easier to share the document. I want it to work locally because local editing and compilation is faster sometimes. I use git to keep them synchronized. I tried the 2020 and 2019 texlive options in Overleaf.
A minimal example:
\documentclass{article}
\usepackage[utf8]{inputenc}
\title{test}
\author{tester}
\date{date}
\usepackage{acro}
\DeclareAcronym{DTS}{short=DTS, long=Divertor Thomson Scattering}
\begin{document}
\maketitle
Table~\ref{tab:my_label} uses an acronym before it appears in the body.
\begin{table}[!htb]
\centering
\begin{tabular}{c|c}
a & b \\
\hline
c & d
\end{tabular}
\caption{An acronym is used in the caption of a float before being used in the body: \acroifusedTF{DTS}{\ac{DTS}}{\ac{DTS}\acreset{DTS}}.}
\label{tab:my_label}
\end{table}
Now the acronym is used again, this time in the body, after it was already used in a caption:
\ac{DTS}.
I don't want the acronym to be used up in a float caption before it is used in the body.
Subsequent use: \ac{DTS}.
\end{document}
\acroifusedTF
? If it's the overlaf one, you might want to update your local installation, if it's the local one, you might want to try using overleaf's texlive 2020 again. It should contain a version ofacro
, that works with\acroifusedTF
. If you can't update (or don't want to), you could use\usepackage[version=2]{acro}
whenever you compile your code on the system that would prefer\acroifusedTF
and replace all instances of\acroifusedTF
with the older\acifused
.\usepackage[version=2]{acro}
is attractive.\acifused
vs.\acroifusedTF
changed between version 2 and version 3 of theacro
package. So, instead of redefining a single command, I suggest to make sure all systems/ users involved use the same version of the package.\usepackage
is nice for portability, too.