ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Henning Hraban Ramm <texml@fiee.net>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: author in ToC and other design complications
Date: Fri, 4 Sep 2020 13:08:27 +0200	[thread overview]
Message-ID: <A6EF1633-80D3-41F0-ABD8-5B079257F39B@fiee.net> (raw)
In-Reply-To: <4ff17fb5-b8d6-0a46-5f1e-3281f2550115@gmail.com>


> Am 04.09.2020 um 12:08 schrieb jbf <roma83537@gmail.com>:
> 
> Thanks, and I am sure that this entry into the wiki will be also helpful for others. For me it will be step by step, and using your information I can now at least get an author's name into the toc! But that's about all. 

And that’s what the wiki entry is about and what I can tell.

> Just know that when you say (in the new wiki addition) 'check on \rawstructurelistuservariable' that  link simply tells me 'There is currently no text in this page'. That leaves someone like me without a lot of the long-gained knowledge that others have, quite lost :-)

Sorry that the command is still undocumented but I thought the example would be clear enough:

You can’t check (i.e. use \doifnot) on \structurelistuservariable because that always contains at least some invisible tokens, you must use \rawstructurelistuservariable instead.

But if all of your chapters have the author set, you don’t need that check.

> But I took your example and adjusted it for, say, a chapter which has just a title (no subtitle) and an author, and added, below what I already have in the preamble:
> 
> \define[1]\ChapterTocEntry{%
>   \structurelistuservariable{author}\crlf%
>   #1\crlf% title
>   %\structurelistuservariable{subtitle}}%
> }
> 
> \setuplist[chapter][
>   textcommand=\ChapterTocEntry,
> ]
> 
> So, in other words I swapped the word 'section' in your example with 'chapter'. That now gives me in the ToC, something like the following:
> 
> One   Author name
> 
>          Title                        pg no.
> 
> Which is pretty much what I am after. Hooray! But how do I get that in reverse?

Have another look at your \ChapterTocEntry: you call the author by \structurelistuservariable{author} and set the title as #1 in the next line. Just adapt this to your needs.


> And how do I get the word 'chapter' to also appear in front of 'One'?

Try \labeltext{chapter} in the right place.


Good luck & have fun!
Hraban

___________________________________________________________________________________
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
___________________________________________________________________________________

      reply	other threads:[~2020-09-04 11:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-04  4:44 jbf
2020-09-04  7:38 ` Henning Hraban Ramm
2020-09-04 10:08   ` jbf
2020-09-04 11:08     ` Henning Hraban Ramm [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=A6EF1633-80D3-41F0-ABD8-5B079257F39B@fiee.net \
    --to=texml@fiee.net \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).