[NTG-context] \obeyspaces

2011-04-08 Thread Herbert Voss

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 hereto here!\par
\TextWithSpaces{   A gap fromhere  to here!}

\framed{   A gap from here to  here!}\par
\FramedTextWithSpaces{   A gap fromhere  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
___


Re: [NTG-context] Obeyspaces in tables

2009-05-09 Thread Hans Hagen

paul morgan wrote:


Does \obeyspaces work in tables? I cannot determine how to make it do so. In


no, does not work there


the following example, I am unable to maintain the space between the words
"T H E" and "P R O J E C T".


\bTD[ny=2][align=middle]{\ssa
\setbox0\hbox{\ssx 100 East 10th Street, NY 10003}%
\hbox to \wd0{\bf\stretched{THE PROJECT}}\\\box0}%
\eTD


-
  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
___


[NTG-context] Obeyspaces in tables

2009-05-08 Thread paul morgan
Hi,

Does \obeyspaces work in tables? I cannot determine how to make it do so. In
the following example, I am unable to maintain the space between the words
"T H E" and "P R O J E C T".

\bTABLE[width=.5\hsize,frame=off]
\bTR
\bTD[align=right] {\it {\vi Contractor:}} \\ {\ss An organization} \\
 {\ssx 100 West 27th Street, NY 10001} \eTD

\bTD[ny=2][align=middle] {\obeyspaces {\ssa {\bf T H E   P R O J E C T}}} \\
100 East 10th Street, NY 10003 \eTD
\eTR

\bTR
\bTD[align=right] {\it {\vi Sub-contractor:}} \\ {\ss Another organization}
\\ {\ssx 100 Stagg St., Brooklyn 11206} \eTD
\eTR
\eTABLE


Thank you for any help or advice.
___
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
___


Re: [NTG-context] \obeyspaces

2005-08-02 Thread Peter Rolf
Hans Hagen wrote:
> Taco Hoekwater wrote:
> 
>>
>>
>> Peter Rolf wrote:
>>
>>> 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}}%
>>
>>
>>
>> A two-part solution is needed:
>>
>>   \def\TextWithSpaces{\bgroup\obeyspaces\doTextWithSpaces}
>>   \def\doTextWithSpaces#1{\framed{#1}\egroup}
> 
> 
> i suggest that rolf adds en entry to the wiki, with the posted
> solutions, maybe we need a "how tex treats arguments" corner or so
> Hans
done. And my (first) name is Peter. Thank god I have no middle name

Greetings,

Peter

> 
> -
>  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
> -
> 
> ___
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context
> 
> 

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \obeyspaces

2005-08-02 Thread Hans Hagen

Peter Rolf wrote:


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!}

\s


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

just postpone argument loading 

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
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \obeyspaces

2005-08-02 Thread Hans Hagen

Taco Hoekwater wrote:




Peter Rolf wrote:


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}}%



A two-part solution is needed:

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


i suggest that rolf adds en entry to the wiki, with the posted solutions, maybe we need a "how tex treats arguments" corner or so 

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
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \obeyspaces

2005-08-02 Thread Peter Rolf
Taco Hoekwater wrote:
> 
> 
> Peter Rolf wrote:
> 
>> 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}}%
> 
> 
> A two-part solution is needed:
> 
>   \def\TextWithSpaces{\bgroup\obeyspaces\doTextWithSpaces}
>   \def\doTextWithSpaces#1{\framed{#1}\egroup}
> 
stupid me. \obeyspaces changes the cat-code of the space char, so...

> Cheers, Taco
> ___
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context
> 
> 

Many thanks Taco!

Greetings,

Peter
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \obeyspaces

2005-08-02 Thread Taco Hoekwater



Peter Rolf wrote:

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}}%


A two-part solution is needed:

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

Cheers, Taco
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] \obeyspaces

2005-08-02 Thread Peter Rolf
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
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context