![](https://secure.gravatar.com/avatar/edcdec265f0de3f45b735068da6ea852.jpg?s=120&d=mm&r=g)
2. Is there a way to provide a default value for a structureuservariable? I'd like to set a reference number based on a global counter if the user doesn't supply their own.
Currently not ... but I can add it.
I'm assuming I could poke a value in using Lua. Would be nice to have but not a big deal for the time being.
3. In a similar vein - is it possible to define a reference for a section if the user doesn't provide one. E.g. if they provide
\startchapter[title=My Example Chapter]
instead of:
\startchapter[chap:examplechapter][title=My Example Chapter]
\startchapter[reference=chap:examplechapter,title=My Example Chapter]
can I set the reference for them? (I will have some sections that could be usefully auto-referenced).
how would you refer to such auto reference?
My report will have a number of findings. I want to give each of these a unique reference number based on a project identifier (set by the user as a global variable) plus a sequential number coming from a counter. In the vast majority of cases the user shouldn't be concerned with having to define these themselves. I'd like them to exist as uservariables and proper references so that they could be referred to if required. I'd only be using the references when looping through all of the findings, so I could reconstruct the reference value as I looped. At the moment I'm doing this hack to get a clickable reference to a finding in my summary table: for k, v in ipairs(structures.lists.collected) do ... context.bTD() context("\\goto{"..(v.references.realpage-2).."}[page("..v.references.realpage..")]") context.eTD() In thinking it through, however, I suppose that if the user is going to be referring to the findings themselves then they should just define their own reference and use that. I just wanted to use proper references for any parts I was auto-generating. I'll stick with my hack for the time being. Many thanks, Felix