ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* startlines bug(s)
@ 2005-06-16 21:05 Stuart Jansen
  2005-06-17  7:41 ` Taco Hoekwater
  0 siblings, 1 reply; 5+ messages in thread
From: Stuart Jansen @ 2005-06-16 21:05 UTC (permalink / raw)



[-- Attachment #1.1: Type: text/plain, Size: 597 bytes --]

Below is a simple test case that illustrates what I suspect are bugs
with \startlines. I suspect that fixing them will be tricky, so I'm
wondering if anyone can think of work arounds.

\starttext
\bgroup\tt
\ConTeXt\ is A\bgroup\ttsl maz\egroup ing
\setuplines[space=yes]
\startlines
\ConTeXt\ is A\bgroup\ttsl maz\egroup ing
 I didn't expect spaces around "maz"
\stoplines
\setuplines[space=on]
\startlines
\ConTeXt\ is A\bgroup\ttsl maz\egroup ing
 I expected a space marker before "is"
\stoplines\egroup
\stoptext

-- 
Stuart Jansen <sjansen@gurulabs.com>
Guru Labs, L.C.

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

[-- Attachment #2: Type: text/plain, Size: 139 bytes --]

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: startlines bug(s)
  2005-06-16 21:05 startlines bug(s) Stuart Jansen
@ 2005-06-17  7:41 ` Taco Hoekwater
  2005-06-20  9:38   ` h h extern
  0 siblings, 1 reply; 5+ messages in thread
From: Taco Hoekwater @ 2005-06-17  7:41 UTC (permalink / raw)




Stuart Jansen wrote:
> Below is a simple test case that illustrates what I suspect are bugs
> with \startlines. I suspect that fixing them will be tricky, so I'm
> wondering if anyone can think of work arounds.

I'm not sure if they are bugs, because they come as a natural
amd predictable side-effect of using \obeyspaces. Here is an
example of the needed source changes to get your expected
output:

   \starttext
   \bgroup\tt
   \ConTeXt\ is A\bgroup\ttsl maz\egroup ing
   \setuplines[space=yes]
   \startlines
   \ConTeXt\ is A{\ttsl{}maz}ing
    I didn't expect spaces around "maz"
   \stoplines
   \setuplines[space=on]
   \startlines
   \ConTeXt{ }is A{\ttsl{}maz}ing
    I expected a space marker before "is"
   \stoplines\egroup
   \stoptext

Taco

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: startlines bug(s)
  2005-06-17  7:41 ` Taco Hoekwater
@ 2005-06-20  9:38   ` h h extern
  2005-06-20  9:58     ` Taco Hoekwater
  0 siblings, 1 reply; 5+ messages in thread
From: h h extern @ 2005-06-20  9:38 UTC (permalink / raw)


Taco Hoekwater wrote:
> 
> 
> Stuart Jansen wrote:
> 
>> Below is a simple test case that illustrates what I suspect are bugs
>> with \startlines. I suspect that fixing them will be tricky, so I'm
>> wondering if anyone can think of work arounds.
> 
> 
> I'm not sure if they are bugs, because they come as a natural
> amd predictable side-effect of using \obeyspaces. Here is an
> example of the needed source changes to get your expected
> output:
> 
>   \starttext
>   \bgroup\tt
>   \ConTeXt\ is A\bgroup\ttsl maz\egroup ing
>   \setuplines[space=yes]
>   \startlines
>   \ConTeXt\ is A{\ttsl{}maz}ing
>    I didn't expect spaces around "maz"
>   \stoplines
>   \setuplines[space=on]
>   \startlines
>   \ConTeXt{ }is A{\ttsl{}maz}ing
>    I expected a space marker before "is"
>   \stoplines\egroup
>   \stoptext

indeed this is not a bug, tex sees the (active) space not as a space but as a 
terminator and keeps it in place; in addition to taco's solution you can do:

\starttext

\switchtobodyfont[tt]

\setuplines[space=on]

% hacky, so not to be used

\startlines
Let's talk about this{\ttsl\gobbleoneargument or}that.
\stoplines

% verbose and okay

\startlines
Let's talk about this{\getvalue{ttsl}or}that.
\stoplines

% TACO: what do you think of

\let\cs\getvalue

\startlines
Let's talk about this{\cs{ttsl}or}that.
\stoplines

\stoptext

(there is no language or font or whatecver \cs)

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: startlines bug(s)
  2005-06-20  9:38   ` h h extern
@ 2005-06-20  9:58     ` Taco Hoekwater
  2005-06-20 13:17       ` Vit Zyka
  0 siblings, 1 reply; 5+ messages in thread
From: Taco Hoekwater @ 2005-06-20  9:58 UTC (permalink / raw)





h h extern wrote:
> % TACO: what do you think of
> 
> \let\cs\getvalue
> 
> \startlines
> Let's talk about this{\cs{ttsl}or}that.
> \stoplines

Assuming you are not going to use it for czech at some point ... yes

Taco

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: startlines bug(s)
  2005-06-20  9:58     ` Taco Hoekwater
@ 2005-06-20 13:17       ` Vit Zyka
  0 siblings, 0 replies; 5+ messages in thread
From: Vit Zyka @ 2005-06-20 13:17 UTC (permalink / raw)


Taco Hoekwater wrote:
> 
> h h extern wrote:
> 
>> % TACO: what do you think of
>>
>> \let\cs\getvalue
>>
>> \startlines
>> Let's talk about this{\cs{ttsl}or}that.
>> \stoplines
> 
> 
> Assuming you are not going to use it for czech at some point ... yes

That is all right with Czech:
   Czech language -> cz
   Slovac language -> sk

(But you are right, there is a true context: 'cs' was used for 
Czechoslovakia, but the state has not existed for 13 years; Czechoslovac 
language does never exist, so no such abbreviation.)

vit

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-06-20 13:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-16 21:05 startlines bug(s) Stuart Jansen
2005-06-17  7:41 ` Taco Hoekwater
2005-06-20  9:38   ` h h extern
2005-06-20  9:58     ` Taco Hoekwater
2005-06-20 13:17       ` Vit Zyka

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