[latex3-commits] [git/LaTeX3-latex3-latex2e] picture-lengths: documentation (dd908566)

David Carlisle d.p.carlisle at gmail.com
Sun Aug 16 10:40:16 CEST 2020


Repository : https://github.com/latex3/latex2e
On branch  : picture-lengths
Link       : https://github.com/latex3/latex2e/commit/dd908566f39d4ea44f53db96329f4a38459f109e

>---------------------------------------------------------------

commit dd908566f39d4ea44f53db96329f4a38459f109e
Author: David Carlisle <d.p.carlisle at gmail.com>
Date:   Sun Aug 16 09:40:16 2020 +0100

    documentation


>---------------------------------------------------------------

dd908566f39d4ea44f53db96329f4a38459f109e
 base/ltpictur.dtx | 76 ++++++++++++++++++++++++++++++++++++++++---------------
 1 file changed, 55 insertions(+), 21 deletions(-)

diff --git a/base/ltpictur.dtx b/base/ltpictur.dtx
index ff5b7298..fdd0e64a 100644
--- a/base/ltpictur.dtx
+++ b/base/ltpictur.dtx
@@ -192,12 +192,26 @@
 % \end{macro}
 %
 % \begin{macro}{\@defaultunitsset}
+% \changes{v1.2a}{2020/08/15}{Macro added}
+% Set a length register, |#1|,
+% accepting number or an etex length expression, |#2|,
+% with default unit, |#3|.
+%
+% |#3| can be a literal unit such as |cm| or a length register such
+% as |\unitlength|.
+%
+% This is used in all |picture| commands that take picture coordinates.
+% So |\put(2,2)| as previously but now |\put(\textwidth-5cm,0.4\texteight)|
+% Note that you can only use expressions with lengths, |\put(1+2,0)| is not
+% supported.
+% 
 %    \begin{macrocode}
 %</2ekernel>
 %<*2ekernel|latexrelease>
 %<latexrelease>\IncludeInRelease{2020/10/01}%
 %<latexrelease>                 {\@defaultunitsset}{default units}%
-\def\@defaultunitsset#1#2#3{\@defaultunits#1\dimexpr#2#3\relax\relax\@nnil}
+\def\@defaultunitsset#1#2#3{%
+  \@defaultunits#1\dimexpr#2#3\relax\relax\@nnil}
 %</2ekernel|latexrelease>
 %    \end{macrocode}
 %    
@@ -1044,7 +1058,8 @@
 %<latexrelease>\IncludeInRelease{0000/00/00}%
 %<latexrelease>                 {\dashbox}{default units}%
 %<latexrelease>\expandafter\let\csname dashbox \endcsname\@undefind
