summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/xsavebox
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-03-07 23:22:38 +0000
committerKarl Berry <karl@freefriends.org>2016-03-07 23:22:38 +0000
commit7a90070ab1c2a78ee48e025706907db2b5fb4384 (patch)
treeffbdbdbfb365f1b7696570815ed5d05fe663940f /Master/texmf-dist/source/latex/xsavebox
parentd9eed51f22174ef543823392b76a190f3c7f83a4 (diff)
xsavebox (7mar16)
git-svn-id: svn://tug.org/texlive/trunk@39965 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/xsavebox')
-rw-r--r--Master/texmf-dist/source/latex/xsavebox/xsavebox.tex14
1 files changed, 10 insertions, 4 deletions
diff --git a/Master/texmf-dist/source/latex/xsavebox/xsavebox.tex b/Master/texmf-dist/source/latex/xsavebox/xsavebox.tex
index ea35dcc8039..32d0fdd1bf8 100644
--- a/Master/texmf-dist/source/latex/xsavebox/xsavebox.tex
+++ b/Master/texmf-dist/source/latex/xsavebox/xsavebox.tex
@@ -14,7 +14,7 @@
\usepackage{color}
\usepackage{lmodern}
\usepackage[T1]{fontenc}
-\usepackage[protrusion,expansion]{microtype}
+%\usepackage[protrusion,expansion]{microtype}
\usepackage{parskip}
\usepackage[bookmarksnumbered,linktocpage]{hyperref}
\usepackage{fancyvrb}
@@ -65,7 +65,7 @@
\section{Introduction}
Whenever the standard \LaTeX{} command \verb+\usebox{+\emph{save-box}\verb+}+ is issued to insert a previously defined \emph{save-box} more than once, the typeset content stored therein is written as DVI or PDF code into the output file again. The redundant code adds to the overall file size and may impair the page caching facilities built into some PDF viewers.
-The PDF file format defines a powerful mechanism for packing readily typeset content once into self-contained entities, so-called \enquote{XObjects}, that can be referenced at other places within the PDF document.
+The PDF file format defines a powerful mechanism for packing readily typeset content once into self-contained entities, so-called \enquote{Form XObjects}, that can be referenced at other places within the PDF document.
The `\verb+xsavebox+' package makes this PDF feature accessible on the \LaTeX{} level as a set of user commands which look similar to and are used in a similar way as the well-known \emph{save-box} related \LaTeX{} commands.
@@ -79,7 +79,13 @@ All common \TeX{} engines and back-ends are supported, which are:
To enable `\verb+dvipdfmx+', pass it as a document class option.
-It should be emphasized that \enquote{XObjects} is a PDF feature. Content saved and referenced using \enquote{XObjects} is only visible in the final PDF output, but not in intermediate formats of the work-flow if those are involved, namely DVI and PostScript. Of course, PostScript converted back from PDF displays the content correctly.
+It should be emphasized that \enquote{Form XObjects} is a PDF feature. Content saved and referenced using \enquote{Form XObjects} is only visible in the final PDF output, but not in intermediate formats of the work-flow if those are involved, namely DVI and PostScript. Of course, PostScript converted back from PDF displays the content correctly.
+
+\section{Package Options}
+\begin{Verbatim}
+margin=<dimension>
+\end{Verbatim}
+When content is converted into a Form XObject, it is clipped to its bounding box. However, the glyphs of the fonts which are used for typesetting tend to be slightly bigger than their boxes. In order to avoid clipping, the `\verb+xsavebox+' package \emph{temporarily} adds an additional margin of \verb+3pt+ around the content. In rare cases, \verb+3pt+ may turn out to be insufficient, e.\,g. if text is up-scaled before being put into a save box. This option allows the setting of a larger margin to ensure that the content gets entirely into the save box. Note that whichever value is chosen for `\verb+margin+', the spacing of the boxes, when inserted into the document, remains unchanged. This is what every user definitely wants.
\section{User commands}
\subsection*{Content saving}
@@ -162,7 +168,7 @@ An example with colour injection (pdf\LaTeX/Lua\LaTeX-only) follows:
\begin{minipage}[b]{1in}
silly boxed paragraph that no one will ever use
\end{minipage}
-\end{xlrbox*}
+\end{xlrbox*}%
Here is a \fbox{\color{blue}\theSavedPar} for anything.
The same \fbox{\color{green}\rotatebox{90}{\theSavedPar}} was inserted again but with a different colour and rotated by 90 degree.