Closed neuhalje closed 4 months ago
Thanks for the detailed bug report! I can't promise it will be soon (though I hope so), but I'll give this a look and see if I can work out what's going on :slightly_smiling_face:
Hi I also have a similar case. I have an acronym and definition for the same concept.
* Acronyms
- PAR :: Pseudoautosomal region
* Glossary
- Pseudoautosomal region :: Region shared between the allosomes. PARs are located at the end of the chromosomes.
When I have just PAR in the text, Glossary is not printed.
If I define the acronym myself like Pseudoautosomal region (PAR) I got the following:
So, this is a bit tricky.
Essentially what's being asked for is double-expansion, with special acronym + glossary handling.
Currently, the actual expansion mechanisms for acronym and glossary entries are the same, but to have acronyms link to glossary entries while also expanding, a custom mechanism for handling this case would be needed.
One alternative approach would be to make it so that terms in the acronym/glossary section can themselves produce links. E.g. the Pseudoautosomal region
text in the acronym section would automatically link to the glossary entry.
I initial thought would be to create glossary linking after the acronym expension and have the link to glossary in text rather than having links to the glossary.
I'll see if I can try getting double-expansion working at some point in the future, and see if that's good enough.
@neuhalje I've just pushed 9e65c4b4397fb0befab3c1756a0b259e30058704, which will make your original example work as expected.
@barslmn with that commit and 0ff4365d9634bc90e08331c64f4be7a276af29a3, I think your example works out a lot more nicely now.
I'm about to tell you about PARs
* Acronyms
- PAR :: Pseudoautosomal region
* Glossary
- Pseudoautosomal region :: Region shared between the allosomes. PARs are located at the end of the chromosomes.
becomes
I'm about to tell you about pseudoautosomal regions (<<gr;2;1>>[[g;2][PARs]])
* Acronyms
- <<g;1>>PAR :: See <<gr;2;0>>[[g;2][pseudoautosomal region]].\ensp{}
* Glossary
- <<g;2>>Pseudoautosomal region :: Region shared between the allosomes. PARs are located at the end of the chromosomes.\ensp{}[[gr;2;1][1]]
I think this should be behaving well enough to close the issue now, let me know if this isn't the case.
Hi Timothy, thanks a lot for your valueable time. The expansion works great.
I notice two things: First is the capitalization. Is there anything I can do to have the capitalized at the start of the sentences? Should define my own export template?
Second thing is that glossary ids are one off. Is it something about my session?
Situation
Acronyms that resolve to a glossary term are recursively resolved to the glossary definition on first use. In the following example glossary entries should not show the glossary definition. On first use an
acronym
should be resolved:elisp
->Emacs Lisp (elisp)
. It should, however, not be further resolved with theglossary
definition.The following example ...
... should be rendered as follows:
but is rendered as
Mark that the acronym definition has been recursively resolved with the glossary definition.
Things I have tried
Updating the
first-use
ofacronym
to%k (%u)
shows the desired result for entries that exhibit this nested definition. For some reason it will also prevent acronyms that do not resolve to a glosary entry from being resolved.This example will translate into
[...] your favorite ML ([[ML][..]] with a unicorn mascot [...]
instead of[...] your favorite Markup Language ([[ML][..]] with a unicorn mascot [...]
. That isML (ML)
instead ofMarkup Language (ML)
.Example Code