ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Sietse Brouwer <sbbrouwer@gmail.com>
To: Hans Hagen <pragma@wxs.nl>
Cc: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Draft version of document
Date: Wed, 8 Aug 2012 17:04:16 +0200	[thread overview]
Message-ID: <CAF=dkzzZksg0=go_2YWzjWGrMvGRwLsbdLjbuHFBVOjZJPbAww@mail.gmail.com> (raw)
In-Reply-To: <50212925.3050900@wxs.nl>

@Roger: I just realised I called you Robert. Sorry about that, moment
of inattention.

Hi Hans,

> Actually, this is something that should be doable with user data weren't it
> that for floats that's not yet available. So I've added it to the core (will
> be in next upload) ...

Ah, nifty; and fantastically quick, as always. I've not heard of
ConTeXt's "user data" feature before. Where can I find more on that?
Is there a list e-mail I should search for?

I'm trying to work out how to describe the new feature, so I can add
that to the documentation. I think I see two features, but I'm not
sure. Can you tell me if the below is correct?

New feature 1: previously we could only do
\startplacefigure[reference=fig:mill, title={A Mill}]
or
\startsection[reference=sec:sheep, title={The Sheep}]

but now we can do
\startplacefigure[reference=fig:mill, title={A Mill}][resource=mill]
or
\startsection[reference=sec:sheep, title={The Sheep}][mykey=myvalue]

Nothing is done with the parameters in the second key=value list, but
they are stored as part of the object when the object is written to
its figures/sections/whatever list; and there they can be used in
constructing the Table of figures/contents/whatever.

--------

New feature 2: the command
\rawstructurelistuservariable{#1}
. This command can be used by custom list entry macros like
\mylistentrymacro below:
\setuplist[somelist][alternative=command, command=\mylistentrymacro]

The command gets a property from the current list entry object, like so:
\rawstructurelistuservariable{resource} %--> mill

Question: does this work, too, or can we only access values in the
*second* key=value list?
\rawstructurelistuservariable{reference} %--> fig:mill

Cheers,
Sietse
___________________________________________________________________________________
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:[~2012-08-08 15:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-04 11:18 Roger Mason
2012-08-06 16:14 ` Sietse Brouwer
2012-08-07  9:19   ` Roger Mason
2012-08-07 12:51   ` Sietse Brouwer
2012-08-07 14:37     ` Hans Hagen
2012-08-07 14:41     ` Hans Hagen
2012-08-08 15:04       ` Sietse Brouwer [this message]
2012-08-08 17:48         ` Wolfgang Schuster
2012-08-08 21:36           ` Hans Hagen

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='CAF=dkzzZksg0=go_2YWzjWGrMvGRwLsbdLjbuHFBVOjZJPbAww@mail.gmail.com' \
    --to=sbbrouwer@gmail.com \
    --cc=ntg-context@ntg.nl \
    --cc=pragma@wxs.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).