ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Meer, H. van der" <H.vanderMeer@uva.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: \startmode and \ignorespaces
Date: Fri, 14 Oct 2011 08:38:43 +0000	[thread overview]
Message-ID: <BC3B3964-18E1-408D-AADB-B18046B82EC0@uva.nl> (raw)
In-Reply-To: <A68C3FDE-E982-4CEC-8922-C462408AF7FF@xs4all.nl>

[-- Attachment #1: Type: text/plain, Size: 411 bytes --]

I made an example of the effect of this on \doifmode and \startmode. The example shows that the appearance of extra space in \doifmode follows a regular pattern. The startmode case differs in that respect because \startmode[condition-true] has the extra space but \startmode[condition-false] has not. In my view that is an unwanted anomaly. A little redefinition remedies that as can be seen in the example.


[-- Attachment #2: spaces.pdf --]
[-- Type: application/pdf, Size: 15641 bytes --]

[-- Attachment #3: ATT00001.txt --]
[-- Type: text/plain, Size: 1952 bytes --]


On 13 okt. 2011, at 17:43, Hans van der Meer wrote:

> A little while ago I asked whether \doifmode and friends should have an \ignorespaces at the end. Hans Hagen answered "no" and after some reasoning (probably along the same lines as his) I agree with him. Thus one uses in a quite natural way:
>   some text\doifmode{xyz}{ conditional text} following text
> doing nothing else than: some text conditional text following text.
> With regard to this it is understandable and correct that extra space is taken in the next construct:
>   some text \doifmode{xyz}{ conditional text} following text.
> 
> But it looks different to me when using the \startmode .. \stopmode pair.
> ---- some text.
> \startmode[xyz]
> some conditional text.
> \stopmode
> further text.
> 
> In order to avoid here the extra space one has to code an extra %
> ---- some text.
> \startmode[xyz]%
> some conditional text.
> \stopmode
> further text.
> 
> or (not preferred imho):
> ---- some text.%
> \startmode[xyz]
> 
> I think this is error prone as it is al too easy to forget the %. The situation here differs from the \doifmode-case. I tend to believe that the fact that the \startmode[] .. \stopmode construct invites one to separate the statements with newlines (whitespace thus). Therefore I would ask if this plea for an \ignorespaces effect at the end of the \startmode[xyz] should be honored.
> 
> Hans van der Meer
> 
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________


[-- Attachment #4: Type: text/plain, Size: 485 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
___________________________________________________________________________________

  reply	other threads:[~2011-10-14  8:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-13 15:43 Hans van der Meer
2011-10-14  8:38 ` Meer, H. van der [this message]
2011-10-14  9:26   ` Wolfgang Schuster
2011-10-14 10:09     ` Meer, H. van der
2011-10-14 13:21   ` 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=BC3B3964-18E1-408D-AADB-B18046B82EC0@uva.nl \
    --to=h.vandermeer@uva.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).