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

Docs: incorrect initial value for case-sensitive #206

Closed
bersbersbers opened this issue Jan 29, 2021 · 2 comments
Closed

Docs: incorrect initial value for case-sensitive #206

bersbersbers opened this issue Jan 29, 2021 · 2 comments

Comments

@bersbersbers
Copy link

bersbersbers commented Jan 29, 2021

\documentclass{article}
\usepackage{acro}
\acsetup{case-sensitive=false}
\DeclareAcronym{id}{short=short, long=long}
\begin{document}
\ac{ID}
\end{document}

compiles, but

\documentclass{article}
\usepackage{acro}
%\acsetup{case-sensitive=false} -  edit
\DeclareAcronym{id}{short=short, long=long}
\begin{document}
\ac{ID}
\end{document}

does not.

Hence, I would conclude that the "initial" setting for case-sensitive is not false, as it appears in the docs:
image

By the way, all other tools that I can think of name this setting "case-insensitive", especially when case-sensitivity is the default. Just think of the abundance of -i flags in *nix tools.

@cgnieder
Copy link
Owner

You have two times the same example…

Anyway: the examples

\documentclass{article}
\usepackage{acro}

\DeclareAcronym{id}{short=short, long=long}
\begin{document}
\ac{ID}
\end{document}

and

\documentclass{article}
\usepackage{acro}
\acsetup{case-sensitive=true}
\DeclareAcronym{id}{short=short, long=long}
\begin{document}
\ac{ID}
\end{document}

and

\documentclass{article}
\usepackage{acro}
\acsetup{case-sensitive}
\DeclareAcronym{id}{short=short, long=long}
\begin{document}
\ac{ID}
\end{document}

give

./test.tex:6: Package acro Error: You've requested acronym `ID' on line 6 but you
(acro)                apparently haven't defined it, yet!
(acro)                Maybe you've misspelled `ID'?

as intended. On the other hand

\documentclass{article}
\usepackage{acro}
\acsetup{case-sensitive=false}
\DeclareAcronym{id}{short=short, long=long}
\begin{document}
\ac{ID}
\end{document}

compiles without error.

This is an error in the manual. The option was introduced in v2.11 (2020/01/11) and you are the first to notice it so I guess it is not a big problem. I'll correct the manual for the next update. Since it is a one-liner to add the inverse option I'll add it as well:

\documentclass{article}
\usepackage{acro}
\ExplSyntaxOn
\keys_define:nn {acro} { case-insensitive .bool_gset_inverse:N = \g__acro_case_sensitive_bool }
\ExplSyntaxOff

\acsetup{case-insensitive=true}

\DeclareAcronym{id}{short=short, long=long}
\begin{document}
\ac{ID}
\end{document}

cgnieder added a commit that referenced this issue Jan 29, 2021
@bersbersbers
Copy link
Author

Agreed - I posted the same example twice (corrected now), and your analysis is correct. Fix LGTM.

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

2 participants