ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* interlinespacing
@ 2003-02-05  3:07 Idris S Hamid
  2003-02-06 21:07 ` interlinespacing Idris S Hamid
  2003-02-08 18:56 ` interlinespacing Hans Hagen
  0 siblings, 2 replies; 8+ messages in thread
From: Idris S Hamid @ 2003-02-05  3:07 UTC (permalink / raw)


Dear Board,

It's going to take some work to come up with a test file for this
problem (since the font is not publically available), but let me
describe it anyway:

Arabic visually requires larger font sizes than roman, as well as wider
interline spacing, so Arabic insertions in Latin can create lines of
mixed interline spacing. Very strangely, this problem is more apparent
in itemize environments and the like than in regular text. Question: is
there a way to turn off interline spacing completely for my insertions
when necessary. Insertions are defined in terms of \startarabictext
\stoparabictext environments:

\definestartstop
  [arabictext]
  [commands=%
    {\osetarabdirtext % switches to RL mode
    \arabictextfont % switches to Arabic
    \vocalizeinsertdefault} % calls default otp list for vocalization
    ]

Idris

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

* Re: interlinespacing
  2003-02-05  3:07 interlinespacing Idris S Hamid
@ 2003-02-06 21:07 ` Idris S Hamid
  2003-02-07 12:45   ` interlinespacing Hans Hagen
  2003-02-08 18:56 ` interlinespacing Hans Hagen
  1 sibling, 1 reply; 8+ messages in thread
From: Idris S Hamid @ 2003-02-06 21:07 UTC (permalink / raw)


> It's going to take some work to come up with a test file for this
> problem (since the font is not publically available), but let me
> describe it anyway:

Silly me, coming up with an example is the most trivial thing, since only
the size and not the typeface is the relevant issue:

\starttext

Thus, I came to the conclusion that the designer of a new system
must not only be the implementer and first large||scale user;
{\tfb the designer should also write the first user manual}. The
separation of any of these four components would have hurt \TeX\
significantly. If I had not participated fully in all these
activities, literally hundreds of improvements would never have
been made, because I would never have thought of them or perceived
why they were important.

\stoptext

The {\tfb} line has more interlinespacing of course. Is there a way I can
force ConTeXt to reduce the interline spacing of the {\tfb } insert so that
all the lines are even (even if the insertion overlaps the main text)? My
own insertions are in terms of \start\stop environments so presumably the
same solution will apply there. There are some cases where this will look
much nicer.

Thnx in advance
Idris

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

* Re: interlinespacing
  2003-02-06 21:07 ` interlinespacing Idris S Hamid
@ 2003-02-07 12:45   ` Hans Hagen
  0 siblings, 0 replies; 8+ messages in thread
From: Hans Hagen @ 2003-02-07 12:45 UTC (permalink / raw)


At 02:07 PM 2/6/2003 -0700, you wrote:
> > It's going to take some work to come up with a test file for this
> > problem (since the font is not publically available), but let me
> > describe it anyway:
>
>Silly me, coming up with an example is the most trivial thing, since only
>the size and not the typeface is the relevant issue:
>
>\starttext
>
>Thus, I came to the conclusion that the designer of a new system
>must not only be the implementer and first large||scale user;
>{\tfb the designer should also write the first user manual}. The
>separation of any of these four components would have hurt \TeX\
>significantly. If I had not participated fully in all these
>activities, literally hundreds of improvements would never have
>been made, because I would never have thought of them or perceived
>why they were important.
>
>\stoptext
>
>The {\tfb} line has more interlinespacing of course. Is there a way I can
>force ConTeXt to reduce the interline spacing of the {\tfb } insert so that
>all the lines are even (even if the insertion overlaps the main text)? My
>own insertions are in terms of \start\stop environments so presumably the
>same solution will apply there. There are some cases where this will look
>much nicer.

for something short inline you can use \struttedbox{some text} but 
otherwise the only thing you can do is accept, unless you want things like

\beginshapebox \bfd \dorecurse{100}{(test) }\endshapebox

\reshapebox{\ruledhbox{\struttedbox{\box\shapebox}}} \flushshapebox

which you don't want

Hans

-------------------------------------------------------------------------
                                   Hans Hagen | PRAGMA ADE | pragma@wxs.nl
                       Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
                        information: http://www.pragma-ade.com/roadmap.pdf
                     documentation: http://www.pragma-ade.com/showcase.pdf
-------------------------------------------------------------------------

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

* Re: interlinespacing
  2003-02-05  3:07 interlinespacing Idris S Hamid
  2003-02-06 21:07 ` interlinespacing Idris S Hamid
