Variables in TOC

Please post all questions on Help+Manual 8 here

Moderators: Alexander Halser, Tim Green

Post Reply
John Johann
Posts: 230
Joined: Mon Aug 21, 2017 7:35 pm

Variables in TOC

Unread post by John Johann » Tue Feb 23, 2021 8:24 am

Hi,
If I create a variable in a project and include it in the TOC, it is output as the topic title/in the TOC in the pdf.

If I redefine that variable locally via the Topic Options for a specific topic, it is updated in the title of that topic, but not in the TOC.

I can't insert a variable locally in a topic without first having created it in the project, so it always has a "default" value (even if I leave it blank) from that first definition. Is there a workaround?

User avatar
Tim Green
Site Admin
Posts: 22103
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Variables in TOC

Unread post by Tim Green » Tue Feb 23, 2021 9:55 am

John Johann wrote:
Tue Feb 23, 2021 8:24 am
I can't insert a variable locally in a topic without first having created it in the project, so it always has a "default" value (even if I leave it blank) from that first definition. Is there a workaround?
This is a tricky case that hasn't come up yet. The problem is that the TOC entry is a completely different file (in the \Maps folder) and the topic variable definition is supposed to apply for the topic only. I'm going to ask our developers whether it would be possible to check whether the topic variable is also used in the TOC. I'm not sure on this, so I don't know what the answer will be.
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.

User avatar
Tim Green
Site Admin
Posts: 22103
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Variables in TOC

Unread post by Tim Green » Tue Feb 23, 2021 11:54 am

Update: Unfortunately, this turns out not to be possible. The problem is that the TOC is generated first, before any topics, and so topic variables are not available to it. :?
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.

John Johann
Posts: 230
Joined: Mon Aug 21, 2017 7:35 pm

Re: Variables in TOC

Unread post by John Johann » Tue Feb 23, 2021 12:08 pm

Hi Tim,
Thanks for checking into this.

As it would also be useful in my usecase for using local variables in figure and table captions, I'd like to put it on the wish list :-)

Post Reply