ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* \obeyspaces
@ 2005-08-02 10:32 Peter Rolf
  2005-08-02 10:40 ` \obeyspaces Taco Hoekwater
  2005-08-02 13:09 ` \obeyspaces Hans Hagen
  0 siblings, 2 replies; 7+ messages in thread
From: Peter Rolf @ 2005-08-02 10:32 UTC (permalink / raw)


Hi all,

I need to pass a short text as parameter to a defintion. My problem is,
that the significant spaces are removed in this process. Hmm.....no clue.


% interface=en output=pdftex
\starttext

\def\TextWithSpaces#1{\framed{\obeyspaces#1}}%

% output is ok
\framed{\obeyspaces{A gap from here      to here!}}
% no big gap between 'here' and 'to'
\TextWithSpaces{A gap from here      to here!}

\stoptext


Any help is welcome.

Greetings,

Peter

^ permalink raw reply	[flat|nested] 7+ messages in thread
* \obeyspaces
@ 2011-04-08 11:08 Herbert Voss
  0 siblings, 0 replies; 7+ messages in thread
From: Herbert Voss @ 2011-04-08 11:08 UTC (permalink / raw)
  To: mailing list for ConTeXt users

The spaces in front of the lines are not taken
into account for the two defined macros. What to do that
\obeyspaces is also valid for these ones?

\def\TextWithSpaces{\bgroup\obeyspaces\doTextWithSpaces}
\def\FramedTextWithSpaces{\framed\bgroup\obeyspaces\doTextWithSpaces}
\def\doTextWithSpaces#1{#1\egroup}

starttext
     A gap from here        to here!\par
\TextWithSpaces{   A gap from        here      to here!}

\framed{   A gap from here         to  here!}\par
\FramedTextWithSpaces{   A gap from        here      to here!}
\stoptext

current minimal

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

end of thread, other threads:[~2011-04-08 11:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-02 10:32 \obeyspaces Peter Rolf
2005-08-02 10:40 ` \obeyspaces Taco Hoekwater
2005-08-02 10:51   ` \obeyspaces Peter Rolf
2005-08-02 13:11   ` \obeyspaces Hans Hagen
2005-08-02 17:42     ` \obeyspaces Peter Rolf
2005-08-02 13:09 ` \obeyspaces Hans Hagen
2011-04-08 11:08 \obeyspaces Herbert Voss

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