From a00e0bf12a86e6a60a3076a11a70112df8e8f37f Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 22 Sep 2010 23:38:29 +0000 Subject: printlen doc (22sep10) git-svn-id: svn://tug.org/texlive/trunk@19847 c570f23f-e606-0410-a88d-b1316a301751 --- .../texmf-dist/doc/latex/printlen/printlen-doc.pdf | Bin 0 -> 243193 bytes .../texmf-dist/doc/latex/printlen/printlen-doc.tex | 102 +++++++++++++++++++++ 2 files changed, 102 insertions(+) create mode 100644 Master/texmf-dist/doc/latex/printlen/printlen-doc.pdf create mode 100644 Master/texmf-dist/doc/latex/printlen/printlen-doc.tex (limited to 'Master/texmf-dist/doc/latex/printlen') diff --git a/Master/texmf-dist/doc/latex/printlen/printlen-doc.pdf b/Master/texmf-dist/doc/latex/printlen/printlen-doc.pdf new file mode 100644 index 00000000000..ec287bd0779 Binary files /dev/null and b/Master/texmf-dist/doc/latex/printlen/printlen-doc.pdf differ diff --git a/Master/texmf-dist/doc/latex/printlen/printlen-doc.tex b/Master/texmf-dist/doc/latex/printlen/printlen-doc.tex new file mode 100644 index 00000000000..2f3f9120865 --- /dev/null +++ b/Master/texmf-dist/doc/latex/printlen/printlen-doc.tex @@ -0,0 +1,102 @@ +\documentclass[pagesize=auto, fontsize=12pt, DIV=10]{scrartcl} + +\usepackage{fixltx2e} +\usepackage{etex} +\usepackage{lmodern} +\usepackage[T1]{fontenc} +\usepackage{textcomp} +\usepackage[svgnames]{xcolor} +\usepackage{listings} +\usepackage{microtype} +\usepackage{hyperref} + +\newcommand*{\mail}[1]{\href{mailto:#1}{\texttt{#1}}} +\newcommand*{\pkg}[1]{\textsf{#1}} +\newcommand*{\cs}[1]{\texttt{\textbackslash#1}} +\makeatletter +\newcommand*{\cmd}[1]{\cs{\expandafter\@gobble\string#1}} +\makeatother +\newcommand*{\meta}[1]{\textlangle\textsl{#1}\textrangle} +\newcommand*{\marg}[1]{\texttt{\{}\meta{#1}\texttt{\}}} + +\addtokomafont{title}{\rmfamily} + +\lstset{% + language=[LaTeX]TeX,% + columns=flexible,% + upquote=true,% + numbers=left,% + basicstyle=\ttfamily,% + keywordstyle=\color{Navy},% + commentstyle=\color{DimGray},% + stringstyle=\color{SeaGreen},% + numberstyle=\scriptsize\color{SlateGray}% +} + +\title{The \pkg{printlen} package\thanks{This manual corresponds to \pkg{printlen.sty}~v1.1a, dated~2009/09/03.}} +\subtitle{Print lengths in a variety of units} +\author{Peter Wilson, Herries Press\and Harald Harders\thanks{\mail{h.harders@tu-bs.de}}\and Maintainer: Will Robertson\thanks{\mail{will.robertson.@latex-project.org}}} +\date{2009/09/03} + + +\begin{document} + +\maketitle + + +\section{Usage} + +\cmd{\printlength}\marg{length} prints the value of a \LaTeX\ length in the +units specified by \cmd{\uselengthunit}\marg{unit}, where \meta{unit} may be any \TeX\ % +length unit except for scaled point. That is, \meta{unit} may be any of: +\texttt{pt}, \texttt{pc}, \texttt{in}, \texttt{mm}, \texttt{cm}, \texttt{bp}, \texttt{dd} or \texttt{cc}. When \texttt{pt} is set the printed length +value will include any stretch or shrink values, otherwise these +are not printed. The \meta{unit} argument may also be \texttt{PT}, in which case +length values will be printed in pt units but without any stretch +or shrink values. An unknown value for \meta{unit} is treated as though it +had been specified as \texttt{pt}. + +The unit is separated from the number using the command +\cmd{\unitspace} which is set to \cmd{\,} by default. In math mode the units are +printed upright. + +\cmd{\rndprintlength}\meta{length} prints the rounded value of a \LaTeX\ length. +Use \texttt{PT} instead of \texttt{pt} for rounded points if there are stretch or +shrink values. + +The initial setting is \verb+\uselengthunit{pt}+ + + +\minisec{Example:} + +\begin{lstlisting} +The \verb|\textwidth| is \printlength{\textwidth} which is also +\uselengthunit{in}\printlength{\textwidth} and +\uselengthunit{mm}\printlength{\textwidth}. +\end{lstlisting} + + +\section{Change history} + +\minisec{Version 1.1a (2009/09/03)} + +\begin{itemize} +\item New maintainer (Will Robertson) +\end{itemize} + + +\minisec{Version 1.1 (2001/12/09)} + +\begin{itemize} +\item Print rounded values +\item Space between value and units +\end{itemize} + + +\minisec{Version 1.0 (2001/11/03)} + +\begin{itemize} +\item First public release +\end{itemize} + +\end{document} -- cgit v1.2.3