[NTG-context] \hangindent and R2L alignment

Wolfgang Schuster schuster.wolfgang at gmail.com
Wed Sep 23 22:15:59 CEST 2015


Hi,

there was a question on the Stackexchange site [*] with a problem
for the \starthanging environment when the alignment is R2L.


Here is shortened version of the example:

%%%% begin example
\useMPlibrary[dum]

\starttext

\starthanging[location=left]{\externalfigure[dummy][width=4cm,height=3\lineheight]}
\input tufte
\stophanging

\blank

\startalignment[righttoleft]
     
\starthanging[location=left]{\externalfigure[dummy][width=4cm,height=3\lineheight]}
     \input tufte
     \stophanging
\stopalignment

\stoptext
%%%% end example


The problem is that \hangindent behaves the same for L2R and R2L 
alignment unlike
the other formatting commands (\hangindent or \leftskip) for paragraphs.

%%%% begin example
\showframe[text][text]

\setuphead
   [subject]
   [align=lefttoright,
    indentnext=yes]

\starttext

\startbuffer

\subject{Normal paragraph}

\input ward

\subject{Leftskip}

\start
     \leftskip 4em
     \input ward\par
\stop

\subject{Parindent}

\start

     \parindent 4em
     \input ward\par

\stop

\subject{Hangindent}

\start
     \hangindent 4em
     \hangafter -2
     \input ward\par
\stop

\stopbuffer

\title{Left to right}

\startalignment[lefttoright]
\getbuffer
\stopalignment

\title{Right to left}

\startalignment[righttoleft]
\getbuffer
\stopalignment

\stoptext
%%%% end example


[*] 
http://tex.stackexchange.com/questions/268688/correct-inconsistent-image-placement-across-direction-boundaries-in-context

Wolfgang


More information about the ntg-context mailing list