Am 05.10.2026 um 19:09 schrieb Hans Hagen via ntg-context:
On 10/5/2026 12:06 AM, Dax Kelson via ntg-context wrote:

5. A document whose list entries come only from \writetolist has no section block and gets no bookmarks: bookmarks.place loops over #lists.sectionblocks, which is 0 there (the comment says "always >= 1").

for wolfgang to check
When you add \writetolist entries without a numbered section


\setupinteraction[state=start]
\placebookmarks[section]
\starttext
%\section{Überschrift}
\writetolist[section]{2}{Eintrag}
\unknown
\stoptext


there is no 'block' entry in the 'references' table in the tuc file.


utilitydata.structures.lists.collected={
 {
  ["metadata"]=1,
  ["references"]={
   ["internal"]=1,
   ["realpage"]=1,
   ["section"]=0,
  },
  ["userdata"]={
   ["first"]="2",
   ["second"]="Eintrag",
  },
 },
}


When you a block entry like below to the sub table the bookmarks are added to the pdf file.


   ["block"]="bodypart",



Why is the necessary?

1. The 'bookmarks.place' function in strc-bkm.lua iterates over the 'nofblocks' (#lists.sectionblocks) table.

2. The entries to this table are added with the 'initializer' function in strc-lst.lmt when 'block' entries exist for lists, but since no 'block' entries exist without \section commands nothing is added.


Why is nothing added?

1. \writetolist uses the 'lists.addto' function from strc-lst.lmt

2. 'lists.addto' tries to get the current 'block' value from the last section command. Since no section appears in the document nothing can be retrieved and no 'block' value is stored.


Wolfgang

___________________________________________________________________________________
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