├── .gitignore ├── crop ├── book-pages.pdf ├── book-print-1x1.pdf ├── book-print-2x1.pdf ├── book-print-2x2.pdf ├── book-pages.tex ├── Makefile ├── book-print-2x1.tex ├── book-print-1x1.tex └── book-print-2x2.tex ├── crop-customised ├── labels.pdf ├── labels-print.pdf ├── Makefile ├── labels-print.tex ├── labels.tex └── crop-3x7.sty ├── hierotex ├── hierotex-example.pdf ├── README.md ├── hierotex-example.tex └── Makefile ├── Makefile └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | # LaTeX files: 2 | */clutter/* 3 | *.log 4 | *.aux 5 | -------------------------------------------------------------------------------- /crop/book-pages.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mike42/tex-examples/master/crop/book-pages.pdf -------------------------------------------------------------------------------- /crop/book-print-1x1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mike42/tex-examples/master/crop/book-print-1x1.pdf -------------------------------------------------------------------------------- /crop/book-print-2x1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mike42/tex-examples/master/crop/book-print-2x1.pdf -------------------------------------------------------------------------------- /crop/book-print-2x2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mike42/tex-examples/master/crop/book-print-2x2.pdf -------------------------------------------------------------------------------- /crop-customised/labels.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mike42/tex-examples/master/crop-customised/labels.pdf -------------------------------------------------------------------------------- /hierotex/hierotex-example.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mike42/tex-examples/master/hierotex/hierotex-example.pdf -------------------------------------------------------------------------------- /crop-customised/labels-print.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mike42/tex-examples/master/crop-customised/labels-print.pdf -------------------------------------------------------------------------------- /hierotex/README.md: -------------------------------------------------------------------------------- 1 | # hierotex example 2 | 3 | This example requires the `sesh` utility, and the `hiero` and `egypto` LaTeX packages from the HieroTeX project. 4 | 5 | -------------------------------------------------------------------------------- /crop/book-pages.tex: -------------------------------------------------------------------------------- 1 | \documentclass{article} 2 | 3 | \usepackage[c6paper]{geometry} 4 | \usepackage{lipsum} 5 | 6 | \begin{document} 7 | \section*{Lorem Ipsum} 8 | \lipsum[1-11] 9 | \end{document} 10 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | EXAMPLES = hierotex 2 | 3 | default: 4 | for dir in $(EXAMPLES); do \ 5 | (cd $$dir && ${MAKE}); \ 6 | done 7 | 8 | clean: 9 | for dir in $(EXAMPLES); do \ 10 | (cd $$dir && ${MAKE} clean); \ 11 | done 12 | 13 | -------------------------------------------------------------------------------- /crop-customised/Makefile: -------------------------------------------------------------------------------- 1 | latex=xelatex --interaction=nonstopmode 2 | 3 | default: labels-print.pdf 4 | 5 | labels-print.pdf: labels-print.tex labels.pdf 6 | $(latex) $< 7 | 8 | labels.pdf: labels.tex 9 | $(latex) labels.tex 10 | 11 | clean: 12 | rm *.log *.aux *.pdf 13 | -------------------------------------------------------------------------------- /crop/Makefile: -------------------------------------------------------------------------------- 1 | latex=xelatex --interaction=nonstopmode 2 | 3 | default: book-print-2x1.pdf book-print-2x2.pdf book-print-1x1.pdf 4 | 5 | book-print-%.pdf: book-print-%.tex book-pages.pdf 6 | $(latex) $< 7 | 8 | book-pages.pdf: book-pages.tex 9 | $(latex) book-pages.tex 10 | 11 | clean: 12 | rm *.log *.aux *.pdf 13 | -------------------------------------------------------------------------------- /hierotex/hierotex-example.tex: -------------------------------------------------------------------------------- 1 | \documentclass[a4paper]{article} 2 | \usepackage{hiero} 3 | \usepackage{egypto} 4 | 5 | \begin{document} 6 | \section*{Egyptian hieroglyph example} 7 | 8 | \begin{hieroglyph}zA ra < i-mn:n-t-G43-t-S34 HqA-iwn-Sma >\end{hieroglyph} \\ 9 | {\em Tutankhamun Hekaiunushema} \\ 10 | Living Image of Amun, ruler of Upper Heliopolis 11 | \end{document} 12 | -------------------------------------------------------------------------------- /hierotex/Makefile: -------------------------------------------------------------------------------- 1 | SOURCE_FN = hierotex-example 2 | CLUTTER_DIR = clutter 3 | 4 | # Info for making files 5 | TEX = xelatex 6 | TEXFLAGS = -halt-on-error 7 | 8 | default: 9 | mkdir -p $(CLUTTER_DIR) 10 | cat $(SOURCE_FN).tex | sesh > $(CLUTTER_DIR)/$(SOURCE_FN).tex 11 | cd $(CLUTTER_DIR); \ 12 | $(TEX) $(TEXFLAGS) $(SOURCE_FN).tex; 13 | rm -f $(SOURCE_FN).pdf 14 | mv $(CLUTTER_DIR)/$(SOURCE_FN).pdf $(SOURCE_FN).pdf 15 | 16 | clean: 17 | rm -Rf $(CLUTTER_DIR) 18 | 19 | -------------------------------------------------------------------------------- /crop/book-print-2x1.tex: -------------------------------------------------------------------------------- 1 | \documentclass{article} 2 | \usepackage{pdfpages} 3 | % Sum of dimensions of the pages. We are displaying 2x1 C6 (114 mm x 162mm) pages, which is where 228x162 comes from. 4 | \usepackage[paperheight=162mm,paperwidth=228mm]{geometry} 5 | 6 | % Include print/output paper size and orientation here, A4 landscape in this example. 7 | \usepackage[axes,cam,a4,landscape,pdftex,center]{crop} 8 | 9 | \begin{document} 10 | 11 | % Restrict page range, and set arrangement of pages per sheet here. 12 | \includepdf[pages=-,nup=2x1,noautoscale]{book-pages.pdf} 13 | 14 | \end{document} 15 | 16 | -------------------------------------------------------------------------------- /crop/book-print-1x1.tex: -------------------------------------------------------------------------------- 1 | \documentclass{article} 2 | \usepackage{pdfpages} 3 | % Sum of dimensions of the pages. We are displaying 1x1 C6 (114 mm x 162mm) pages, which is where 114x162 comes from. 4 | \usepackage[paperheight=162mm,paperwidth=114mm]{geometry} 5 | 6 | % Include print/output paper size and orientation here, A4 portrait in this example (use 'landscape' option for landscape) 7 | \usepackage[axes,cam,a4,pdftex,center]{crop} 8 | 9 | \begin{document} 10 | 11 | % Restrict page range, and set arrangement of pages per sheet here. 12 | \includepdf[pages=-,nup=1x1,noautoscale]{book-pages.pdf} 13 | 14 | \end{document} 15 | 16 | -------------------------------------------------------------------------------- /crop/book-print-2x2.tex: -------------------------------------------------------------------------------- 1 | \documentclass{article} 2 | \usepackage{pdfpages} 3 | % Sum of dimensions of the pages. We are displaying 2x2 C6 (114 mm x 162mm) pages, which is where 228x324 comes from. 4 | \usepackage[paperheight=324mm,paperwidth=228mm]{geometry} 5 | 6 | % Include print/output paper size and orientation here, A3 portrait in this example (use 'landscape' option for landscape) 7 | \usepackage[axes,cam,a3,pdftex,center]{crop} 8 | 9 | \begin{document} 10 | 11 | % Restrict page range, and set arrangement of pages per sheet here. 12 | \includepdf[pages=-,nup=2x2,noautoscale]{book-pages.pdf} 13 | 14 | \end{document} 15 | 16 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | TeX Examples 2 | ============ 3 | 4 | Random snippets of TeX. 5 | 6 | ## Contributing 7 | 8 | Each of these examples is written in LaTeX, and compiles with XeTeX on TeX Live. If you wish to contribute an example to this repository, please simply issue a pull request: 9 | 10 | - Include a Makefile for compilation 11 | - Include a PDF of the output 12 | - Name the subfolder after the package or technique you are demonstrating 13 | - Include a README listing dependencies, if something more than LaTeX and Make are needed to compile 14 | 15 | ## Licence 16 | These snippets are released under the LaTeX Project Public License (LPPL). Please see indicidual source files for authorship details. 17 | 18 | -------------------------------------------------------------------------------- /crop-customised/labels-print.tex: -------------------------------------------------------------------------------- 1 | \documentclass{article} 2 | % This file demonstrates the use of a customisation to the 'crop' package to render additional axes for cutting up small name labels. 3 | 4 | \usepackage{pdfpages} 5 | % Sum of dimensions of the pages. We are displaying 3x7 small tags (60 x 30 mm) to a page, which is where 180x210 comes from. 6 | \usepackage[paperheight=210mm,paperwidth=180mm]{geometry} 7 | 8 | % Include print/output paper size and orientation here, A3 portrait in this example (use 'landscape' option for landscape) 9 | \usepackage[axes,cam,a4,pdftex,center]{crop-3x7} 10 | 11 | \begin{document} 12 | 13 | % Restrict page range, and set arrangement of pages per sheet here. 14 | \includepdf[pages=-,nup=3x7,noautoscale]{labels.pdf} 15 | 16 | \end{document} 17 | 18 | -------------------------------------------------------------------------------- /crop-customised/labels.tex: -------------------------------------------------------------------------------- 1 | \documentclass{article} 2 | % Custom page size 3 | \usepackage[margin=4mm,paperheight=30mm,paperwidth=60mm]{geometry} 4 | 5 | % Macro for a name tag 6 | \newcommand{\tag}[2]{\begin{center}~\\\textbf{\Large#1}\\~\\\em{#2}\end{center}\clearpage} 7 | 8 | \begin{document} 9 | 10 | % Make some name tags for a conference 11 | % Names generated via www.generatedata.com/ 12 | \tag{Flynn Craig}{ExampleCorp} 13 | \tag{Daniel Cash}{ExampleCorp} 14 | \tag{Griffith Durham}{ExampleCorp} 15 | \tag{Sean Washington}{ExampleCorp} 16 | \tag{James Simon}{ExampleCorp} 17 | \tag{Aidan Cotton}{ExampleCorp} 18 | \tag{Wing Sanders}{ExampleCorp} 19 | \tag{Dean Wilcox}{ExampleCorp} 20 | \tag{Jerome Flynn}{FooCorp} 21 | \tag{Leonard Steele}{FooCorp} 22 | \tag{Zane Pratt}{FooCorp} 23 | \tag{Andrew Hartman}{FooCorp} 24 | \tag{Roth Mccullough}{FooCorp} 25 | \tag{Fritz Taylor}{Quux Ltd} 26 | \tag{Beau Bray}{Quux Ltd} 27 | \tag{Duncan Hampton}{Quux Ltd} 28 | \tag{Daquan Witt}{Quux Ltd} 29 | \tag{Wylie Heath}{Quux Ltd} 30 | \tag{Thaddeus Payne}{Quux Ltd} 31 | \tag{Carson Ayala}{Quux Ltd} 32 | \tag{Oleg Olson}{Quux Ltd} 33 | \tag{Herrod Gillespie}{Bar University} 34 | \tag{Jonas Wyatt}{Bar University} 35 | \tag{Mannix Patrick}{Bar University} 36 | \tag{Cain Ferguson}{Bar University} 37 | \tag{Nasim Mendez}{Bar University} 38 | \tag{Emery Bennett}{Bar University} 39 | \tag{Oscar Bennett}{Bar University} 40 | \tag{William Neal}{Bar University} 41 | \tag{Dieter Cochran}{Bar University} 42 | \tag{Bert Schultz}{Bar University} 43 | 44 | \end{document} 45 | 46 | -------------------------------------------------------------------------------- /crop-customised/crop-3x7.sty: -------------------------------------------------------------------------------- 1 | %% 'crop-3x7' is not a real package for general use, it is an example only! 2 | %% 3 | %% It is a modified version of the 'crop' package, for rendering 4 | %% additonal axis marks as cutting aids. 5 | 6 | %% Original file was- 7 | %% File: crop.dtx Copyright (C) 1998--2003 Melchior FRANZ 8 | %% $Id: crop.dtx,v 1.92 2003/05/19 20:05:17 m Rel $ 9 | %% $Version: 1.9 $ 10 | \NeedsTeXFormat{LaTeX2e} 11 | % Changed package name here- 12 | \ProvidesPackage{crop-3x7}[2016/01/03 v2.0 crop marks 3x7 (mf)] 13 | \expandafter\ifx\csname stockwidth\endcsname\relax 14 | \newdimen\stockwidth 15 | \stockwidth\paperwidth 16 | \fi 17 | \expandafter\ifx\csname stockheight\endcsname\relax 18 | \newdimen\stockheight 19 | \stockheight\paperheight 20 | \fi 21 | \newcount\CROP@index 22 | \CROP@index\z@ 23 | \newcommand*\CROP@font{} 24 | \let\CROP@stockcolor\@empty 25 | \let\CROP@pagecolor\@empty 26 | \IfFileExists{color.sty}{% 27 | \RequirePackage{color}% 28 | \let\CROP@needscolor\@empty 29 | }{% 30 | \newcommand*\CROP@needscolor{% 31 | \PackageError{crop}{% 32 | The `invert' and `notext' options require the\MessageBreak 33 | `color' package, which doesn't seem to be installed% 34 | }{% 35 | Install the `color' package or don't use the `invert' 36 | \MessageBreak or `notext' option. 37 | }% 38 | \let\CROP@needscolor\relax 39 | }% 40 | \let\current@color\relax 41 | } 42 | \let\CROP@detdriver\@empty 43 | \IfFileExists{graphics.sty}{% 44 | \RequirePackage{graphics}% 45 | \let\CROP@Ginclude@graphics\Ginclude@graphics 46 | \ifx\Gin@driver\@empty\else 47 | \filename@parse{\Gin@driver}% 48 | \edef\CROP@detdriver{\filename@base}% 49 | \fi 50 | \let\CROP@ps\Gin@PS@raw 51 | }{% 52 | \PackageWarning{crop}{I couldn't find the `graphics' package, so 53 | I'll use\MessageBreak my internal PostScript interface% 54 | }% 55 | \newcommand*\CROP@ps[1]{\special{ps: ##1}}% 56 | } 57 | \let\CROP@reqdriver\@empty 58 | \DeclareOption{vtex}{\def\CROP@reqdriver{vtex}} 59 | \DeclareOption{pdftex}{\def\CROP@reqdriver{pdftex}} 60 | \DeclareOption{pdflatex}{\def\CROP@reqdriver{pdftex}} 61 | \DeclareOption{dvips}{\def\CROP@reqdriver{dvips}} 62 | \let\CROP@driver\@empty 63 | \DeclareOption{vtex!}{\def\CROP@driver{vtex}} 64 | \DeclareOption{pdftex!}{\def\CROP@driver{pdftex}} 65 | \DeclareOption{pdflatex!}{\def\CROP@driver{pdftex}} 66 | \DeclareOption{dvips!}{\def\CROP@driver{dvips}} 67 | \DeclareOption{nodriver}{\def\CROP@driver{none}} 68 | \DeclareOption{!}{\def\CROP@driver{none}} 69 | \newcommand*\CROP@evaldriver{% 70 | \ifx\CROP@driver\@empty 71 | \PackageInfo{crop}{requested driver: `\CROP@reqdriver'}% 72 | \ifx\pdfoutput\@undefined\else 73 | \ifx\pdfoutput\relax\else 74 | \ifcase\pdfoutput\else 75 | \def\CROP@detdriver{pdftex}% 76 | \fi 77 | \fi 78 | \fi 79 | \ifx\VTeXversion\@undefined\else 80 | \ifx\VTeXversion\relax\else 81 | \def\CROP@detdriver{vtex}% 82 | \fi 83 | \fi 84 | \PackageInfo{crop}{detected driver: `\CROP@detdriver'}% 85 | \ifx\CROP@reqdriver\@empty\else 86 | \ifx\CROP@reqdriver\@empty\else 87 | \ifx\CROP@reqdriver\CROP@detdriver\else 88 | \PackageWarningNoLine{crop}{% 89 | You requested the `\CROP@reqdriver' driver 90 | but I think that\MessageBreak the 91 | `\CROP@detdriver' driver works better in the 92 | current\MessageBreak context. You can force 93 | me to respect your decision\MessageBreak 94 | by adding an exclamation point as in 95 | [\CROP@reqdriver!]% 96 | }% 97 | \fi 98 | \fi 99 | \fi 100 | \ifx\CROP@detdriver\@empty 101 | \let\CROP@driver\CROP@reqdriver 102 | \else 103 | \let\CROP@driver\CROP@detdriver 104 | \fi 105 | \fi 106 | \let\CROP@evaldriver\relax 107 | } 108 | \AtBeginDocument{\CROP@evaldriver} 109 | \newcommand*\CROP@init@dvips{% 110 | \PackageInfo{crop}{using `dvips' graphics driver}% 111 | \AtBeginDvi{% 112 | \special{papersize=\the\stockwidth,\the\stockheight}% 113 | }% 114 | } 115 | \newcommand*\CROP@init@pdftex{% 116 | \PackageInfo{crop}{using `pdftex' graphics driver}% 117 | \pdfpagewidth\stockwidth 118 | \pdfpageheight\stockheight 119 | \let\CROP@reflect\CROP@genreflect 120 | \let\CROP@rotate\CROP@genrotate 121 | } 122 | \newcommand*\CROP@init@vtex{% 123 | \PackageInfo{crop}{using `vtex' graphics driver}% 124 | \mediawidth\stockwidth 125 | \mediaheight\stockheight 126 | \let\CROP@reflect\CROP@genreflect 127 | \let\CROP@rotate\CROP@genrotate 128 | } 129 | \newcommand*\CROP@init@none{% 130 | \PackageInfo{crop}{not using any graphics driver}% 131 | } 132 | \newcommand*\CROP@size[2]{\stockwidth#1 \stockheight#2 } 133 | \DeclareOption{landscape}{% 134 | \def\CROP@size#1#2{\stockheight#1 \stockwidth#2 }% 135 | } 136 | \DeclareOption{a0}{\CROP@size{841truemm}{1189truemm}} 137 | \DeclareOption{a1}{\CROP@size{595truemm}{841truemm}} 138 | \DeclareOption{a2}{\CROP@size{420truemm}{595truemm}} 139 | \DeclareOption{a3}{\CROP@size{297truemm}{420truemm}} 140 | \DeclareOption{a4}{\CROP@size{210truemm}{297truemm}} 141 | \DeclareOption{a5}{\CROP@size{149truemm}{210truemm}} 142 | \DeclareOption{a6}{\CROP@size{105truemm}{149truemm}} 143 | \DeclareOption{b0}{\CROP@size{1000truemm}{1414truemm}} 144 | \DeclareOption{b1}{\CROP@size{707truemm}{1000truemm}} 145 | \DeclareOption{b2}{\CROP@size{500truemm}{707truemm}} 146 | \DeclareOption{b3}{\CROP@size{353truemm}{500truemm}} 147 | \DeclareOption{b4}{\CROP@size{250truemm}{353truemm}} 148 | \DeclareOption{b5}{\CROP@size{176truemm}{250truemm}} 149 | \DeclareOption{b6}{\CROP@size{125truemm}{176truemm}} 150 | \DeclareOption{letter}{\CROP@size{8.5truein}{11truein}} 151 | \DeclareOption{legal}{\CROP@size{8.5truein}{14truein}} 152 | \DeclareOption{executive}{\CROP@size{7.25truein}{10.5truein}} 153 | \newcommand\CROP@opt@width{\stockwidth\CROP@@} 154 | \newcommand\CROP@opt@height{\stockheight\CROP@@} 155 | \DeclareOption{center}{\AtBeginDocument{\CROP@center}} 156 | \newcommand*\CROP@center{% 157 | \voffset\stockheight 158 | \advance\voffset-\paperheight 159 | \voffset.5\voffset 160 | \hoffset\stockwidth 161 | \advance\hoffset-\paperwidth 162 | \hoffset.5\hoffset 163 | } 164 | \DeclareOption*{\CROP@execopt\CurrentOption} 165 | \newcommand*\crop[1][cam,noaxes]{% 166 | \@for\CROP@@:=#1\do{\CROP@execopt\CROP@@}% 167 | } 168 | \newcommand*\CROP@execopt[1]{% 169 | \def\CROP@##1=##2=##3\@nil{\def\CROP@{##1}\def\CROP@@{##2}}% 170 | \expandafter\CROP@#1==\@nil% 171 | \@ifundefined{CROP@opt@\CROP@}{% 172 | \PackageError{crop}{% 173 | Requested option `#1' not provided% 174 | }{% 175 | Note that the `*center' options are obsolete. You have to 176 | request\MessageBreak e.g. [a4,center] instead of 177 | [a4center]. 178 | }% 179 | }{% 180 | \@nameuse{CROP@opt@\CROP@}% 181 | }% 182 | } 183 | \newcommand*\cropdef[6][\CROP@@info]{% 184 | \@namedef{CROP@opt@#6}{% 185 | \def\CROP@info{#1}% 186 | \let\CROP@ulc#2 187 | \let\CROP@urc#3 188 | \let\CROP@llc#4 189 | \let\CROP@lrc#5 190 | \let\CROP@@@marks\CROP@marks 191 | }% 192 | } 193 | \newcommand*\CROP@@laxis{% 194 | \begin{picture}(0,0) 195 | \unitlength\p@\thinlines 196 | \put(-2,0){\line(-1,0){11}} 197 | \end{picture}% 198 | } 199 | \newcommand*\CROP@@raxis{% 200 | \begin{picture}(0,0) 201 | \unitlength\p@\thinlines 202 | \put(2,0){\line(1,0){11}} 203 | \end{picture}% 204 | } 205 | \newcommand*\CROP@@upaxis{% 206 | \begin{picture}(0,0) 207 | \unitlength\p@\thinlines 208 | \put(0,2){\line(0,1){11}} 209 | \end{picture}% 210 | } 211 | \newcommand*\CROP@@loaxis{% 212 | \begin{picture}(0,0) 213 | \unitlength\p@\thinlines 214 | \put(0,-2){\line(0,-1){11}} 215 | \end{picture}% 216 | } 217 | \newcommand*\CROP@time{} 218 | \bgroup 219 | \count@\time 220 | \divide\time60 221 | \count\@ne\time 222 | \multiply\time60 223 | \advance\count@-\time 224 | \xdef\CROP@time{\the\count\@ne:\two@digits{\count@}} 225 | \egroup 226 | \newcommand*\CROP@@info{{% 227 | \global\advance\CROP@index\@ne 228 | \def\x{\discretionary{}{}{\hbox{\kern.5em---\kern.5em}}}% 229 | \advance\paperwidth-20\p@ 230 | \dimen@4pt 231 | \ifx\CROP@pagecolor\@empty 232 | \else 233 | \advance\dimen@\CROP@overlap 234 | \fi 235 | \hb@xt@\z@{% 236 | \hss 237 | \vbox to\z@{% 238 | \centering 239 | \hsize\paperwidth 240 | \vss 241 | \normalfont 242 | \normalsize 243 | \expandafter\csname\CROP@font\endcsname{% 244 | ``\jobname''\x 245 | \the\year/\the\month/\the\day\x 246 | \CROP@time\x 247 | page\kern.5em\thepage\x 248 | \#\the\CROP@index 249 | \strut 250 | }% 251 | \vskip\dimen@ 252 | }% 253 | \hss 254 | }% 255 | }} 256 | \newcommand*\CROP@opt@font{\let\CROP@font\CROP@@} 257 | \newcommand*\CROP@@ulc{% 258 | \begin{picture}(0,0) 259 | \unitlength\p@\thinlines 260 | \put(-30,0){\circle{10}} 261 | \put(-30,-5){\line(0,1){10}} 262 | \put(-35,0){\line(1,0){30}} 263 | \put(0,30){\circle{10}} 264 | \put(-5,30){\line(1,0){10}} 265 | \put(0,35){\line(0,-1){30}} 266 | \end{picture}% 267 | } 268 | \newcommand*\CROP@@urc{% 269 | \begin{picture}(0,0) 270 | \unitlength\p@\thinlines 271 | \put(30,0){\circle{10}} 272 | \put(30,-5){\line(0,1){10}} 273 | \put(35,0){\line(-1,0){30}} 274 | \put(0,30){\circle{10}} 275 | \put(-5,30){\line(1,0){10}} 276 | \put(0,35){\line(0,-1){30}} 277 | \end{picture}% 278 | } 279 | \newcommand*\CROP@@llc{% 280 | \begin{picture}(0,0) 281 | \unitlength\p@\thinlines 282 | \put(-30,0){\circle{10}} 283 | \put(-30,-5){\line(0,1){10}} 284 | \put(-35,0){\line(1,0){30}} 285 | \put(0,-30){\circle{10}} 286 | \put(-5,-30){\line(1,0){10}} 287 | \put(0,-35){\line(0,1){30}} 288 | \end{picture}% 289 | } 290 | \newcommand*\CROP@@lrc{% 291 | \begin{picture}(0,0) 292 | \unitlength\p@\thinlines 293 | \put(30,0){\circle{10}} 294 | \put(30,-5){\line(0,1){10}} 295 | \put(35,0){\line(-1,0){30}} 296 | \put(0,-30){\circle{10}} 297 | \put(-5,-30){\line(1,0){10}} 298 | \put(0,-35){\line(0,1){30}} 299 | \end{picture}% 300 | } 301 | \cropdef\CROP@@ulc\CROP@@urc\CROP@@llc\CROP@@lrc{cam} 302 | \newcommand*\CROP@@cross{% 303 | \begin{picture}(0,0) 304 | \unitlength1cm\thinlines 305 | \put(-2,0){\line(1,0){4}} 306 | \put(0,-2){\line(0,1){4}} 307 | \end{picture}% 308 | } 309 | \cropdef\CROP@@cross\CROP@@cross\CROP@@cross\CROP@@cross{cross} 310 | \newcommand*\CROP@@frame{% 311 | \begin{picture}(0,0) 312 | \unitlength\p@\thinlines 313 | \put(0,0){\line(1,0){\strip@pt\paperwidth}} 314 | \put(0,0){\line(0,-1){\strip@pt\paperheight}} 315 | \put(\strip@pt\paperwidth,0){\line(0,-1){\strip@pt\paperheight}} 316 | \put(0,-\strip@pt\paperheight){\line(1,0){\strip@pt\paperwidth}} 317 | \end{picture}% 318 | } 319 | \cropdef\CROP@@frame\relax\relax\relax{frame} 320 | \let\CROP@shipout\shipout 321 | \renewcommand*\shipout{% 322 | \afterassignment\CROP@ship 323 | \setbox\@cclv=% 324 | } 325 | \newcommand*\CROP@ship{% 326 | \ifvoid\@cclv 327 | \expandafter\aftergroup 328 | \fi 329 | \CROP@@ship 330 | } 331 | \newcommand*\CROP@shiplist{% 332 | \lineskip\z@ 333 | \lineskiplimit\z@ 334 | \baselineskip\z@ 335 | \CROP@kernel 336 | \box\@cclv 337 | } 338 | \newcommand*\CROP@@ship{% 339 | \CROP@shipout\vbox{\CROP@shiplist}% 340 | } 341 | \newcommand*\CROP@shipadd[1]{% 342 | \bgroup 343 | \toks@\expandafter{\expandafter#1\expandafter{\CROP@shiplist}}% 344 | \xdef\CROP@shiplist{\the\toks@}% 345 | \egroup 346 | } 347 | \newcommand*\CROP@kernel{% 348 | \vbox to\z@{% 349 | \vskip\CROP@vorigin 350 | \hb@xt@\z@{% 351 | \hskip\CROP@horigin 352 | \vbox to\paperheight{% 353 | \let\protect\relax 354 | \hsize\paperwidth 355 | \CROP@hook 356 | \CROP@user@a 357 | \CROP@drawstockcolor 358 | \CROP@drawpagecolor 359 | \CROP@@@marks 360 | }% 361 | \hss 362 | }% 363 | \vss 364 | }% 365 | } 366 | \newcommand*\CROP@marks{% 367 | % Changed from one axis on each side to 2 axes on top/lower edge, 6 on each side, for printing 3x7 panels per this example. 368 | \CROP@setmarkcolor 369 | \CROP@user@b 370 | \CROP@ulc\null\hfill\CROP@@@info\CROP@upedge\hfill\CROP@upedge\hfill\null\CROP@urc 371 | \vfill 372 | \CROP@ledge\hfill\CROP@redge 373 | \vfill 374 | \CROP@ledge\hfill\CROP@redge 375 | \vfill 376 | \CROP@ledge\hfill\CROP@redge 377 | \vfill 378 | \CROP@ledge\hfill\CROP@redge 379 | \vfill 380 | \CROP@ledge\hfill\CROP@redge 381 | \vfill 382 | \CROP@ledge\hfill\CROP@redge 383 | \vfill 384 | \CROP@llc\null\hfill\CROP@loedge\hfill\CROP@loedge\hfill\null\CROP@lrc 385 | } 386 | \let\CROP@@@marks\CROP@marks 387 | \newcommand*\CROP@setmarkcolor{% 388 | \let\current@color\CROP@markcolor 389 | \set@color 390 | } 391 | \let\CROP@user@a\relax 392 | \let\CROP@user@b\relax 393 | \newcommand*\CROP@opt@horigin{\let\CROP@horigin\CROP@@} 394 | \newcommand*\CROP@opt@vorigin{\let\CROP@vorigin\CROP@@} 395 | \newcommand*\CROP@opt@off{% 396 | \let\CROP@@@marks\vfil 397 | } 398 | \newcommand*\CROP@opt@odd{% 399 | \def\CROP@@@marks{\ifodd\c@page\CROP@marks\else\vfil\fi}% 400 | } 401 | \newcommand*\CROP@opt@even{% 402 | \def\CROP@@@marks{\ifodd\c@page\vfil\else\CROP@marks\fi}% 403 | } 404 | \newcommand*\CROP@@@info{} 405 | \newcommand*\CROP@opt@info{\def\CROP@@@info{\CROP@info}} 406 | \newcommand*\CROP@opt@noinfo{\let\CROP@@@info\relax} 407 | \newcommand*\CROP@opt@axes{% 408 | \let\CROP@ledge\CROP@@laxis 409 | \let\CROP@redge\CROP@@raxis 410 | \let\CROP@upedge\CROP@@upaxis 411 | \let\CROP@loedge\CROP@@loaxis 412 | } 413 | \newcommand*\CROP@opt@noaxes{% 414 | \let\CROP@ledge\relax 415 | \let\CROP@redge\relax 416 | \let\CROP@upedge\relax 417 | \let\CROP@loedge\relax 418 | } 419 | \expandafter\newcommand\expandafter*\csname CROP@opt@mount1\endcsname{% 420 | \let\CROP@hook\relax 421 | } 422 | \newcount\CROP@offset 423 | \expandafter\newcommand\expandafter*\csname CROP@opt@mount2\endcsname{% 424 | \CROP@offset=\ifx\CROP@@\@empty\z@\else\CROP@@\fi 425 | \def\CROP@hook{% 426 | \count@\c@page 427 | \advance\count@\CROP@offset 428 | \ifodd\count@ 429 | \let\CROP@ulc\relax 430 | \let\CROP@llc\relax 431 | \let\CROP@ledge\relax 432 | \else 433 | \let\CROP@urc\relax 434 | \let\CROP@lrc\relax 435 | \let\CROP@redge\relax 436 | \fi 437 | }% 438 | } 439 | \DeclareOption{mirror}{% 440 | \AtBeginDocument{\CROP@shipadd\CROP@reflect} 441 | } 442 | \newcommand*\CROP@reflect[1]{% 443 | \vbox to\z@{% 444 | \vskip\CROP@vorigin 445 | \hb@xt@\z@{% 446 | \hskip\CROP@horigin 447 | \CROP@ps{gsave currentpoint}% 448 | \kern\paperwidth 449 | \CROP@ps{currentpoint}% 450 | \hss 451 | }% 452 | \vss 453 | }% 454 | \CROP@ps{translate -1 1 scale neg exch neg exch translate}% 455 | \vbox{#1}% 456 | \CROP@ps{grestore}% 457 | } 458 | \newcommand*\CROP@genreflect[1]{% 459 | \leavevmode 460 | \dimen0\CROP@horigin 461 | \kern2\dimen0 462 | \reflectbox{% 463 | \hb@xt@\paperwidth{% 464 | \vbox to\paperheight{% 465 | #1% 466 | \vss 467 | }% 468 | \hss 469 | }% 470 | }% 471 | } 472 | \DeclareOption{rotate}{% 473 | \AtBeginDocument{\CROP@shipadd\CROP@rotate} 474 | } 475 | \newcommand*\CROP@rotate[1]{% 476 | \hb@xt@\z@{% 477 | \hskip\CROP@horigin 478 | \vbox to\z@{% 479 | \vskip\CROP@vorigin 480 | \CROP@ps{gsave currentpoint}% 481 | \kern\paperheight 482 | \hb@xt@\z@{% 483 | \kern\paperwidth 484 | \CROP@ps{currentpoint}% 485 | \hss 486 | }% 487 | \vss 488 | }% 489 | \hss 490 | }% 491 | \CROP@ps{translate 180 rotate neg exch neg exch translate}% 492 | \vbox{#1}% 493 | \CROP@ps{grestore}% 494 | } 495 | \newcommand*\CROP@genrotate[1]{% 496 | \dimen0\CROP@vorigin 497 | \kern2\dimen0 498 | \leavevmode 499 | \dimen0\CROP@horigin 500 | \kern2\dimen0 501 | \rotatebox{180}{% 502 | \hb@xt@\paperwidth{% 503 | \vbox to\paperheight{% 504 | #1% 505 | \vss 506 | }% 507 | \hss 508 | }% 509 | }% 510 | } 511 | \newcommand*\CROP@defmarkcolor[1]{{% 512 | \def\set@color{\global\let\CROP@markcolor\current@color}% 513 | \@declaredcolor{#1}% 514 | }} 515 | \ifx\CROP@needscolor\@empty 516 | \renewcommand*\set@page@color{% 517 | \global\let\CROP@stockcolor\current@color 518 | }% 519 | \AtBeginDocument{% 520 | \def\set@page@color{% 521 | \global\let\CROP@pagecolor\current@color 522 | }% 523 | }% 524 | \CROP@defmarkcolor{black}% 525 | \let\CROP@needscolor\relax 526 | \fi 527 | \newcommand*\CROP@opt@color{% 528 | \CROP@needscolor 529 | \expandafter\CROP@defmarkcolor\expandafter{\CROP@@}% 530 | } 531 | \newcommand*\CROP@drawstockcolor{% 532 | \ifx\CROP@stockcolor\@empty 533 | \else 534 | \rlap{% 535 | \smash{% 536 | \raise\voffset\hbox{% 537 | \let\current@color\CROP@stockcolor 538 | \set@color 539 | \hskip-\hoffset 540 | \vrule width\stockwidth height\z@ depth\stockheight 541 | }% 542 | }% 543 | }% 544 | \fi 545 | } 546 | \newcommand*\CROP@drawpagecolor{% 547 | \ifx\CROP@pagecolor\@empty 548 | \else 549 | \rlap{% 550 | \smash{% 551 | \dimen@\CROP@overlap 552 | \advance\paperwidth2\dimen@ 553 | \advance\paperheight2\dimen@ 554 | \raise\dimen@\hbox{% 555 | \let\current@color\CROP@pagecolor 556 | \set@color 557 | \hskip-\dimen@ 558 | \vrule width\paperwidth height\z@ depth\paperheight 559 | }% 560 | }% 561 | }% 562 | \fi 563 | } 564 | \def\CROP@overlap{3truemm} 565 | \newcommand*\CROP@opt@overlap{\let\CROP@overlap\CROP@@} 566 | \newcommand*\CROP@invert[1]{% 567 | \CROP@needscolor 568 | \AtBeginDvi{% 569 | \pagecolor{#1}% 570 | \global\let\set@page@color\relax 571 | \global\let\CROP@setpagecolor\relax 572 | }% 573 | \color{white}% 574 | \DeclareRobustCommand*\color[2][]{}% 575 | \let\pagecolor\color 576 | \let\textcolor\color 577 | \let\CROP@invert\@gobble 578 | } 579 | \DeclareOption{invert}{% 580 | \CROP@invert{black}% 581 | \let\CROP@setmarkcolor\relax 582 | } 583 | \DeclareOption{notext}{% 584 | \CROP@invert{white}% 585 | } 586 | \newcommand*\CROP@opt@nographics{% 587 | \def\Ginclude@graphics##1{% 588 | \phantom{% 589 | \CROP@Ginclude@graphics{##1}% 590 | }% 591 | }% 592 | }% 593 | \newcommand*\CROP@opt@graphics{% 594 | \let\Ginclude@graphics\CROP@Ginclude@graphics 595 | } 596 | \newcommand*\CROP@horigin{-1truein} 597 | \newcommand*\CROP@vorigin{-1truein} 598 | \crop[cam,off,noaxes,info,mount1] 599 | \InputIfFileExists{crop.cfg}{% 600 | \PackageInfo{crop}{Local config file crop.cfg used} 601 | }{} 602 | \ProcessOptions 603 | \AtBeginDocument{\@nameuse{CROP@init@\CROP@driver}} 604 | \endinput 605 | %% 606 | %% End of file `crop.sty'. 607 | --------------------------------------------------------------------------------