![](https://secure.gravatar.com/avatar/6114858d84b0f40cf715f12237ab67a1.jpg?s=120&d=mm&r=g)
On 19 June 2016 at 22:17, Mojca Miklavec wrote:
Hi,
I'm trying to generate daily reports and wanted to include the date in bookmarks, but there is some weird (non)expansion going on.
I might just as well switch to lua for certain parts of the document (like cycling through dates), but I suspect that there must be some trivial hack to prevent me from getting my sections labeled date[y={2016},m={06},d={25}]
... other than using \section{#1-#2-#3} (which might also do the job for now).
\setupinteraction [state=start] \placebookmarks [chapter,section,subsection] [chapter,section] \setupinteractionscreen [option=bookmark]
\def\generatesection#1#2#3{% \edef\dt{\date[y={#1},m={#2},d={#3}][year,-,mm,-,dd]} \setupheadertexts[{\dt}][pagenumber] \section{\dt} % \externalfigure[#1#2#3.pdf] }
\starttext \chapter{Daily files} \generatesection{2016}{06}{25} \generatesection{2016}{06}{26} \stoptext
Thank you, Mojca