summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-04-09 21:14:28 +0000
committerKarl Berry <karl@freefriends.org>2018-04-09 21:14:28 +0000
commitdb2477c99efe052b36f6f42d0e8666d5de71fcd0 (patch)
tree4e039ff9a57a55301741b7fef335580017874c5b /Master/texmf-dist/tex/latex
parent20e3b619e46b4054c5e50d58557d23611f8eae38 (diff)
adjustbox (9apr18)
git-svn-id: svn://tug.org/texlive/trunk@47405 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r--Master/texmf-dist/tex/latex/adjustbox/adjcalc.sty9
-rw-r--r--Master/texmf-dist/tex/latex/adjustbox/adjustbox.sty630
-rw-r--r--Master/texmf-dist/tex/latex/adjustbox/tc-dvips.def116
-rw-r--r--Master/texmf-dist/tex/latex/adjustbox/tc-pdftex.def91
-rw-r--r--Master/texmf-dist/tex/latex/adjustbox/tc-pgf.def44
-rw-r--r--Master/texmf-dist/tex/latex/adjustbox/tc-xetex.def109
-rw-r--r--Master/texmf-dist/tex/latex/adjustbox/trimclip.sty9
7 files changed, 906 insertions, 102 deletions
diff --git a/Master/texmf-dist/tex/latex/adjustbox/adjcalc.sty b/Master/texmf-dist/tex/latex/adjustbox/adjcalc.sty
index 98c05a8e6ed..cd219dbb5c2 100644
--- a/Master/texmf-dist/tex/latex/adjustbox/adjcalc.sty
+++ b/Master/texmf-dist/tex/latex/adjustbox/adjcalc.sty
@@ -1,4 +1,4 @@
-%% Copyright (C) 2011-2012 by Martin Scharrer <martin@scharrer-online.de>
+%% Copyright (C) 2011-2018 by Martin Scharrer <martin@scharrer-online.de>
%% ----------------------------------------------------------------------
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
@@ -143,6 +143,13 @@
}%
\let\adjsetlengthdefault\adjsetlengthdefault@
}
+\def\adjcalc@settobp#1#2{%
+ \begingroup
+ \adjsetlength\@tempdima{#2}%
+ \@tempdima=0.99626\@tempdima
+ \edef\@tempa{\endgroup\def\noexpand#1{\strip@pt\@tempdima\space}}%
+ \@tempa
+}%
\def\adjcalc@overwrite{%
\let\setlength\adjsetlength
\let\addtolength\adjaddtolength
diff --git a/Master/texmf-dist/tex/latex/adjustbox/adjustbox.sty b/Master/texmf-dist/tex/latex/adjustbox/adjustbox.sty
index b07f7d9c530..999d602fd1a 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-2012 by Martin Scharrer <martin@scharrer-online.de>
+%% Copyright (C) 2011-2018 by Martin Scharrer <martin@scharrer-online.de>
%% ----------------------------------------------------------------------
%% 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}[%
- 2012/05/21
- v1.0
+ 2018/04/08
+ v1.1
Adjusting TeX boxes (trim, clip, ...)]
\RequirePackage{xkeyval}
\RequirePackage{adjcalc}
@@ -85,23 +85,33 @@
\fi
}
\let\adjbox@keysafter\@empty
-\newcommand\adjustbox[1]{%
+\newcommand\adjustbox{%
\begingroup
+ \collectboxcheckenv{adjustbox}%
+ \@adjustbox
+}
+\long\def\@adjustbox#1{%
\edef\adjbox@line{\the\inputlineno}%
\let\collectbox@mode\relax
\let\collectbox@noindent\relax
- \collectboxcheckenv{adjustbox}%
- \ifcollectboxenv\else
+ \let\adjbox@collectbox\@collectbox
+ \let\adjbox@begininnercode\@empty
+ \let\adjbox@endinnercode\@empty
+ \chardef\adjbox@innerlevel\z@
+ \ifcollectboxenv
+ \let\adjustbox@noindent\noindent
+ \let\adjustbox@unskip\unskip
+ \let\adjustbox@ignorespaces\ignorespaces
+ \else
\let\adjustbox@noindent\relax
+ \let\adjustbox@unskip\relax
+ \let\adjustbox@ignorespaces\relax
\fi
- \begingroup
+ \let\XKV@checksanitizea\adjbox@kvsanitize
\adjbox@setkeys{#1}%
- \expandafter\expandafter\expandafter
- \endgroup
\expandafter
\adjbox@collectbox\expandafter{\expandafter\adjustbox@\expandafter{\XKV@rm}}%
}
-\def\adjbox@collectbox{\@collectbox}
\def\adjbox@setkeys@ba{%
\expandafter\expandafter
\expandafter\adjbox@@setkeys@ba
@@ -115,7 +125,6 @@
\def\adjbox@setkeys{%
\setkeys*{ADJBOX}%
}
-\let\adjustbox@noindent\noindent
\def\adjustbox@#1{%
\adjbox@Width\width
\adjbox@Height\height
@@ -136,13 +145,113 @@
\the\toks@
\endgroup
}
+\begingroup
+\catcode`\, 3
+\catcode`\= 3
+\gdef\adjbox@comma@iii{,}%
+\gdef\adjbox@equal@iii{=}%
+\catcode`\, 4
+\catcode`\= 4
+\gdef\adjbox@comma@iv{,}%
+\gdef\adjbox@equal@iv{=}%
+\catcode`\, 7
+\catcode`\= 7
+\gdef\adjbox@comma@vii{,}%
+\gdef\adjbox@equal@vii{=}%
+\catcode`\, 8
+\catcode`\= 8
+\gdef\adjbox@comma@viii{,}%
+\gdef\adjbox@equal@viii{=}%
+\catcode`\, 10
+\catcode`\= 10
+\gdef\adjbox@comma@x{,}%
+\gdef\adjbox@equal@x{=}%
+\catcode`\, 11
+\catcode`\= 11
+\gdef\adjbox@comma@xi{,}%
+\gdef\adjbox@equal@xi{=}%
+\catcode`\, 13
+\catcode`\= 13
+\gdef\adjbox@comma@xiii{,}%
+\gdef\adjbox@equal@xiii{=}%
+\catcode`\, 12
+\catcode`\= 12
+\gdef\adjbox@comma@xii{,}%
+\gdef\adjbox@equal@xii{=}%
+\gdef\adjbox@kvsanitize#1#2{%
+ \def\@tempa{\expandafter\noexpand\adjbox@comma@xiii}%
+ \def\@tempb{}%
+ \ifnum\catcode`\,=12 \else
+ \ifnum\catcode`\,=13 \else
+ \@ifundefined{adjbox@comma@\romannumeral\catcode`\,}{%
+ \PackageError{adjustbox}
+ {Invalid comma catcode \the\catcode`\,}{}%
+ }{}%
+ \edef\@tempb{\csname adjbox@comma@\romannumeral\the\catcode`\,\endcsname}%
+ \fi
+ \fi
+ \edef\@tempa{\@tempa\@tempb}%
+ \XKV@tempa@toks{#1}%
+ \expandafter\adjbox@replacecatcodes\expandafter,\@tempa\@nnil
+ \def\@tempa{\expandafter\noexpand\adjbox@equal@xiii}%
+ \def\@tempb{}%
+ \ifnum\catcode`\==12 \else
+ \ifnum\catcode`\==13 \else
+ \@ifundefined{adjbox@equal@\romannumeral\catcode`\=}{%
+ \PackageError{adjustbox}
+ {Invalid equal sign catcode \the\catcode`\=}{}%
+ }{}%
+ \def\@tempb{\@tempa\csname adjbox@equal@\romannumeral\the\catcode`\,\endcsname}%
+ \fi
+ \fi
+ \edef\@tempa{\@tempa\@tempb}%
+ \expandafter\adjbox@replacecatcodes\expandafter=\@tempa\@nnil
+ \edef#2{\the\XKV@tempa@toks}%
+}
+\gdef\adjbox@replacecatcodes#1#2{%
+ \ifx\@nnil#2\relax\else
+ \def\@tempa##1#2{%
+ \ifx\@nnil##1\relax\else
+ \XKV@tempa@toks{##1}%
+ \expandafter\@tempb
+ \fi
+ }%
+ \def\@tempb##1#2{%
+ \ifx\@nnil##1\relax\else
+ \XKV@tempa@toks\expandafter{\the\XKV@tempa@toks#1##1}%
+ \expandafter\@tempb
+ \fi
+ }%
+ \expandafter\@tempa\the\XKV@tempa@toks#2\@nnil#2\relax
+ \expandafter\adjbox@replacecatcodes\expandafter#1%
+ \fi
+}
+\endgroup
\def\adjustbox@content{%
\usebox\collectedbox
}
+\def\smallestside{\ifdim\width<\totalheight \width\else\totalheight\fi}%
+\def\largestside{\ifdim\width>\totalheight \width\else\totalheight\fi}%
+\def\Smallestside{\ifdim\Width<\Totalheight \Width\else\Totalheight\fi}%
+\def\Largestside{\ifdim\Width>\Totalheight \Width\else\Totalheight\fi}%
\newdimen\adjbox@Width
\newdimen\adjbox@Height
\newdimen\adjbox@Depth
\newdimen\adjbox@Totalheight
+\newdimen\adjbox@pwidth
+\newdimen\adjbox@pheight
+\newdimen\adjbox@pdepth
+\newdimen\adjbox@ptotalheight
+\def\adjbox@parentdims{%
+ \let\pwidth\adjbox@pwidth
+ \let\pheight\adjbox@pheight
+ \let\pdepth\adjbox@pdepth
+ \let\ptotalheight\adjbox@ptotalheight
+ \pwidth\width
+ \pheight\height
+ \pdepth\depth
+ \ptotalheight\totalheight
+}%
\def\adjbox@esetsize{%
\ifcase0%
\ifx\Gin@ewidth\Gin@exclamation\else 1\fi
@@ -164,6 +273,103 @@
\adjustbox{#1}{\Gin@clipfalse\Gin@i{#2}}%
}
{\csname adjustbox@minimal\endcsname}
+\newcommand*\newadjustboxenv{%
+ \begingroup
+ \@ifstar{%
+ \let\@@@newadjustboxenv\@@@newadjustboxenv@
+ \def\new@adjustbox{\newenvironment}%
+ \newadjustboxenv@
+ }{%
+ \def\new@adjustbox{\newcommand}%
+ \newadjustboxenv@
+ }%
+}
+\newcommand*\newadjustboxcmd{%
+ \begingroup
+ \let\@@@newadjustboxenv\@@@newadjustboxcmd
+ \def\new@adjustbox{\newcommand}%
+ \newadjustboxenv@
+}
+\newcommand*\renewadjustboxenv{%
+ \begingroup
+ \@ifstar{%
+ \let\@@@newadjustboxenv\@@@newadjustboxenv@
+ \def\new@adjustbox{\renewenvironment}%
+ \newadjustboxenv@
+ }{%
+ \def\new@adjustbox{\renewcommand}%
+ \newadjustboxenv@
+ }%
+}
+\newcommand*\renewadjustboxcmd{%
+ \begingroup
+ \let\@@@newadjustboxenv\@@@newadjustboxcmd
+ \def\new@adjustbox{\renewcommand}%
+ \newadjustboxenv@
+}
+\newcommand*\provideadjustboxenv{%
+ \begingroup
+ \@ifstar{%
+ \let\@@@newadjustboxenv\@@@newadjustboxenv@
+ \def\new@adjustbox{\@star@or@long\adjustbox@provideenvironment}%
+ \newadjustboxenv@
+ }{%
+ \def\new@adjustbox{\providecommand}%
+ \newadjustboxenv@
+ }%
+}
+\def\adjustbox@provideenvironment#1{%
+ \@ifundefined{#1}%
+ {\new@environment{#1}}%
+ {\adjustbox@gobble@oomm}%
+}
+\newcommand*\adjustbox@gobble@oomm[1][]{%
+ \adjustbox@gobble@@oomm
+}
+\newcommand*\adjustbox@gobble@@oomm[3][]{%
+}
+\def\newadjustboxenv@#1{%
+ \@ifnextchar{[}%
+ {\@newadjustboxenv{#1}}%
+ {\@@@newadjustboxenv{#1}{[0]}}%
+}
+\def\@newadjustboxenv#1[#2]{%
+ \@ifnextchar{[}%
+ {\@@newadjustboxenv{#1}{#2}}%
+ {\@@@newadjustboxenv{#1}{[#2]}}%
+}
+\def\@@newadjustboxenv#1#2[#3]{%
+ \@@@newadjustboxenv{#1}{[#2][#3]}%
+}
+\def\@@@newadjustboxenv@#1#2#3{%
+ \expandafter
+ \endgroup
+ \new@adjustbox{#1}#2{%
+ \begingroup
+ \@collectboxisenv{#1}%
+ \@adjustbox{#3}%
+ }{%
+ \collectboxenvend
+ }%
+}
+\def\@@@newadjustboxenv#1#2#3{%
+ \expandafter
+ \endgroup
+ \expandafter
+ \expandafter\new@adjustbox\csname #1\endcsname#2{%
+ \begingroup
+ \collectboxcheckenv{#1}%
+ \@adjustbox{#3}%
+ }%
+}
+\def\@@@newadjustboxcmd#1#2#3{%
+ \expandafter
+ \endgroup
+ \new@adjustbox{#1}#2{%
+ \begingroup
+ \@adjustbox{#3}%
+ }%
+}
\def\adjbox@Gin@add#1{%
\def\@tempa{#1}%
\toks@\expandafter\expandafter\expandafter{\expandafter\@tempa\expandafter{\the\toks@}}%
@@ -254,6 +460,14 @@
\expandafter\let\csname KV@#1@#2\expandafter\endcsname\csname KV@#1@#3\endcsname
\expandafter\let\csname KV@#1@#2@default\expandafter\endcsname\csname KV@#1@#3@default\endcsname
}
+\def\adjbox@copy@key#1{%
+ \expandafter\let
+ \csname KV@ADJBOX@#1\expandafter\endcsname
+ \csname KV@Gin@#1\endcsname
+ \expandafter\let
+ \csname KV@ADJBOX@#1@default\expandafter\endcsname
+ \csname KV@Gin@#1@default\endcsname
+}
\define@key{adjbox}{viewport}{%
\def\adjustbox@content{%
\@trimclip{%
@@ -279,11 +493,87 @@
}
\define@adjboxkey{Trim}{\trimbox@{#1}}%
\define@adjboxkey{Clip}{\clipbox@{#1}}
+\define@adjboxkey{rndcorners}{\rndcornersbox@{#1}}
+\define@adjboxkey{rndframe}{%
+ \@ifnextchar\bgroup{%
+ \adjbox@rndframe{sep=\z@}%
+ }{%
+ \adjbox@rndframe{sep=\z@}{}%
+ }#1\@nnil
+}
+\define@adjboxkey{rndfbox}{%
+ \@ifnextchar\bgroup{%
+ \adjbox@rndframe{}%
+ }{%
+ \adjbox@rndframe{}{}%
+ }#1\@nnil
+}
+
+\def\adjbox@rndframe#1#2#3\@nnil{%
+ \rndfbox[{#1,#2}]{#3}%
+}
\define@adjboxkey{Clip*}{\clipbox@s{#1}}
\define@adjboxkey{margin}{\marginbox@{#1}}
\define@adjboxkey{margin*}{\marginbox@s{#1}}
\adjbox@let@key\adjbox@fam{padding}{margin}
\adjbox@let@key\adjbox@fam{padding*}{margin*}
+\adjbox@copy@key{bbllx}
+\adjbox@copy@key{bblly}
+\adjbox@copy@key{bburx}
+\adjbox@copy@key{bbury}
+\adjbox@copy@key{decodearray}
+\adjbox@copy@key{intent}
+\adjbox@copy@key{interpolate}
+\adjbox@copy@key{maskarray}
+\adjbox@copy@key{natheight}
+\adjbox@copy@key{natwidth}
+\adjbox@copy@key{ocobjnum}
+\adjbox@copy@key{ocobjref}
+\adjbox@copy@key{page}
+\adjbox@copy@key{pagebox}
+\adjbox@copy@key{print}
+\adjbox@copy@key{quiet}
+\adjbox@copy@key{resetcolor}
+\adjbox@copy@key{resolution}
+\adjbox@copy@key{xmpfile}
+\newcommand\rndcornersbox{%
+ \collectboxcheckenv{rndcornersbox}%
+ \rndcornersbox@
+}
+\def\rndcornersbox@#1{%
+ \collectbox{\@trimclip\@clipcornersofbox{#1}}%
+}
+\newcommand\rndframebox{%
+ \collectboxcheckenv{rndframebox}%
+ \rndframebox@
+}
+\newcommand*\rndframebox@[2][]{%
+ \collectbox{\@trimclip{\rndframearoundbox@{sep=\z@,#1}}{#2}}%
+}
+\newcommand\rndfbox{%
+ \collectboxcheckenv{rndfbox}%
+ \rndfbox@
+}
+\newcommand*\rndfbox@[2][]{%
+ \collectbox{\@trimclip{\rndframearoundbox@{#1}}{#2}}%
+}
+\def\rndframearoundbox@#1{%
+ \setkeys{adjbox@rndframe}{#1}%
+ \@rndframearoundbox
+}
+\define@key{adjbox@rndframe}{width}{%
+ \adjsetlength\fboxrule{#1}%
+}
+\define@key{adjbox@rndframe}{sep}{%
+ \adjsetlength\fboxsep{#1}%
+}
+\define@key{adjbox@rndframe}{color}{%
+ \def\adjbox@rndframe@color{\color{#1}}%
+}
+\define@key{adjbox@rndframe}{color*}{%
+ \def\adjbox@rndframe@color{#1}%
+}
+\let\adjbox@rndframe@color\relax
\define@key\adjbox@fam{scale}{%
\@ifnextchar\bgroup{%
\adjbox@scale@xy
@@ -322,15 +612,18 @@
\define@adjboxkey@defvalue{left}{\linewidth}{\adjbox@halign{#1}\relax\hss}
\define@adjboxkey@defvalue{right}{\linewidth}{\adjbox@halign{#1}\hss\relax}
\newcommand\centerbox[1][\linewidth]{%
- \adjustbox@noindent
+ \collectboxcheckenv{centerbox}%
+ \noindent
\adjbox@halign{#1}\hss\hss
}
\newcommand\leftalignbox[1][\linewidth]{%
- \adjustbox@noindent
+ \collectboxcheckenv{leftalignbox}%
+ \noindent
\adjbox@halign{#1}\relax\hss
}
\newcommand\rightalignbox[1][\linewidth]{%
- \adjustbox@noindent
+ \collectboxcheckenv{rightalignbox}%
+ \noindent
\adjbox@halign{#1}\hss\relax
}
\define@adjboxkey@defvalue{outer}{\linewidth}{%
@@ -341,7 +634,7 @@
}
\newcommand\outersidebox[1][\linewidth]{%
\collectboxcheckenv{outersidebox}%
- \adjustbox@noindent
+ \noindent
\adjbox@halign{#1}{%
\checkoddpage
\ifoddpageoroneside
@@ -359,7 +652,7 @@
}
\newcommand\innersidebox[1][\linewidth]{%
\collectboxcheckenv{innersidebox}%
- \adjustbox@noindent
+ \noindent
\adjbox@halign{#1}{%
\checkoddpage
\ifoddpageoroneside
@@ -532,28 +825,34 @@
\newcommand*\@minmaxsizebox[4]{%
\edef\@tempa{#3}%
\edef\@tempb{#4}%
+ \ifx\@tempa\Gin@exclamation\else
+ \adjsetlength\@tempdima{#3}%
+ \fi
+ \ifx\@tempb\Gin@exclamation\else
+ \adjsetlength\@tempdimb{#4}%
+ \fi
\ifcase0%
\ifx\@tempa\Gin@exclamation
\ifx\@tempb\Gin@exclamation
\else
- \ifdim\@tempb#1#2%
+ \ifdim\@tempdimb#1#2%
1%
\fi
\fi
\else
\ifx\@tempb\Gin@exclamation
- \ifdim\@tempa#1\width
+ \ifdim\@tempdima#1\width
2%
\fi
\else
- \ifdim\@tempa#1\width
- \ifdim\@tempb#1#2%
+ \ifdim\@tempdima#1\width
+ \ifdim\@tempdimb#1#2%
3%
\else
2%
\fi
\else
- \ifdim\@tempb#1#2%
+ \ifdim\@tempdimb#1#2%
1%
\fi
\fi
@@ -562,18 +861,14 @@
\relax% 0
\BOXCONTENT
\or
- \adjsetlength\@tempdima\@tempb
- \Gscale@div\@tempa\@tempdima#2%
+ \Gscale@div\@tempa\@tempdimb#2%
\Gscale@box\@tempa[\@tempa]\BOXCONTENT
\or
- \adjsetlength\@tempdima\@tempa
\Gscale@div\@tempa\@tempdima\width
\Gscale@box\@tempa[\@tempa]\BOXCONTENT
\or
- \adjsetlength\@tempdima\@tempa
\Gscale@div\@tempa\@tempdima\width
- \adjsetlength\@tempdima\@tempb
- \Gscale@div\@tempb\@tempdima#2%
+ \Gscale@div\@tempb\@tempdimb#2%
\ifdim\@tempa\p@#1\@tempb\p@
\let\@tempb\@tempa
\else
@@ -727,6 +1022,43 @@
\def\@tempa{\begin{#1}#2}%
\toks@\expandafter\expandafter\expandafter{\expandafter\@tempa\the\toks@\end{#1}}%
}%
+\define@key{ADJBOX}{color}{%
+ \adjbox@checkcolor
+ \@ifnextchar\bgroup{%
+ \adjbox@color
+ }{%
+ \adjbox@color{}{#1}%
+ }#1\@nnil
+}
+\def\adjbox@color#1#2#3\@nnil{%
+ \ifx\@nnil#1\@nnil
+ \color{#2}%
+ \else
+ \color[{#1}]{#2}%
+ \fi
+}
+\define@key{ADJBOX}{color*}{%
+ #1%
+}
+\define@key{ADJBOX}{fgcolor}{%
+ \adjbox@checkcolor
+ \@ifnextchar\bgroup{%
+ \adjbox@fgcolor
+ }{%
+ \adjbox@fgcolor{}{#1}%
+ }#1\@nnil
+}
+\def\adjbox@fgcolor#1#2#3\@nnil{%
+ \ifx\@nnil#1\@nnil
+ \adjbox@innercode{\color{#2}}{}%
+ \else
+ \adjbox@innercode{\color[{#1}]{#2}}{}%
+ \fi
+}
+\define@key{ADJBOX}{fgcolor*}{%
+ \adjbox@checkcolor
+ \adjbox@innercode{#1}{}%
+}
\define@key\adjbox@fam{bgcolor}{%
\adjbox@checkcolor
\@ifnextchar\bgroup{%
@@ -737,17 +1069,18 @@
}
\def\adjbox@bgcolor#1#2#3\@nnil{%
\ifx\@nnil#1\@nnil
- \adjbox@Gin@add{\@Collectbox{\adjbox@@bgcolor{\color{#2}}}}%
+ \adjbox@Gin@add{\@Collectbox{\@bgcolorbox{\color{#2}}}}%
\else
- \adjbox@Gin@add{\@Collectbox{\adjbox@@bgcolor{\color[#1]{#2}}}}%
+ \adjbox@Gin@add{\@Collectbox{\@bgcolorbox{\color[#1]{#2}}}}%
\fi
}
\define@key\adjbox@fam{bgcolor*}{%
\adjbox@checkcolor
- \adjbox@Gin@add{\@Collectbox{\adjbox@@bgcolor{#1}}}%
+ \adjbox@Gin@add{\@Collectbox{\@bgcolorbox{#1}}}%
}
-\def\adjbox@@bgcolor#1{%
- \mbox{%
+\def\@bgcolorbox#1{%
+ \leavevmode
+ \hbox{%
\hbox{%
#1%
\vrule\@width\width\@height\height\@depth\depth%
@@ -756,32 +1089,175 @@
\BOXCONTENT
}%
}%
-\newcommand*\bgimagebox[2][]{%
+\expandafter\newcommand\expandafter\bgcolorbox\expandafter{%
+ \expandafter
+ \@ifstar
+ \csname bgcolorbox*\endcsname
+ \bgcolorbox@
+}
+\newcommand\bgcolorbox@[2][\@nnil]{%
+ \collectboxcheckenv{bgcolorbox}%
+ \ifx\@nnil#1\relax
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi
+ {\@collectbox{\@bgcolorbox{\color{#2}}}}%
+ {\@collectbox{\@bgcolorbox{\color[#1]{#2}}}}%
+}
+\@namedef{bgcolorbox*}#1{%
+ \collectboxcheckenv{bgcolorbox*}%
+ \@collectbox{\@bgcolorbox{#1}}%
+}
+\expandafter\newcommand\expandafter\fgimagebox\expandafter{%
+ \expandafter
+ \@ifstar
+ \csname fgimagebox*\endcsname
+ \fgimagebox@
+}
+\newcommand\fgimagebox@[2][]{%
+ \collectboxcheckenv{fgimagebox}%
+ \@collectbox{\@foregroundbox\adjustimage{#1,width=\pwidth,totalheight=\ptotalheight,raise=-\pdepth}{#2}}%
+}
+\expandafter\newcommand\csname fgimagebox*\endcsname[2][]{%
+ \collectboxcheckenv{fgimagebox*}%
+ \@collectbox{\@foregroundbox\adjustimage{#1}{#2}}%
+}
+\define@key{adjbox}{fgimage}{%
+ \@ifnextchar\bgroup{%
+ \adjbox@fgimage
+ }{%
+ \adjbox@fgimage{}{#1}%
+ }#1{}\@nnil
+ {,width=\pwidth,totalheight=\ptotalheight,raise=-\pdepth}%
+}
+\define@key{adjbox}{fgimage*}{%
+ \@ifnextchar\bgroup{%
+ \adjbox@fgimage
+ }{%
+ \adjbox@fgimage{}{#1}%
+ }#1{}\@nnil{}%
+}
+\def\adjbox@fgimage#1#2#3\@nnil#4{%
+ \adjbox@Gin@Add{\@Collectbox{\@foregroundbox\adjustimage{#1#4}{#2}}}%
+}
+\expandafter\newcommand\expandafter\bgimagebox\expandafter{%
+ \expandafter
+ \@ifstar
+ \csname bgimagebox*\endcsname
+ \bgimagebox@
+}
+\newcommand\bgimagebox@[2][]{%
\collectboxcheckenv{bgimagebox}%
- \@collectbox{\@bgimagebox{#1}{#2}}%
-}
-\def\@bgimagebox#1#2{%
- \mbox{%
- \lower\depth\hbox{%
- \edef\@tempa{\noexpand\adjustimage
- {#1,width=\the\width,totalheight=\the\totalheight}%
- {#2}%
- }%
- \@tempa
- }%
- \hskip-\width%
- \BOXCONTENT
- }%
+ \@collectbox{\@backgroundbox\adjustimage{#1,width=\pwidth,totalheight=\ptotalheight,raise=-\pdepth}{#2}}%
+}
+\expandafter\newcommand\csname bgimagebox*\endcsname[2][]{%
+ \collectboxcheckenv{bgimagebox*}%
+ \@collectbox{\@backgroundbox\adjustimage{#1}{#2}}%
}
\define@key{adjbox}{bgimage}{%
\@ifnextchar\bgroup{%
\adjbox@bgimage
}{%
\adjbox@bgimage{}{#1}%
- }#1\@nnil
+ }#1{}\@nnil
+ {,width=\pwidth,totalheight=\ptotalheight,raise=-\pdepth}%
+}
+\define@key{adjbox}{bgimage*}{%
+ \@ifnextchar\bgroup{%
+ \adjbox@bgimage
+ }{%
+ \adjbox@bgimage{}{#1}%
+ }#1{}\@nnil{}%
+}
+\def\adjbox@bgimage#1#2#3\@nnil#4{%
+ \adjbox@Gin@Add{\@Collectbox{\@backgroundbox\adjustimage{#1#4}{#2}}}%
+}
+\define@key{adjbox}{foreground}{%
+ \@ifnextchar\bgroup{%
+ \adjbox@foreground
+ }{%
+ \adjbox@foreground{}{#1}%
+ }#1{}{}\@nnil
+ {,width=\pwidth,totalheight=\ptotalheight,raise=\depth-\pdepth}%
+}
+\define@key{adjbox}{foreground*}{%
+ \@ifnextchar\bgroup{%
+ \adjbox@foreground
+ }{%
+ \adjbox@foreground{}{#1}%
+ }#1{}{}\@nnil{}%
}
-\def\adjbox@bgimage#1#2#3\@nnil{%
- \adjbox@Gin@add{\@Collectbox{\@bgimagebox{#1}{#2}}}%
+\def\adjbox@foreground#1#2#3\@nnil#4{%
+ \adjbox@Gin@Add{\@Collectbox{\@foregroundbox\adjustbox{#1#4}{#2}}}%
+}
+\def\@foregroundbox#1#2#3{%
+ \leavevmode
+ \hbox to \width{%
+ \BOXCONTENT
+ \hskip-\width
+ \hss
+ \adjbox@parentdims
+ #1{#2}{#3}%
+ \hss
+ }%
+}
+\expandafter\newcommand\expandafter\foregroundbox\expandafter{%
+ \expandafter
+ \@ifstar
+ \csname foregroundbox*\endcsname
+ \foregroundbox@
+}
+\newcommand\foregroundbox@[2][]{%
+ \collectboxcheckenv{foregroundbox}%
+ \@collectbox{\@foregroundbox\adjustbox{#1,width=\pwidth,totalheight=\ptotalheight,raise=-\pdepth}{#2}}%
+}
+\expandafter\newcommand\csname foregroundbox*\endcsname[2][]{%
+ \collectboxcheckenv{foregroundbox*}%
+ \@collectbox{\@foregroundbox\adjustbox{#1}{#2}}%
+}
+\define@key{adjbox}{background}{%
+ \@ifnextchar\bgroup{%
+ \adjbox@background
+ }{%
+ \adjbox@background{}{#1}%
+ }#1{}{}\@nnil
+ {,width=\pwidth,totalheight=\ptotalheight,raise=\depth-\pdepth}%
+}
+\define@key{adjbox}{background*}{%
+ \@ifnextchar\bgroup{%
+ \adjbox@background
+ }{%
+ \adjbox@background{}{#1}%
+ }#1{}{}\@nnil{}%
+}
+\def\adjbox@background#1#2#3\@nnil#4{%
+ \adjbox@Gin@Add{\@Collectbox{\@backgroundbox\adjustbox{#1#4}{#2}}}%
+}
+\def\@backgroundbox#1#2#3{%
+ \leavevmode
+ \hbox to \width{%
+ \hss
+ \adjbox@parentdims
+ #1{#2}{#3}%
+ \hss
+ \hskip-\width%
+ \BOXCONTENT
+ }%
+}
+\expandafter\newcommand\expandafter\backgroundbox\expandafter{%
+ \expandafter
+ \@ifstar
+ \csname backgroundbox*\endcsname
+ \backgroundbox@
+}
+\newcommand\backgroundbox@[2][]{%
+ \collectboxcheckenv{backgroundbox}%
+ \@collectbox{\@backgroundbox\adjustbox{#1,width=\pwidth,totalheight=\ptotalheight,raise=-\pdepth}{#2}}%
+}
+\expandafter\newcommand\csname backgroundbox*\endcsname[2][]{%
+ \collectboxcheckenv{backgroundbox*}%
+ \@collectbox{\@backgroundbox\adjustbox{#1}{#2}}%
}
\define@key\adjbox@fam{lap}{%
\@ifnextchar\bgroup{%
@@ -844,7 +1320,9 @@
}#2\@nnil
}
\def\adjbox@@page#1#2\@nnil{%
- \def\adjbox@collectbox##1{\collectbox@{\adjbox@set\begin{#1}#2\adjbox@reset}{##1}{\end{#1}}}%
+ \adjbox@innercode
+ {\adjbox@set\begin{#1}#2\adjbox@reset\ignorespaces}%
+ {\end{#1}}%
}
\def\adjbox@set{%
\let\adjbox@origsetlength\setlength
@@ -864,7 +1342,7 @@
}
\def\@@stackbox#1#2[#3]{%
\collectbox@
- {\begin{varwidth}[#2]{\linewidth}\csname adjbox@halign@#1\endcsname#3}
+ {\begin{varwidth}[#2]{\linewidth}\csname adjbox@halign@#1\endcsname#3\ignorespaces}
\BOXCONTENT
{\end{varwidth}}%
}
@@ -886,11 +1364,12 @@
\fi\fi
}
\def\adjbox@@stack#1#2#3{%
- \def\adjbox@collectbox##1{%
- \collectbox@{%
- \begin{varwidth}[#2]{\linewidth}%
- \csname adjbox@halign@#1\endcsname#3%
- }{##1}{\end{varwidth}}%
+ \adjbox@innercode{%
+ \begin{varwidth}[#2]{\linewidth}%
+ \csname adjbox@halign@#1\endcsname#3%
+ \ignorespaces
+ }{%
+ \end{varwidth}%
}%
}
\IfFileExists{varwidth.sty}
@@ -914,8 +1393,9 @@
\ifcollectboxenv
\adjbox@innerenv{#1}{#2}\@nnil
\else
- \def\adjbox@collectbox##1{\collectbox@tab{#1}{#2}{}{##1}{}}%
+ \def\adjbox@collectbox##1{\collectbox@tab{#1}{#2}{\adjbox@begininnercode}{##1}{\adjbox@endinnercode}}%
\fi
+ \chardef\adjbox@innerlevel\tw@
}
\define@key{ADJBOX}{tabular*}{%
\adjbox@tabular{tabular*}#1\@nnil
@@ -932,8 +1412,9 @@
\ifcollectboxenv
\adjbox@innercode{\(\begin{array}#1}{\end{array}\)}%
\else
- \def\adjbox@collectbox##1{\collectbox@tab{array}{#1}{\(}{##1}{\)}}%
+ \def\adjbox@collectbox##1{\collectbox@tab{array}{#1}{\adjbox@begininnercode\(}{##1}{\)\adjbox@endinnercode}}%
\fi
+ \chardef\adjbox@innerlevel\tw@
}
\define@key{ADJBOX}{innerenv}{%
\@ifnextchar\bgroup{%
@@ -943,8 +1424,11 @@
\remove@to@nnil
}#1\@nnil
}
+\adjbox@let@key{ADJBOX}{inner env}{innerenv}
\def\adjbox@innerenv#1#2\@nnil{%
- \def\adjbox@collectbox##1{\collectbox@{\begin{#1}#2}{##1}{\end{#1}}}%
+ \adjbox@innercode
+ {\begin{#1}#2}%
+ {\end{#1}}%
}%
\def\adjbox@@innerenv#1{%
\adjbox@@@innerenv{#1}{}%
@@ -957,10 +1441,28 @@
}%
\define@key{ADJBOX}{innercode}{%
\adjbox@innercode#1{}{}%
-}
-\def\adjbox@innercode#1#2{%
- \def\adjbox@collectbox##1{\collectbox@{#1}{##1}{#2}}%
}%
+\adjbox@let@key{ADJBOX}{inner code}{innercode}
+\def\adjbox@innercode{%
+ \ifcase\adjbox@innerlevel
+ \relax% 0: first inner code
+ \def\adjbox@collectbox##1{\collectbox@{\adjbox@begininnercode\adjustbox@ignorespaces}{##1}{\adjustbox@unskip\adjbox@endinnercode}}%
+ \chardef\adjbox@innerlevel\@ne
+ \expandafter\adjbox@@innercode
+ \or% 1 append inner code, no inner env
+ \expandafter\adjbox@@innercode
+ \else% 2 inner tabular exists, create warning and ignore content.
+ \PackageWarning{adjustbox}{Further inner code or environment ignored\MessageBreak after "tabular"-like key}%
+ \expandafter\@gobbletwo
+ \fi
+}%
+\long\def\adjbox@@innercode#1#2{%
+ \@temptokena\expandafter{\adjbox@begininnercode#1}%
+ \edef\adjbox@begininnercode{\the\@temptokena}%
+ \@temptokena{#2}%
+ \@temptokena\expandafter\expandafter\expandafter{\expandafter\the\expandafter\@temptokena\adjbox@endinnercode}%
+ \edef\adjbox@endinnercode{\the\@temptokena}%
+}
\define@key\adjbox@fam{label}{%
\def\adjbox@label{\label{#1}}%
}
@@ -1013,6 +1515,8 @@
}
\def\adjbox@caption@table@pos{1}
\def\adjbox@addfloat#1#2#3#4{%
+ \Gin@esetsize
+ \@tempswatrue
\ifnum\adjbox@caption@pos>10
\chardef\adjbox@caption@pos=0\csname adjbox@caption@#1@pos\endcsname\relax
\fi
diff --git a/Master/texmf-dist/tex/latex/adjustbox/tc-dvips.def b/Master/texmf-dist/tex/latex/adjustbox/tc-dvips.def
index b643bf5bd1b..4bd2f36c001 100644
--- a/Master/texmf-dist/tex/latex/adjustbox/tc-dvips.def
+++ b/Master/texmf-dist/tex/latex/adjustbox/tc-dvips.def
@@ -1,4 +1,4 @@
-%% Copyright (C) 2011-2012 by Martin Scharrer <martin@scharrer-online.de>
+%% Copyright (C) 2011-2018 by Martin Scharrer <martin@scharrer-online.de>
%% ----------------------------------------------------------------------
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
@@ -17,13 +17,12 @@
%% 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}[2012/05/13 v1.0 Clipping driver for dvips]
+\ProvidesFile{tc-dvips.def}[2018/04/08 v2.1 Clipping driver for dvips]
\def\@cliptoboxdim#1{%
\setbox#1=\hbox{%
- \adjsetlength\@tempdima{\ht#1+\dp#1}%
- \edef\TOTALHEIGHT{-\strip@pt\@tempdima\space}%
- \edef\DEPTH{\strip@pt\dp#1\space}%
- \edef\WIDTH{\strip@pt\wd#1\space}%
+ \adjcalc@settobp\WIDTH{\wd#1}%
+ \adjcalc@settobp\DEPTH{\dp#1}%
+ \adjcalc@settobp\TOTALHEIGHT{-\ht#1-\dp#1}%
\special{%
ps:
/mtrxc matrix currentmatrix def
@@ -36,10 +35,113 @@
newpath
mtrxc setmatrix
}%
- \box#1%
+ \hbox to 0pt{\copy#1\hss}%
\special{ps: grestore }%
+ \hskip\wd#1%
}%
}
+\def\@clipcornersofbox#1#2#3#4#5{%
+ \setbox#1=\hbox{%
+ \adjcalc@settobp\DEPTHmRADIUSBL\@tempdima
+ \adjcalc@settobp\TOTALHEIGHT{-\ht#1-\dp#1}%
+ \adjcalc@settobp\HEIGHT{-\ht#1}%
+ \adjcalc@settobp\DEPTH{\dp#1}%
+ \adjcalc@settobp\WIDTH{\wd#1}%
+ \adjcalc@settobp\RADIUSTL{#2}%
+ \adjcalc@settobp\RADIUSTR{#3}%
+ \adjcalc@settobp\RADIUSBR{#4}%
+ \adjcalc@settobp\RADIUSBL{#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}%
+ \special{%
+ ps:
+ /mtrxc matrix currentmatrix def
+ currentpoint gsave
+ translate
+ Resolution 72 div VResolution 72 div
+ scale
+ newpath
+ %0 \DEPTH neg translate
+ %0 \DEPTH \WIDTH \TOTALHEIGHT rectclip
+ 0 \RADIUSTLmHEIGHT\space moveto
+ \RADIUSTL\space \RADIUSTLmHEIGHT\space \RADIUSTL\space 180 -90 arc
+ \WIDTHmRADIUSTR\space \HEIGHT\space lineto
+ \WIDTHmRADIUSTR\space \RADIUSTRmHEIGHT\space \RADIUSTR\space -90 0 arc
+ \WIDTH\space \DEPTHmRADIUSBR\space lineto
+ \WIDTHmRADIUSBR\space \DEPTHmRADIUSBR\space \RADIUSBR\space 0 90 arc
+ \RADIUSBL\space \DEPTH\space lineto
+ \RADIUSBL\space \DEPTHmRADIUSBL\space \RADIUSBL\space -270 -180 arc
+ closepath
+ %gsave 0.5 0 0 setrgbcolor stroke grestore
+ clip
+ newpath
+ mtrxc setmatrix
+ }%
+ \hbox to 0pt{\copy#1\hss}%
+ \special{ps: grestore }%
+ \hskip \wd#1%
+ }%
+}
+\def\@rndframearoundbox#1#2#3#4#5{%
+ \setbox#1=\hbox{%
+ \adjsetlength\@tempdima{\fboxsep+.5\fboxrule}%
+ \@marginbox#1\@tempdima\@tempdima\@tempdima\@tempdima%
+ \adjcalc@settobp\TOTALHEIGHT{-\ht#1-\dp#1}%
+ \adjcalc@settobp\HEIGHT{-\ht#1}%
+ \adjcalc@settobp\DEPTH{\dp#1}%
+ \adjcalc@settobp\WIDTH{\wd#1}%
+ \adjcalc@settobp\RADIUSTL{#2}%
+ \adjcalc@settobp\RADIUSTR{#3}%
+ \adjcalc@settobp\RADIUSBR{#4}%
+ \adjcalc@settobp\RADIUSBL{#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\LINEWIDTH{\fboxrule}%
+ %
+ \hbox to 0pt{\copy#1\hss}%
+ \hbox to 0pt{%
+ \color@setgroup
+ \adjbox@rndframe@color
+ \special{%
+ ps:
+ /mtrxc matrix currentmatrix def
+ currentpoint gsave
+ translate
+ Resolution 72 div VResolution 72 div
+ scale
+ newpath
+ %0 \DEPTH neg translate
+ %0 \DEPTH \WIDTH \TOTALHEIGHT rectclip
+ 0 \RADIUSTLmHEIGHT moveto
+ \RADIUSTL \RADIUSTLmHEIGHT \RADIUSTL 180 -90 arc
+ \WIDTHmRADIUSTR \HEIGHT lineto
+ \WIDTHmRADIUSTR \RADIUSTRmHEIGHT \RADIUSTR -90 0 arc
+ \WIDTH \DEPTHmRADIUSBR lineto
+ \WIDTHmRADIUSBR \DEPTHmRADIUSBR \RADIUSBR 0 90 arc
+ \RADIUSBL \DEPTH lineto
+ \RADIUSBL \DEPTHmRADIUSBL \RADIUSBL -270 -180 arc
+ closepath
+ \LINEWIDTH setlinewidth
+ stroke
+ newpath
+ mtrxc setmatrix
+ grestore
+ }%
+ \color@endgroup
+ }%
+ \hskip \wd#1%
+ }%
+ \adjsetlength\@tempdima{.5\fboxrule}%
+ \@marginbox#1\@tempdima\@tempdima\@tempdima\@tempdima%
+}
\endinput
%%
%% End of file `tc-dvips.def'.
diff --git a/Master/texmf-dist/tex/latex/adjustbox/tc-pdftex.def b/Master/texmf-dist/tex/latex/adjustbox/tc-pdftex.def
index e18f0909122..c69189939da 100644
--- a/Master/texmf-dist/tex/latex/adjustbox/tc-pdftex.def
+++ b/Master/texmf-dist/tex/latex/adjustbox/tc-pdftex.def
@@ -1,4 +1,4 @@
-%% Copyright (C) 2011-2012 by Martin Scharrer <martin@scharrer-online.de>
+%% Copyright (C) 2011-2018 by Martin Scharrer <martin@scharrer-online.de>
%% ----------------------------------------------------------------------
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
@@ -17,22 +17,93 @@
%% 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}[2012/05/13 v1.0 Clipping driver for pdftex]
+\ProvidesFile{tc-pdftex.def}[2018/04/08 v2.1 Clipping driver for pdftex]
\def\@cliptoboxdim#1{%
\setbox#1=\hbox{%
- \Gin@defaultbp\WIDTH{\wd#1}%
- \Gin@defaultbp\DEPTH{\dp#1}%
- \@tempdima\ht#1%
- \advance\@tempdima\dp#1%
- \Gin@defaultbp\TOTALHEIGHT{\@tempdima}%
+ \adjcalc@settobp\WIDTH{\wd#1}%
+ \adjcalc@settobp\DEPTH{\dp#1}%
+ \adjcalc@settobp\TOTALHEIGHT{\ht#1+\dp#1}%
\pdfsave
+ \pdfliteral direct {%
+ 0 -\DEPTH\space \WIDTH\space \TOTALHEIGHT\space re W n
+ }%
+ \hbox to 0pt{\copy#1\hss}%
+ \pdfrestore
+ \hskip\wd#1
+ }%
+}
+\def\@clip@bpdimens#1#2#3#4#5{%
+ \adjcalc@settobp\TOTALHEIGHT{\ht#1+\dp#1}%
+ \adjcalc@settobp\HEIGHT{\ht#1}%
+ \adjcalc@settobp\DEPTH{-\dp#1}%
+ \adjcalc@settobp\WIDTH{\wd#1}%
+ \adjcalc@settobp\RADIUSTL{#2}%
+ \adjcalc@settobp\RADIUSTR{#3}%
+ \adjcalc@settobp\RADIUSBR{#4}%
+ \adjcalc@settobp\RADIUSBL{#5}%
+ \adjcalc@settobp\RADIUSTLb{\tc@bezfacn#2}%
+ \adjcalc@settobp\HEIGHTmRADIUSTL{\ht#1-#2}%
+ \adjcalc@settobp\HEIGHTmRADIUSTLb{\ht#1-\tc@bezfacn#2}%
+ \adjcalc@settobp\HEIGHTmRADIUSTR{\ht#1-#3}%
+ \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\LINEWIDTH{\fboxrule}%
+}
+\def\@clip@roundedboxpath@pdfcode{%
+ 0 \HEIGHTmRADIUSTL m
+ 0 \HEIGHTmRADIUSTLb \RADIUSTLb \HEIGHT \RADIUSTL \HEIGHT c
+ \WIDTHmRADIUSTR \HEIGHT l
+ \WIDTHmRADIUSTRb \HEIGHT \WIDTH \HEIGHTmRADIUSTRb \WIDTH \HEIGHTmRADIUSTR c
+ \WIDTH \RADIUSBRmDEPTH l
+ \WIDTH \RADIUSBRmDEPTHb \WIDTHmRADIUSBRb \DEPTH \WIDTHmRADIUSBR \DEPTH c
+ \RADIUSBL \DEPTH l
+ \RADIUSBLb \DEPTH 0 \RADIUSBLmDEPTHb 0 \RADIUSBLmDEPTH c
+ 0 \RADIUSBLmDEPTH l
+}
+\def\@clipcornersofbox#1#2#3#4#5{%
+ \setbox#1=\hbox{%
+ \@clip@bpdimens{#1}{#2}{#3}{#4}{#5}%
+ \pdfsave
+ \pdfliteral direct {%
+ \@clip@roundedboxpath@pdfcode
+ h W n
+ }%
+ \hbox to 0pt{\copy#1\hss}%
+ \pdfrestore
+ \hskip\wd#1%
+ }%
+}
+\def\@rndframearoundbox#1#2#3#4#5{%
+ \setbox#1=\hbox{%
+ \adjsetlength\@tempdima{\fboxsep+.5\fboxrule}%
+ \@marginbox#1\@tempdima\@tempdima\@tempdima\@tempdima%
+ \@clip@bpdimens{#1}{#2}{#3}{#4}{#5}%
+ %
+ \hbox to 0pt{\copy#1\hss}%
+ \pdfsave
+ \hbox to 0pt{%
+ \color@setgroup
+ \adjbox@rndframe@color
\pdfliteral direct {%
- 0 -\DEPTH\space \WIDTH\space \TOTALHEIGHT\space re W n
+ \LINEWIDTH w
+ \@clip@roundedboxpath@pdfcode
+ h s
}%
- \hbox to 0pt{\copy#1\hss}%
+ \color@endgroup
+ }%
\pdfrestore
- \hskip \wd#1
+ \hskip\wd#1%
}%
+ \adjsetlength\@tempdima{.5\fboxrule}%
+ \@marginbox#1\@tempdima\@tempdima\@tempdima\@tempdima%
}
\endinput
%%
diff --git a/Master/texmf-dist/tex/latex/adjustbox/tc-pgf.def b/Master/texmf-dist/tex/latex/adjustbox/tc-pgf.def
index 0b32c59cffd..10dbef59d4c 100644
--- a/Master/texmf-dist/tex/latex/adjustbox/tc-pgf.def
+++ b/Master/texmf-dist/tex/latex/adjustbox/tc-pgf.def
@@ -1,4 +1,4 @@
-%% Copyright (C) 2011-2012 by Martin Scharrer <martin@scharrer-online.de>
+%% Copyright (C) 2011-2018 by Martin Scharrer <martin@scharrer-online.de>
%% ----------------------------------------------------------------------
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
@@ -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}[2012/05/13 v1.0 trimclip fall-back clipping driver using PGF]
+\ProvidesFile{tc-pgf.def}[2018/04/08 v2.1 trimclip fall-back clipping driver using PGF]
\RequirePackage{pgf}
\def\@cliptoboxdim#1{%
\setbox#1\hbox{\begin{pgfpicture}%
@@ -32,6 +32,46 @@
\pgfsetbaselinepointnow{\pgfpoint\z@\z@}%
\end{pgfpicture}}%
}
+\def\@clipcornersofbox#1#2#3#4#5{%
+ \setbox#1\hbox{\begin{pgfpicture}%
+ \pgfpathmoveto{\pgfpoint{\z@}{\ht#1-#2}}%
+ \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{\z@}{\ht#1-#2}}%
+ \pgfpathclose
+ \pgfusepathqclip
+ \pgfset{inner sep=\z@,outer sep=\z@,minimum size=\z@}%
+ \pgfnode{rectangle}{base west}{\usebox#1}{}{}%
+ \pgfsetbaselinepointnow{\pgfpoint\z@\z@}%
+ \end{pgfpicture}}%
+}
+\def\@rndframearoundbox#1#2#3#4#5{%
+ \setbox#1\hbox{\begin{pgfpicture}%
+ \adjsetlength\@tempdima{\fboxsep+.5\fboxrule}%
+ \@marginbox#1\@tempdima\@tempdima\@tempdima\@tempdima%
+ \pgfset{inner sep=\z@,outer sep=\z@,minimum size=\z@}%
+ \pgfnode{rectangle}{base west}{\usebox#1}{}{}%
+ \pgfusepath{}%
+ \adjbox@rndframe@color
+ \pgfpathmoveto{\pgfpoint{\z@}{\ht#1-#2}}%
+ \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{\z@}{\ht#1-#2}}%
+ \pgfpathclose
+ \pgfusepath{stroke}%
+ \pgfsetbaselinepointnow{\pgfpoint\z@\z@}%
+ \end{pgfpicture}}%
+}
\endinput
%%
%% End of file `tc-pgf.def'.
diff --git a/Master/texmf-dist/tex/latex/adjustbox/tc-xetex.def b/Master/texmf-dist/tex/latex/adjustbox/tc-xetex.def
index 2aa3dc0c21e..ea28e71c1b4 100644
--- a/Master/texmf-dist/tex/latex/adjustbox/tc-xetex.def
+++ b/Master/texmf-dist/tex/latex/adjustbox/tc-xetex.def
@@ -1,4 +1,4 @@
-%% Copyright (C) 2011-2012 by Martin Scharrer <martin@scharrer-online.de>
+%% Copyright (C) 2011-2018 by Martin Scharrer <martin@scharrer-online.de>
%% ----------------------------------------------------------------------
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
@@ -17,24 +17,103 @@
%% 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}[2012/05/13 v1.0 Clipping driver for xetex]
+\ProvidesFile{tc-xetex.def}[2018/04/08 v2.1 Clipping driver for xetex]
\def\@cliptoboxdim#1{%
\setbox#1=\hbox{%
- \Gin@defaultbp\WIDTH{\wd#1}%
- \Gin@defaultbp\DEPTH{\dp#1}%
- \@tempdima\ht#1%
- \advance\@tempdima\dp#1%
- \Gin@defaultbp\TOTALHEIGHT{\@tempdima}%
- \special{pdf:bcontent }%
- \special{%
- pdf:literal direct
- 0 -\DEPTH\space \WIDTH\space \TOTALHEIGHT\space re
+ \adjcalc@settobp\WIDTH{\wd#1}%
+ \adjcalc@settobp\DEPTH{\dp#1}%
+ \adjcalc@settobp\TOTALHEIGHT{\ht#1+\dp#1}%
+ \special{pdf:content q }%
+ \special{pdf:code 0 -\DEPTH \WIDTH \TOTALHEIGHT re W n }%
+ \special{pdf:literal direct -1 0 0 -1 0 0 cm }%
+ \special{pdf:content q }%
+ \special{pdf:literal direct -1 0 0 -1 0 0 cm }%
+ \hbox to 0 pt{\copy#1\hss}%
+ \special{pdf:literal direct Q }%
+ \special{pdf:literal direct Q }%
+ \hskip\wd#1%
+ }%
+}
+\def\@clip@bpdimens#1#2#3#4#5{%
+ \adjcalc@settobp\TOTALHEIGHT{\ht#1+\dp#1}%
+ \adjcalc@settobp\HEIGHT{\ht#1}%
+ \adjcalc@settobp\DEPTH{-\dp#1}%
+ \adjcalc@settobp\WIDTH{\wd#1}%
+ \adjcalc@settobp\RADIUSTL{#2}%
+ \adjcalc@settobp\RADIUSTR{#3}%
+ \adjcalc@settobp\RADIUSBR{#4}%
+ \adjcalc@settobp\RADIUSBL{#5}%
+ \adjcalc@settobp\RADIUSTLb{\tc@bezfacn#2}%
+ \adjcalc@settobp\HEIGHTmRADIUSTL{\ht#1-#2}%
+ \adjcalc@settobp\HEIGHTmRADIUSTLb{\ht#1-\tc@bezfacn#2}%
+ \adjcalc@settobp\HEIGHTmRADIUSTR{\ht#1-#3}%
+ \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\LINEWIDTH{\fboxrule}%
+}
+\def\@clip@roundedboxpath@pdfcode{%
+ 0 \HEIGHTmRADIUSTL m
+ 0 \HEIGHTmRADIUSTLb \RADIUSTLb \HEIGHT \RADIUSTL \HEIGHT c
+ \WIDTHmRADIUSTR \HEIGHT l
+ \WIDTHmRADIUSTRb \HEIGHT \WIDTH \HEIGHTmRADIUSTRb \WIDTH \HEIGHTmRADIUSTR c
+ \WIDTH \RADIUSBRmDEPTH l
+ \WIDTH \RADIUSBRmDEPTHb \WIDTHmRADIUSBRb \DEPTH \WIDTHmRADIUSBR \DEPTH c
+ \RADIUSBL \DEPTH l
+ \RADIUSBLb \DEPTH 0 \RADIUSBLmDEPTHb 0 \RADIUSBLmDEPTH c
+ 0 \RADIUSBLmDEPTH l
+}
+\def\@clipcornersofbox#1#2#3#4#5{%
+ \setbox#1=\hbox{%
+ \@clip@bpdimens{#1}{#2}{#3}{#4}{#5}%
+ \special{pdf:content q }%
+ \special{pdf:literal direct
+ \@clip@roundedboxpath@pdfcode
+ h W n
+ }%
+ \special{pdf:literal direct -1 0 0 -1 0 0 cm }%
+ \special{pdf:content q }%
+ \special{pdf:literal direct -1 0 0 -1 0 0 cm }%
+ \hbox to 0pt{\copy#1\hss}%
+ \special{pdf:literal direct Q }%
+ \special{pdf:literal direct Q }%
+ \hskip\wd#1%
+ }%
+}
+\def\@rndframearoundbox#1#2#3#4#5{%
+ \setbox#1=\hbox{%
+ \adjsetlength\@tempdima{\fboxsep+.5\fboxrule}%
+ \@marginbox#1\@tempdima\@tempdima\@tempdima\@tempdima%
+ \@clip@bpdimens{#1}{#2}{#3}{#4}{#5}%
+ %
+ \hbox to 0pt{\copy#1\hss}%
+ \hbox to 0pt{%
+ \color@setgroup
+ \adjbox@rndframe@color
+ \special{pdf:content q }%
+ \special{pdf:literal direct
+ \LINEWIDTH w
+ \@clip@roundedboxpath@pdfcode
+ h s
+ }%
+ \special{pdf:literal direct -1 0 0 -1 0 0 cm }%
+ \special{pdf:content q }%
+ \special{pdf:literal direct -1 0 0 -1 0 0 cm }%
+ \special{pdf:literal direct Q }%
+ \special{pdf:literal direct Q }%
+ \color@endgroup
}%
- \special{pdf:literal direct W }%
- \special{pdf:literal direct n }%
- \box#1%
- \special{pdf:econtent }%
+ \hskip\wd#1%
}%
+ \adjsetlength\@tempdima{.5\fboxrule}%
+ \@marginbox#1\@tempdima\@tempdima\@tempdima\@tempdima%
}
\endinput
%%
diff --git a/Master/texmf-dist/tex/latex/adjustbox/trimclip.sty b/Master/texmf-dist/tex/latex/adjustbox/trimclip.sty
index d0dcb815ac8..6592bcd3f20 100644
--- a/Master/texmf-dist/tex/latex/adjustbox/trimclip.sty
+++ b/Master/texmf-dist/tex/latex/adjustbox/trimclip.sty
@@ -1,4 +1,4 @@
-%% Copyright (C) 2011-2012 by Martin Scharrer <martin@scharrer-online.de>
+%% Copyright (C) 2011-2018 by Martin Scharrer <martin@scharrer-online.de>
%% ----------------------------------------------------------------------
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
@@ -18,11 +18,11 @@
%% Further author information are located in the .def files.
%%
\ProvidesPackage{trimclip}[%
- 2012/05/16
- v1.0
+ 2018/04/08
+ v1.1
Trim and clip general TeX material]
\def\tc@driver{tc-\Gin@driver}
-\DeclareOption{pgf}{\def\tc@driver{tc-pgf.def}\PassOptionsToPackage{pgf}{graphicx}}
+\DeclareOption{pgf}{\def\tc@driver{tc-pgf.def}\AtEndOfPackage{\RequirePackage{pgf}}}
\DeclareOption{pdftex}{\def\tc@driver{tc-pdftex.def}\PassOptionsToPackage{pdftex}{graphicx}}
\DeclareOption{xetex}{\def\tc@driver{tc-xetex.def}\PassOptionsToPackage{xetex}{graphicx}}
\DeclareOption{dvips}{\def\tc@driver{tc-dvips.def}\PassOptionsToPackage{dvips}{graphicx}}
@@ -247,6 +247,7 @@
\@viewportbox{#1}{#2}{#3}{#4}{#5}%
\@cliptoboxdim{#1}%
}
+\def\tc@bezfacn{0.44771525}%
\InputIfFileExists{\tc@driver}{%
{\let\on@line\@gobble
\PackageInfo{trimclip}{Using driver '\tc@driver'.}}%