Open bersbersbers opened 3 years ago
I get no undefined
error along the lines of
./test.tex:16: Package acro Error: You've requested acronym `xx' on line 16 but you
(acro) apparently haven't defined it, yet!
(acro) Maybe you've misspelled `xx'?
so I guess you don't actually mean undefined.
I am not sure what the expected outcome should be. IMHO barriers/single=true
does only make sense in combination with barriers/reset=true
. In your example none of the two usages of CPU
after the barrier is the first use in the document so technically the outcome is correct.
What you actually want is that an acronym is reset at a barrier if it is has been used only once, despite having chosen barriers/reset=false
.
I can understand your setup but I have to think about a solution.
BTW: I guess this should be true if it happens multiple times as well? Like in this example:
1: \ac{aa} \par
\acbarrier
2: \ac{aa}, \ac{aa} \par
\acbarrier
3: \ac{aa} \par
\acbarrier
4: \ac{aa}, \ac{aa} \par
I get no
undefined
error [...] so I guess you don't actually mean undefined.
Correct - I mean it in a semantic way from the point of view of the final document. I did not have any better expression - I could have said "short form used without being introduced alongside the long form".
I am not sure what the expected outcome should be. IMHO
barriers/single=true
does only make sense in combination withbarriers/reset=true
.
I agree that this is one valid way to see it. This is not my preferred one, but if it's yours, it would make sense to enforce that through a warning or something like this.
In your example none of the two usages of
CPU
after the barrier is the first use in the document so technically the outcome is correct.
Technically, yes ;)
What you actually want is that an acronym is reset at a barrier if it is has been used only once
Correct - after a single use which is the first use in the document.
despite having chosen
barriers/reset=false
.
Yes, and a bit of no. I would not say "chosen" - I have not actively set it to false: I have only omitted it. From a user standpoint, I think it should be considered valid to pick only a few options and set them to true while ignoring other options, if the package does not give a warning (or forces other values internally).
I can understand your setup but I have to think about a solution.
I have a couple of ideas:
barriers/resetsingle
which does what I like.barriers/reset
could be renamed to barriers/resetall
(because that is what it actually does, currently). Also, this version would show to the user that barriers/resetall=false
(the default) does not prevent all resetting (as barriers/reset=false
) - it just does not enable resetting of all acronyms. This would allow you to introduce some minimally-invasive resets where appropriate.BTW: I guess this should be true if it happens multiple times as well? Like in this example:
1: \ac{aa} \par \acbarrier 2: \ac{aa}, \ac{aa} \par \acbarrier 3: \ac{aa} \par \acbarrier 4: \ac{aa}, \ac{aa} \par
I think what we currently get is
1: Long 2: short, short 3: short 4: short, short
What would I expect here? Only a single exception at 2, I believe:
1: Long 2: Long (short), short 3: short 4: short, short (Is that identical to internally using the starred version in the sections with single use? Maybe not for lists, but for everything else it should be.)
For me, since we are not using barriers/reset
, the expected rule is "introduce the short form if it has not been introduced yet to obtain a consistent document". Technically, this may translate into
single
AND barriers/single
AND this acronym has been used single AND the short form has not been used before (which is approximately "first use in document")
Yields:
I am not sure this is a bug, but my expectation was that after the first barrier, I would get "central processing unit (CPU), CPU": currently, "CPU" is "undefined".
Technically, after a
\barrier
'ed section with a singly-used acronym, I'd expect that acronym (only that one) to be reset even underbarriers/reset=false
. (Note that "RAM" is defined twice when usingbarriers/reset=true
- as expected, but unwanted - so that is not really a solution.) If that is not possible, maybebarriers/single
should forcebarriers/reset
, but I don't think that is necessary.By the way, what is my use case?
single
- there is no need to define a short form if the long form is used only once.barriers/use
andbarriers/single
).barriers/reset=false
).