ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* structureuservariable in ToC
@ 2018-01-14 20:44 Henning Hraban Ramm
  2018-01-23 20:16 ` Henning Hraban Ramm
  2018-01-23 20:24 ` Wolfgang Schuster
  0 siblings, 2 replies; 8+ messages in thread
From: Henning Hraban Ramm @ 2018-01-14 20:44 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Now, my second issue with user variables:

"""
\define[1]\ChapterTocEntry{%
  \doifnotempty{\structureuservariable{author}}{\structureuservariable{author}\crlf }%
  #1%
  \doifnotempty{\structureuservariable{subtitle}}{\crlf\structureuservariable{subtitle}}}

\setuplist[chapter][textcommand=\ChapterTocEntry]

\starttext
\completelist[chapter][criterium=all]

\startchapter[
  title={The Use of Typefaces}][%
  author={Hermann Zapf},
  subtitle={Ein zapfiges Zitat}]

\input zapf

\stopchapter

\startchapter[
  title={Sheep and Goats}][%
  author={Siegfried Tufte},
  subtitle={Tofte Tufte-Zitat}]

\input tufte

\stopchapter

\stoptext
"""

I’m trying to get author and subtitle into the ToC (while in the content, subtitle goes to the margin and author to the end of the chapter).
But in this example, both are empty (but not empty enough for doifnotempty), while in my actual project I always get author and subtitle from the first chapter.
I guess this is an expansion problem?


Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
GPG Key ID 1C9B22FD

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-01-24 22:05 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-14 20:44 structureuservariable in ToC Henning Hraban Ramm
2018-01-23 20:16 ` Henning Hraban Ramm
2018-01-23 20:24 ` Wolfgang Schuster
2018-01-24  7:51   ` Henning Hraban Ramm
2018-01-24 15:42     ` Wolfgang Schuster
2018-01-24 18:05       ` Henning Hraban Ramm
2018-01-24 18:18         ` Wolfgang Schuster
2018-01-24 22:05           ` Henning Hraban Ramm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).