* Re: Defining a command for enumeration+block
[not found] <mailman.329.1290186723.4239.ntg-context@ntg.nl>
@ 2010-11-20 21:24 ` Glen Callaghan
0 siblings, 0 replies; 8+ messages in thread
From: Glen Callaghan @ 2010-11-20 21:24 UTC (permalink / raw)
To: <ntg-context@ntg.nl>
[-- Attachment #1.1: Type: text/plain, Size: 784 bytes --]
Hi Wolfgang,
With MkIV blocks are hidden by default while MkII prints them, add \keepblocks[Block]
to your document and the blocks will appear.
Using \keepblocks worked thanks.
Unfortunately, now the \reset command doesn't seem to work in mkiv (see attachment), but's ok in mkii.
Glen
-------
\defineblock[Block]
\defineenumeration[Enum][location=left,text=Test]
\setupblock[Block][before=\startEnum,after=\stopEnum]
\keepblocks[Block]
\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 #1.2: Type: text/html, Size: 2614 bytes --]
[-- Attachment #2: blockenum_iv.pdf --]
[-- Type: application/pdf, Size: 8791 bytes --]
[-- Attachment #3: ATT00001.htm --]
[-- Type: text/html, Size: 147 bytes --]
[-- Attachment #4: 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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Defining a command for enumeration+block
2010-11-19 15:49 ` Wolfgang Schuster
@ 2010-11-19 17:11 ` Hans Hagen
0 siblings, 0 replies; 8+ messages in thread
From: Hans Hagen @ 2010-11-19 17:11 UTC (permalink / raw)
To: mailing list for ConTeXt users
On 19-11-2010 4:49, Wolfgang Schuster wrote:
> With MkIV blocks are hidden by default while MkII prints them, add \keepblocks[Block]
> to your document and the blocks will appear. You can also use the same name for the
> blocks as you do use the enumerations, to allow this blocks use begin/end commands
> and not the usual start/stop commands.
or we can change the defaults to show them
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Defining a command for enumeration+block
2010-11-19 4:43 ` Glen Callaghan
@ 2010-11-19 15:49 ` Wolfgang Schuster
2010-11-19 17:11 ` Hans Hagen
0 siblings, 1 reply; 8+ messages in thread
From: Wolfgang Schuster @ 2010-11-19 15:49 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 1095 bytes --]
Am 19.11.2010 um 05:43 schrieb Glen Callaghan:
>
>
>>> 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 can reproduce this but for mkiv (context <file>) the output in both cases is the same.
>
> Wolfgang
>
> Weird... when I try it here on mkiv, there is no output where I define the blocks (see attachment).
>
> I'm trying this on the "current" mimimals (downloaded today) on mac os x (10.6.5).
> [LuaTeX beta-0.64.0-2010111215, ConTeXt ver: 2010.07.30 11:35 MKIV fmt: 2010.11.19]
>
> Could this be some sort of bug? Is there anything you'd like me to try.
With MkIV blocks are hidden by default while MkII prints them, add \keepblocks[Block]
to your document and the blocks will appear. You can also use the same name for the
blocks as you do use the enumerations, to allow this blocks use begin/end commands
and not the usual start/stop commands.
Wolfgang
[-- Attachment #1.2: Type: text/html, Size: 2727 bytes --]
[-- Attachment #2: 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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Defining a command for enumeration+block
[not found] <mailman.307.1290132702.4239.ntg-context@ntg.nl>
@ 2010-11-19 4:43 ` Glen Callaghan
2010-11-19 15:49 ` Wolfgang Schuster
0 siblings, 1 reply; 8+ messages in thread
From: Glen Callaghan @ 2010-11-19 4:43 UTC (permalink / raw)
To: <ntg-context@ntg.nl>
[-- Attachment #1.1: Type: text/plain, Size: 711 bytes --]
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 can reproduce this but for mkiv (context <file>) the output in both cases is the same.
Wolfgang
Weird... when I try it here on mkiv, there is no output where I define the blocks (see attachment).
I'm trying this on the "current" mimimals (downloaded today) on mac os x (10.6.5).
[LuaTeX beta-0.64.0-2010111215, ConTeXt ver: 2010.07.30 11:35 MKIV fmt: 2010.11.19]
Could this be some sort of bug? Is there anything you'd like me to try.
thanks
Glen
[-- Attachment #1.2: Type: text/html, Size: 2501 bytes --]
[-- Attachment #2: blockenum_iv.pdf --]
[-- Type: application/pdf, Size: 8484 bytes --]
[-- Attachment #3: ATT00001.htm --]
[-- Type: text/html, Size: 229 bytes --]
[-- Attachment #4: 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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Defining a command for enumeration+block
2010-11-18 21:44 ` Glen Callaghan
@ 2010-11-18 22:13 ` Wolfgang Schuster
0 siblings, 0 replies; 8+ messages in thread
From: Wolfgang Schuster @ 2010-11-18 22:13 UTC (permalink / raw)
To: mailing list for ConTeXt users
Am 18.11.2010 um 22:44 schrieb Glen Callaghan:
> 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 can reproduce this but for mkiv (context <file>) the output in both cases is the same.
Wolfgang
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Defining a command for enumeration+block
[not found] <mailman.297.1290110799.4239.ntg-context@ntg.nl>
@ 2010-11-18 21:44 ` Glen Callaghan
2010-11-18 22:13 ` Wolfgang Schuster
0 siblings, 1 reply; 8+ messages in thread
From: Glen Callaghan @ 2010-11-18 21:44 UTC (permalink / raw)
To: <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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Defining a command for enumeration+block
2010-11-18 11:15 Glen Callaghan
@ 2010-11-18 18:05 ` Wolfgang Schuster
0 siblings, 0 replies; 8+ messages in thread
From: Wolfgang Schuster @ 2010-11-18 18:05 UTC (permalink / raw)
To: mailing list for ConTeXt users
Am 18.11.2010 um 12:15 schrieb Glen Callaghan:
> Hello,
>
> I'm having some problems using blocks and enumeration together.
>
> I can get it to work using something like this (see complete minimal example further down):
>
> \beginBlock
> \startEnum
> Some text A
> \stopEnum
> \endBlock
>
> But it doesn't seem to work if I try to define a command (macro?) to keep my source file a bit tidier.
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]
\starttext
\beginBlock
Some text A
\endBlock
\stoptext
Wolfgang
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 8+ messages in thread
* Defining a command for enumeration+block
@ 2010-11-18 11:15 Glen Callaghan
2010-11-18 18:05 ` Wolfgang Schuster
0 siblings, 1 reply; 8+ messages in thread
From: Glen Callaghan @ 2010-11-18 11:15 UTC (permalink / raw)
To: ntg-context
Hello,
I'm having some problems using blocks and enumeration together.
I can get it to work using something like this (see complete minimal example further down):
\beginBlock
\startEnum
Some text A
\stopEnum
\endBlock
But it doesn't seem to work if I try to define a command (macro?) to keep my source file a bit tidier.
\define[1]\Revs{
\beginBlock
\startEnum
#1
\stopEnum
\endBlock
}
\Revs{Missing Text B}
I don't get any output from the call \Revs. No doubt I'm doing something silly......
I've also noticed that it breaks if I put the \beginBlock \startEnum commands on the same line, as in:
\beginBlock \startEnum
Some text A
\stopEnum \endBlock
I've been trying this on TeX Live 2010.
thanks
Glen
---------
\defineblock[Block]
\defineenumeration[Enum][location=left,text=Test]
\define[1]\Revs{
\beginBlock
\startEnum
#1
\stopEnum
\endBlock
}
\starttext
\section{Use}
\useblocks[Block]
\reset[Enum]
\section{Define}
\beginBlock
\startEnum
Some text A
\stopEnum
\endBlock
\Revs{Missing Text B}
\stoptext
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2010-11-20 21:24 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <mailman.329.1290186723.4239.ntg-context@ntg.nl>
2010-11-20 21:24 ` Defining a command for enumeration+block 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
[not found] <mailman.297.1290110799.4239.ntg-context@ntg.nl>
2010-11-18 21:44 ` Glen Callaghan
2010-11-18 22:13 ` Wolfgang Schuster
2010-11-18 11:15 Glen Callaghan
2010-11-18 18:05 ` Wolfgang Schuster
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).