@ 2003-02-08 18:56 ` Hans Hagen
  2003-02-09 22:30   ` interlinespacing Idris S Hamid
  1 sibling, 1 reply; 8+ messages in thread
From: Hans Hagen @ 2003-02-08 18:56 UTC (permalink / raw)


At 08:07 PM 2/4/2003 -0700, Idris S Hamid wrote:
>Dear Board,
>
>It's going to take some work to come up with a test file for this
>problem (since the font is not publically available), but let me
>describe it anyway:
>
>Arabic visually requires larger font sizes than roman, as well as wider
>interline spacing, so Arabic insertions in Latin can create lines of
>mixed interline spacing. Very strangely, this problem is more apparent
>in itemize environments and the like than in regular text. Question: is
>there a way to turn off interline spacing completely for my insertions
>when necessary. Insertions are defined in terms of \startarabictext
>\stoparabictext environments:
>
>\definestartstop
>   [arabictext]
>   [commands=%
>     {\osetarabdirtext % switches to RL mode
>     \arabictextfont % switches to Arabic
>     \vocalizeinsertdefault} % calls default otp list for vocalization
>     ]

this should be a font characteristics (glyph boundingboxes smaller than 
normal.

\long\def\startarabictext#1\stoparabictext
   {{\bfd\processisolatedwords{#1}\struttedbox}}
     ^^ otp switches

\long\def\arabictext#1{\startarabictext#1\stoparabictext}

\dorecurse{10}
   {test test \startarabictext well o well\stoparabictext test }

i have no idea if this works well with arabic

Hans
-------------------------------------------------------------------------
                                   Hans Hagen | PRAGMA ADE | pragma@wxs.nl
                       Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
                        information: http://www.pragma-ade.com/roadmap.pdf
                     documentation: http://www.pragma-ade.com/showcase.pdf
-------------------------------------------------------------------------

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

* Re: interlinespacing
  2003-02-08 18:56 ` interlinespacing Hans Hagen
@ 2003-02-09 22:30   ` Idris S Hamid
  2003-02-10  9:03     ` interlinespacing Hans Hagen
  0 siblings, 1 reply; 8+ messages in thread
From: Idris S Hamid @ 2003-02-09 22:30 UTC (permalink / raw)


> \long\def\startarabictext#1\stoparabictext
>    {{\bfd\processisolatedwords{#1}\struttedbox}}
>      ^^ otp switches
>
> \long\def\arabictext#1{\startarabictext#1\stoparabictext}
>
> \dorecurse{10}
>    {test test \startarabictext well o well\stoparabictext test }
>
> i have no idea if this works well with arabic

This works beautifully! There is only one (unfortunately major) glitch:

I have defined my inserts to use `<' and `>', but I'm having problems
defining
the above macros in these terms. Compare the first and second paragraphs
in
the following: the first works fine but the second reports a "Runaway
Argument?" How can I fix this? I don't want to activate the angle
brackets
inside of the definition since in some applications I use them for other
things (like in critical editions).

The following test file illustrates the problem.

==========================
\long\def\startarabictext#1\stoparabictext
   {{\bfd\processisolatedwords{#1}\struttedbox}}

\long\def\arabictext#1{\startarabictext#1\stoparabictext}

\catcode`\<=\active
\catcode`\>=\active
\def\startarabictextv{\startarabictext}
\let<=\startarabictextv
\let>=\stoparabictext

\starttext

Thus, I came to the conclusion that the designer of a new system
must not only be the implementer and first
\startarabictext test \stoparabictext
large-scale user; the designer should also write the first user manual.

Thus, I came to the conclusion that the designer of a new system
must not only be the implementer and first
<test>
large-scale user; the designer should also write the first user manual.

\stoptext
==========================

All the best
Idris

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

* Re: interlinespacing
  2003-02-09 22:30   ` interlinespacing Idris S Hamid
@ 2003-02-10  9:03     ` Hans Hagen
  2003-02-13 22:43       ` interlinespacing Idris S Hamid
  0 siblings, 1 reply; 8+ messages in thread
From: Hans Hagen @ 2003-02-10  9:03 UTC (permalink / raw)


At 03:30 PM 2/9/2003 -0700, Idris S Hamid wrote:
> > \long\def\startarabictext#1\stoparabictext
> >    {{\bfd\processisolatedwords{#1}\struttedbox}}
> >      ^^ otp switches
> >
> > \long\def\arabictext#1{\startarabictext#1\stoparabictext}
> >
> > \dorecurse{10}
> >    {test test \startarabictext well o well\stoparabictext test }
> >
> > i have no idea if this works well with arabic
>
>This works beautifully! There is only one (unfortunately major) glitch:
>
>I have defined my inserts to use `<' and `>', but I'm having problems
>defining
>the above macros in these terms. Compare the first and second paragraphs
>in
>the following: the first works fine but the second reports a "Runaway
>Argument?" How can I fix this? I don't want to activate the angle
>brackets
>inside of the definition since in some applications I use them for other
>things (like in critical editions).
>
>The following test file illustrates the problem.
>
>==========================
>\long\def\startarabictext#1\stoparabictext
>    {{\bfd\processisolatedwords{#1}\struttedbox}}
>
>\long\def\arabictext#1{\startarabictext#1\stoparabictext}
>
>\catcode`\<=\active
>\catcode`\>=\active
>\def\startarabictextv{\startarabictext}
>\let<=\startarabictextv
>\let>=\stoparabictext
>
>\starttext
>
>Thus, I came to the conclusion that the designer of a new system
>must not only be the implementer and first
>\startarabictext test \stoparabictext
>large-scale user; the designer should also write the first user manual.
>
>Thus, I came to the conclusion that the designer of a new system
>must not only be the implementer and first
><test>
>large-scale user; the designer should also write the first user manual.
>
>\stoptext
>==========================

you need a delimited def, so

   \catcode`\<=\active \def<#1>{\startarabictext#1\stoparabictext}

or nicer:

   \defineactivecharacter < {\quickanddirtyarabic}

   \def\quickanddirtyarabic#1>{\startarabictext#1\stoparabictext}

Hans
-------------------------------------------------------------------------
                                   Hans Hagen | PRAGMA ADE | pragma@wxs.nl
                       Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
                        information: http://www.pragma-ade.com/roadmap.pdf
                     documentation: http://www.pragma-ade.com/showcase.pdf
-------------------------------------------------------------------------

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

* Re: interlinespacing
  2003-02-10  9:03     ` interlinespacing Hans Hagen
@ 2003-02-13 22:43       ` Idris S Hamid
  2003-02-14  8:32         ` interlinespacing Hans Hagen
  0 siblings, 1 reply; 8+ messages in thread
From: Idris S Hamid @ 2003-02-13 22:43 UTC (permalink / raw)


Hans Hagen wrote:

> you need a delimited def, so
>
>    \catcode`\<=\active \def<#1>{\startarabictext#1\stoparabictext}
>
> or nicer:
>
>    \defineactivecharacter < {\quickanddirtyarabic}
>
>    \def\quickanddirtyarabic#1>{\startarabictext#1\stoparabictext}

Great! Everything will look so much nicer now.

Best
Idris

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

* Re: interlinespacing
  2003-02-13 22:43       ` interlinespacing Idris S Hamid
@ 2003-02-14  8:32         ` Hans Hagen
  0 siblings, 0 replies; 8+ messages in thread
From: Hans Hagen @ 2003-02-14  8:32 UTC (permalink / raw)


At 03:43 PM 2/13/2003 -0700, you wrote:
>Hans Hagen wrote:
>
> > you need a delimited def, so
> >
> >    \catcode`\<=\active \def<#1>{\startarabictext#1\stoparabictext}
> >
> > or nicer:
> >
> >    \defineactivecharacter < {\quickanddirtyarabic}
> >
> >    \def\quickanddirtyarabic#1>{\startarabictext#1\stoparabictext}
>
>Great! Everything will look so much nicer now.

ok, so test it and later we will see how it can end up in a proper environment

Hans

-------------------------------------------------------------------------
                                   Hans Hagen | PRAGMA ADE | pragma@wxs.nl
                       Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
                        information: http://www.pragma-ade.com/roadmap.pdf
                     documentation: http://www.pragma-ade.com/showcase.pdf
-------------------------------------------------------------------------

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

end of thread, other threads:[~2003-02-14  8:32 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-05  3:07 interlinespacing Idris S Hamid
2003-02-06 21:07 ` interlinespacing Idris S Hamid
2003-02-07 12:45   ` interlinespacing Hans Hagen
2003-02-08 18:56 ` interlinespacing Hans Hagen
2003-02-09 22:30   ` interlinespacing Idris S Hamid
2003-02-10  9:03     ` interlinespacing Hans Hagen
2003-02-13 22:43       ` interlinespacing Idris S Hamid
2003-02-14  8:32         ` interlinespacing Hans Hagen

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