ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Indents, enumerations, and modes (mk2+mk4)
@ 2010-06-01 22:14 Matthias Weber
  2010-06-02  3:32 ` Wolfgang Schuster
  0 siblings, 1 reply; 3+ messages in thread
From: Matthias Weber @ 2010-06-01 22:14 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Dear all,

I have two questions regarding using spacing in enumerations.  
Depending on a mode being enabled, I would like to add a command at  
the beginning of
an enumeration (I want to place something in the margin, but it  
doesn't actually matter what I do, only when).
  As shown in the minimal example below, invoking the macro that does  
something, a little extra space is added.
I don't know why, it is probably something very TeX-basic I am  
ignorant of. So: How do I get rid of the extra space?
The problem occurs both in mk2 and mk4, I would prefer a solution that  
also works in mk2.

Thanks!


Matthias



\def\mma{
\startmode	[mma]
			{}
\stopmode
}



\def\enwidth{5em}


\defineenumeration	[example]
				[text=Example,
				way=bysubsection,
				location=hanging,
				width=\enwidth,
				letter=rm]


\starttext


\enablemode[mma]
\startexample
\mma
\input tufte
\stopexample

%%

\disablemode[mma]
\startexample
\mma
\input tufte
\stopexample

%%

\startexample
\input tufte
\stopexample



\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] 3+ messages in thread

* Re: Indents, enumerations, and modes (mk2+mk4)
  2010-06-01 22:14 Indents, enumerations, and modes (mk2+mk4) Matthias Weber
@ 2010-06-02  3:32 ` Wolfgang Schuster
  2010-06-02  8:07   ` Aditya Mahajan
  0 siblings, 1 reply; 3+ messages in thread
From: Wolfgang Schuster @ 2010-06-02  3:32 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Am 02.06.10 00:14, schrieb Matthias Weber:
> Dear all,
>
> I have two questions regarding using spacing in enumerations. 
> Depending on a mode being enabled, I would like to add a command at 
> the beginning of
> an enumeration (I want to place something in the margin, but it 
> doesn't actually matter what I do, only when).
>  As shown in the minimal example below, invoking the macro that does 
> something, a little extra space is added.
> I don't know why, it is probably something very TeX-basic I am 
> ignorant of. So: How do I get rid of the extra space?
> The problem occurs both in mk2 and mk4, I would prefer a solution that 
> also works in mk2.
>
> Thanks!
>
>
> Matthias
>
>
>
> \def\mma{
> \startmode    [mma]
>             {}
> \stopmode
> }

\def\mma
   {\startmode[mma]% not sure here
    ...%
    \stopmode}

or use setups

\startsetups[mma]
\startmode[mma]
...
\stopmode
\stopsetups

\startexample
\setups[mma]
\stopexample

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] 3+ messages in thread

* Re: Indents, enumerations, and modes (mk2+mk4)
  2010-06-02  3:32 ` Wolfgang Schuster
@ 2010-06-02  8:07   ` Aditya Mahajan
  0 siblings, 0 replies; 3+ messages in thread
From: Aditya Mahajan @ 2010-06-02  8:07 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Wed, 2 Jun 2010, Wolfgang Schuster wrote:

> Am 02.06.10 00:14, schrieb Matthias Weber:
>>  Dear all,
>>
>>  I have two questions regarding using spacing in enumerations. Depending on
>>  a mode being enabled, I would like to add a command at the beginning of
>>  an enumeration (I want to place something in the margin, but it doesn't
>>  actually matter what I do, only when).
>>  As shown in the minimal example below, invoking the macro that does
>>  something, a little extra space is added.
>>  I don't know why, it is probably something very TeX-basic I am ignorant
>>  of. So: How do I get rid of the extra space?
>>  The problem occurs both in mk2 and mk4, I would prefer a solution that
>>  also works in mk2.
>>
>>  Thanks!
>> 
>>
>>  Matthias
>> 
>> 
>>
>>  \def\mma{
>>  \startmode    [mma]
>>              {}
>>  \stopmode
>>  }
>
> \def\mma
>   {\startmode[mma]% not sure here
>    ...%
>    \stopmode}

or maybe

\def\mma{\doifmode{mma}{....}}

or perhaps

\def\mma{}%default

% override the definition in a mode
\startmode[mma]
\def\mma{in mode mma}
\stopmode

> or use setups

Aditya
___________________________________________________________________________________
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] 3+ messages in thread

end of thread, other threads:[~2010-06-02  8:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-01 22:14 Indents, enumerations, and modes (mk2+mk4) Matthias Weber
2010-06-02  3:32 ` Wolfgang Schuster
2010-06-02  8:07   ` Aditya Mahajan

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).