From: Hans Hagen <pragma@wxs.nl>
Subject: Re: A feq questions about eating spaces in macros
Date: Mon, 23 Jan 2006 11:50:18 +0100 [thread overview]
Message-ID: <43D4B4EA.2030102@wxs.nl> (raw)
In-Reply-To: <43D3BB37.4090702@mail.ru>
Radhelorn wrote:
> Hello!
>
> I have a few questions about ignoring unnecessary spaces and blank
> lines. The following example illustrates my problem. In the first
> start/stop pair text after \startcommand is not bold as it should be,
> in the second it is bold but blank line is before. I've tried to fix
> this with various manipulations with \noindent with moderate success.
>
> Another problem is necessity to explicitly add % character before
> \stopcommand to ignore newline. How to do this inside macro with this
> combination of lines and sidebar?
>
> Thanks in advance for any suggestions.
>
> ---------
>
> \setuplines[before=,after=]
>
> \def\startcommand{\dosingleargument\dostartcommand}
>
> \def\dostartcommand[#1]%
> {\bgroup\defineshortcut[style=bold]#1\startlines\startsidebar}
>
> \def\stopcommand{\stopsidebar\stoplines\egroup}
>
> \starttext
>
> \startcommand
> <this must be bold>
> \input knuth
> <this is bold>%
> \stopcommand
>
> some text
>
> \startcommand[arg]
> <this is bold indeed but with a blank line before>
> \input knuth
> \stopcommand
>
> \stoptext
>
>
\ignorespaces ....
... \removeunwantedspaces
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
-----------------------------------------------------------------
next prev parent reply other threads:[~2006-01-23 10:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-22 17:04 Radhelorn
2006-01-23 10:50 ` Hans Hagen [this message]
2006-01-24 13:45 ` A few " Radhelorn
2006-01-25 12:23 ` 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=43D4B4EA.2030102@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).