summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/adjustbox/margin.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/adjustbox/margin.tex')
-rw-r--r--Master/texmf-dist/doc/latex/adjustbox/margin.tex33
1 files changed, 33 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/adjustbox/margin.tex b/Master/texmf-dist/doc/latex/adjustbox/margin.tex
new file mode 100644
index 00000000000..0e9893400f7
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/adjustbox/margin.tex
@@ -0,0 +1,33 @@
+\begin{tikzpicture}[font=\sffamily,>=latex]
+ \def\text{\scalebox{10}{Xy}}
+ \sbox\mybox{\pgfinterruptpicture\sffamily\color{black!25}\scalebox{10}{Xy}\endpgfinterruptpicture}
+ \def\HEIGHT{\ht\mybox}
+ \def\WIDTH{\wd\mybox}
+ \def\DEPTH{\dp\mybox}
+ \def\LLX{.15\WIDTH}
+ \def\LLY{.5\DEPTH}
+ \def\URX{.15\WIDTH}
+ \def\URY{.25\HEIGHT}
+ \node [inner sep=0pt,anchor=base west] {\usebox\mybox};
+ \draw (0,0) -- (\WIDTH,0);% node [above,midway] {baseline};
+ \begin{scope}[blue,every node/.append style={inner sep=2pt}]
+ \begin{scope}
+ \draw ([shift={(-\LLX,-\LLY)}]0,-\DEPTH) rectangle ([shift={(\URX,\URY)}]\WIDTH,\HEIGHT);
+ \end{scope}
+ \draw [->] (.5\WIDTH,-\DEPTH) -- ++(0,-\LLY) node [right,midway] {\scriptsize lly};
+ \draw [->] (0,.5*\HEIGHT-.5*\DEPTH) -- ++(-\LLX,0) node [above,midway] {\scriptsize llx};
+ \draw (-\LLX,0) -- ([shift={(+\URX,0)}]\WIDTH,0);
+ \draw [->] (.5\WIDTH,\HEIGHT) -- ++(0,\URY) node [right,midway] {\scriptsize ury};
+ \draw [->] (\WIDTH,.5*\HEIGHT-.5*\DEPTH) -- ++(\URX,0) node [above,midway] {\scriptsize urx};
+ \path [fill=white,draw] (-\LLX,0) circle (1pt);
+ \end{scope}
+ \draw [thick] (0,-\DEPTH) rectangle (\WIDTH,\HEIGHT);
+ \path [fill=white,draw=black] (0,0) circle (1pt);
+ \path let
+ \p1 = (current bounding box.south west),
+ \p2 = (current bounding box.north east),
+ \p3 = (0,-\DEPTH),
+ \p4 = (\WIDTH,\HEIGHT)
+ in
+ (\x3-\x2+\x4,\y3) rectangle (\x4+\x3-\x1,\y4);
+\end{tikzpicture}