diff options
author | Hans Hagen <pragma@wxs.nl> | 2020-08-14 09:36:25 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2020-08-14 09:36:25 +0200 |
commit | e4473c5bfc835fe69b7e85c1deef4aacce63a291 (patch) | |
tree | 7f905bb8bcc45ae6a69e2486dd6273754139964b /doc/context/sources/general/manuals/luametatex/luametatex-enhancements.tex | |
parent | 4f97d7d7cd942dfe76cd4bb54fc3f5b890654235 (diff) | |
download | context-e4473c5bfc835fe69b7e85c1deef4aacce63a291.tar.gz |
2020-08-13 19:45:00
Diffstat (limited to 'doc/context/sources/general/manuals/luametatex/luametatex-enhancements.tex')
-rw-r--r-- | doc/context/sources/general/manuals/luametatex/luametatex-enhancements.tex | 196 |
1 files changed, 99 insertions, 97 deletions
diff --git a/doc/context/sources/general/manuals/luametatex/luametatex-enhancements.tex b/doc/context/sources/general/manuals/luametatex/luametatex-enhancements.tex index 687e6e8b5..03dfc1bad 100644 --- a/doc/context/sources/general/manuals/luametatex/luametatex-enhancements.tex +++ b/doc/context/sources/general/manuals/luametatex/luametatex-enhancements.tex @@ -1728,106 +1728,108 @@ convenience extra which could also have been implemented using node list parsing \stopsubsection -\startsubsection[title={Controlling glue with \lpr {breakafterdirmode}}] - -Glue after a dir node is ignored in the linebreak decision but you can bypass that -by setting \lpr {breakafterdirmode} to~\type {1}. The following table shows the -difference. Watch your spaces. - -\def\ShowSome#1{% - \BC \type{#1} - \NC \breakafterdirmode\zerocount\hsize\zeropoint#1 - \NC - \NC \breakafterdirmode\plusone\hsize\zeropoint#1 - \NC - \NC \NR -} - -\starttabulate[|l|Tp(1pt)|w(5em)|Tp(1pt)|w(5em)|] - \DB - \BC \type{0} - \NC - \BC \type{1} - \NC - \NC \NR - \TB - \ShowSome{pre {\textdirection 0 xxx} post} - \ShowSome{pre {\textdirection 0 xxx }post} - \ShowSome{pre{ \textdirection 0 xxx} post} - \ShowSome{pre{ \textdirection 0 xxx }post} - \ShowSome{pre { \textdirection 0 xxx } post} - \ShowSome{pre {\textdirection 0\relax\space xxx} post} - \LL -\stoptabulate - -\stopsubsection +\startsubsection[title={Normalizing lines}] -\startsubsection[title={Controlling parshapes with \lpr {shapemode}}] +{\em Experimental!} -Another adaptation to the \ALEPH\ directional model is control over shapes driven -by \prm {hangindent} and \prm {parshape}. This is controlled by a new parameter -\lpr {shapemode}: - -\starttabulate[|c|l|l|] -\DB value \BC \prm {hangindent} \BC \prm {parshape} \NC \NR -\TB -\BC \type{0} \NC normal \NC normal \NC \NR -\BC \type{1} \NC mirrored \NC normal \NC \NR -\BC \type{2} \NC normal \NC mirrored \NC \NR -\BC \type{3} \NC mirrored \NC mirrored \NC \NR -\LL -\stoptabulate +% Swapping shapes +% +% Another adaptation to the \ALEPH\ directional model is control over shapes driven +% by \prm {hangindent} and \prm {parshape}. This is controlled by a new parameter +% \lpr {shapemode}: +% +% \starttabulate[|c|l|l|] +% \DB value \BC \prm {hangindent} \BC \prm {parshape} \NC \NR +% \TB +% \BC \type{0} \NC normal \NC normal \NC \NR +% \BC \type{1} \NC mirrored \NC normal \NC \NR +% \BC \type{2} \NC normal \NC mirrored \NC \NR +% \BC \type{3} \NC mirrored \NC mirrored \NC \NR +% \LL +% \stoptabulate +% +% The value is reset to zero (like \prm {hangindent} and \prm {parshape}) +% after the paragraph is done with. You can use negative values to prevent +% this. In \in {figure} [fig:shapemode] a few examples are given. +% +% \startplacefigure[reference=fig:shapemode,title={The effect of \type {shapemode}.}] +% \startcombination[2*3] +% {\ruledvbox \bgroup \setuptolerance[verytolerant] +% \hsize .45\textwidth \switchtobodyfont[6pt] +% \pardirection 0 \textdirection 0 +% \hangindent 40pt \hangafter -3 +% \leftskip10pt \input tufte \par +% \egroup} {TLT: hangindent} +% {\ruledvbox \bgroup \setuptolerance[verytolerant] +% \hsize .45\textwidth \switchtobodyfont[6pt] +% \pardirection 0 \textdirection 0 +% \parshape 4 0pt .8\hsize 10pt .8\hsize 20pt .8\hsize 0pt \hsize +% \input tufte \par +% \egroup} {TLT: parshape} +% {\ruledvbox \bgroup \setuptolerance[verytolerant] +% \hsize .45\textwidth \switchtobodyfont[6pt] +% \pardirection 1 \textdirection 1 +% \hangindent 40pt \hangafter -3 +% \leftskip10pt \input tufte \par +% \egroup} {TRT: hangindent mode 0} +% {\ruledvbox \bgroup \setuptolerance[verytolerant] +% \hsize .45\textwidth \switchtobodyfont[6pt] +% \pardirection 1 \textdirection 1 +% \parshape 4 0pt .8\hsize 10pt .8\hsize 20pt .8\hsize 0pt \hsize +% \input tufte \par +% \egroup} {TRT: parshape mode 0} +% {\ruledvbox \bgroup \setuptolerance[verytolerant] +% \hsize .45\textwidth \switchtobodyfont[6pt] +% \shapemode=3 +% \pardirection 1 \textdirection 1 +% \hangindent 40pt \hangafter -3 +% \leftskip10pt \input tufte \par +% \egroup} {TRT: hangindent mode 1 & 3} +% {\ruledvbox \bgroup \setuptolerance[verytolerant] +% \hsize .45\textwidth \switchtobodyfont[6pt] +% \shapemode=3 +% \pardirection 1 \textdirection 1 +% \parshape 4 0pt .8\hsize 10pt .8\hsize 20pt .8\hsize 0pt \hsize +% \input tufte \par +% \egroup} {TRT: parshape mode 2 & 3} +% \stopcombination +% \stopplacefigure +% +% We have \type {\pardirection}, \type {\textdirection}, \type {\mathdirection} and +% \type {\linedirection} that is like \type {\textdirection} but with some +% additional (inline) glue checking. -The value is reset to zero (like \prm {hangindent} and \prm {parshape}) -after the paragraph is done with. You can use negative values to prevent -this. In \in {figure} [fig:shapemode] a few examples are given. - -\startplacefigure[reference=fig:shapemode,title={The effect of \type {shapemode}.}] - \startcombination[2*3] - {\ruledvbox \bgroup \setuptolerance[verytolerant] - \hsize .45\textwidth \switchtobodyfont[6pt] - \pardirection 0 \textdirection 0 - \hangindent 40pt \hangafter -3 - \leftskip10pt \input tufte \par - \egroup} {TLT: hangindent} - {\ruledvbox \bgroup \setuptolerance[verytolerant] - \hsize .45\textwidth \switchtobodyfont[6pt] - \pardirection 0 \textdirection 0 - \parshape 4 0pt .8\hsize 10pt .8\hsize 20pt .8\hsize 0pt \hsize - \input tufte \par - \egroup} {TLT: parshape} - {\ruledvbox \bgroup \setuptolerance[verytolerant] - \hsize .45\textwidth \switchtobodyfont[6pt] - \pardirection 1 \textdirection 1 - \hangindent 40pt \hangafter -3 - \leftskip10pt \input tufte \par - \egroup} {TRT: hangindent mode 0} - {\ruledvbox \bgroup \setuptolerance[verytolerant] - \hsize .45\textwidth \switchtobodyfont[6pt] - \pardirection 1 \textdirection 1 - \parshape 4 0pt .8\hsize 10pt .8\hsize 20pt .8\hsize 0pt \hsize - \input tufte \par - \egroup} {TRT: parshape mode 0} - {\ruledvbox \bgroup \setuptolerance[verytolerant] - \hsize .45\textwidth \switchtobodyfont[6pt] - \shapemode=3 - \pardirection 1 \textdirection 1 - \hangindent 40pt \hangafter -3 - \leftskip10pt \input tufte \par - \egroup} {TRT: hangindent mode 1 & 3} - {\ruledvbox \bgroup \setuptolerance[verytolerant] - \hsize .45\textwidth \switchtobodyfont[6pt] - \shapemode=3 - \pardirection 1 \textdirection 1 - \parshape 4 0pt .8\hsize 10pt .8\hsize 20pt .8\hsize 0pt \hsize - \input tufte \par - \egroup} {TRT: parshape mode 2 & 3} - \stopcombination -\stopplacefigure - -We have \type {\pardirection}, \type {\textdirection}, \type {\mathdirection} and -\type {\linedirection} that is like \type {\textdirection} but with some -additional (inline) glue checking. +% Controlling glue with \lpr {breakafterdirmode} +% +% Glue after a dir node is ignored in the linebreak decision but you can bypass that +% by setting \lpr {breakafterdirmode} to~\type {1}. The following table shows the +% difference. Watch your spaces. +% +% \def\ShowSome#1{% +% \BC \type{#1} +% \NC \breakafterdirmode\zerocount\hsize\zeropoint#1 +% \NC +% \NC \breakafterdirmode\plusone\hsize\zeropoint#1 +% \NC +% \NC \NR +% } +% +% \starttabulate[|l|Tp(1pt)|w(5em)|Tp(1pt)|w(5em)|] +% \DB +% \BC \type{0} +% \NC +% \BC \type{1} +% \NC +% \NC \NR +% \TB +% \ShowSome{pre {\textdirection 0 xxx} post} +% \ShowSome{pre {\textdirection 0 xxx }post} +% \ShowSome{pre{ \textdirection 0 xxx} post} +% \ShowSome{pre{ \textdirection 0 xxx }post} +% \ShowSome{pre { \textdirection 0 xxx } post} +% \ShowSome{pre {\textdirection 0\relax\space xxx} post} +% \LL +% \stoptabulate \stopsubsection |