summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/varwidth/varwidth-doc.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/varwidth/varwidth-doc.tex')
-rw-r--r--Master/texmf-dist/doc/latex/varwidth/varwidth-doc.tex55
1 files changed, 55 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/varwidth/varwidth-doc.tex b/Master/texmf-dist/doc/latex/varwidth/varwidth-doc.tex
new file mode 100644
index 00000000000..8d1e78b44af
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/varwidth/varwidth-doc.tex
@@ -0,0 +1,55 @@
+\documentclass[a4paper]{article}
+\usepackage[a4paper]{geometry}
+\usepackage{miscdoc,varwidth,multicol}
+\newcommand{\minitab}[2][l]{\begin{tabular}{#1}#2\end{tabular}}
+
+\newsavebox{\varbox}
+
+\begin{document}
+\title{The \Package{varwidth} package (version 0.92)}
+\author{Donald Arseneau\thanks{Documentation put together by Robin Fairbairns}}
+\maketitle
+
+\section{The \environment{varwidth} environment}
+
+The package defines a \environment{varwidth} environment (based on
+\environment{minipage}) which is an
+analogue of \environment{minipage}, but whose resulting width is the
+natural width of its contents. A trivial example:
+\begin{center}
+ \begin{minipage}[t]{1in}
+ \cmdinvoke{begin}{varwidth}[1in]\\
+ \null\quad\texttt{Trivia}\\
+ \cmdinvoke{end}{varwidth}
+ \end{minipage}%
+ \quad and\quad
+ \begin{minipage}[t]{1in}
+ \cmdinvoke{begin}{minipage}[1in]\\
+ \null\quad\texttt{Trivia}\\
+ \cmdinvoke{end}{minpage}
+ \end{minipage}
+\end{center}
+produce
+\begin{center}
+ \begin{lrbox}\varbox
+ \begin{varwidth}{1in}
+ Trivia
+ \end{varwidth}
+ \end{lrbox}
+ \fbox{\usebox{\varbox}}%
+ \quad and\quad
+ \begin{lrbox}\varbox
+ \begin{minipage}{1in}
+ Trivia
+ \end{minipage}
+ \end{lrbox}
+ \fbox{\usebox{\varbox}}%
+\end{center}
+(the output placed in an \cs{fbox} to emphasise the effect).
+
+\section{The \cs{narrowragged} command}
+
+The command works like \cs{raggedright}, but produces generally
+narrowe lines in paragraphs, with more text in the last line (the
+lines have more-equal lengths).
+\end{document}