Hi Hans,

I found a rather perplexing bug. Sample document:

    \setuptagging[state=start] %% Works with this line commented out

    \usebtxdefinitions[aps]

    \startluacode
        local fields = { "mycustomfield" }
        for _, category in pairs(publications.specifications.aps.categories) do
            for _, field in ipairs(fields) do
                category.fields[field] = "optional"
            end
        end
    \stopluacode

    \starttexdefinition mutable protected btx:aps:note
        <\btxflush{mycustomfield}>
    \stoptexdefinition

    \startbuffer[bibliography]
        @article{example,
            author = {The Author},
            title = {A short title},
            journal = {Some journal},
            year = {2025},
            volume = {9},
            number = {99},
            mycustomfield = {This is my new field!},
        }
    \stopbuffer

    \usebtxdataset[bibliography.buffer]

    \starttext
        \cite[example] %% Works with this line commented out
        \nocitation[example]

        \page %% Works with this line commented out

        \placelistofpublications
    \stoptext

If you compile it with "--once", on the first run the bibliography is
empty (as expected), and then on the second run, "<This is my new
field!>" shows up (also as expected), but on the third and subsequent
runs, I just get "<>" (which is surprising). This problem goes away with
tagging disabled, with the bibliography on the same page as the
citation, or if "\nocitation" is used instead of "\cite".

This works correctly with versions "2024.02.27 09:18" and "2023.05.05
18:36", and is broken with versions "2025.08.20 10:30" and "2025.09.19
18:32". On the older versions, MkIV also works correctly, but on the
newer/broken versions, MkIV gives an undefined cs error on
"\btxstarttaggedcite".

Thanks,
-- Max
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : [email protected] / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

Reply via email to