-%<latexrelease>\def\dashbox#1(#2,#3){\leavevmode\hb at xt@\z@{\baselineskip \z at skip
+%<latexrelease>\def\dashbox#1(#2,#3){%
+%<latexrelease>\leavevmode\hb at xt@\z@{\baselineskip \z at skip
 %<latexrelease>\lineskip \z at skip
 %<latexrelease>\@dashdim #2\unitlength
 %<latexrelease>\@dashcnt \@dashdim \advance\@dashcnt 200
@@ -1053,15 +1068,17 @@
 %<latexrelease>\advance\@dashcnt \@ne \divide\@dashcnt \tw@
 %<latexrelease>\else \divide\@dashdim \tw@ \divide\@dashcnt \tw@
 %<latexrelease>\advance\@dashcnt \m at ne
-%<latexrelease>\setbox\@dashbox \hbox{\vrule \@height \@halfwidth \@depth \@halfwidth
-%<latexrelease>\@width \@dashdim}\put(0,0){\copy\@dashbox}%
+%<latexrelease>\setbox\@dashbox \hbox{%
+%<latexrelease>  \vrule \@height \@halfwidth \@depth \@halfwidth
+%<latexrelease>  \@width \@dashdim}\put(0,0){\copy\@dashbox}%
 %<latexrelease>\put(0,#3){\copy\@dashbox}%
 %<latexrelease>\put(#2,0){\hskip-\@dashdim\copy\@dashbox}%
 %<latexrelease>\put(#2,#3){\hskip-\@dashdim\box\@dashbox}%
 %<latexrelease>\multiply\@dashdim \thr@@
 %<latexrelease>\fi
-%<latexrelease>\setbox\@dashbox \hbox{\vrule \@height \@halfwidth \@depth \@halfwidth
-%<latexrelease>\@width #1\unitlength\hskip #1\unitlength}\@tempcnta\z@
+%<latexrelease>\setbox\@dashbox \hbox{%
+%<latexrelease>  \vrule \@height \@halfwidth \@depth \@halfwidth
+%<latexrelease>  \@width #1\unitlength\hskip #1\unitlength}\@tempcnta\z@
 %<latexrelease>\put(0,0){\hskip\@dashdim \@whilenum \@tempcnta <\@dashcnt
 %<latexrelease>\do{\copy\@dashbox\advance\@tempcnta \@ne }}\@tempcnta\z@
 %<latexrelease>\put(0,#3){\hskip\@dashdim \@whilenum \@tempcnta <\@dashcnt
@@ -1084,12 +1101,16 @@
 %<latexrelease>\fi
 %<latexrelease>\setbox\@dashbox\hbox{\vrule \@width \@wholewidth
 %<latexrelease>\@height #1\unitlength}\@tempcnta\z@
-%<latexrelease>\put(0,0){\hskip -\@halfwidth \vbox{\@whilenum \@tempcnta <\@dashcnt
-%<latexrelease>\do{\vskip #1\unitlength\copy\@dashbox\advance\@tempcnta \@ne }%
-%<latexrelease>\vskip\@dashdim}}\@tempcnta\z@
-%<latexrelease>\put(#2,0){\hskip -\@halfwidth \vbox{\@whilenum \@tempcnta<\@dashcnt
-%<latexrelease>\do{\vskip #1\unitlength\copy\@dashbox\advance\@tempcnta \@ne }%
-%<latexrelease>\vskip\@dashdim}}}\@makepicbox(#2,#3)}
+%<latexrelease>\put(0,0){%
+%<latexrelease>  \hskip -\@halfwidth \vbox{\@whilenum \@tempcnta <\@dashcnt
+%<latexrelease>  \do{\vskip #1\unitlength\copy\@dashbox
+%<latexrelease>      \advance\@tempcnta\@ne }%
+%<latexrelease>  \vskip\@dashdim}}\@tempcnta\z@
+%<latexrelease>\put(#2,0){%
+%<latexrelease>  \hskip -\@halfwidth \vbox{\@whilenum \@tempcnta<\@dashcnt
+%<latexrelease>  \do{\vskip #1\unitlength\copy\@dashbox
+%<latexrelease>      \advance\@tempcnta \@ne }%
+%<latexrelease>  \vskip\@dashdim}}}\@makepicbox(#2,#3)}
 %<latexrelease>\EndIncludeInRelease
 %<*2ekernel>
 %    \end{macrocode}
@@ -1414,7 +1435,8 @@
   \@ovvlinefalse \@ovhlinefalse
 %    \end{macrocode}
 %    \begin{macrocode}
-  \@tfor\reserved at a :=#3\do{\csname @ov\reserved at a false\endcsname}%
+  \@tfor\reserved at a :=#3\do{%
+    \csname @ov\reserved at a false\endcsname}%
   \@defaultunitsset\@ovxx{#1}\unitlength
   \@defaultunitsset\@ovyy{#2}\unitlength
 %    \end{macrocode}
@@ -1454,11 +1476,13 @@
 %<latexrelease>\def\@oval(#1,#2)[#3]{\begingroup\boxmaxdepth \maxdimen
 %<latexrelease>  \@ovttrue \@ovbtrue \@ovltrue \@ovrtrue
 %<latexrelease>  \@ovvlinefalse \@ovhlinefalse
-%<latexrelease>  \@tfor\reserved at a :=#3\do{\csname @ov\reserved at a false\endcsname}%
+%<latexrelease>  \@tfor\reserved at a :=#3\do{%
+%<latexrelease>    \csname @ov\reserved at a false\endcsname}%
 %<latexrelease>  \@ovxx #1\unitlength
 %<latexrelease>  \@ovyy #2\unitlength
 %<latexrelease>  \@tempdimb \ifdim \@ovyy >\@ovxx \@ovxx \@ovvlinetrue
-%<latexrelease>  \else \@ovyy \ifdim \@ovyy =\@ovxx \else \@ovhlinetrue \fi\fi
+%<latexrelease>  \else \@ovyy \ifdim \@ovyy =\@ovxx \else \@ovhlinetrue
+%<latexrelease>   \fi\fi
 %<latexrelease>  \advance \@tempdimb -2\p@
 %<latexrelease>  \@getcirc \@tempdimb
 %<latexrelease>  \@ovro \ht\@tempboxa \@ovri \dp\@tempboxa
@@ -1468,7 +1492,9 @@
 %<latexrelease>  \ifdim \@ovdy >\z@ \@ovvlinetrue \fi
 %<latexrelease>  \@circlefnt \setbox\@tempboxa
 %<latexrelease>  \hbox{\if at ovr \@ovvert32\kern -\@tempdima \fi
-%<latexrelease>  \if at ovl \kern \@ovxx \@ovvert01\kern -\@tempdima \kern -\@ovxx \fi
+%<latexrelease>  \if at ovl
+%<latexrelease>   \kern \@ovxx \@ovvert01\kern -\@tempdima \kern -\@ovxx
+%<latexrelease>  \fi
 %<latexrelease>  \if at ovt \@ovhorz \kern -\@ovxx \fi
 %<latexrelease>  \if at ovb \raise \@ovyy \@ovhorz \fi}\advance\@ovdx\@ovro
 %<latexrelease>  \advance\@ovdy\@ovro \ht\@tempboxa\z@ \dp\@tempboxa\z@
@@ -1624,9 +1650,11 @@
 %<latexrelease>      \@ovro\ht\@tempboxa
 %<latexrelease>     \setbox\@tempboxa\hbox{\@circlefnt
 %<latexrelease>      \advance\@tempcnta\tw@ \char \@tempcnta
-%<latexrelease>      \advance\@tempcnta\m at ne \char \@tempcnta \kern -2\@tempdima
+%<latexrelease>      \advance\@tempcnta\m at ne \char \@tempcnta
+%<latexrelease>      \kern -2\@tempdima
 %<latexrelease>      \advance\@tempcnta\tw@
-%<latexrelease>      \raise \@tempdima \hbox{\char\@tempcnta}\raise \@tempdima
+%<latexrelease>      \raise \@tempdima \hbox{\char\@tempcnta}%
+%<latexrelease>      \raise \@tempdima
 %<latexrelease>        \box\@tempboxa}\ht\@tempboxa\z@ \dp\@tempboxa\z@
 %<latexrelease>      \@put{-\@ovro}{-\@ovro}{\box\@tempboxa}%
 %<latexrelease>   \else  \@circ\@tempdimb{96}\fi\endgroup}
@@ -1642,7 +1670,9 @@
 %<*2ekernel|latexrelease>
 %<latexrelease>\IncludeInRelease{2020/10/01}%
 %<latexrelease>                 {\@dot}{default units}%
-\def\@dot#1{\@defaultunitsset\@tempdimb{#1}\unitlength \@circ\@tempdimb{112}}
+\def\@dot#1{%
+  \@defaultunitsset\@tempdimb{#1}\unitlength
+  \@circ\@tempdimb{112}}
 %</2ekernel|latexrelease>
 %    \end{macrocode}
 %    
@@ -1855,7 +1885,9 @@
       \@multicnt
          \ifdim \@ovxx>\@ovyy \@ovxx \else \@ovyy \fi
       \@ovxx .5\@halfwidth \divide\@multicnt\@ovxx
-      \ifnum \qbeziermax<\@multicnt \@multicnt\qbeziermax\relax \fi
+      \ifnum \qbeziermax<\@multicnt
+        \@multicnt\qbeziermax\relax
+      \fi
   \else \@multicnt#1\relax \fi
   \@tempcnta\@multicnt \advance\@tempcnta\@ne
   \@defaultunitsset\@ovdx{#4}\unitlength
@@ -1920,7 +1952,9 @@
 %<latexrelease>      \@multicnt
 %<latexrelease>         \ifdim \@ovxx>\@ovyy \@ovxx \else \@ovyy \fi
 %<latexrelease>      \@ovxx .5\@halfwidth \divide\@multicnt\@ovxx
-%<latexrelease>      \ifnum \qbeziermax<\@multicnt \@multicnt\qbeziermax\relax \fi
+%<latexrelease>      \ifnum
+%<latexrelease>        \qbeziermax<\@multicnt \@multicnt\qbeziermax\relax
+%<latexrelease>      \fi
 %<latexrelease>  \else \@multicnt#1\relax \fi
 %<latexrelease>  \@tempcnta\@multicnt \advance\@tempcnta\@ne
 %<latexrelease>  \@ovdx #4\unitlength \advance\@ovdx -#2\unitlength





More information about the latex3-commits mailing list.