ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Jano Kula <jano.kula@gmail.com>
To: ntg-context@ntg.nl
Subject: \writetolist in mkiv
Date: Sun, 12 Oct 2014 20:39:31 +0200	[thread overview]
Message-ID: <m1eht2$vg3$1@ger.gmane.org> (raw)

Hello to everybody!

Minimal story
-------------
How to insert local TOC of manually created subsections after the 
section starts?

% start minimal example
\def\ManualSubsection#1{\blank%
{\bf Manual Subsection #1}\par%
\writetolist[subsection]{whatever}{Manual Subsection #1}%
\input tufte\relax}

\starttext
\dorecurse{3}{%
\startchapter[title=Chapter]
\placecontent[chapter,criterium=local] % local TOC OK
\startsection[title=Section]
Here we would like to see the local list of manual subsections
\placecontent[section,criterium=local] % local TOC not OK
\ManualSubsection{\recurselevel-1}
\ManualSubsection{\recurselevel-2}
\stopsection
\stopchapter}
\stoptext
% stop minimal example

Longer Story
------------
Predefined \start<chapter|section> inserts "titledata" in TUC file:
   ["titledata"]={
    ["label"]="chapter",
    ["title"]="Chapter",
   },
   ...
   ["titledata"]={
    ["label"]="section",
    ["title"]="Section",
   },
while \writetolist[subsection]{whatever}{Manual Subsection #1} inserts 
"userdata":
   ["userdata"]={
    ["first"]="whatever",
    ["second"]="Manual Subsection \\recurselevel -1",
   },
Is this the reason and can I force to write "titledata" in the TUC file?

Real case is of course more complicated and also PDF hyperlinks should work.

Thank you in advance,

Jano

___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

             reply	other threads:[~2014-10-12 18:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-12 18:39 Jano Kula [this message]
2014-10-12 19:28 ` Wolfgang Schuster
2014-10-12 20:57   ` Jano Kula
2014-10-12 21:06     ` Wolfgang Schuster
2014-10-13  7:14       ` Jano Kula

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='m1eht2$vg3$1@ger.gmane.org' \
    --to=jano.kula@gmail.com \
    --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).