tc-dvips.def (1624B)
1 %% Copyright (C) 2011-2012 by Martin Scharrer <martin@scharrer-online.de> 2 %% ---------------------------------------------------------------------- 3 %% This work may be distributed and/or modified under the 4 %% conditions of the LaTeX Project Public License, either version 1.3 5 %% of this license or (at your option) any later version. 6 %% The latest version of this license is in 7 %% http://www.latex-project.org/lppl.txt 8 %% and version 1.3 or later is part of all distributions of LaTeX 9 %% version 2005/12/01 or later. 10 %% 11 %% This work has the LPPL maintenance status `maintained'. 12 %% 13 %% The Current Maintainer of this work is Martin Scharrer. 14 %% 15 %% This work consists of the files trimclip.dtx, adjustbox.ins 16 %% and the derived files trimclip.sty, 17 %% tc-dvips.def, tc-pdftex.def, tc-pgf.def and tc-xetex.def. 18 %% Further author information are located in the .def files. 19 %% 20 \ProvidesFile{tc-dvips.def}[2012/05/13 v1.0 Clipping driver for dvips] 21 \def\@cliptoboxdim#1{% 22 \setbox#1=\hbox{% 23 \adjsetlength\@tempdima{\ht#1+\dp#1}% 24 \edef\TOTALHEIGHT{-\strip@pt\@tempdima\space}% 25 \edef\DEPTH{\strip@pt\dp#1\space}% 26 \edef\WIDTH{\strip@pt\wd#1\space}% 27 \special{% 28 ps: 29 /mtrxc matrix currentmatrix def 30 currentpoint gsave 31 translate 32 Resolution 72 div VResolution 72 div 33 scale 34 newpath 35 0 \DEPTH \WIDTH \TOTALHEIGHT rectclip 36 newpath 37 mtrxc setmatrix 38 }% 39 \box#1% 40 \special{ps: grestore }% 41 }% 42 } 43 \endinput 44 %% 45 %% End of file `tc-dvips.def'.