texlive[64042] Master/texmf-dist/doc/generic/olsak-misc: olsak-misc

commits+karl at tug.org commits+karl at tug.org
Thu Aug 4 22:32:07 CEST 2022


Revision: 64042
          http://tug.org/svn/texlive?view=revision&revision=64042
Author:   karl
Date:     2022-08-04 22:32:06 +0200 (Thu, 04 Aug 2022)
Log Message:
-----------
olsak-misc (4aug22)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/generic/olsak-misc/README
    trunk/Master/texmf-dist/doc/generic/olsak-misc/cropmarks.tex

Modified: trunk/Master/texmf-dist/doc/generic/olsak-misc/README
===================================================================
--- trunk/Master/texmf-dist/doc/generic/olsak-misc/README	2022-08-03 23:49:28 UTC (rev 64041)
+++ trunk/Master/texmf-dist/doc/generic/olsak-misc/README	2022-08-04 20:32:06 UTC (rev 64042)
@@ -25,6 +25,7 @@
 <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:
 -------

Modified: trunk/Master/texmf-dist/doc/generic/olsak-misc/cropmarks.tex
===================================================================
--- trunk/Master/texmf-dist/doc/generic/olsak-misc/cropmarks.tex	2022-08-03 23:49:28 UTC (rev 64041)
+++ trunk/Master/texmf-dist/doc/generic/olsak-misc/cropmarks.tex	2022-08-04 20:32:06 UTC (rev 64042)
@@ -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 @@
 (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
+    _               _ _               _
+     |      |      | | |      |      |
+
+



More information about the tex-live-commits mailing list.