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
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
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 -----------------------------------------------------------------
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
participants (4)
-
h h extern
-
Stuart Jansen
-
Taco Hoekwater
-
Vit Zyka