Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Printed acronym cannot be written on two lines #257

Open
leo-leesco opened this issue Mar 20, 2023 · 0 comments
Open

Printed acronym cannot be written on two lines #257

leo-leesco opened this issue Mar 20, 2023 · 0 comments

Comments

@leo-leesco
Copy link

leo-leesco commented Mar 20, 2023

Description

I observed this weird behaviour : when I use the short form (composed of multiple words) of an acronym, it appears that it is does not switch lines. I am clueless as to what is causing that, even after trying to go through the .sty.

Thanks for your help !

Preamble

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
\usepackage{babel}

\usepackage{acro}
\acsetup{
	short-plural-ending={},
	make-links=true,
	case-insensitive=true,
	list/sort=true,
	list/heading=chapter*,
	pages/display=all,
	use-id-as-short,
}

\NewAcroPreset{shortcut}{
	first-style=long,
	subsequent-style=alt,
	tag={shortcut},
}

\NewAcroPreset{id=short}{
	short-format={\MakeUppercase},
}

\usepackage[hidelinks]{hyperref}

It seems like the problem is caused by using hyperref (when disabled, all works fine).

MWE

\documentclass[a4paper,11pt,french,oneside]{report} 
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage{textcomp}

% #region acro
\usepackage{acro}
\acsetup{
	short-plural-ending={},
	make-links=true,
	case-insensitive=true,
	list/sort=true,
	list/heading=chapter*,
	pages/display=all,
	use-id-as-short,
}

\NewAcroPreset{test}{
	first-style=short,
	tag={test},
	format={\bfseries\MakeUppercase}
}

\DeclareAcronym{test}{
	short={shoooooooort teeeeeeeest},
	long={loooooooooong teeeeeeeest},
	preset={test},
}

\usepackage[hidelinks]{hyperref} % comment to show the various behaviours

\begin{document}

% normal paragraph

a very long line that does not stop as long as it does not crash \ac{test} qsdfqsdfyug qsdfiugy and blablabla. At this point I'm just trying to show where the line overflows as a comparison

\paragraph{a very long} line that does not stop as long as it does not crash \acl{test} qsdfqsdfyug qsdfiugy and blablabla. At this point I'm just trying to show where the line overflows as a comparison

\end{document}

mwe.pdf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant