1 % \iffalse meta-comment
3 % Copyright 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009
4 % The LaTeX3 Project and any individual authors listed elsewhere
7 % This file is part of the LaTeX base system.
8 % -------------------------------------------
10 % It may be distributed and/or modified under the
11 % conditions of the LaTeX Project Public License, either version 1.3c
12 % of this license or (at your option) any later version.
13 % The latest version of this license is in
14 % http://www.latex-project.org/lppl.txt
15 % and version 1.3c or later is part of all distributions of LaTeX
16 % version 2005/12/01 or later.
18 % This file has the LPPL maintenance status "maintained".
20 % The list of all files belonging to the LaTeX base distribution is
21 % given in the file `manifest.txt'. See also `legal.txt' for additional
24 % The list of derived (unpacked) files belonging to the distribution
25 % and covered by LPPL is defined by the unpacking scripts (with
26 % extension .ins) which are part of the distribution.
31 %%% From File: ltlength.dtx
35 \ProvidesFile{ltlength.dtx}
36 [2015/01/08 v1.1c LaTeX Kernel (Lengths)]
38 \documentclass{ltxdoc}
39 \GetFileInfo{ltlength.dtx}
60 % \changes{v1.0c}{1994/03/29}
61 % {Create file ltcntlen from parts of ltmiscen and ltherest.}
62 % \changes{v1.1a}{1994/05/19}
63 % {Extract file ltlength from ltcntlen.}
64 % \changes{v1.1b}{1995/08/11}
65 % {Doc typos fixed for latex/753}
69 % \DescribeMacro{\newlength}
70 % Declare |#1| to be a new length command.
72 % \DescribeMacro{\setlength}
73 % Set the length command, |#1|, to the value |#2|.
75 % \DescribeMacro{\addtolength}
76 % Increase the value of the length command, |#1|, by the value |#2|.
78 % \DescribeMacro{\settowidth}
79 % Set the length, |#1| to the width of a box containing |#2|.
81 % \DescribeMacro{\settoheight}
82 % Set the length, |#1| to the height of a box containing |#2|.
84 % \DescribeMacro{\settodepth}
85 % Set the length, |#1| to the depth of a box containing |#2|.
94 % \begin{macro}{\newlength}
96 \def\newlength#1{\@ifdefinable#1{\newskip#1}}
100 % \begin{macro}{\setlength}
101 % \changes{v1.1c}{2015/01/08}{add = to ensure first length argument is terminated.
105 %<latexrelease>\IncludeInRelease{2015/01/01}%
106 %<latexrelease> {\setlength}{Using \setlength with \dimen0}{%
107 %<*2ekernel|latexrelease>
110 \def\setlength#1#2{#1 #2\relax}
111 %</2ekernel|latexrelease>
113 %<latexrelease>\IncludeInRelease{0000/00/00}%
114 %<latexrelease> {\setlength}{Using \setlength with \dimen0}{%
115 %<latexrelease>\def\setlength#1#2{#1#2\relax}
121 % \begin{macro}{\addtolength}
122 % |\relax| added 24 Mar 86
124 \def\addtolength#1#2{\advance#1 #2\relax}
129 % \begin{macro}{\settoheight}
130 % \changes{LaTeX2e}{1993/11/22}{Macro added}
131 % \begin{macro}{\settodepth}
132 % \changes{LaTeX2e}{1993/11/22}{Macro added}
133 % \begin{macro}{\settowidth}
134 % \begin{macro}{\@settodim}
135 % \changes{LaTeX2e}{1993/11/22}{Macro added}
136 % \changes{v1.0a}{1994/03/07}{(DPC) Extra group for colour}
137 % The obvious analogs of |\settowidth|.
139 \def\@settodim#1#2#3{\setbox\@tempboxa\hbox{{#3}}#2#1\@tempboxa
141 % Clear the memory afterwards (which might be a lot).
143 \setbox\@tempboxa\box\voidb@x}
144 \def\settoheight{\@settodim\ht}
145 \def\settodepth {\@settodim\dp}
146 \def\settowidth {\@settodim\wd}
154 % \begin{macro}{\@settopoint}
155 % This macro takes the contents of the skip register that is
156 % supplied as its argument and removes the fractional part to make
157 % it a whole number of points. This can be used in class files to
158 % avoid values like |345.4666666pt| when calulating a dimension.
159 % \changes{LaTeX2e}{1993/11/22}{Macro added}
161 \def\@settopoint#1{\divide#1\p@\multiply#1\p@}