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
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
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 -------------------------------------------------------------------------
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 -------------------------------------------------------------------------
\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
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 -------------------------------------------------------------------------
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
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 -------------------------------------------------------------------------
participants (2)
-
Hans Hagen
-
Idris S Hamid