Comments (7)
Original comment by Robin Schneider (Bitbucket: ypid, GitHub: ypid).
I found a workaround:
#!latex
\makeatletter%
\let\acro@patch@org@acl\acl\relax
\let\acro@patch@org@ac\ac\relax
\renewcommand{\acl}[1]{\acro@patch@org@acl{#1}\acuse{#1}\xspace}
\renewcommand{\ac}[1]{\acro@patch@org@ac{#1}\acuse{#1}\xspace}
\makeatother%
from acro.
Original comment by Robin Schneider (Bitbucket: ypid, GitHub: ypid).
To answer the question why one would use acronyms in math mode. That is a little hack I came up with to use acronyms in source code listings with the minted
package and the option mathescape :)
from acro.
Original comment by Clemens Niederberger (Bitbucket: cgnieder, GitHub: cgnieder).
Interesting...
#!latex
\documentclass{article}
\usepackage{amsmath,acro}
\DeclareAcronym{test}{short=test,long=a test entry}
\DeclareAcronym{foo}{short=foo,long=bar}
\begin{document}
\printacronyms%
text
$\text{\ac{test}}$
text
$\ac{foo}$
text
\end{document}
from acro.
Original comment by Clemens Niederberger (Bitbucket: cgnieder, GitHub: cgnieder).
Obviously \mathchoice
is the bad guy here:
#!latex
\documentclass{article}
\usepackage{acro}
\DeclareAcronym{test}{short=test,long=a test entry}
\DeclareAcronym{foo}{short=foo,long=bar}
\newcommand\mytext[1]{\mathchoice{#1}{#1}{#1}{#1}}
\begin{document}
\printacronyms%
text
$\mytext{\ac{test}}$
text
$\ac{foo}$
text
\end{document}
from acro.
Original comment by Clemens Niederberger (Bitbucket: cgnieder, GitHub: cgnieder).
The problem with \mathchoice
is that the contents of all four arguments is typeset and stored before TeX decides which of the four to use. In the case of \text
this means that \ac{test}
is typeset four times before actually used by TeX. By then it is marked as used as far as acro
as concerned but the aux file contains no information about this: the line
#!latex
\acro@used@once{test}{1}{1}{1}
is missing. When \ac{test}
is finally used the line
#!latex
\acro@used@twice{test}{1}{1}{1}
is inserted instead. I'm not sure there is much I can do about this...
from acro.
Original comment by Clemens Niederberger (Bitbucket: cgnieder, GitHub: cgnieder).
Removing version: 1.6 (automated comment)
from acro.
Original comment by Clemens Niederberger (Bitbucket: cgnieder, GitHub: cgnieder).
\mathchoice
is a TeX primitive. There isn't much that can be done about the behaviour. A workaround with and care by the user is needed
from acro.
Related Issues (20)
- `Acronym properties may have changed. Rerun to get them synchronized` regardless of how many times I compile HOT 2
- Acronym properties may have changed. Rerun to get them(acro) synchronized. HOT 5
- Page number alignment error
- \scshape only has an effect in \ac{…}, not in \printacronyms HOT 1
- ! Package acro Error: Patching `longtable' failed. Please contact the acro author. HOT 2
- Typo in the "property-unique" message
- `\printacronyms` fails for nested acronyms if inserted thanks to the `\AtEndDocument` hook
- `link-only-first` makes the (first) short appearance of the acronym wrongly linked to the last page of the document
- Missing number, treated as zero with template=tabularray HOT 1
- Printed acronym cannot be written on two lines
- I miss list-short-format HOT 1
- Kerning Bug
- `acro` automatically capitalizes `<id>` when using `\acroupper` HOT 2
- Missin `format-include-endings` flag
- \ace command for printing extra. HOT 2
- tabularray Continuation Header Shown
- `acro` broken with latest release of `l3kernel` HOT 5
- is there any method to change the font of acronyms in \printacronyms?
- Indexing
- Declaring acronyms in v3.7+ takes far longer to process than in v2 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from acro.