From 86a77f5dd3bc8913d175cc79d962377eaa68eb7d Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 21 May 2012 23:56:59 +0000 Subject: adjustbox (21may12) git-svn-id: svn://tug.org/texlive/trunk@26555 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/adjustbox/adjcalc.pdf | Bin 152771 -> 152771 bytes .../texmf-dist/doc/latex/adjustbox/adjustbox.pdf | Bin 280660 -> 293232 bytes Master/texmf-dist/doc/latex/adjustbox/trimclip.pdf | Bin 317094 -> 317094 bytes .../source/latex/adjustbox/adjustbox.dtx | 852 ++++++++++++++++----- .../texmf-dist/source/latex/adjustbox/trimclip.dtx | 2 +- .../texmf-dist/tex/latex/adjustbox/adjustbox.sty | 442 ++++++----- 6 files changed, 910 insertions(+), 386 deletions(-) diff --git a/Master/texmf-dist/doc/latex/adjustbox/adjcalc.pdf b/Master/texmf-dist/doc/latex/adjustbox/adjcalc.pdf index a45d87dcb59..f42689ac604 100644 Binary files a/Master/texmf-dist/doc/latex/adjustbox/adjcalc.pdf and b/Master/texmf-dist/doc/latex/adjustbox/adjcalc.pdf differ diff --git a/Master/texmf-dist/doc/latex/adjustbox/adjustbox.pdf b/Master/texmf-dist/doc/latex/adjustbox/adjustbox.pdf index df4ac76b7ca..ed295b58110 100644 Binary files a/Master/texmf-dist/doc/latex/adjustbox/adjustbox.pdf and b/Master/texmf-dist/doc/latex/adjustbox/adjustbox.pdf differ diff --git a/Master/texmf-dist/doc/latex/adjustbox/trimclip.pdf b/Master/texmf-dist/doc/latex/adjustbox/trimclip.pdf index 4fe41a2ee2e..ffc4de0c74d 100644 Binary files a/Master/texmf-dist/doc/latex/adjustbox/trimclip.pdf and b/Master/texmf-dist/doc/latex/adjustbox/trimclip.pdf differ diff --git a/Master/texmf-dist/source/latex/adjustbox/adjustbox.dtx b/Master/texmf-dist/source/latex/adjustbox/adjustbox.dtx index 5c5eb67e5c7..91d9cbfbd7e 100644 --- a/Master/texmf-dist/source/latex/adjustbox/adjustbox.dtx +++ b/Master/texmf-dist/source/latex/adjustbox/adjustbox.dtx @@ -26,10 +26,10 @@ %<*driver> \ProvidesFile{adjustbox.dtx}[% %<=*DATE> - 2012/05/16 + 2012/05/21 %<=/DATE> %<=*VERSION> - v0.9 + v1.0 %<=/VERSION> DTX file for the adjustbox package] \documentclass[a4paper]{ydoc}[2011/08/11] @@ -55,7 +55,8 @@ }{% \par } -\optionaloff +\global\optionaloff +\let\optionalon\relax \lstdefinelanguage{none}{}% \lstdefinelanguage{adjustbox}{% @@ -146,7 +147,7 @@ % ^^A ))) % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % ^^A Title page ((( -% \CheckSum{0} +% \CheckSum{2141} % % \CharacterTable % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z @@ -194,7 +195,44 @@ % Added check for \pkg{xcolor} package. % } % \changes{v0.9}{2012/05/16}{ -% +% Basic trim and clip macros and driver files are now placed in a dedicated minimal package 'trimclip'. +% Special thanks goes to Joseph Wright (LaTeX3 project) for his work on the driver files. +% Clipping drivers are provided for 'pdftex' (incl. LuaTeX), 'dvips' and 'xetex' as well as a PGF fall-back +% driver. +% Packages: New dedicated 'trimclip' package with own manual. +% Better separation between 'adjcalc' and 'adjustbox' package. +% Review of manuals +% New adjustbox keys: +% * content +% * gstore +% * gstore* +% * gstore width/height/depth/totalheight/sizes +% * gobble/discard +% * phantom +% * warn width +% * float +% * nofloat +% * figure +% * label +% * caption +% * vspace +% * vspace* +% * padding (alias of 'margin') +% * padding* (alias of 'margin*') +% Fixes: env key now works correctly; Fixed raise box code. +% Macro changes: Added third optional argument to \stackbox. +% } +% \changes{v1.0}{2012/05/21}{%^^A +% * Updated manual to contain all new keys and macro. +% * Code optimisations. +% * Improvements of (re-)boxing code. +% * Added user-level macros to define keys. +% * Changed horizontal alignment keys to box the content and added matching macros. +% * Changed horizontal inner/outer side keys to use 'ifodd' package and added matching macros. +% * Added missing \cs{leavevmode} for "raise" key. +% * Simplified code for "valign" key. Fixed spurious space for "valign=v". +% * Fixed min/max size keys to double a single value correctly. +% * Code cleanup with "warn width" key. % } % % \GetFileInfo{adjustbox.dtx} @@ -240,13 +278,14 @@ % % ^^A )))2 % \subsection{Dependencies} ^^A (((2 -% The \pkg{adjustbox} package and its \pkg{trimclip} sub-package require the author's other packages -% \pkg{adjcalc} (bundled with \pkg{adjustbox}) and \pkg{collectbox}, as -% well as the packages \pkg{xkeyval}, \pkg{graphicx} and \pkg{ifpdf}. The \pkg{varwidth} package is automatically -% loaded if installed, otherwise the \Key{varwidth} and \Key{stack} keys are disables as well as -% \Macro\stackbox and the \env{stackbox} environment. For features which use colors the \pkg{xcolor} package must also be loaded manually -% (the \pkg{color} package is fine, too). The experimental |split| and |pagebreak| features also require the -% \pkg{storebox} package to be loaded manually. +% The \pkg{adjustbox} package and its \pkg{trimclip} sub-package require the author's other packages \pkg{adjcalc} +% (bundled with \pkg{adjustbox}) and \pkg{collectbox}, as well as the packages \pkg{xkeyval}, \pkg{graphicx} and \pkg{ifpdf}. +% The \pkg{varwidth} package is automatically loaded if installed, otherwise the \Key{varwidth} and \Key{stack} keys are +% disables as well as \Macro\stackbox and the \env{stackbox} environment. +% The \pkg{ifoddpage} package is automatically loaded if installed, otherwise the \Key{outer} and \Key{inner} keys are +% disables as well as \Macro\outersidebox and \Macro\innersidebox macros and corresponding environments. +% For features which use colors the \pkg{xcolor} package must also be loaded manually (the \pkg{color} package is fine, too). +% The experimental |split| and |pagebreak| features also require the \pkg{storebox} package to be loaded manually. % % ^^A )))2 % \subsection{Verbatim Support}\label{sec:verbatim} ^^A (((2 @@ -307,7 +346,7 @@ % % ^^A ))) % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% \section{Main macros}^^A ((( +% \section{Main Macros}^^A ((( % The following macros and environments represent the main functionality of this package. % Special care is taken so that the macros and the environments can have the same name. % For starred environments the star can be either part of the name or an optional argument. @@ -443,6 +482,7 @@ % \section{Adjustbox Keys} ^^A ((( % This packages provides the following \Macro\adjustbox keys with matching macros and environments. % +% % \subsection{Trimming and Clipping} ^^A (((2 % The following keys allow content to be trimmed (i.e.\ the official size is made smaller, so the remaining material % laps over the official boundaries) or clipped (overlapping material is not displayed). @@ -635,6 +675,26 @@ % \end{examples} % % +% \DescribeKey{warn width} +% \DescribeKey{warn width}= +% If this key is used the current width of the content is measured and compared with the given maximum width (default is +% \Macro\linewidth). +% If the content is wider than this value by more than the \TeX\ length \Macro\hfuzz\relax (by default 0.1pt) +% an \emph{Overfull hbox} warning is produced. +% The warning will include the source code position and the information that it was an |adjustbox| not a normal +% paragraph: +% \par\smallskip\par +% {\ttfamily Overfull |\hbox| (X.Ypt too wide) in adjustbox at line N} +% +% {\ttfamily Overfull |\hbox| (X.Ypt too wide) in adjustbox at lines N-M} +% \par\smallskip\par\noindent +% Note that this key is not able to take any horizontal space before the |adjustbox| +% into account. This includes a paragraph indention which might be present with \Macro\adjustbox. +% +% This key is useful to be used before the horizontal alignment keys which change the official width of the content +% and prevent the normal \emph{Overfull} warnings to take affect. +% +% % ^^A )))2 % \Needspace*{8\baselineskip} % \subsection{Scaling} ^^A (((2 @@ -937,7 +997,7 @@ % places the content in a box with the given width (by default \Macro\linewidth) but aligns it towards the inner margin. % If the content is wider than the available width it will stick into the outer margin without causing an overfull hbox warning. % In |twoside| mode this key is equal to \Key{left} for odd pages and equal to \Key{right} for even pages. -% For |oneside| mode it is always equal to \Key{center}, because there is no inner or outer margin. +% For |oneside| mode it is equal to \Key{left}. % Note that the page-is-odd test might not always lead to correct results for some material close to a page boundary, because \TeX\ % might not have decided on which page it will be placed. This can be improved by loading the \pkg{changepage} package with the % \opt{strict} option, which uses a reference to determine the correct page number (and requires the usual additional compiler run). @@ -946,9 +1006,26 @@ % \DescribeKey{outer} % \DescribeKey{outer}'=' % Identical to \Key{inner} but aligns the content towards the outer margin. +% For |oneside| mode it is equal to \Key{right}. % If the content is wider than the available width it will stick into the outer inner without causing an overfull hbox warning. % % +% \DescribeMacro\innersidebox[]{} +% \vspace{-1.5\baselineskip} +% \DescribeEnv[]{innersidebox}[] +% Macro and environment version of the \Key{inner} key. The optional width argument defaults to \Macro\linewidth. +% Both include a \Macro\noindent to avoid paragraph indention. If an paragraph indention is wanted it can be created by +% placing a |\mbox{}| or the identical |\null| macro before it. +% +% +% \DescribeMacro\outersidebox[]{} +% \vspace{-1.5\baselineskip} +% \DescribeEnv[]{outersidebox}[] +% Macro and environment version of the \Key{outer} key. The optional width argument defaults to \Macro\linewidth. +% Both include a \Macro\noindent to avoid paragraph indention. If an paragraph indention is wanted it can be created by +% placing a |\mbox{}| or the identical |\null| macro before it. +% +% % \subsection*{Lapping} ^^A (((3 % The following features can be used to make the content lap over its left or right boundary. This is basically the same % as trimming, but provides a different, more dedicated interface. @@ -1268,6 +1345,66 @@ % \end{example} % % ^^A )))2 +% \subsection{Floats and non-float replacements} ^^A (((2 +% The following keys can be used to turn an adjusted box into a float or a non-floating replacement which also allows +% for a caption. These keys must be used last and no other normal keys must be used afterwards, otherwise an error will +% occur because the added floating environment is boxed again. +% +% +% \DescribeKey{caption}= +% \DescribeKey{caption}=[]{} +% Defines a caption which will be used by a following \Key{figure}, \Key{float} or \Key{nofloat} key. +% The position of the caption defaults to top for a |table| (non-)float and bottom for every other type. +% +% \DescribeKey{captionabove}= +% \DescribeKey{captionabove}=[]{} +% Like the \Key{caption} key but forces the placement of the caption above the content. +% The vertical skip above and below a normal below caption are reversed in this case to get proper +% spacing. However, this is not done if the \pkg{caption} package is loaded. +% It is recommended to load this package with the |tableposition=above| option. +% +% +% \DescribeKey{captionbelow}= +% \DescribeKey{captionbelow}=[]{} +% Like the \Key{caption} key but forces the placement of the caption below the content. +% +% +% \DescribeKey{label}=