From: Hans Hagen <pragma@wxs.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: ifdim ... or ... else ...
Date: Wed, 10 Sep 2008 17:15:12 +0200 [thread overview]
Message-ID: <48C7E480.7020805@wxs.nl> (raw)
In-Reply-To: <115224fb0809100712v30b54f07qc179319a4474c297@mail.gmail.com>
Wolfgang Schuster wrote:
> On Wed, Sep 10, 2008 at 2:31 PM, Hans Hagen <pragma@wxs.nl> wrote:
>> Marcin Borkowski wrote:
>>> Dnia Wed, Sep 10, 2008 at 01:49:52PM +0200, Steffen Wolfrum napisał(a):
>>>> Hi,
>>>>
>>>>
>>>> I'd like to change the phrase
>>>>
>>>> "if lastskip equals \EinsSignal set vskip to 0pt else ..."
>>>>
>>>> to
>>>>
>>>> "if lastskip equals \EinsSignal set vskip to 0pt else if lastskip
>>>> equals \\ZweiSignal set vskip to -2pt else ... "
>>>>
>>>>
>>>> in the following code ...
>>>>
>>>> \newsignal\ZweiSignal
>>>> \def\EbeneDreibefore {\ifdim\lastskip=\EinsSignal \vskip-0pt \else
>>>> \blank[20pt]\fi}
>>>> \setuphead[EbeneDrei][...,before=\EbeneDreibefore,...]
>>> What about just that you wrote?
>>>
>>> \ifdim ... \else\ifdim ... \fi\fi
>>>
>>>> Some native (tex)speaker can help me translating?
>>> Non-native, but close (OTOH, not so close as Hans;))
>> ok then, an obscure solution for the natives ... untested:
>>
>> \setvalue{Ebene:\the\dimexpr 0pt\relax}{1pt}
>> \setvalue{Ebene:\the\dimexpr 1pt\relax}{-2pt}
>>
>> \vskip\executeifdefined{Ebene:\the\lastskip}{0pt}\relax
>
> But this is newspeak ;-)
newspeak would be using an attribute and postprocessing the node list -)
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 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 : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
next prev parent reply other threads:[~2008-09-10 15:15 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-10 11:49 Steffen Wolfrum
2008-09-10 12:12 ` Thomas A. Schmitz
2008-09-10 12:15 ` Marcin Borkowski
2008-09-10 12:23 ` was: " Steffen Wolfrum
2008-09-10 12:28 ` Wolfgang Schuster
2008-09-10 12:31 ` Hans Hagen
2008-09-10 14:12 ` Wolfgang Schuster
2008-09-10 15:15 ` Hans Hagen [this message]
2008-09-13 12:18 ` Wolfgang Schuster
2008-09-13 19:25 ` Hans Hagen
2008-09-14 14:30 ` luigi scarso
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=48C7E480.7020805@wxs.nl \
--to=pragma@wxs.nl \
--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).