diff options
author | Karl Berry <karl@freefriends.org> | 2022-08-04 20:32:06 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2022-08-04 20:32:06 +0000 |
commit | 7b9b61b7a0d42b60f7f2792422223c497dce7476 (patch) | |
tree | 79437c06771f137c803b9d5af3b29d649bc300f3 /Master | |
parent | 4a8cb26166eb0641bc2bdce99207dc6cbf0d29dc (diff) |
olsak-misc (4aug22)
git-svn-id: svn://tug.org/texlive/trunk@64042 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/doc/generic/olsak-misc/README | 1 | ||||
-rw-r--r-- | Master/texmf-dist/doc/generic/olsak-misc/cropmarks.tex | 52 |
2 files changed, 51 insertions, 2 deletions
diff --git a/Master/texmf-dist/doc/generic/olsak-misc/README b/Master/texmf-dist/doc/generic/olsak-misc/README index a564097162c..a4c9ab33bc5 100644 --- a/Master/texmf-dist/doc/generic/olsak-misc/README +++ b/Master/texmf-dist/doc/generic/olsak-misc/README @@ -25,6 +25,7 @@ History: <Jun. 2016> ver.1 ... files contributed to CTAN as one "bundle" olsak-misc <May 2019> ... qrcode: bug fixed <Jun. 2022> ... cropmarks.tex added +<Aug. 2022> ... middle cropmarks added License: ------- diff --git a/Master/texmf-dist/doc/generic/olsak-misc/cropmarks.tex b/Master/texmf-dist/doc/generic/olsak-misc/cropmarks.tex index d098f8144e9..155581692fc 100644 --- a/Master/texmf-dist/doc/generic/olsak-misc/cropmarks.tex +++ b/Master/texmf-dist/doc/generic/olsak-misc/cropmarks.tex @@ -42,6 +42,13 @@ \def\middleB{\vbox to0pt{\kern\gap\copy\vrul\vss}} \def\middleL{\llap{\copy\hrul\kern\gap}} \def\middleR{\rlap{\kern\gap\copy\hrul}} +\def\middleV#1#2{\setbox0=\hbox to#2{#1\kern\gap\hlin#1\hlin\kern\gap#1}% + \vbox to0pt{\vss\box0\vss}} +\def\middleH#1#2{\setbox0=\vbox to#2{#1\kern\gap\vlin#1\vlin\kern\gap#1}% + \hbox to0pt{\hss\box0\hss}} +\def\hlin{\leaders\vrule height.5\mthick depth.5\mthick\hfil} +\def\vlin{\leaders\hrule width\mthick\vfil} +\def\middledim{\csname mc?h\the\tmpnum\endcsname} % \cropmarks{box} % creates a dimension-less crop marks around the box and prints the box with them: @@ -61,7 +68,10 @@ \vss \tmpnum=0 \loop \ifnum\tmpnum<\hmiddle \advance\tmpnum by1 - \hbox to\dimen0{\middleL\hss\middleR}% + \hbox to\dimen0 + \ifcsname mc?h\the\tmpnum\endcsname + {\middleH\middleL\middledim \hss \middleH\middleR\middledim}% + \else {\middleL\hss\middleR}\fi \vss \repeat \hbox to\dimen0{\cropLB\hss\vmiddleloop\middleB \cropRB} } @@ -70,7 +80,9 @@ \loop \ifnum\tmpnum<\vmiddle \advance\tmpnum by1 - #1\hss + \ifcsname mc?v\the\tmpnum\endcsname \middleV#1{\csname mc?v\the\tmpnum\endcsname}% + \else #1\fi + \hss \repeat } \def\docropmarks{% @@ -98,6 +110,8 @@ \def\today {\the\year-\othe\month-\othe\day} % you can re-define this format \ifx\optexversion\undefined \catcode`\_=12 \fi % names can include _ character +\def\middlecrop #1:#2{\expandafter\def\csname mc?#1\endcsname{#2}} + \endinput @@ -165,3 +179,37 @@ first and then you can add cropmarks for whole sheets. Use another software (or your TeX macro or use OpTeX trick 0088) for creating sheets and create a new PDF document. Then set appropriate number of middle marks and read this new document with sheets at input side when you are using cropmarks.tex + +The middle marks are only single lines by default (intendend for paper bend +only). Sometimes we need to leave a space for crop area here too. This is +possible by \middlecrop vnum:{dimen} or \middlecrop hnum:{dimen} +declaration. The "h" is declaration for \hmiddle marks (left+right +margins) and "v" for \vmiddle marks (top+bottom margins). The "num" is order +number of given middle mark and dimen is the amout of the space between crop +marks created here (the single-line mark for paper bend is added between +them to the center). For example, you can create "imposition sheets" with 8 +pages per sheet shown in the example of the OpTeX trick 0088. See also +https://en.wikipedia.org/wiki/Imposition. Then you can declare: + + \hmiddle=1 \middlecrop h1: {18mm} + \vmiddle=3 \middlecrop v2: {14mm} + +It says that there is single \hmiddle mark which is intended for bend +followed by crop 9mm and there is first and third \vmiddle mark intended for +bend only and second \vmiddle mark is used for bend followed by crop 7mm. +We get something like this: + + _| | |_|_| | |_ + + page page page page + + _ _ + _| |_ + _| |_ + + + page page page page + _ _ _ _ + | | | | | | | + + |