From 0034d54351819457808cf0c8c3d6811269ad264f Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 4 Jan 2019 21:48:42 +0000 Subject: adjustbox (4jan19) git-svn-id: svn://tug.org/texlive/trunk@49596 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/adjustbox/README | 4 +- Master/texmf-dist/doc/latex/adjustbox/adjcalc.pdf | Bin 152773 -> 152773 bytes .../texmf-dist/doc/latex/adjustbox/adjustbox.pdf | Bin 347217 -> 380505 bytes Master/texmf-dist/doc/latex/adjustbox/trimclip.pdf | Bin 213356 -> 213356 bytes .../texmf-dist/source/latex/adjustbox/adjcalc.dtx | 2 +- .../source/latex/adjustbox/adjustbox.dtx | 948 ++++++++++++++++++--- .../texmf-dist/source/latex/adjustbox/trimclip.dtx | 126 +-- .../texmf-dist/tex/latex/adjustbox/adjustbox.sty | 310 ++++++- Master/texmf-dist/tex/latex/adjustbox/tc-dvips.def | 28 +- .../texmf-dist/tex/latex/adjustbox/tc-pdftex.def | 26 +- Master/texmf-dist/tex/latex/adjustbox/tc-pgf.def | 24 +- Master/texmf-dist/tex/latex/adjustbox/tc-xetex.def | 26 +- 12 files changed, 1248 insertions(+), 246 deletions(-) (limited to 'Master') diff --git a/Master/texmf-dist/doc/latex/adjustbox/README b/Master/texmf-dist/doc/latex/adjustbox/README index 0c7817075cd..fb560d38ef5 100644 --- a/Master/texmf-dist/doc/latex/adjustbox/README +++ b/Master/texmf-dist/doc/latex/adjustbox/README @@ -1,6 +1,6 @@ LaTeX bundle adjustbox -========================= -Copyright (c) 2011-2018 by Martin Scharrer +======================== +Copyright (c) 2011-2019 by Martin Scharrer WWW: (incl. bug tracker) This bundle contains the the adjustbox package and its auxiliary packages trimclip and adjcalc. diff --git a/Master/texmf-dist/doc/latex/adjustbox/adjcalc.pdf b/Master/texmf-dist/doc/latex/adjustbox/adjcalc.pdf index 67fde1a7aaa..f8bb78c4915 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 755ba7e002e..f9ccff37643 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 b9b243455fb..2ad59ec6b4e 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/adjcalc.dtx b/Master/texmf-dist/source/latex/adjustbox/adjcalc.dtx index 1327ed4ab74..318bda128fd 100644 --- a/Master/texmf-dist/source/latex/adjustbox/adjcalc.dtx +++ b/Master/texmf-dist/source/latex/adjustbox/adjcalc.dtx @@ -58,7 +58,7 @@ % % \fi % -% \CheckSum{0} +% \CheckSum{274} % % \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 diff --git a/Master/texmf-dist/source/latex/adjustbox/adjustbox.dtx b/Master/texmf-dist/source/latex/adjustbox/adjustbox.dtx index 7453b574924..ebcfeb71763 100644 --- a/Master/texmf-dist/source/latex/adjustbox/adjustbox.dtx +++ b/Master/texmf-dist/source/latex/adjustbox/adjustbox.dtx @@ -1,6 +1,6 @@ % \iffalse meta-comment %<=*COPYRIGHT> -%% Copyright (C) 2011-2018 by Martin Scharrer +%% Copyright (C) 2011-2019 by Martin Scharrer %% ---------------------------------------------------------------------- %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 @@ -26,10 +26,10 @@ %<*driver> \ProvidesFile{adjustbox.dtx}[% %<=*DATE> - 2018/04/08 + 2019/01/04 %<=/DATE> %<=*VERSION> - v1.1 + v1.2 %<=/VERSION> DTX file for the adjustbox package] \documentclass[a4paper]{ydoc}[2011/08/11] @@ -38,6 +38,7 @@ \usepackage[utf8]{inputenc} \usepackage{fourier} \usepackage{newverbs} +\usepackage{xparse} \MakeSpecialShortVerb\qverb\" %\AtBeginDocument{\MakeShortMacroArgs\`\relax} %\AtEndDocument{\DeleteShortVerb\`} @@ -147,7 +148,7 @@ % ^^A ))) % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % ^^A Title page ((( -% \CheckSum{2141} +% \CheckSum{3447} % % \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 @@ -238,6 +239,22 @@ % * Several bug fixes. % * Support for round corners and frames. % } +% \changes{v1.2}{2019/01/04}{%^^A +% * Added missing 'clip' feature for rounded frames. +% * Changed order of corner values for rounded frames. This includes an update to the clipping drivers. +% * Corrected 'adjnofloat' environment used by the 'nofloat' key to support the 'hypcap' feature of the 'caption' and 'hypcap' packages. +% * Updated manual description of `export` option as requested by Issue #9. +% * Updated manual to use (left, bottom, right, top) for the side values instead of (llx, lly, urx, ury). +% * Some other improvements in the manual. +% * Added keys and matching commands and environments to align to the page margins and text area borders: +% 'pagecenter', 'pageleft', 'pageright', 'pageinner', 'pageouter', +% 'textareacenter', 'textarealeft', 'textarearight', 'textareainner', 'textareaouter'. +% * Added 'noindent' key. +% * Added \newadjustimage and \NewAdjustImage commands to define custom versions of \adjustimage with predefined key +% lists. This include variation to renew, provide and declare such macros. +% * Added \provideadjustboxenv and \declareadjustboxenv. +% * Added \provideadjustboxcmd and \declareadjustboxcmd. +% } % % \GetFileInfo{adjustbox.dtx} % @@ -317,8 +334,10 @@ % This package accepts the following options: % % \begin{description}\def\oitem#1{\item[{\normalfont\opt{#1}}]} -% \oitem{export} Exports most keys of \Macro\adjustbox to \Macro\includegraphics so that they can be used with this -% macro as well. +% \oitem{export} Exports the keys of \Macro\adjustbox to \Macro\includegraphics so that they can be used with this +% macro as well. Note that not all keys will works properly with \Macro\includegraphics as its internal +% code does not support all features. If problems occur the option |Export| should be used. +% For new documents it is recommended to use the macro \Macro\adjustimage{}{} instead. % \oitem{Export} Sets \Macro\includegraphics to be identical to \Macro\adjincludegraphics, which also allows the usage % of all \Macro\adjustbox keys. % \oitem{pgf} This option is passed to \pkg{trimclip} and makes it to use the \pkg{pgf} package for all clip operations. @@ -436,6 +455,11 @@ % yet. % % +% \DescribeMacro\declareadjustboxenv{}[][]{} +% \DescribeMacro\declareadjustboxenv*{}[][]{} +% Like \Macro\newadjustboxenv and \Macro\newadjustboxenv* but will always define a macro/environment even if it does already exist. +% +% % \DescribeMacro\newadjustboxcmd{<\textbackslash macro>}[][]{} % This declaration defines a macro which applies the given \pkg{adjustbox} keys to its content. % As with \Macro\adjustbox the content is read as box, not as macro argument. @@ -451,11 +475,64 @@ % \end{examplecode} % \end{example} % -% % \DescribeMacro\renewadjustboxcmd{<\textbackslash macro>}[][]{} % Like \Macro\newadjustboxcmd but will redefine an existing macro and cause an % error if it was not yet defined. % +% +% \DescribeMacro\provideadjustboxcmd{<\textbackslash macro>}[][]{} +% Like \Macro\newadjustboxcmd but will define the macro only if it does not exist yet. +% +% +% \DescribeMacro\declareadjustboxcmd{<\textbackslash macro>}[][]{} +% Like \Macro\newadjustboxcmd but will define the macro in any case even if it does exist yet.% +% +% +% \DescribeMacro\newadjustimage{<\textbackslash macro>}[][]{} +% \DescribeMacro\renewadjustimage{<\textbackslash macro>}[][]{} +% \DescribeMacro\provideadjustimage{<\textbackslash macro>}[][]{} +% These macros allow to define new versions of \Macro\adjustimage with predefined key lists. +% The new define image macros can also have arguments which can be used in the predefined key list to +% substitude values or one or multiple keys. +% +% They work like \Macro\newcommand, \Macro\renewcommand and \Macro\providecommand, respectively, where +% \meta{num} is the number of arguments and \meta{default} provides a default value for the then optional +% first argument. However, instead of a macro content a \meta{key=value} list must be present, which can +% contain the arguments (|#1|, |#2|, etc). If arguments are used as values they should be wrapped in braces. +% If there are only part of a value the whole value should be wrapped in braces. This is to avoid causes commas +% inside the arguments to cause issues with the key=value list. +% +% \begin{example} +% \begin{examplecode} +% \newadjustimage{\myimage}[2][red]{width={#2},cfbox={#1}}% +% \myimage{2cm}{example-image} +% \myimage[blue]{2cm}{example-image} +% \end{examplecode} +% \end{example} +% +% \DescribeMacro\declareadjustimage{<\textbackslash macro>}[][]{} +% Like \Macro\newadjustimage but will not cause an error if the macro is already defined. +% +% +% \DescribeMacro\NewAdjustImage{<\textbackslash macro>}{}{} +% \DescribeMacro\RenewAdjustImage{<\textbackslash macro>}{}{} +% \DescribeMacro\ProvideAdjustImage{<\textbackslash macro>}{}{} +% \DescribeMacro\DeclareAdjustImage{<\textbackslash macro>}{}{} +% These macros also allow to define new versions of \Macro\adjustimage with predefined key lists, but use +% the \pkg{xparse} package (which must be loaded separately!) and its macros \Macro\NewDocumentCommand, \Macro\RenewDocumentCommand, +% \Macro\ProvideDocumentCommand and \Macro\DeclareDocumentCommand instead of the standard \LaTeX\ macro creation +% macros. This allows a larger variety of optional and mandatory arguments. Please see the \pkg{xparse} manual +% for more details. +% +% \begin{example} +% \begin{examplecode} +% \NewAdjustImage{\myimage}{O{red}m}{width={#2},cfbox={#1}}% +% \myimage{2cm}{example-image} +% \myimage[blue]{2cm}{example-image} +% \end{examplecode} +% \end{example} +% +% % ^^A )))2 % \clearpage\subsection{Setting keys globally} ^^A (((2 % \vskip-\lastskip @@ -545,7 +622,7 @@ % % % \subsubsection*{Default unit} -% If no unit is provided for of the bounding box coordinates (llx, lly, urx, ury) in the trim and clip features then +% If no unit is provided for of the bounding box coordinates (left, bottom, right, top) in the trim and clip features then % PostScript points (\emph{big points}, bp, $72\,\text{bp}=1\,\text{inch}$) are used, as it is the default behaviour of % the \Key{trim} and \Key{viewport} options of \pkg{graphicx}'s \Macro\includegraphics. Note that \pkg{graphicx} % converts all values, independent if a unit is provided or not, internally to bp, because graphics where traditionally @@ -569,19 +646,17 @@ % and environments (\env{trimbox}, \env{clipbox}, etc.) are included in the % accompanying \pkg{trimclip} package and are explained in its manual. % -% \DescribeKey{trim}'='~~~ % \DescribeKey{trim}'=' % \DescribeKey{trim}'='~ +% \DescribeKey{trim}'='~~~ % This key represents the original \Key{trim} key of \Macro\includegraphics but accepts its value in different forms. % Unlike most other keys it always acts on the original content independent in which order it is used with other keys. -% The key trims the given amounts from the lower left (ll) and the upper right (ur) corner of the box. This means that -% the amount \meta{llx} is trimmed from the left side, \meta{lly} from the bottom and \meta{urx} and \meta{ury} from the -% right and top of the box, respectively. % If only one value is given it will be used for all four sites. -% If only two values are given the first one will be used for the left and right side (llx, urx) and the second for the -% bottom and top side (lly, ury). +% If only two values are given, seperated by a space, the first one will be used for the left and right side and the second for the +% bottom and top side. +% % -% \DescribeKey{viewport}'='~~~ +% \DescribeKey{viewport}'='~~~ % This key represents the original \Key{viewport} key of \Macro\includegraphics. % It always trims the original content to the given view port independent from its position. % @@ -594,10 +669,10 @@ % bad idea. % % -% \DescribeKey{Trim}'='~~~ % \DescribeKey{Trim}'=' % \DescribeKey{Trim}'='~ -% \DescribeKey{Viewport}'='~~~ +% \DescribeKey{Trim}'='~~~ +% \DescribeKey{Viewport}'='~~~ % The normal \Key{trim} and \Key{viewport} keys are applied on the original content before any resizing or (most) other % keys take effect. This is because for \Macro\includegraphics the trimming is done by the internal graphic driver, % while the effects can be applied later (but can also be driver dependent). @@ -608,24 +683,26 @@ % has no effect on them. % % -% \DescribeKey{Clip}'='~~~ % \DescribeKey{Clip}'=' % \DescribeKey{Clip}'='~ -% \DescribeKey{Clip*}'='~~~ +% \DescribeKey{Clip}'='~~~ +% \DescribeKey{Clip*}'='~~~ % The \Key{Clip} key will clip the given amounts from the current content and can be used several times if required. % The starred version will use the given coordinates as \Key{viewport}. % These keys work by wrapping the content internally in a \Macro\clipbox or \Macro\clipbox*\relax macro. % +% % \DescribeKey{rndcorners}'=' -% \DescribeKey{rndcorners}'='~~~ +% \DescribeKey{rndcorners}'='~ +% \DescribeKey{rndcorners}'='~~~ % This key produces round corners by clipping the content. This is done using the same way as the % above clipping keys but instead of a rectangle clipping path one with quarter circles is used. -% The radius of the every round corner can be given separatly if wanted. If only one value is given -% it is used for all four corners. A value of 0pt will produce a normal rectangular corner. +% The radius of the every round corner can be given separately if wanted. If only one value is given +% it is used for all four corners. If only two values are given they will be used for the left and right side, respectively. +% A value of 0pt will produce a normal rectangular corner. % No radius should be larger than half the smallest side (minimum of \Macro\width and \Macro\totalheight). % -% Please see also the related keys \Key{fbox} and \Key{rndframe}, which allow to add a rounded frame around the content as well. -% +% Please see also the related keys \Key{rndfbox} and \Key{rndframe}, which allow to add a rounded frame around the content as well. % % % ^^A )))2 @@ -634,9 +711,9 @@ % % \DescribeKey{margin}'=' % \DescribeKey{margin}'='~ -% \DescribeKey{margin}'='~~~ +% \DescribeKey{margin}'='~~~ % This key can be used to add a margin (white space) around the content. It can be seen as the opposite of \Key{Trim}. -% The original baseline of the content is preserved because \meta{lly} is added to the depth. +% The original baseline of the content is preserved because \meta{bottom} is added to the depth. % It is also available under the alternative name \Key{padding}, which can be used to more visually distinguish an inner % margin from an outer margin e.g.\ if a frame is added. % @@ -648,8 +725,8 @@ % % \DescribeKey{margin*}'=' % \DescribeKey{margin*}'='~ -% \DescribeKey{margin*}'='~~~ -% This starred version is almost identical to the normal \Key{margin} key, but also raises the content by the \MacroArgs +% \DescribeKey{margin*}'='~~~ +% This starred version is almost identical to the normal \Key{margin} key, but also raises the content by the \MacroArgs % amount, so that the original depth is preserved instead of the original baseline. % Note that while \Key{margin} is basically the opposite of \Key{Trim}, \Key{margin*} is not the opposite of \Key{Trim*}. % Instead it also takes the same values as the unstarred key and not viewport values like \Key{Trim*}. @@ -893,12 +970,12 @@ % \end{example} % % -% \DescribeKey{rndframe}'=' -% \DescribeKey{rndframe}'='~ -% \DescribeKey{rndframe}'='~~~ -% \DescribeKey{rndframe}'='{}{} -% \DescribeKey{rndframe}'='{}{~} -% \DescribeKey{rndframe}'='{}{~~~} +% \DescribeKey{rndframe}'=' +% \DescribeKey{rndframe}'='~ +% \DescribeKey{rndframe}'='~~~ +% \DescribeKey{rndframe}'='{}{} +% \DescribeKey{rndframe}'='{}{~} +% \DescribeKey{rndframe}'='{}{~~~} % % \begingroup % \colorlet{keydesc}{keydesc!50!green} @@ -931,7 +1008,7 @@ % \DescribeMacro\rndcornersbox % \DescribeMacro\rndframebox % \DescribeMacro\rndfbox -% Standlone macro versions of the corresponding keys. See there for the list of arguments. +% Standalone macro versions of the corresponding keys. See there for the list of arguments. % % ^^A )))2 % \clearpage\subsection{Vertical Alignment} ^^A (((2 @@ -1138,8 +1215,80 @@ % If the content is wider than the available width it will stick into the outer inner without causing an overfull hbox warning. % % +% \DescribeKey{pagecenter} +% \DescribeKey{pagecenter}'=' +% This key centers the content relative to the page and independent from the text area. Afterwards the content has the same distance to the +% left and right page borders. It differs from the \Key{center} key when the left and right page margins are different which is the case in +% |twoside| documents or in environments which change the margins. +% +% Note that the content will look misalign to the text paragraphs before and afterwards and is therefore only +% pleasing for overwide images or similar content. +% +% The optional width defaults to \Macro\linewidth and determines the official width of the content. If a smaller value is selected +% following material will be placed on the same line while maybe overlapping the content. +% Larger values will cause an |Overfull \hbox| warning. +% +% \DescribeKey{pageleftalign} +% \DescribeKey{pageleftalign}'=' +% Similar to \Key{pagecenter}\relax{} (see remarks there) but aligns the content on the left side of the page instead of centering it. +% +% \DescribeKey{pagerightalign} +% \DescribeKey{pagerightalign}'=' +% Similar to \Key{pagecenter}\relax{} (see remarks there) but aligns the content on the left side of the page instead of centering it. +% +% \DescribeKey{pageinner} +% \DescribeKey{pageinner}'=' +% Similar to \Key{pagecenter}\relax{} (see remarks there) but aligns the content on the inner side of the page instead of centering it. +% This assumes that the document is compiled in |twoside| mode. +% In |oneside| mode the macro is identical to \Key{pageleftalign}, i.e. always aligns to the left of the page. +% +% \DescribeKey{pageouter} +% \DescribeKey{pageouter}'=' +% Similar to \Key{pagecenter}\relax{} (see remarks there) but aligns the content on the outer side of the page instead of centering it. +% This assumes that the document is compiled in |twoside| mode. +% In |oneside| mode the macro is identical to \Key{pagerightalign}, i.e. always aligns to the right of the page. +% +% +% \DescribeKey{textareacenter} +% \DescribeKey{textareacenter}'=' +% This key centers the content on the text area (the box with size \Macro\textwidth$\times$\Macro\textheight containing the text on a page) +% even if the box is inside an indending environment like \env{enumerate}. For this it is assumed that the adjusted box is on the start +% of a line or paragraph. If this is not the case the content will be overlapping the material on its left side. +% +% The optional width defaults to \Macro\linewidth and determines the official width of the content. If a smaller value is selected +% following material will be placed on the same line while maybe overlapping the content. +% Larger values will cause an |Overfull \hbox| warning.% +% +% +% \DescribeKey{textareatalign} +% \DescribeKey{textareatalign}'=' +% Similar to \Key{textareacenter}\relax{} (see remarks there) but aligns the content on the left side of the text area instead of centering it. +% +% \DescribeKey{textareatalign} +% \DescribeKey{textareatalign}'=' +% Similar to \Key{textareacenter}\relax{} (see remarks there) but aligns the content on the left side of the text area instead of centering it. +% +% \DescribeKey{textareainner} +% \DescribeKey{textareainner}'=' +% Similar to \Key{textareacenter}\relax{} (see remarks there) but aligns the content on the inner side of the text area instead of centering it. +% This assumes that the document is compiled in |twoside| mode. +% In |oneside| mode the macro is identical to \Key{pageleftalign}, i.e. always aligns to the left of the text area. +% +% \DescribeKey{textareaouter} +% \DescribeKey{textareaouter}'=' +% Similar to \Key{textareacenter}\relax{} (see remarks there) but aligns the content on the outer side of the text area instead of centering it. +% This assumes that the document is compiled in |twoside| mode. +% In |oneside| mode the macro is identical to \Key{pagerightalign}, i.e. always aligns to the right of the text area. +% +% +% +% \DescribeKey{noindent} +% This key will issue an \Macro\noindent for the \Macro\adjustbox to avoid a paragraph indention if it starts a paragraph. +% It does not expect a value and will ignore it if provided. +% +% % \DescribeMacro\centerbox[]{} -% \vspace{-1.5\baselineskip} +% \vspace{-1.5\baselineskip}\nopagebreak % \DescribeEnv[]{centerbox}[] % Macro and environment version of the \Key{center} 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 @@ -1147,7 +1296,7 @@ % % % \DescribeMacro\leftalignbox[]{} -% \vspace{-1.5\baselineskip} +% \vspace{-1.5\baselineskip}\nopagebreak % \DescribeEnv[]{leftalignbox}[] % Macro and environment version of the \Key{left} 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 @@ -1155,7 +1304,7 @@ % % % \DescribeMacro\rightalignbox[]{} -% \vspace{-1.5\baselineskip} +% \vspace{-1.5\baselineskip}\nopagebreak % \DescribeEnv[]{rightalignbox}[] % Macro and environment version of the \Key{rightalign} 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 @@ -1163,7 +1312,7 @@ % % % \DescribeMacro\innersidebox[]{} -% \vspace{-1.5\baselineskip} +% \vspace{-1.5\baselineskip}\nopagebreak % \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 @@ -1171,13 +1320,91 @@ % % % \DescribeMacro\outersidebox[]{} -% \vspace{-1.5\baselineskip} +% \vspace{-1.5\baselineskip}\nopagebreak % \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. % % +% \DescribeMacro\centerpagebox[]{} +% \vspace{-1.5\baselineskip}\nopagebreak +% \DescribeEnv[]{centerpagebox}[] +% Macro and environment version of the \Key{centerpage} 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\pagecenterbox[]{} +% \vspace{-1.5\baselineskip}\nopagebreak +% \DescribeEnv[]{pagecenterbox}[] +% Macro and environment version of the \Key{pagecenterbox} 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\pageleftalignbox[]{} +% \vspace{-1.5\baselineskip}\nopagebreak +% \DescribeEnv[]{pageleftalignbox}[] +% Macro and environment version of the \Key{pageleftalignbox} 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\pagerightalignbox[]{} +% \vspace{-1.5\baselineskip}\nopagebreak +% \DescribeEnv[]{pagerightalignbox}[] +% Macro and environment version of the \Key{pagerightalignbox} 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\pageinnerbox[]{} +% \vspace{-1.5\baselineskip}\nopagebreak +% \DescribeEnv[]{pageinnerbox}[] +% Macro and environment version of the \Key{pageinnerbox} 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\pageouterbox[]{} +% \vspace{-1.5\baselineskip}\nopagebreak +% \DescribeEnv[]{pageouterbox}[] +% Macro and environment version of the \Key{pageouterbox} 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\textareacenterbox[]{} +% \vspace{-1.5\baselineskip}\nopagebreak +% \DescribeEnv[]{textareacenterbox}[] +% Macro and environment version of the \Key{textareacenterbox} 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\textareatalignbox[]{} +% \vspace{-1.5\baselineskip}\nopagebreak +% \DescribeEnv[]{textareatalignbox}[] +% Macro and environment version of the \Key{textareatalignbox} 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\textareatalignbox[]{} +% \vspace{-1.5\baselineskip}\nopagebreak +% \DescribeEnv[]{textareatalignbox}[] +% Macro and environment version of the \Key{textareatalignbox} 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\textareainnerbox[]{} +% \vspace{-1.5\baselineskip}\nopagebreak +% \DescribeEnv[]{textareainnerbox}[] +% Macro and environment version of the \Key{textareainnerbox} 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\textareaouterbox[]{} +% \vspace{-1.5\baselineskip}\nopagebreak +% \DescribeEnv[]{textareaouterbox}[] +% Macro and environment version of the \Key{textareaouterbox} 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. +% % \clearpage\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. @@ -1378,9 +1605,9 @@ % % \DescribeMacro{\bgcolorbox}[]{} % \DescribeMacro{\bgcolorbox}*{} -% \vspace{-1.5\baselineskip} +% \vspace{-1.5\baselineskip}\nopagebreak % \DescribeEnv[]{bgcolorbox}[]{} -% \vspace{-1.5\baselineskip} +% \vspace{-1.5\baselineskip}\nopagebreak % \DescribeEnv[]{bgcolorbox*}{} % Standalone macro and environment versions of the \Key{bgcolorbox} and \Key{bgcolorbox*} keys. % @@ -1468,7 +1695,7 @@ % % % \DescribeKey{foreground}'=' -% \DescribeKey{foreground}'='{}{} +% \DescribeKey{foreground}'='{}{} % Adds the given content as foreground layer to the main content. The foreground content is stretched to fit the size of % the main content. It is also possible to provide \Macro\adjustbox or \Macro\includegraphics keys to modify the % foreground content (before the resizing is done). @@ -1479,7 +1706,7 @@ % \end{examples} % % \DescribeKey{foreground*}'=' -% \DescribeKey{foreground*}'='{}{} +% \DescribeKey{foreground*}'='{}{} % Like \Key{foreground} but does not resizes the foreground content. % Instead it is added in its natural size but can be adjusted using \Macro\adjustbox or \Macro\includegraphics keys. % @@ -1712,12 +1939,11 @@ % type. % A previously used \Key{caption} and \Key{label} will be added. % -% % \DescribeEnv[]{adjnofloat}{} % This environment is used internally by \Key{nofloat} to create a non-floating replacement of the given float type % (|figure|, |table|, etc.). It can also be used directly with other code or be redefined to change the % behavior of \Key{nofloat}. -% Any redefinition should include |\def\@captype{#1}| to set the caption type. +% Any redefinition should include |\adjbox@nofloatcaptionsetup{#1}| to set the caption type. % The environment will be used in plain form, i.e.\ \Macro\adjnofloat\ldots\Macro\endadjnofloat, so % if a group is required in a redefinition it should be added manually using \Macro\begingroup and \Macro\endgroup. % @@ -1746,16 +1972,20 @@ % Identical to \Key{addcode} but does not sets the size of the content first. % % \DescribeKey{appcode}'=' -% Appends come \meta{code after} the content and the already existing code around it which was added by other keys beforehand. -% More complex code should be enclosed in braces. +% Appends the given \LaTeX\ code after the currently accumulated content. Note that this is the original content of the adjusted box \emph{and} all code +% added by the previous keys. +% +% It is recommended to wrap complex code into braces. % % \DescribeKey{precode}'=' -% Prepends come \meta{code afterwards} the content and the already existing code around it which was added by other keys beforehand. -% More complex code should be enclosed in braces. -% This key sets -% the size of the content before adding the code, i.e.\ keys like \Key{width} or \Key{scale} are executed on the content +% Prepends the given \LaTeX\ code before the currently accumulated content. Note that this is the original content of the adjusted box \emph{and} all code +% added by the previous keys. The content is wrapped into curly braces, so the given code can use it as a macro argument. +% This key sets the size of the content before adding the code, i.e.\ keys like \Key{width} or \Key{scale} are executed on the content % beforehand. % +% It is recommended to wrap complex code into braces. +% +% % \DescribeKey{Precode}'='{} % Identical to \Key{precode} but does not sets the size of the content first. % @@ -2022,7 +2252,7 @@ % \end{macrocode} % \end{macro} % -% \begin{macro}{\adjbox@addkeysbefore} +% \begin{macro}{\adjbox@addkeysbefore}[1]{} % \begin{macrocode} \def\adjbox@addkeysbefore#1{% \ifx\@nnil#1\@nnil @@ -2036,7 +2266,7 @@ % \end{macrocode} % \end{macro} % -% \begin{macro}{\adjbox@addkeysafter} +% \begin{macro}{\adjbox@addkeysafter}[1]{} % \begin{macrocode} \def\adjbox@addkeysafter#1{% \begingroup @@ -2062,7 +2292,7 @@ % % % -% \begin{macro}{\adjustbox} +% \begin{macro}{\adjustbox}[1]{} % Now processes the keys before the box is read to allow for parbox or similar modes. % % This code was originally adapted from the \Macro\Gin@ii macro from the |graphicx| package. @@ -2113,10 +2343,10 @@ \setkeys*{ADJBOX}% } % \end{macrocode} -% \end{environment} +% \end{macro} % % -% \begin{macro}{\adjustbox@} +% \begin{macro}{\adjustbox@}[1]{} % Second part of \Macro\adjustbox, after the content has been boxed. % This sets the dimension macros, processes the keys and finally typesets the content. % \begin{macrocode} @@ -2177,7 +2407,7 @@ \catcode`\= 12 \gdef\adjbox@comma@xii{,}% \gdef\adjbox@equal@xii{=}% -% \end{macro} +% \end{macrocode} % % \begin{macro}{\adjbox@kvsanitize} % \begin{macrocode} @@ -2366,7 +2596,7 @@ % \end{macrocode} % \end{macro} % -% \begin{macro}{\adjincludegraphics} +% \begin{macro}{\adjincludegraphics}[2]{}{} % Simple wrapper to use \Macro\adjustbox for images in the same format of \Macro\includegraphics. % This allows to simply do |\let\includegraphics\adjincludegraphics|, which is done by the \opt{Export} option. % \begin{macrocode} @@ -2405,32 +2635,72 @@ % \end{macro} % % -% \begin{macro}{\newadjustboxcmd} +% \begin{macro}{\renewadjustboxenv} % \begin{macrocode} -\newcommand*\newadjustboxcmd{% +\newcommand*\renewadjustboxenv{% \begingroup - \let\@@@newadjustboxenv\@@@newadjustboxcmd - \def\new@adjustbox{\newcommand}% - \newadjustboxenv@ + \@ifstar{% + \let\@@@newadjustboxenv\@@@newadjustboxenv@ + \def\new@adjustbox{\renewenvironment}% + \newadjustboxenv@ + }{% + \def\new@adjustbox{\renewcommand}% + \newadjustboxenv@ + }% } % \end{macrocode} % \end{macro} % % -% \begin{macro}{\newadjustboxenv} +% \begin{macro}{\provideadjustboxenv} % \begin{macrocode} -\newcommand*\renewadjustboxenv{% +\newcommand*\provideadjustboxenv{% \begingroup \@ifstar{% \let\@@@newadjustboxenv\@@@newadjustboxenv@ - \def\new@adjustbox{\renewenvironment}% + \def\new@adjustbox{\@star@or@long\adjustbox@provideenvironment}% \newadjustboxenv@ }{% - \def\new@adjustbox{\renewcommand}% + \def\new@adjustbox{\providecommand}% \newadjustboxenv@ }% } % \end{macrocode} +% \end{macro}% +% +% +% \begin{macro}{\declareadjustboxenv} +% \begin{macrocode} +\newcommand*\declareadjustboxenv{% + \begingroup + \@ifstar{% + \let\@@@newadjustboxenv\@@@newadjustboxenv@ + \def\new@adjustbox##1{% + \expandafter\let\csname ##1\endcsname\@undefined + \newenvironment{##1}% + }% + \newadjustboxenv@ + }{% + \def\new@adjustbox##1{% + \let##1\@undefined + \newcommand{##1}% + }% + \newadjustboxenv@ + }% +} +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\newadjustboxcmd} +% \begin{macrocode} +\newcommand*\newadjustboxcmd{% + \begingroup + \let\@@@newadjustboxenv\@@@newadjustboxcmd + \def\new@adjustbox{\newcommand}% + \newadjustboxenv@ +} +% \end{macrocode} % \end{macro} % % @@ -2446,24 +2716,31 @@ % \end{macro} % % -% \begin{macro}{\newadjustboxenv} +% \begin{macro}{\provideadjustboxcmd} % \begin{macrocode} -\newcommand*\provideadjustboxenv{% +\newcommand*\provideadjustboxcmd{% \begingroup - \@ifstar{% - \let\@@@newadjustboxenv\@@@newadjustboxenv@ - \def\new@adjustbox{\@star@or@long\adjustbox@provideenvironment}% - \newadjustboxenv@ - }{% - \def\new@adjustbox{\providecommand}% - \newadjustboxenv@ - }% + \let\@@@newadjustboxenv\@@@newadjustboxcmd + \def\new@adjustbox{\providecommand}% + \newadjustboxenv@ } % \end{macrocode} -% \end{macro} +% \end{macro}% % % -% \begin{macro}{\adjustbox@provideenvironment} +% \begin{macro}{\provideadjustboxcmd} +% \begin{macrocode} +\newcommand*\declareadjustboxcmd{% + \begingroup + \let\@@@newadjustboxenv\@@@newadjustboxcmd + \def\new@adjustbox##1{\let##1\@undefined\newcommand{##1}}% + \newadjustboxenv@ +} +% \end{macrocode} +% \end{macro}% +% +% +% \begin{macro}{\adjustbox@provideenvironment}[1]{} % Tests if the environment already exists and calls the internal % macro of \Macro\newenvironment if not. Otherwise, the two optional % and two mandatory arguments are gobbled. @@ -2496,7 +2773,7 @@ % \end{macro} % % -% \begin{macro}{\newadjustboxenv@} +% \begin{macro}{\newadjustboxenv@}[1]{} % \begin{macrocode} \def\newadjustboxenv@#1{% \@ifnextchar{[}% @@ -2507,7 +2784,7 @@ % \end{macro} % % -% \begin{macro}{\@newadjustboxenv} +% \begin{macro}{\@newadjustboxenv}[2]{}{} % \begin{macrocode} \def\@newadjustboxenv#1[#2]{% \@ifnextchar{[}% @@ -2518,7 +2795,7 @@ % \end{macro} % % -% \begin{macro}{\@@newadjustboxenv} +% \begin{macro}{\@@newadjustboxenv}[3]{}{}{} % \begin{macrocode} \def\@@newadjustboxenv#1#2[#3]{% \@@@newadjustboxenv{#1}{[#2][#3]}% @@ -2527,7 +2804,7 @@ % \end{macro} % % -% \begin{macro}{\@@@newadjustboxenv@} +% \begin{macro}{\@@@newadjustboxenv@}[3]{}{}{} % \begin{macrocode} \def\@@@newadjustboxenv@#1#2#3{% \expandafter @@ -2544,7 +2821,7 @@ % \end{macro} % % -% \begin{macro}{\@@@newadjustboxenv} +% \begin{macro}{\@@@newadjustboxenv}[3]{}{}{} % \begin{macrocode} \def\@@@newadjustboxenv#1#2#3{% \expandafter @@ -2560,7 +2837,7 @@ % \end{macro} % % -% \begin{macro}{\@@@newadjustboxcmd} +% \begin{macro}{\@@@newadjustboxcmd}[3]{}{}{} % \begin{macrocode} \def\@@@newadjustboxcmd#1#2#3{% \expandafter @@ -2573,13 +2850,147 @@ % \end{macrocode} % \end{macro} % +% \begin{macro}{\newadjustimage} +% \begin{macrocode} +\newcommand*\newadjustimage{% + \begingroup + \let\@@@newadjustboxenv\@@@newadjustimage + \def\new@adjustbox{\newcommand}% + \newadjustboxenv@ +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\renewadjustimage} +% \begin{macrocode} +\newcommand*\renewadjustimage{% + \begingroup + \let\@@@newadjustboxenv\@@@newadjustimage + \def\new@adjustbox{\renewcommand}% + \newadjustboxenv@ +} +% \end{macrocode} +% \end{macro}% +% +% \begin{macro}{\provideadjustimage} +% \begin{macrocode} +\newcommand*\provideadjustimage{% + \begingroup + \let\@@@newadjustboxenv\@@@newadjustimage + \def\new@adjustbox{\providecommand}% + \newadjustboxenv@ +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\declareadjustimage} +% \begin{macrocode} +\newcommand*\declareadjustimage{% + \begingroup + \let\@@@newadjustboxenv\@@@newadjustimage + \def\new@adjustbox##1{\let##1\@undefined\newcommand{##1}}% + \newadjustboxenv@ +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@@@newadjustimage}[3]{}{}{} +% \begin{macrocode} +\def\@@@newadjustimage#1#2#3{% + \expandafter + \endgroup + \new@adjustbox{#1}#2{% + \begingroup + \def\@tempa####1{% + \def\IMAGEFILENAME{####1}% + \@adjustbox{#3}{\Gin@clipfalse\expandafter\Gin@i\expandafter{\IMAGEFILENAME}}% + }% + \@tempa + }% +} +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\NewAdjustImage} +% \begin{macrocode} +\newcommand*\adjustbox@NewAdjustImage[4]{% + \adjustbox@checkforxparse + #1{#2}{#3}{% + \begingroup + \def\@tempa####1{% + \def\IMAGEFILENAME{####1}% + \@adjustbox{#4}{\Gin@clipfalse\expandafter\Gin@i\expandafter{\IMAGEFILENAME}}% + }% + \@tempa + }% +} +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\NewAdjustImage} +% \begin{macrocode} +\newcommand*\NewAdjustImage{% + \adjustbox@NewAdjustImage\NewDocumentCommand +} +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\RenewDocumentCommand} +% \begin{macrocode} +\newcommand*\RenewAdjustImage{% + \adjustbox@NewAdjustImage\RenewDocumentCommand +} +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\ProvideAdjustImage} +% \begin{macrocode} +\newcommand*\ProvideAdjustImage{% + \adjustbox@NewAdjustImage\ProvideDocumentCommand +} +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\DeclareAdjustImage} +% \begin{macrocode} +\newcommand*\DeclareAdjustImage{% + \adjustbox@NewAdjustImage\ProvideDocumentCommand +} +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\NewAdjustImage} +% \begin{macrocode} +\def\adjustbox@checkforxparse{% + \begingroup + \expandafter\ifx\csname ver@xparse.sty\endcsname\relax + \PackageError{adjustbox}{% + The 'xparse' package must be loaded separately in\MessageBreak + order to use the following macros: \MessageBreak + \string\NewAdjustImage, + \string\RenewAdjustImage, \MessageBreak + \string\ProvideAdjustImage, + \string\DeclareAdjustImage}{} + \fi + \endgroup + \let\adjustbox@checkforxparse\relax +} +% \end{macrocode} +% \end{macro} +% % % ^^A ))) % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % \subsection{Internal code adding macros} ^^A ((( % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % -% \begin{macro}{\adjbox@Gin@add} +% \begin{macro}{\adjbox@Gin@add}[1]{} % \begin{macrocode} \def\adjbox@Gin@add#1{% \def\@tempa{#1}% @@ -2630,7 +3041,7 @@ % \end{macro} % % -% \begin{macro}{\@adjustboxkey} +% \begin{macro}{\@adjustboxkey}[1]{} % \begin{macrocode} \def\@adjustboxkey#1{% \@ifstar @@ -2982,9 +3393,10 @@ % % \begin{macro}{\rndframearoundbox@} % \begin{macrocode} -\def\rndframearoundbox@#1{% +\newif\ifadjbox@rndframe@clip +\def\rndframearoundbox@#1#2#3#4#5#6{% \setkeys{adjbox@rndframe}{#1}% - \@rndframearoundbox + \@rndframearoundbox{#2}{#3}{#4}{#5}{#6}{\ifadjbox@rndframe@clip\relax\fi}% } \define@key{adjbox@rndframe}{width}{% \adjsetlength\fboxrule{#1}% @@ -2999,6 +3411,9 @@ \def\adjbox@rndframe@color{#1}% } \let\adjbox@rndframe@color\relax +\define@key{adjbox@rndframe}{clip}[true]{% + \csname adjbox@rndframe@clip#1\endcsname +} % \end{macrocode} % \end{macro} % @@ -3078,7 +3493,7 @@ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % -% \begin{macro}{\adjbox@halign} +% \begin{macro}{\adjbox@halign}[3]{}{}{} % \begin{macrocode} \def\adjbox@halign#1#2#3{% \@collectbox{\@adjbox@halign{#1}{#2}{#3}}% @@ -3087,7 +3502,7 @@ % \end{macro} % % -% \begin{macro}{\@adjbox@halign} +% \begin{macro}{\@adjbox@halign}[3]{}{}{} % \begin{macrocode} \def\@adjbox@halign#1#2#3{% \begingroup @@ -3098,26 +3513,26 @@ % \end{macrocode} % \end{macro} % -% \begin{key}{adjbox}{center} +% \begin{key}{adjbox}{center}[1]{} % \begin{macrocode} \define@adjboxkey@defvalue{center}{\linewidth}{\adjbox@halign{#1}\hss\hss} % \end{macrocode} % \end{key} % -% \begin{key}{adjbox}{left} +% \begin{key}{adjbox}{left}[1]{} % \begin{macrocode} \define@adjboxkey@defvalue{left}{\linewidth}{\adjbox@halign{#1}\relax\hss} % \end{macrocode} % \end{key} % -% \begin{key}{adjbox}{right} +% \begin{key}{adjbox}{right}[1]{} % \begin{macrocode} \define@adjboxkey@defvalue{right}{\linewidth}{\adjbox@halign{#1}\hss\relax} % \end{macrocode} % \end{key} % % -% \begin{macro}{\centerbox} +% \begin{macro}{\centerbox}[1]{} % \begin{macrocode} \newcommand\centerbox[1][\linewidth]{% \collectboxcheckenv{centerbox}% @@ -3128,7 +3543,7 @@ % \end{macro} % % -% \begin{macro}{\leftalignbox} +% \begin{macro}{\leftalignbox}[1]{} % \begin{macrocode} \newcommand\leftalignbox[1][\linewidth]{% \collectboxcheckenv{leftalignbox}% @@ -3139,7 +3554,7 @@ % \end{macro} % % -% \begin{macro}{\rightalignbox} +% \begin{macro}{\rightalignbox}[1]{} % \begin{macrocode} \newcommand\rightalignbox[1][\linewidth]{% \collectboxcheckenv{rightalignbox}% @@ -3150,7 +3565,7 @@ % \end{macro} % % -% \begin{key}{adjbox}{outer} +% \begin{key}{adjbox}{outer}[1]{} % \begin{macrocode} \define@adjboxkey@defvalue{outer}{\linewidth}{% \outersidebox[{#1}]% @@ -3159,7 +3574,7 @@ % \end{key} % % -% \begin{key}{adjbox}{inner} +% \begin{key}{adjbox}{inner}[1]{} % \begin{macrocode} \define@adjboxkey@defvalue{inner}{\linewidth}{% \innersidebox[{#1}]% @@ -3168,7 +3583,7 @@ % \end{key} % % -% \begin{macro}{\outersidebox} +% \begin{macro}{\outersidebox}[1]{} % \begin{macrocode} \newcommand\outersidebox[1][\linewidth]{% \collectboxcheckenv{outersidebox}% @@ -3192,7 +3607,7 @@ % \end{macro} % % -% \begin{macro}{\innersidebox} +% \begin{macro}{\innersidebox}[1]{} % \begin{macrocode} \newcommand\innersidebox[1][\linewidth]{% \collectboxcheckenv{innersidebox}% @@ -3215,21 +3630,307 @@ % \end{macrocode} % \end{macro} % +% +% \begin{key}{adjbox}{pagecenter}[1]{} +% \begin{macrocode} +\define@key\adjbox@fam{pagecenter}[\linewidth]{% + \noindent\leavevmode + \adjbox@Gin@Add{\pagecenterbox[{#1}]}% +}% +% \end{macrocode} +% \end{key} +% +% +% \begin{key}{adjbox}{pageleftalign}[1]{} +% \begin{macrocode} +\define@key\adjbox@fam{pageleftalign}[\linewidth]{% + \noindent\leavevmode + \adjbox@Gin@Add{\pageleftalignbox[{#1}]}% +}% +% \end{macrocode} +% \end{key} +% +% +% \begin{key}{adjbox}{pagerightalign}[1]{} +% \begin{macrocode} +\define@key\adjbox@fam{pagerightalign}[\linewidth]{% + \noindent\leavevmode + \adjbox@Gin@Add{\pagerightalignbox[{#1}]}% +}% +% \end{macrocode} +% \end{key} +% +% +% \begin{key}{adjbox}{pageinner}[1]{} +% \begin{macrocode} +\define@key\adjbox@fam{pageinner}[\linewidth]{% + \noindent\leavevmode + \adjbox@Gin@Add{\pageinnerbox[{#1}]}% +} +% \end{macrocode} +% \end{key} +% +% +% \begin{key}{adjbox}{pageouter}[1]{} +% \begin{macrocode} +\define@key\adjbox@fam{pageouter}[\linewidth]{% + \noindent\leavevmode + \adjbox@Gin@Add{\pageouterbox[{#1}]}% +} +% \end{macrocode} +% \end{key} +% +% +% \begin{key}{adjbox}{textareacenter}[1]{} +% \begin{macrocode} +\define@key\adjbox@fam{textareacenter}[\linewidth]{% + \noindent\leavevmode + \adjbox@Gin@Add{\textareacenterbox[{#1}]}% +}% +% \end{macrocode} +% \end{key} +% +% +% \begin{key}{adjbox}{textarealeftalign}[1]{} +% \begin{macrocode} +\define@key\adjbox@fam{textarealeftalign}[\linewidth]{% + \noindent\leavevmode + \adjbox@Gin@Add{\textarealeftalignbox[{#1}]}% +}% +% \end{macrocode} +% \end{key} +% +% +% \begin{key}{adjbox}{textarearightalign}[1]{} +% \begin{macrocode} +\define@key\adjbox@fam{textarearightalign}[\linewidth]{% + \noindent\leavevmode + \adjbox@Gin@Add{\textarearightalignbox[{#1}]}% +}% +% \end{macrocode} +% \end{key} +% +% +% \begin{key}{adjbox}{textareainner}[1]{} +% \begin{macrocode} +\define@key\adjbox@fam{textareainner}[\linewidth]{% + \noindent\leavevmode + \adjbox@Gin@Add{\textareainnerbox[{#1}]}% +} +% \end{macrocode} +% \end{key} +% +% +% \begin{key}{adjbox}{textareaouter}[1]{} +% \begin{macrocode} +\define@key\adjbox@fam{textareaouter}[\linewidth]{% + \noindent\leavevmode + \adjbox@Gin@Add{\textareaouterbox[{#1}]}% +} +% \end{macrocode} +% \end{key} +% +% +% \begin{macro}{\pagecenterbox}[1]{} +% \begin{macrocode} +\newcommand\pagecenterbox[1][\linewidth]{% + \collectboxcheckenv{pagecenterbox}% + \noindent\leavevmode\checkoddpage + \@collectbox{\@pagecenterbox{#1}{-1in-\hoffset-\ifoddpage\oddsidemargin\else\evensidemargin\fi+.5\paperwidth-.5\@tempdimc-\@totalleftmargin}}% +} +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\@pagecenterbox}[2]{}{} +% \begin{macrocode} +\def\@pagecenterbox#1#2{% + \adjsetlength\@tempdimc{#1}% + \ifdim\@tempdimc<\z@ + \@tempdimc=\z@ + \fi + \adjsetlength\@tempdima{#2}% + \ifdim\@tempdima<\z@ + \@tempdimb=-\@tempdima + \else + \@tempdimb=\@tempdima + \fi + \ifdim\@tempdima<\z@ + \hb@xt@\@tempdimc{\hss\hb@xt@\@tempdimb{\hb@xt@\@tempdimc{\hss\usebox\collectedbox\hss}\hss}\hskip\@tempdimc}% + \else + \hb@xt@\@tempdimc{\hskip\@tempdimc\hb@xt@\@tempdimb{\hss\hb@xt@\@tempdimc{\hss\usebox\collectedbox\hss}}\hss}% + \fi +} +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\textareacenterbox}[1]{} +% \begin{macrocode} +\newcommand\textareacenterbox[1][\linewidth]{% + \collectboxcheckenv{textareacenterbox}% + \noindent\leavevmode + \@collectbox{\@pagecenterbox{#1}{-\@totalleftmargin+.5\textwidth-.5\linewidth}}% +} +% \end{macrocode} +% \end{macro}% +% +% +% \begin{macro}{\pageleftalignbox}[1]{} +% \begin{macrocode} +\newcommand\pageleftalignbox[1][\linewidth]{% + \collectboxcheckenv{pageleftalignbox}% + \noindent\leavevmode\checkoddpage + \@collectbox{\@lapbox{#1}{-1in-\hoffset-\ifoddpage\oddsidemargin\else\evensidemargin\fi-\@totalleftmargin}}% +} +% \end{macrocode} +% \end{macro}% +% +% +% \begin{macro}{\pagerightalignbox}[1]{} +% Note: \Macro\@tempdimc holds the official width inside \Macro\@lapbox. +% \begin{macrocode} +\newcommand\pagerightalignbox[1][\linewidth]{% + \collectboxcheckenv{pagerightalignbox}% + \noindent\leavevmode\checkoddpage + \@collectbox{\@lapbox{#1}{-1in-\hoffset-\ifoddpage\oddsidemargin\else\evensidemargin\fi-\@totalleftmargin+\paperwidth-(#1)}}% +} +% \end{macrocode} +% \end{macro}% +% +% +% \begin{macro}{\textarealeftalignbox}[1]{} +% \begin{macrocode} +\newcommand\textarealeftalignbox[1][\linewidth]{% + \collectboxcheckenv{textarealeftalignbox}% + \noindent\leavevmode\checkoddpage + \@collectbox{\@textarealeftalignbox{#1}}% +} +% \end{macrocode} +% \end{macro}% +% +% +% \begin{macro}{\@textarealeftalignbox}[1]{} +% \begin{macrocode} +\def\@textarealeftalignbox#1{% + \adjsetlength\@tempdima{\@totalleftmargin}% + \adjsetlength\@tempdimc{#1}% + \ifdim\@tempdimc<\z@ + \@tempdimc=\z@ + \fi + \leavevmode + \hb@xt@\@tempdimc{\hss\hb@xt@\@tempdima{\usebox\collectedbox\hss}\hskip\@tempdimc}% +} +% \end{macrocode} +% \end{macro}% +% +% +% \begin{macro}{\textarearightalignbox}[1]{} +% \begin{macrocode} +\newcommand\textarearightalignbox[1][\linewidth]{% + \collectboxcheckenv{textarearightalignbox}% + \noindent\leavevmode\checkoddpage + \@collectbox{\@textarearightalignbox{#1}{+\textwidth}}% +} +% \end{macrocode} +% \end{macro}% +% +% +% \begin{macro}{\@textarearightalignbox}[1]{} +% \begin{macrocode} +\def\@textarearightalignbox#1#2{% + \adjsetlength\@tempdimc{#1}% + \ifdim\@tempdimc<\z@ + \@tempdimc=\z@ + \fi + \adjsetlength\@tempdima{-\@totalleftmargin+\textwidth-\@tempdimc}% + \ifdim\@tempdima<\z@ + \@tempdima=-\@tempdima + \fi + \leavevmode + \hb@xt@\@tempdimc{\hskip\@tempdimc\hb@xt@\@tempdima{\hss\usebox\collectedbox}\hss}% +} +% \end{macrocode} +% \end{macro}% +% +% +% \begin{macro}{pageinnerbox} +% \begin{macrocode} +\newcommand\pageinnerbox{% + \noindent\leavevmode\checkoddpage + \ifoddpageoroneside + \expandafter\pageleftalignbox + \else + \expandafter\pagerightalignbox + \fi +}% +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{pageouterbox} +% \begin{macrocode} +\newcommand\pageouterbox{% + \noindent\leavevmode\checkoddpage + \ifoddpageoroneside + \expandafter\pagerightalignbox + \else + \expandafter\pageleftalignbox + \fi +}% +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{textareaouterbox} +% \begin{macrocode} +\newcommand\textareainnerbox{% + \noindent\leavevmode\checkoddpage + \ifoddpageoroneside + \expandafter\textarealeftalignbox + \else + \expandafter\textarearightalignbox + \fi +}% +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{textareaouterbox} +% \begin{macrocode} +\newcommand\textareaouterbox{% + \noindent\leavevmode\checkoddpage + \ifoddpageoroneside + \expandafter\textarearightalignbox + \else + \expandafter\textarealeftalignbox + \fi +}% +% \end{macrocode} +% \end{macro}% +% +% % \begin{macrocode} \IfFileExists{ifoddpage.sty}{% \RequirePackage{ifoddpage}% }{% - \renewcommand\outersidebox[1][]{% + \def\checkoddpage{% \PackageError{adjustbox}{% - The 'outer' and 'inner' keys as well as the\MessageBreak - \string\outersidebox\space and \string\innersidebox\space macros\MessageBreak - require the 'ifoddpage' package, which is not\MessageBreak - installed}{}% - }% - \let\innersidebox\outersidebox + The used key, macro or environment requires \MessageBreak + the 'ifoddpage' package which is not installed!}{}% + } }% % \end{macrocode} % +% +% \begin{key}{adjbox}{noindent} +% \begin{macrocode} +\define@key\adjbox@fam{noindent}[]{% + \noindent +} +% \end{macrocode} +% \end{key}% +% % ^^A ))) % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % \subsection{Vertical alignment keys} ^^A ((( @@ -4901,7 +5602,7 @@ }% \adjbox@let@key{ADJBOX}{inner code}{innercode} % \end{macrocode} -% \end{macro} +% \end{key} % % % \begin{macro}{\adjbox@innercode} @@ -5083,18 +5784,35 @@ % \end{macrocode} % \end{macro} % +% \begin{macro}{\adjbox@nofloatenv} +% \begin{macrocode} +\def\adjbox@nofloatenv{minipage} +% \end{macrocode} +% \end{macro} % +% \begin{macro}{\adjbox@nofloatcaptionsetup} +% Calls \Macro\captionsetup from the \pkg{caption} package if defined, otherwise sets \Macro\@captype directly. +% Calls \Macro\capstart from the \pkg{hypcap} package if defined. Both are done to ensure correct hypertargets on top +% of the content and not at the caption position. +% \begin{macrocode} +\def\adjbox@nofloatcaptionsetup#1{% + \@ifundefined{captionsetup}% + {\def\@captype{#1}}% + {\captionsetup{type={#1}}}% +\csname capstart\endcsname +} +% \end{macrocode} +% \end{macro}% % % \begin{environment}{adjnofloat} % Environment used for non-floats. % \begin{macrocode} \newenvironment{adjnofloat}[1]{% - \trivlist - \def\@captype{#1}% - \parindent\z@ - \item\relax + \par\noindent + \minipage{\linewidth}% + \adjbox@nofloatcaptionsetup{#1}% }{% - \endtrivlist + \endminipage\par } % \end{macrocode} % \end{environment} diff --git a/Master/texmf-dist/source/latex/adjustbox/trimclip.dtx b/Master/texmf-dist/source/latex/adjustbox/trimclip.dtx index 31dd9eb99b8..0240ff55e25 100644 --- a/Master/texmf-dist/source/latex/adjustbox/trimclip.dtx +++ b/Master/texmf-dist/source/latex/adjustbox/trimclip.dtx @@ -159,7 +159,7 @@ % % \fi % -% \CheckSum{490} +% \CheckSum{1118} % % \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 @@ -962,7 +962,7 @@ % \fi % \begin{macrocode} % -\ProvidesFile{tc-pgf.def}[2018/04/08 v2.1 trimclip fall-back clipping driver using PGF] +\ProvidesFile{tc-pgf.def}[2019/01/04 v2.2 trimclip fall-back clipping driver using PGF] % \end{macrocode} % % \begin{macrocode} @@ -989,7 +989,7 @@ % \end{macro} % % -% \begin{macro}{\@clipcornersofbox} +% \begin{macro}{\@clipcornersofbox}[5]{}{}{}{} % Clips round corners off. % \begin{macrocode} \def\@clipcornersofbox#1#2#3#4#5{% @@ -998,10 +998,10 @@ \pgfpatharc{180}{90}{#2}% \pgfpathlineto{\pgfpoint{\wd#1-#3}{\ht#1}}% \pgfpatharc{90}{0}{#3}% - \pgfpathlineto{\pgfpoint{\wd#1}{#4-\dp#1}}% - \pgfpatharc{0}{-90}{#4}% - \pgfpathlineto{\pgfpoint{#5}{-\dp#1}}% - \pgfpatharc{270}{180}{#5}% + \pgfpathlineto{\pgfpoint{\wd#1}{#5-\dp#1}}% + \pgfpatharc{0}{-90}{#5}% + \pgfpathlineto{\pgfpoint{#4}{-\dp#1}}% + \pgfpatharc{270}{180}{#4}% \pgfpathlineto{\pgfpoint{\z@}{\ht#1-#2}}% \pgfpathclose \pgfusepathqclip @@ -1014,13 +1014,17 @@ % \end{macro} % % -% \begin{macro}{\@rndframearoundbox} +% \begin{macro}{\@rndframearoundbox}[6]{}{}{}{}{} % Round frame around a box. % \begin{macrocode} -\def\@rndframearoundbox#1#2#3#4#5{% +\def\@rndframearoundbox#1#2#3#4#5#6{% \setbox#1\hbox{\begin{pgfpicture}% \adjsetlength\@tempdima{\fboxsep+.5\fboxrule}% \@marginbox#1\@tempdima\@tempdima\@tempdima\@tempdima% + \edef\@tempa{#6}% + \ifx\@empty\@tempa\else + \@clipcornersofbox{#1}{#2}{#3}{#4}{#5}% + \fi \pgfset{inner sep=\z@,outer sep=\z@,minimum size=\z@}% \pgfnode{rectangle}{base west}{\usebox#1}{}{}% \pgfusepath{}% @@ -1029,10 +1033,10 @@ \pgfpatharc{180}{90}{#2}% \pgfpathlineto{\pgfpoint{\wd#1-#3}{\ht#1}}% \pgfpatharc{90}{0}{#3}% - \pgfpathlineto{\pgfpoint{\wd#1}{#4-\dp#1}}% - \pgfpatharc{0}{-90}{#4}% - \pgfpathlineto{\pgfpoint{#5}{-\dp#1}}% - \pgfpatharc{270}{180}{#5}% + \pgfpathlineto{\pgfpoint{\wd#1}{#5-\dp#1}}% + \pgfpatharc{0}{-90}{#5}% + \pgfpathlineto{\pgfpoint{#4}{-\dp#1}}% + \pgfpatharc{270}{180}{#4}% \pgfpathlineto{\pgfpoint{\z@}{\ht#1-#2}}% \pgfpathclose \pgfusepath{stroke}% @@ -1053,7 +1057,7 @@ % \fi % \begin{macrocode} % -\ProvidesFile{tc-pdftex.def}[2018/04/08 v2.1 Clipping driver for pdftex] +\ProvidesFile{tc-pdftex.def}[2019/01/04 v2.2 Clipping driver for pdftex] % \end{macrocode} % % \begin{macro}{\@cliptoboxdim} @@ -1080,7 +1084,7 @@ % \end{macro} % % -% \begin{macro}{\@clip@bpdimens} +% \begin{macro}{\@clip@bpdimens}[5]{}{}{}{} % \begin{macrocode} \def\@clip@bpdimens#1#2#3#4#5{% \adjcalc@settobp\TOTALHEIGHT{\ht#1+\dp#1}% @@ -1089,8 +1093,8 @@ \adjcalc@settobp\WIDTH{\wd#1}% \adjcalc@settobp\RADIUSTL{#2}% \adjcalc@settobp\RADIUSTR{#3}% - \adjcalc@settobp\RADIUSBR{#4}% - \adjcalc@settobp\RADIUSBL{#5}% + \adjcalc@settobp\RADIUSBR{#5}% + \adjcalc@settobp\RADIUSBL{#4}% \adjcalc@settobp\RADIUSTLb{\tc@bezfacn#2}% \adjcalc@settobp\HEIGHTmRADIUSTL{\ht#1-#2}% \adjcalc@settobp\HEIGHTmRADIUSTLb{\ht#1-\tc@bezfacn#2}% @@ -1098,13 +1102,13 @@ \adjcalc@settobp\HEIGHTmRADIUSTRb{\ht#1-\tc@bezfacn#3}% \adjcalc@settobp\WIDTHmRADIUSTR{\wd#1-#3}% \adjcalc@settobp\WIDTHmRADIUSTRb{\wd#1-\tc@bezfacn#3}% - \adjcalc@settobp\RADIUSBRmDEPTH{#4-\dp#1}% - \adjcalc@settobp\RADIUSBRmDEPTHb{\tc@bezfacn#4-\dp#1}% - \adjcalc@settobp\WIDTHmRADIUSBR{\wd#1-#4}% - \adjcalc@settobp\WIDTHmRADIUSBRb{\wd#1-\tc@bezfacn#4}% - \adjcalc@settobp\RADIUSBLmDEPTH{#5-\dp#1}% - \adjcalc@settobp\RADIUSBLmDEPTHb{\tc@bezfacn#5-\dp#1}% - \adjcalc@settobp\RADIUSBLb{\tc@bezfacn#5}% + \adjcalc@settobp\RADIUSBRmDEPTH{#5-\dp#1}% + \adjcalc@settobp\RADIUSBRmDEPTHb{\tc@bezfacn#5-\dp#1}% + \adjcalc@settobp\WIDTHmRADIUSBR{\wd#1-#5}% + \adjcalc@settobp\WIDTHmRADIUSBRb{\wd#1-\tc@bezfacn#5}% + \adjcalc@settobp\RADIUSBLmDEPTH{#4-\dp#1}% + \adjcalc@settobp\RADIUSBLmDEPTHb{\tc@bezfacn#4-\dp#1}% + \adjcalc@settobp\RADIUSBLb{\tc@bezfacn#4}% \adjcalc@settobp\LINEWIDTH{\fboxrule}% } % \end{macrocode} @@ -1129,7 +1133,7 @@ % % % -% \begin{macro}{\@clipcornersofbox} +% \begin{macro}{\@clipcornersofbox}[5]{}{}{}{} % Clips round corners off. % \begin{macrocode} \def\@clipcornersofbox#1#2#3#4#5{% @@ -1150,14 +1154,18 @@ % % % -% \begin{macro}{\@rndframearoundbox} +% \begin{macro}{\@rndframearoundbox}[6]{}{}{}{}{} % Round frame around a box. % \begin{macrocode} -\def\@rndframearoundbox#1#2#3#4#5{% +\def\@rndframearoundbox#1#2#3#4#5#6{% \setbox#1=\hbox{% \adjsetlength\@tempdima{\fboxsep+.5\fboxrule}% \@marginbox#1\@tempdima\@tempdima\@tempdima\@tempdima% \@clip@bpdimens{#1}{#2}{#3}{#4}{#5}% + \edef\@tempa{#6}% + \ifx\@empty\@tempa\else + \@clipcornersofbox{#1}{#2}{#3}{#4}{#5}% + \fi % \hbox to 0pt{\copy#1\hss}% \pdfsave @@ -1192,7 +1200,7 @@ % \fi % \begin{macrocode} % -\ProvidesFile{tc-dvips.def}[2018/04/08 v2.1 Clipping driver for dvips] +\ProvidesFile{tc-dvips.def}[2019/01/04 v2.2 Clipping driver for dvips] % \end{macrocode} % % \begin{macro}{\@cliptoboxdim}[1]{box register to clip} @@ -1229,7 +1237,7 @@ % \end{macro} % % -% \begin{macro}{\@clipcornersofbox} +% \begin{macro}{\@clipcornersofbox}[5]{}{}{}{} % Clips round corners off. % \begin{macrocode} \def\@clipcornersofbox#1#2#3#4#5{% @@ -1241,14 +1249,14 @@ \adjcalc@settobp\WIDTH{\wd#1}% \adjcalc@settobp\RADIUSTL{#2}% \adjcalc@settobp\RADIUSTR{#3}% - \adjcalc@settobp\RADIUSBR{#4}% - \adjcalc@settobp\RADIUSBL{#5}% + \adjcalc@settobp\RADIUSBL{#4}% + \adjcalc@settobp\RADIUSBR{#5}% \adjcalc@settobp\RADIUSTLmHEIGHT{#2-\ht#1}% \adjcalc@settobp\RADIUSTRmHEIGHT{#3-\ht#1}% \adjcalc@settobp\WIDTHmRADIUSTR{\wd#1-#3}% - \adjcalc@settobp\DEPTHmRADIUSBR{\dp#1-#4}% - \adjcalc@settobp\WIDTHmRADIUSBR{\wd#1-#4}% - \adjcalc@settobp\DEPTHmRADIUSBL{\dp#1-#5}% + \adjcalc@settobp\DEPTHmRADIUSBR{\dp#1-#5}% + \adjcalc@settobp\WIDTHmRADIUSBR{\wd#1-#5}% + \adjcalc@settobp\DEPTHmRADIUSBL{\dp#1-#4}% \special{% ps: /mtrxc matrix currentmatrix def @@ -1283,10 +1291,10 @@ % % % -% \begin{macro}{\@rndframearoundbox} +% \begin{macro}{\@rndframearoundbox}[6]{}{}{}{}{} % Clips round corners off. % \begin{macrocode} -\def\@rndframearoundbox#1#2#3#4#5{% +\def\@rndframearoundbox#1#2#3#4#5#6{% \setbox#1=\hbox{% \adjsetlength\@tempdima{\fboxsep+.5\fboxrule}% \@marginbox#1\@tempdima\@tempdima\@tempdima\@tempdima% @@ -1296,15 +1304,19 @@ \adjcalc@settobp\WIDTH{\wd#1}% \adjcalc@settobp\RADIUSTL{#2}% \adjcalc@settobp\RADIUSTR{#3}% - \adjcalc@settobp\RADIUSBR{#4}% - \adjcalc@settobp\RADIUSBL{#5}% + \adjcalc@settobp\RADIUSBR{#5}% + \adjcalc@settobp\RADIUSBL{#4}% \adjcalc@settobp\RADIUSTLmHEIGHT{#2-\ht#1}% \adjcalc@settobp\RADIUSTRmHEIGHT{#3-\ht#1}% \adjcalc@settobp\WIDTHmRADIUSTR{\wd#1-#3}% - \adjcalc@settobp\DEPTHmRADIUSBR{\dp#1-#4}% - \adjcalc@settobp\WIDTHmRADIUSBR{\wd#1-#4}% - \adjcalc@settobp\DEPTHmRADIUSBL{\dp#1-#5}% + \adjcalc@settobp\DEPTHmRADIUSBR{\dp#1-#5}% + \adjcalc@settobp\WIDTHmRADIUSBR{\wd#1-#5}% + \adjcalc@settobp\DEPTHmRADIUSBL{\dp#1-#4}% \adjcalc@settobp\LINEWIDTH{\fboxrule}% + \edef\@tempa{#6}% + \ifx\@empty\@tempa\else + \@clipcornersofbox{#1}{#2}{#3}{#4}{#5}% + \fi % \hbox to 0pt{\copy#1\hss}% \hbox to 0pt{% @@ -1356,7 +1368,7 @@ % \fi % \begin{macrocode} % -\ProvidesFile{tc-xetex.def}[2018/04/08 v2.1 Clipping driver for xetex] +\ProvidesFile{tc-xetex.def}[2019/01/04 v2.2 Clipping driver for xetex] % \end{macrocode} % % \begin{macro}{\@cliptoboxdim} @@ -1386,7 +1398,7 @@ % \end{macro} % % -% \begin{macro}{\@clip@bpdimens} +% \begin{macro}{\@clip@bpdimens}[5]{}{}{}{} % \begin{macrocode} \def\@clip@bpdimens#1#2#3#4#5{% \adjcalc@settobp\TOTALHEIGHT{\ht#1+\dp#1}% @@ -1395,8 +1407,8 @@ \adjcalc@settobp\WIDTH{\wd#1}% \adjcalc@settobp\RADIUSTL{#2}% \adjcalc@settobp\RADIUSTR{#3}% - \adjcalc@settobp\RADIUSBR{#4}% - \adjcalc@settobp\RADIUSBL{#5}% + \adjcalc@settobp\RADIUSBL{#4}% + \adjcalc@settobp\RADIUSBR{#5}% \adjcalc@settobp\RADIUSTLb{\tc@bezfacn#2}% \adjcalc@settobp\HEIGHTmRADIUSTL{\ht#1-#2}% \adjcalc@settobp\HEIGHTmRADIUSTLb{\ht#1-\tc@bezfacn#2}% @@ -1404,13 +1416,13 @@ \adjcalc@settobp\HEIGHTmRADIUSTRb{\ht#1-\tc@bezfacn#3}% \adjcalc@settobp\WIDTHmRADIUSTR{\wd#1-#3}% \adjcalc@settobp\WIDTHmRADIUSTRb{\wd#1-\tc@bezfacn#3}% - \adjcalc@settobp\RADIUSBRmDEPTH{#4-\dp#1}% - \adjcalc@settobp\RADIUSBRmDEPTHb{\tc@bezfacn#4-\dp#1}% - \adjcalc@settobp\WIDTHmRADIUSBR{\wd#1-#4}% - \adjcalc@settobp\WIDTHmRADIUSBRb{\wd#1-\tc@bezfacn#4}% - \adjcalc@settobp\RADIUSBLmDEPTH{#5-\dp#1}% - \adjcalc@settobp\RADIUSBLmDEPTHb{\tc@bezfacn#5-\dp#1}% - \adjcalc@settobp\RADIUSBLb{\tc@bezfacn#5}% + \adjcalc@settobp\RADIUSBRmDEPTH{#5-\dp#1}% + \adjcalc@settobp\RADIUSBRmDEPTHb{\tc@bezfacn#5-\dp#1}% + \adjcalc@settobp\WIDTHmRADIUSBR{\wd#1-#5}% + \adjcalc@settobp\WIDTHmRADIUSBRb{\wd#1-\tc@bezfacn#5}% + \adjcalc@settobp\RADIUSBLmDEPTH{#4-\dp#1}% + \adjcalc@settobp\RADIUSBLmDEPTHb{\tc@bezfacn#4-\dp#1}% + \adjcalc@settobp\RADIUSBLb{\tc@bezfacn#4}% \adjcalc@settobp\LINEWIDTH{\fboxrule}% } % \end{macrocode} @@ -1435,7 +1447,7 @@ % % % -% \begin{macro}{\@clipcornersofbox} +% \begin{macro}{\@clipcornersofbox}[5]{}{}{}{} % Clips round corners off. % \begin{macrocode} \def\@clipcornersofbox#1#2#3#4#5{% @@ -1460,14 +1472,18 @@ % % % -% \begin{macro}{\@rndframearoundbox} +% \begin{macro}{\@rndframearoundbox}[6]{}{}{}{}{} % Round frame around a box. % \begin{macrocode} -\def\@rndframearoundbox#1#2#3#4#5{% +\def\@rndframearoundbox#1#2#3#4#5#6{% \setbox#1=\hbox{% \adjsetlength\@tempdima{\fboxsep+.5\fboxrule}% \@marginbox#1\@tempdima\@tempdima\@tempdima\@tempdima% \@clip@bpdimens{#1}{#2}{#3}{#4}{#5}% + \edef\@tempa{#6}% + \ifx\@empty\@tempa\else + \@clipcornersofbox{#1}{#2}{#3}{#4}{#5}% + \fi % \hbox to 0pt{\copy#1\hss}% \hbox to 0pt{% diff --git a/Master/texmf-dist/tex/latex/adjustbox/adjustbox.sty b/Master/texmf-dist/tex/latex/adjustbox/adjustbox.sty index 999d602fd1a..c12de75fadb 100644 --- a/Master/texmf-dist/tex/latex/adjustbox/adjustbox.sty +++ b/Master/texmf-dist/tex/latex/adjustbox/adjustbox.sty @@ -1,4 +1,4 @@ -%% Copyright (C) 2011-2018 by Martin Scharrer +%% Copyright (C) 2011-2019 by Martin Scharrer %% ---------------------------------------------------------------------- %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 @@ -16,8 +16,8 @@ %% and the derived file adjustbox.sty. %% \ProvidesPackage{adjustbox}[% - 2018/04/08 - v1.1 + 2019/01/04 + v1.2 Adjusting TeX boxes (trim, clip, ...)] \RequirePackage{xkeyval} \RequirePackage{adjcalc} @@ -284,12 +284,6 @@ \newadjustboxenv@ }% } -\newcommand*\newadjustboxcmd{% - \begingroup - \let\@@@newadjustboxenv\@@@newadjustboxcmd - \def\new@adjustbox{\newcommand}% - \newadjustboxenv@ -} \newcommand*\renewadjustboxenv{% \begingroup \@ifstar{% @@ -301,12 +295,6 @@ \newadjustboxenv@ }% } -\newcommand*\renewadjustboxcmd{% - \begingroup - \let\@@@newadjustboxenv\@@@newadjustboxcmd - \def\new@adjustbox{\renewcommand}% - \newadjustboxenv@ -} \newcommand*\provideadjustboxenv{% \begingroup \@ifstar{% @@ -318,6 +306,47 @@ \newadjustboxenv@ }% } +\newcommand*\declareadjustboxenv{% + \begingroup + \@ifstar{% + \let\@@@newadjustboxenv\@@@newadjustboxenv@ + \def\new@adjustbox##1{% + \expandafter\let\csname ##1\endcsname\@undefined + \newenvironment{##1}% + }% + \newadjustboxenv@ + }{% + \def\new@adjustbox##1{% + \let##1\@undefined + \newcommand{##1}% + }% + \newadjustboxenv@ + }% +} +\newcommand*\newadjustboxcmd{% + \begingroup + \let\@@@newadjustboxenv\@@@newadjustboxcmd + \def\new@adjustbox{\newcommand}% + \newadjustboxenv@ +} +\newcommand*\renewadjustboxcmd{% + \begingroup + \let\@@@newadjustboxenv\@@@newadjustboxcmd + \def\new@adjustbox{\renewcommand}% + \newadjustboxenv@ +} +\newcommand*\provideadjustboxcmd{% + \begingroup + \let\@@@newadjustboxenv\@@@newadjustboxcmd + \def\new@adjustbox{\providecommand}% + \newadjustboxenv@ +} +\newcommand*\declareadjustboxcmd{% + \begingroup + \let\@@@newadjustboxenv\@@@newadjustboxcmd + \def\new@adjustbox##1{\let##1\@undefined\newcommand{##1}}% + \newadjustboxenv@ +} \def\adjustbox@provideenvironment#1{% \@ifundefined{#1}% {\new@environment{#1}}% @@ -370,6 +399,79 @@ \@adjustbox{#3}% }% } +\newcommand*\newadjustimage{% + \begingroup + \let\@@@newadjustboxenv\@@@newadjustimage + \def\new@adjustbox{\newcommand}% + \newadjustboxenv@ +} +\newcommand*\renewadjustimage{% + \begingroup + \let\@@@newadjustboxenv\@@@newadjustimage + \def\new@adjustbox{\renewcommand}% + \newadjustboxenv@ +} +\newcommand*\provideadjustimage{% + \begingroup + \let\@@@newadjustboxenv\@@@newadjustimage + \def\new@adjustbox{\providecommand}% + \newadjustboxenv@ +} +\newcommand*\declareadjustimage{% + \begingroup + \let\@@@newadjustboxenv\@@@newadjustimage + \def\new@adjustbox##1{\let##1\@undefined\newcommand{##1}}% + \newadjustboxenv@ +} +\def\@@@newadjustimage#1#2#3{% + \expandafter + \endgroup + \new@adjustbox{#1}#2{% + \begingroup + \def\@tempa####1{% + \def\IMAGEFILENAME{####1}% + \@adjustbox{#3}{\Gin@clipfalse\expandafter\Gin@i\expandafter{\IMAGEFILENAME}}% + }% + \@tempa + }% +} +\newcommand*\adjustbox@NewAdjustImage[4]{% + \adjustbox@checkforxparse + #1{#2}{#3}{% + \begingroup + \def\@tempa####1{% + \def\IMAGEFILENAME{####1}% + \@adjustbox{#4}{\Gin@clipfalse\expandafter\Gin@i\expandafter{\IMAGEFILENAME}}% + }% + \@tempa + }% +} +\newcommand*\NewAdjustImage{% + \adjustbox@NewAdjustImage\NewDocumentCommand +} +\newcommand*\RenewAdjustImage{% + \adjustbox@NewAdjustImage\RenewDocumentCommand +} +\newcommand*\ProvideAdjustImage{% + \adjustbox@NewAdjustImage\ProvideDocumentCommand +} +\newcommand*\DeclareAdjustImage{% + \adjustbox@NewAdjustImage\ProvideDocumentCommand +} +\def\adjustbox@checkforxparse{% + \begingroup + \expandafter\ifx\csname ver@xparse.sty\endcsname\relax + \PackageError{adjustbox}{% + The 'xparse' package must be loaded separately in\MessageBreak + order to use the following macros: \MessageBreak + \string\NewAdjustImage, + \string\RenewAdjustImage, \MessageBreak + \string\ProvideAdjustImage, + \string\DeclareAdjustImage}{} + \fi + \endgroup + \let\adjustbox@checkforxparse\relax +} \def\adjbox@Gin@add#1{% \def\@tempa{#1}% \toks@\expandafter\expandafter\expandafter{\expandafter\@tempa\expandafter{\the\toks@}}% @@ -557,9 +659,10 @@ \newcommand*\rndfbox@[2][]{% \collectbox{\@trimclip{\rndframearoundbox@{#1}}{#2}}% } -\def\rndframearoundbox@#1{% +\newif\ifadjbox@rndframe@clip +\def\rndframearoundbox@#1#2#3#4#5#6{% \setkeys{adjbox@rndframe}{#1}% - \@rndframearoundbox + \@rndframearoundbox{#2}{#3}{#4}{#5}{#6}{\ifadjbox@rndframe@clip\relax\fi}% } \define@key{adjbox@rndframe}{width}{% \adjsetlength\fboxrule{#1}% @@ -574,6 +677,9 @@ \def\adjbox@rndframe@color{#1}% } \let\adjbox@rndframe@color\relax +\define@key{adjbox@rndframe}{clip}[true]{% + \csname adjbox@rndframe@clip#1\endcsname +} \define@key\adjbox@fam{scale}{% \@ifnextchar\bgroup{% \adjbox@scale@xy @@ -668,18 +774,158 @@ \fi }% } +\define@key\adjbox@fam{pagecenter}[\linewidth]{% + \noindent\leavevmode + \adjbox@Gin@Add{\pagecenterbox[{#1}]}% +}% +\define@key\adjbox@fam{pageleftalign}[\linewidth]{% + \noindent\leavevmode + \adjbox@Gin@Add{\pageleftalignbox[{#1}]}% +}% +\define@key\adjbox@fam{pagerightalign}[\linewidth]{% + \noindent\leavevmode + \adjbox@Gin@Add{\pagerightalignbox[{#1}]}% +}% +\define@key\adjbox@fam{pageinner}[\linewidth]{% + \noindent\leavevmode + \adjbox@Gin@Add{\pageinnerbox[{#1}]}% +} +\define@key\adjbox@fam{pageouter}[\linewidth]{% + \noindent\leavevmode + \adjbox@Gin@Add{\pageouterbox[{#1}]}% +} +\define@key\adjbox@fam{textareacenter}[\linewidth]{% + \noindent\leavevmode + \adjbox@Gin@Add{\textareacenterbox[{#1}]}% +}% +\define@key\adjbox@fam{textarealeftalign}[\linewidth]{% + \noindent\leavevmode + \adjbox@Gin@Add{\textarealeftalignbox[{#1}]}% +}% +\define@key\adjbox@fam{textarearightalign}[\linewidth]{% + \noindent\leavevmode + \adjbox@Gin@Add{\textarearightalignbox[{#1}]}% +}% +\define@key\adjbox@fam{textareainner}[\linewidth]{% + \noindent\leavevmode + \adjbox@Gin@Add{\textareainnerbox[{#1}]}% +} +\define@key\adjbox@fam{textareaouter}[\linewidth]{% + \noindent\leavevmode + \adjbox@Gin@Add{\textareaouterbox[{#1}]}% +} +\newcommand\pagecenterbox[1][\linewidth]{% + \collectboxcheckenv{pagecenterbox}% + \noindent\leavevmode\checkoddpage + \@collectbox{\@pagecenterbox{#1}{-1in-\hoffset-\ifoddpage\oddsidemargin\else\evensidemargin\fi+.5\paperwidth-.5\@tempdimc-\@totalleftmargin}}% +} +\def\@pagecenterbox#1#2{% + \adjsetlength\@tempdimc{#1}% + \ifdim\@tempdimc<\z@ + \@tempdimc=\z@ + \fi + \adjsetlength\@tempdima{#2}% + \ifdim\@tempdima<\z@ + \@tempdimb=-\@tempdima + \else + \@tempdimb=\@tempdima + \fi + \ifdim\@tempdima<\z@ + \hb@xt@\@tempdimc{\hss\hb@xt@\@tempdimb{\hb@xt@\@tempdimc{\hss\usebox\collectedbox\hss}\hss}\hskip\@tempdimc}% + \else + \hb@xt@\@tempdimc{\hskip\@tempdimc\hb@xt@\@tempdimb{\hss\hb@xt@\@tempdimc{\hss\usebox\collectedbox\hss}}\hss}% + \fi +} +\newcommand\textareacenterbox[1][\linewidth]{% + \collectboxcheckenv{textareacenterbox}% + \noindent\leavevmode + \@collectbox{\@pagecenterbox{#1}{-\@totalleftmargin+.5\textwidth-.5\linewidth}}% +} +\newcommand\pageleftalignbox[1][\linewidth]{% + \collectboxcheckenv{pageleftalignbox}% + \noindent\leavevmode\checkoddpage + \@collectbox{\@lapbox{#1}{-1in-\hoffset-\ifoddpage\oddsidemargin\else\evensidemargin\fi-\@totalleftmargin}}% +} +\newcommand\pagerightalignbox[1][\linewidth]{% + \collectboxcheckenv{pagerightalignbox}% + \noindent\leavevmode\checkoddpage + \@collectbox{\@lapbox{#1}{-1in-\hoffset-\ifoddpage\oddsidemargin\else\evensidemargin\fi-\@totalleftmargin+\paperwidth-(#1)}}% +} +\newcommand\textarealeftalignbox[1][\linewidth]{% + \collectboxcheckenv{textarealeftalignbox}% + \noindent\leavevmode\checkoddpage + \@collectbox{\@textarealeftalignbox{#1}}% +} +\def\@textarealeftalignbox#1{% + \adjsetlength\@tempdima{\@totalleftmargin}% + \adjsetlength\@tempdimc{#1}% + \ifdim\@tempdimc<\z@ + \@tempdimc=\z@ + \fi + \leavevmode + \hb@xt@\@tempdimc{\hss\hb@xt@\@tempdima{\usebox\collectedbox\hss}\hskip\@tempdimc}% +} +\newcommand\textarearightalignbox[1][\linewidth]{% + \collectboxcheckenv{textarearightalignbox}% + \noindent\leavevmode\checkoddpage + \@collectbox{\@textarearightalignbox{#1}{+\textwidth}}% +} +\def\@textarearightalignbox#1#2{% + \adjsetlength\@tempdimc{#1}% + \ifdim\@tempdimc<\z@ + \@tempdimc=\z@ + \fi + \adjsetlength\@tempdima{-\@totalleftmargin+\textwidth-\@tempdimc}% + \ifdim\@tempdima<\z@ + \@tempdima=-\@tempdima + \fi + \leavevmode + \hb@xt@\@tempdimc{\hskip\@tempdimc\hb@xt@\@tempdima{\hss\usebox\collectedbox}\hss}% +} +\newcommand\pageinnerbox{% + \noindent\leavevmode\checkoddpage + \ifoddpageoroneside + \expandafter\pageleftalignbox + \else + \expandafter\pagerightalignbox + \fi +}% +\newcommand\pageouterbox{% + \noindent\leavevmode\checkoddpage + \ifoddpageoroneside + \expandafter\pagerightalignbox + \else + \expandafter\pageleftalignbox + \fi +}% +\newcommand\textareainnerbox{% + \noindent\leavevmode\checkoddpage + \ifoddpageoroneside + \expandafter\textarealeftalignbox + \else + \expandafter\textarearightalignbox + \fi +}% +\newcommand\textareaouterbox{% + \noindent\leavevmode\checkoddpage + \ifoddpageoroneside + \expandafter\textarearightalignbox + \else + \expandafter\textarealeftalignbox + \fi +}% \IfFileExists{ifoddpage.sty}{% \RequirePackage{ifoddpage}% }{% - \renewcommand\outersidebox[1][]{% + \def\checkoddpage{% \PackageError{adjustbox}{% - The 'outer' and 'inner' keys as well as the\MessageBreak - \string\outersidebox\space and \string\innersidebox\space macros\MessageBreak - require the 'ifoddpage' package, which is not\MessageBreak - installed}{}% - }% - \let\innersidebox\outersidebox + The used key, macro or environment requires \MessageBreak + the 'ifoddpage' package which is not installed!}{}% + } }% +\define@key\adjbox@fam{noindent}[]{% + \noindent +} \define@key\adjbox@fam{raise}{% \@ifnextchar\bgroup{% \adjbox@raise @@ -1548,13 +1794,19 @@ }{}% }% } +\def\adjbox@nofloatenv{minipage} +\def\adjbox@nofloatcaptionsetup#1{% + \@ifundefined{captionsetup}% + {\def\@captype{#1}}% + {\captionsetup{type={#1}}}% +\csname capstart\endcsname +} \newenvironment{adjnofloat}[1]{% - \trivlist - \def\@captype{#1}% - \parindent\z@ - \item\relax + \par\noindent + \minipage{\linewidth}% + \adjbox@nofloatcaptionsetup{#1}% }{% - \endtrivlist + \endminipage\par } \define@key\adjbox@fam{phantom}[]{% \expandafter\ifx\csname #1phantom\endcsname\relax diff --git a/Master/texmf-dist/tex/latex/adjustbox/tc-dvips.def b/Master/texmf-dist/tex/latex/adjustbox/tc-dvips.def index 4bd2f36c001..7f7f11e715b 100644 --- a/Master/texmf-dist/tex/latex/adjustbox/tc-dvips.def +++ b/Master/texmf-dist/tex/latex/adjustbox/tc-dvips.def @@ -17,7 +17,7 @@ %% tc-dvips.def, tc-pdftex.def, tc-pgf.def and tc-xetex.def. %% Further author information are located in the .def files. %% -\ProvidesFile{tc-dvips.def}[2018/04/08 v2.1 Clipping driver for dvips] +\ProvidesFile{tc-dvips.def}[2019/01/04 v2.2 Clipping driver for dvips] \def\@cliptoboxdim#1{% \setbox#1=\hbox{% \adjcalc@settobp\WIDTH{\wd#1}% @@ -49,14 +49,14 @@ \adjcalc@settobp\WIDTH{\wd#1}% \adjcalc@settobp\RADIUSTL{#2}% \adjcalc@settobp\RADIUSTR{#3}% - \adjcalc@settobp\RADIUSBR{#4}% - \adjcalc@settobp\RADIUSBL{#5}% + \adjcalc@settobp\RADIUSBL{#4}% + \adjcalc@settobp\RADIUSBR{#5}% \adjcalc@settobp\RADIUSTLmHEIGHT{#2-\ht#1}% \adjcalc@settobp\RADIUSTRmHEIGHT{#3-\ht#1}% \adjcalc@settobp\WIDTHmRADIUSTR{\wd#1-#3}% - \adjcalc@settobp\DEPTHmRADIUSBR{\dp#1-#4}% - \adjcalc@settobp\WIDTHmRADIUSBR{\wd#1-#4}% - \adjcalc@settobp\DEPTHmRADIUSBL{\dp#1-#5}% + \adjcalc@settobp\DEPTHmRADIUSBR{\dp#1-#5}% + \adjcalc@settobp\WIDTHmRADIUSBR{\wd#1-#5}% + \adjcalc@settobp\DEPTHmRADIUSBL{\dp#1-#4}% \special{% ps: /mtrxc matrix currentmatrix def @@ -86,7 +86,7 @@ \hskip \wd#1% }% } -\def\@rndframearoundbox#1#2#3#4#5{% +\def\@rndframearoundbox#1#2#3#4#5#6{% \setbox#1=\hbox{% \adjsetlength\@tempdima{\fboxsep+.5\fboxrule}% \@marginbox#1\@tempdima\@tempdima\@tempdima\@tempdima% @@ -96,15 +96,19 @@ \adjcalc@settobp\WIDTH{\wd#1}% \adjcalc@settobp\RADIUSTL{#2}% \adjcalc@settobp\RADIUSTR{#3}% - \adjcalc@settobp\RADIUSBR{#4}% - \adjcalc@settobp\RADIUSBL{#5}% + \adjcalc@settobp\RADIUSBR{#5}% + \adjcalc@settobp\RADIUSBL{#4}% \adjcalc@settobp\RADIUSTLmHEIGHT{#2-\ht#1}% \adjcalc@settobp\RADIUSTRmHEIGHT{#3-\ht#1}% \adjcalc@settobp\WIDTHmRADIUSTR{\wd#1-#3}% - \adjcalc@settobp\DEPTHmRADIUSBR{\dp#1-#4}% - \adjcalc@settobp\WIDTHmRADIUSBR{\wd#1-#4}% - \adjcalc@settobp\DEPTHmRADIUSBL{\dp#1-#5}% + \adjcalc@settobp\DEPTHmRADIUSBR{\dp#1-#5}% + \adjcalc@settobp\WIDTHmRADIUSBR{\wd#1-#5}% + \adjcalc@settobp\DEPTHmRADIUSBL{\dp#1-#4}% \adjcalc@settobp\LINEWIDTH{\fboxrule}% + \edef\@tempa{#6}% + \ifx\@empty\@tempa\else + \@clipcornersofbox{#1}{#2}{#3}{#4}{#5}% + \fi % \hbox to 0pt{\copy#1\hss}% \hbox to 0pt{% diff --git a/Master/texmf-dist/tex/latex/adjustbox/tc-pdftex.def b/Master/texmf-dist/tex/latex/adjustbox/tc-pdftex.def index c69189939da..637f631bfc2 100644 --- a/Master/texmf-dist/tex/latex/adjustbox/tc-pdftex.def +++ b/Master/texmf-dist/tex/latex/adjustbox/tc-pdftex.def @@ -17,7 +17,7 @@ %% tc-dvips.def, tc-pdftex.def, tc-pgf.def and tc-xetex.def. %% Further author information are located in the .def files. %% -\ProvidesFile{tc-pdftex.def}[2018/04/08 v2.1 Clipping driver for pdftex] +\ProvidesFile{tc-pdftex.def}[2019/01/04 v2.2 Clipping driver for pdftex] \def\@cliptoboxdim#1{% \setbox#1=\hbox{% \adjcalc@settobp\WIDTH{\wd#1}% @@ -39,8 +39,8 @@ \adjcalc@settobp\WIDTH{\wd#1}% \adjcalc@settobp\RADIUSTL{#2}% \adjcalc@settobp\RADIUSTR{#3}% - \adjcalc@settobp\RADIUSBR{#4}% - \adjcalc@settobp\RADIUSBL{#5}% + \adjcalc@settobp\RADIUSBR{#5}% + \adjcalc@settobp\RADIUSBL{#4}% \adjcalc@settobp\RADIUSTLb{\tc@bezfacn#2}% \adjcalc@settobp\HEIGHTmRADIUSTL{\ht#1-#2}% \adjcalc@settobp\HEIGHTmRADIUSTLb{\ht#1-\tc@bezfacn#2}% @@ -48,13 +48,13 @@ \adjcalc@settobp\HEIGHTmRADIUSTRb{\ht#1-\tc@bezfacn#3}% \adjcalc@settobp\WIDTHmRADIUSTR{\wd#1-#3}% \adjcalc@settobp\WIDTHmRADIUSTRb{\wd#1-\tc@bezfacn#3}% - \adjcalc@settobp\RADIUSBRmDEPTH{#4-\dp#1}% - \adjcalc@settobp\RADIUSBRmDEPTHb{\tc@bezfacn#4-\dp#1}% - \adjcalc@settobp\WIDTHmRADIUSBR{\wd#1-#4}% - \adjcalc@settobp\WIDTHmRADIUSBRb{\wd#1-\tc@bezfacn#4}% - \adjcalc@settobp\RADIUSBLmDEPTH{#5-\dp#1}% - \adjcalc@settobp\RADIUSBLmDEPTHb{\tc@bezfacn#5-\dp#1}% - \adjcalc@settobp\RADIUSBLb{\tc@bezfacn#5}% + \adjcalc@settobp\RADIUSBRmDEPTH{#5-\dp#1}% + \adjcalc@settobp\RADIUSBRmDEPTHb{\tc@bezfacn#5-\dp#1}% + \adjcalc@settobp\WIDTHmRADIUSBR{\wd#1-#5}% + \adjcalc@settobp\WIDTHmRADIUSBRb{\wd#1-\tc@bezfacn#5}% + \adjcalc@settobp\RADIUSBLmDEPTH{#4-\dp#1}% + \adjcalc@settobp\RADIUSBLmDEPTHb{\tc@bezfacn#4-\dp#1}% + \adjcalc@settobp\RADIUSBLb{\tc@bezfacn#4}% \adjcalc@settobp\LINEWIDTH{\fboxrule}% } \def\@clip@roundedboxpath@pdfcode{% @@ -81,11 +81,15 @@ \hskip\wd#1% }% } -\def\@rndframearoundbox#1#2#3#4#5{% +\def\@rndframearoundbox#1#2#3#4#5#6{% \setbox#1=\hbox{% \adjsetlength\@tempdima{\fboxsep+.5\fboxrule}% \@marginbox#1\@tempdima\@tempdima\@tempdima\@tempdima% \@clip@bpdimens{#1}{#2}{#3}{#4}{#5}% + \edef\@tempa{#6}% + \ifx\@empty\@tempa\else + \@clipcornersofbox{#1}{#2}{#3}{#4}{#5}% + \fi % \hbox to 0pt{\copy#1\hss}% \pdfsave diff --git a/Master/texmf-dist/tex/latex/adjustbox/tc-pgf.def b/Master/texmf-dist/tex/latex/adjustbox/tc-pgf.def index 10dbef59d4c..3f852728baa 100644 --- a/Master/texmf-dist/tex/latex/adjustbox/tc-pgf.def +++ b/Master/texmf-dist/tex/latex/adjustbox/tc-pgf.def @@ -17,7 +17,7 @@ %% tc-dvips.def, tc-pdftex.def, tc-pgf.def and tc-xetex.def. %% Further author information are located in the .def files. %% -\ProvidesFile{tc-pgf.def}[2018/04/08 v2.1 trimclip fall-back clipping driver using PGF] +\ProvidesFile{tc-pgf.def}[2019/01/04 v2.2 trimclip fall-back clipping driver using PGF] \RequirePackage{pgf} \def\@cliptoboxdim#1{% \setbox#1\hbox{\begin{pgfpicture}% @@ -38,10 +38,10 @@ \pgfpatharc{180}{90}{#2}% \pgfpathlineto{\pgfpoint{\wd#1-#3}{\ht#1}}% \pgfpatharc{90}{0}{#3}% - \pgfpathlineto{\pgfpoint{\wd#1}{#4-\dp#1}}% - \pgfpatharc{0}{-90}{#4}% - \pgfpathlineto{\pgfpoint{#5}{-\dp#1}}% - \pgfpatharc{270}{180}{#5}% + \pgfpathlineto{\pgfpoint{\wd#1}{#5-\dp#1}}% + \pgfpatharc{0}{-90}{#5}% + \pgfpathlineto{\pgfpoint{#4}{-\dp#1}}% + \pgfpatharc{270}{180}{#4}% \pgfpathlineto{\pgfpoint{\z@}{\ht#1-#2}}% \pgfpathclose \pgfusepathqclip @@ -50,10 +50,14 @@ \pgfsetbaselinepointnow{\pgfpoint\z@\z@}% \end{pgfpicture}}% } -\def\@rndframearoundbox#1#2#3#4#5{% +\def\@rndframearoundbox#1#2#3#4#5#6{% \setbox#1\hbox{\begin{pgfpicture}% \adjsetlength\@tempdima{\fboxsep+.5\fboxrule}% \@marginbox#1\@tempdima\@tempdima\@tempdima\@tempdima% + \edef\@tempa{#6}% + \ifx\@empty\@tempa\else + \@clipcornersofbox{#1}{#2}{#3}{#4}{#5}% + \fi \pgfset{inner sep=\z@,outer sep=\z@,minimum size=\z@}% \pgfnode{rectangle}{base west}{\usebox#1}{}{}% \pgfusepath{}% @@ -62,10 +66,10 @@ \pgfpatharc{180}{90}{#2}% \pgfpathlineto{\pgfpoint{\wd#1-#3}{\ht#1}}% \pgfpatharc{90}{0}{#3}% - \pgfpathlineto{\pgfpoint{\wd#1}{#4-\dp#1}}% - \pgfpatharc{0}{-90}{#4}% - \pgfpathlineto{\pgfpoint{#5}{-\dp#1}}% - \pgfpatharc{270}{180}{#5}% + \pgfpathlineto{\pgfpoint{\wd#1}{#5-\dp#1}}% + \pgfpatharc{0}{-90}{#5}% + \pgfpathlineto{\pgfpoint{#4}{-\dp#1}}% + \pgfpatharc{270}{180}{#4}% \pgfpathlineto{\pgfpoint{\z@}{\ht#1-#2}}% \pgfpathclose \pgfusepath{stroke}% diff --git a/Master/texmf-dist/tex/latex/adjustbox/tc-xetex.def b/Master/texmf-dist/tex/latex/adjustbox/tc-xetex.def index ea28e71c1b4..0f35b4d0340 100644 --- a/Master/texmf-dist/tex/latex/adjustbox/tc-xetex.def +++ b/Master/texmf-dist/tex/latex/adjustbox/tc-xetex.def @@ -17,7 +17,7 @@ %% tc-dvips.def, tc-pdftex.def, tc-pgf.def and tc-xetex.def. %% Further author information are located in the .def files. %% -\ProvidesFile{tc-xetex.def}[2018/04/08 v2.1 Clipping driver for xetex] +\ProvidesFile{tc-xetex.def}[2019/01/04 v2.2 Clipping driver for xetex] \def\@cliptoboxdim#1{% \setbox#1=\hbox{% \adjcalc@settobp\WIDTH{\wd#1}% @@ -41,8 +41,8 @@ \adjcalc@settobp\WIDTH{\wd#1}% \adjcalc@settobp\RADIUSTL{#2}% \adjcalc@settobp\RADIUSTR{#3}% - \adjcalc@settobp\RADIUSBR{#4}% - \adjcalc@settobp\RADIUSBL{#5}% + \adjcalc@settobp\RADIUSBL{#4}% + \adjcalc@settobp\RADIUSBR{#5}% \adjcalc@settobp\RADIUSTLb{\tc@bezfacn#2}% \adjcalc@settobp\HEIGHTmRADIUSTL{\ht#1-#2}% \adjcalc@settobp\HEIGHTmRADIUSTLb{\ht#1-\tc@bezfacn#2}% @@ -50,13 +50,13 @@ \adjcalc@settobp\HEIGHTmRADIUSTRb{\ht#1-\tc@bezfacn#3}% \adjcalc@settobp\WIDTHmRADIUSTR{\wd#1-#3}% \adjcalc@settobp\WIDTHmRADIUSTRb{\wd#1-\tc@bezfacn#3}% - \adjcalc@settobp\RADIUSBRmDEPTH{#4-\dp#1}% - \adjcalc@settobp\RADIUSBRmDEPTHb{\tc@bezfacn#4-\dp#1}% - \adjcalc@settobp\WIDTHmRADIUSBR{\wd#1-#4}% - \adjcalc@settobp\WIDTHmRADIUSBRb{\wd#1-\tc@bezfacn#4}% - \adjcalc@settobp\RADIUSBLmDEPTH{#5-\dp#1}% - \adjcalc@settobp\RADIUSBLmDEPTHb{\tc@bezfacn#5-\dp#1}% - \adjcalc@settobp\RADIUSBLb{\tc@bezfacn#5}% + \adjcalc@settobp\RADIUSBRmDEPTH{#5-\dp#1}% + \adjcalc@settobp\RADIUSBRmDEPTHb{\tc@bezfacn#5-\dp#1}% + \adjcalc@settobp\WIDTHmRADIUSBR{\wd#1-#5}% + \adjcalc@settobp\WIDTHmRADIUSBRb{\wd#1-\tc@bezfacn#5}% + \adjcalc@settobp\RADIUSBLmDEPTH{#4-\dp#1}% + \adjcalc@settobp\RADIUSBLmDEPTHb{\tc@bezfacn#4-\dp#1}% + \adjcalc@settobp\RADIUSBLb{\tc@bezfacn#4}% \adjcalc@settobp\LINEWIDTH{\fboxrule}% } \def\@clip@roundedboxpath@pdfcode{% @@ -87,11 +87,15 @@ \hskip\wd#1% }% } -\def\@rndframearoundbox#1#2#3#4#5{% +\def\@rndframearoundbox#1#2#3#4#5#6{% \setbox#1=\hbox{% \adjsetlength\@tempdima{\fboxsep+.5\fboxrule}% \@marginbox#1\@tempdima\@tempdima\@tempdima\@tempdima% \@clip@bpdimens{#1}{#2}{#3}{#4}{#5}% + \edef\@tempa{#6}% + \ifx\@empty\@tempa\else + \@clipcornersofbox{#1}{#2}{#3}{#4}{#5}% + \fi % \hbox to 0pt{\copy#1\hss}% \hbox to 0pt{% -- cgit v1.2.3