Re: [dev-context] \textrule and Bidi

2019-12-17 Thread Hans Hagen

On 12/16/2019 10:26 PM, Wolfgang Schuster wrote:


A fix for this is to use \naturalvpack instead of \vpack.

ok.

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
dev-context mailing list
dev-context@ntg.nl
https://mailman.ntg.nl/mailman/listinfo/dev-context


[dev-context] \textrule and Bidi

2019-12-16 Thread Wolfgang Schuster

Hi,

in RTL text direction the middle and bottom alternatives of \textrule 
extend into the right margin.


\setupalign[righttoleft]

\starttext

\textrule[top]{}

\textrule[middle]{}

\textrule[bottom]{}

\stoptext


A fix for this is to use \naturalvpack instead of \vpack.

 pack-mrl.mkiv
\def\pack_textrule_with_text_nop#1%
  {\ifhmode
 \endgraf
   \fi
   \doifelse{\directtextrulesparameter\c!depthcorrection}\v!on
 \pack_textrule_correct_depth_yes
 \pack_textrule_correct_depth_nop
   \nointerlineskip
-  \noindent\vpack % was \dontleavehmode
+  \noindent\naturalvpack % was \dontleavehmode
 {\color[\directtextrulesparameter\c!rulecolor]
    {\hrule
   \s!depth \directtextrulesparameter\c!rulethickness
   \s!height\zeropoint
   \s!width \availablehsize}}}


Wolfgang



textrule.pdf
Description: Adobe PDF document
___
dev-context mailing list
dev-context@ntg.nl
https://mailman.ntg.nl/mailman/listinfo/dev-context