From: Glen Callaghan <Glen.Callaghan@emsolutions.com.au>
To: "<ntg-context@ntg.nl>" <ntg-context@ntg.nl>
Subject: Re: Defining a command for enumeration+block
Date: Thu, 18 Nov 2010 21:44:50 +0000 [thread overview]
Message-ID: <E4D6915C-5896-4BFE-8423-F634083E23AB@emsolutions.com.au> (raw)
In-Reply-To: <mailman.297.1290110799.4239.ntg-context@ntg.nl>
[-- Attachment #1: Type: text/plain, Size: 1336 bytes --]
> You can?t use blocks within other commands but when you use only enumerations in your block you can simplify your code a little bit.
>
> \defineblock[Block]
> \defineenumeration[Enum][location=left,text=Test]
>
> \setupblock[Block][before=\startEnum,after=\stopEnum]
Thanks very much Wolfgang, that seems to work well enough for me.
Interestingly though, the formatting is slightly different between defining the blocks and using (recalling) the blocks. When I recall the blocks, the text appears a line below the enumeration labels (see example + attachment below).
I had always assumed that \define just did a text replacement (like in c).... looks like I was wrong.
How does \define actually work? Could you point me towards some documentation.... I'm struggling to find anything about \define.
thanks
Glen
-------------
\defineblock[Block]
\defineenumeration[Enum][location=left,text=Test]
\setupblock[Block][before=\startEnum,after=\stopEnum]
\starttext
\section{Use}
\useblocks[Block]
\reset[Enum]
\section{Define}
\beginBlock
jhdsa hdsfhj lh dsfjh jkhasdf
sdakjhfsal sdkajhf kljsdh
\endBlock
\beginBlock
jhdsa hdsfhj lh dsfjh jkhasdf
sdakjhfsal sdkajhf kljsdh fhlkjsad kah dkjh akjhd flkjs
lkjsad flkjh salkjhf asd
\endBlock
\stoptext
[-- Attachment #2: blockenum.pdf --]
[-- Type: application/pdf, Size: 44523 bytes --]
[-- Attachment #3: Type: text/plain, Size: 486 bytes --]
___________________________________________________________________________________
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
___________________________________________________________________________________
next parent reply other threads:[~2010-11-18 21:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.297.1290110799.4239.ntg-context@ntg.nl>
2010-11-18 21:44 ` Glen Callaghan [this message]
2010-11-18 22:13 ` Wolfgang Schuster
[not found] <mailman.329.1290186723.4239.ntg-context@ntg.nl>
2010-11-20 21:24 ` Glen Callaghan
[not found] <mailman.307.1290132702.4239.ntg-context@ntg.nl>
2010-11-19 4:43 ` Glen Callaghan
2010-11-19 15:49 ` Wolfgang Schuster
2010-11-19 17:11 ` Hans Hagen
2010-11-18 11:15 Glen Callaghan
2010-11-18 18:05 ` Wolfgang Schuster
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=E4D6915C-5896-4BFE-8423-F634083E23AB@emsolutions.com.au \
--to=glen.callaghan@emsolutions.com.au \
--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).