medskipamount, default value in article class
Using \showthe\medskipamount
will produce the answer:
6.0pt plus 2.0pt minus 2.0pt.
\medskipamount
is a "rubber length", i.e., it can be stretched (plus
) or shrunk (minus
) by a certain amount. (This is useful for, e.g., stretching page contents so that the last text line will be positioned exactly at the bottom margin.)
\medskipamount
is not defined by article.cls
, but part of the LaTeX kernel; its definition can be found in section 16.5 "Vertical spacing" of source2e.
Using \showthe\medskipamount
will print the quantity in your .log
file, just like \show\medskip
will print
> \medskip=macro:
->\vspace \medskipamount .
in your .log
file, showing what the macro does. For shorthand (rather than viewing the .log
file), you can also print the amount in your actual document output using \the\medskipamount
.
The printlen
package is made especially for printing lengths using \printlength{<len>}
within your document and switching between measurement units when printing via \uselengthunit{<unit>}
:
\documentclass{article}
\usepackage{printlen}% http://ctan.org/pkg/printlen
\begin{document}
\begin{tabular}{ll}
\verb!\parskip! in points (\verb!pt!): & \the\parskip \\
\verb!\textwidth! in inches (\verb!in!): & \uselengthunit{in}\printlength{\textwidth} \\
\verb!3cm! in points (\verb!pt!): & \uselengthunit{pt}\printlength{\dimexpr3cm} \\
\verb!2pt+.5\parindent-3bp! in centimetres (\verb!cm!): & \uselengthunit{cm}\printlength{\dimexpr2pt+.5\parindent-3bp}
\end{tabular}
\end{document}
Printing of font-specific components can vary depending on where it's used within the document. For example, \baselineskip
is 0pt
within tabular
, but 12pt
within regular text (when using \documentclass{article}
).