1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="generator" content="pandoc">
<title>jlreq-trimmarks</title>
<style>
.markdown-body {
padding-top: 10px;
padding-bottom: 10px;
background-color: white;
padding: 30px;
line-height: 170%;
}
h1{
font-size: 200%;
}
h2{
border-style: solid;
border-width: 0 0 0.1em 0em;
padding: 0 0 0.2em 0em;
border-color: #EEEEEE;
margin-top: 2em;
}
h3{
border-style: solid;
border-width: 0 0 0 0.5em;
padding: 0 0 0 0.5em;
border-color: #EEEEEE;
margin-top: 2em;
}
code{
white-space: pre;
font-weight: normal;
background-color: #F4F4F4;
border-color: #F4F4F4;
border-style: solid;
border-width: .2em .5em;
border-radius: .2em;
}
pre{
background-color: #F8F8F8;
border-color: #F8F8F8;
border-width: 1em;
border-style: solid;
border-radius: .5em;
padding: 0;
margin: 0;
line-height: 130%;
}
pre code{
background-color: #F8F8F8;
border-style: none;
}
div.sourceCode { overflow-x: auto; text-indent: 0em;}
code span.kw { color: #007020; font-weight: bold; } /* Keyword */
code span.dt { color: #902000; } /* DataType */
code span.dv { color: #40a070; } /* DecVal */
code span.bn { color: #40a070; } /* BaseN */
code span.fl { color: #40a070; } /* Float */
code span.ch { color: #4070a0; } /* Char */
code span.st { color: #4070a0; } /* String */
code span.co { color: #008000; } /* Comment */
code span.ot { color: #007020; } /* Other */
code span.al { color: #ff0000; font-weight: bold; } /* Alert */
code span.fu { color: #0040FF; } /* Function */
code span.er { color: #ff0000; font-weight: bold; } /* Error */
code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
code span.cn { color: #880000; } /* Constant */
code span.sc { color: #4070a0; } /* SpecialChar */
code span.vs { color: #4070a0; } /* VerbatimString */
code span.ss { color: #bb6688; } /* SpecialString */
code span.im { } /* Import */
code span.va { color: #19177c; } /* Variable */
code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
code span.op { color: #666666; } /* Operator */
code span.bu { color: #0040FF; } /* BuiltIn */
code span.ex { } /* Extension */
code span.pp { color: #bc7a00; } /* Preprocessor */
code span.at { color: #7d9029; } /* Attribute */
code span.do { color: #ba2121; font-style: italic; } /* Documentation */
code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
</style>
</head>
<body>
<article class="markdown-body">
<h1 id="jlreq-trimmarks">jlreq-trimmarks</h1>
<h2 id="what-is-this">What is this?</h2>
<p>This package outputs trim (register) marks. It works with <a href="https://osdn.jp/projects/luatex-ja/wiki/FrontPage">LuaTeX-ja</a> / pLaTeX / upLaTeX / dvipdfmx / Dvips / dviout and any document class (not only with jlreq class). It provides the following.</p>
<ul>
<li>Output trim marks</li>
<li>Set TrimBox and BleedBox if possible.</li>
<li>Set the size of paper.</li>
</ul>
<p>Note that this package is independent from <a href="https://www.w3.org/TR/jlreq/">Requirements for Japanese Text Layout</a> (JLReq). JLReq says nothing about trim marks.</p>
<h2 id="installation">Installation</h2>
<p>Move jlreq-trimmarks.sty and jlre-helpers.sty to $TEXMF/tex/latex/jlreq.</p>
<h2 id="how-to-use">How to use</h2>
<p>Load it by <code>\usepackage</code> with specifying the TeX engine and the DVI driver.</p>
<pre><code>\usepackage[dvipdfmx,platex]{jlreq-trimmarks}
</code></pre>
<p>Do not use <code>tombow</code> option in the document class.</p>
<h2 id="note">Note</h2>
<p>jlreq-trimmarks sets the size of the paper. However, it may not work due to a conflict with other packages. In this case, please use more powerful package, e.g., <a href="https://github.com/zr-tex8r/BXpapersize">bxpapersize</a>.</p>
<h2 id="options">Options</h2>
<p>The following package options (keyval style) are available.</p>
<h3 id="platex-uplatex-lulatex"><code>platex</code>, <code>uplatex</code>, <code>lulatex</code></h3>
<p>Set the engine. If it is not specified, then the engine is</p>
<ul>
<li>the one used in the jlreq class if the jlreq class is loaded.</li>
<li>guessed one if the jlreq class is not loaded.</li>
</ul>
<h3 id="dvipdfmx-dvips-dviout"><code>dvipdfmx</code>, <code>dvips</code>, <code>dviout</code></h3>
<p>Set the dvi driver. You do not have to specify it when using the engine <code>lualatex</code>. If it is not specified (with <code>platex</code> or <code>uplatex</code>), then <code>dvipdfmx</code> is used.</p>
<h3 id="trimmarks_paper"><code>trimmarks_paper</code></h3>
<p>Set the size of the paper including trim marks.</p>
<ul>
<li><code>trimmarks_paper=<paper type></code>: specify via the paper type. for the paper type, you can use <code>a0--a10</code>, <code>b0--b10</code> and <code>c2--c8</code>. Note that <code>b0--b10</code> is `JIS B' (Japanese B-series variant).</li>
<li><code>trimmarks_paper={<width>,height>}</code>: specify via the width and height.</li>
<li><code>trimmarks_paper=<paper size>+{<width>,<height>}</code> (e.g. <code>trimmarks_paper=a4+{1cm,2cm}</code>): <code><width></code> (resp. <code><height></code>) is added to the width (resp. height) of the paper size specified by <code><paper size></code> For <code><paper size></code>, one can use <code><paper type></code> or <code>{<width>,<height>}</code> as in the above.</li>
<li><code>trimmarks_paper=a4+2cm</code> is equivalent to <code>trimmarks_paper=a4+{2cm,2cm}</code>.</li>
<li>If <code><paper size></code> is empty (e.g. <code>trimmarks_paper=+2cm</code>), the current paper size (which is specified usually by the option for the document class) is used.</li>
</ul>
<h3 id="landscape"><code>landscape</code></h3>
<p>Swap the width and the height. This swaps only the width and height which is specified with the option <code>trimmarks_paper</code>. For example, <code>landscape,trimmarks_paper=+{2cm,1cm}</code>, adds 1cm to the height and 2cm to the width. But the current paper size is not swapped.</p>
<h3 id="show"><code>show</code></h3>
<p>Specify the types of trim marks which the package outputs. It is specified with the comma separated list like <code>show={trimmarks,banner,digital}</code>. If no argument is given, everything will be showed.</p>
<ul>
<li><code>trimmarks</code>: outputs the trim marks.</li>
<li><code>banner</code>: date etc.</li>
<li><code>digital</code>:TrimBox and BleedBox.</li>
<li><code>no</code>: nothing will be showed</li>
</ul>
<h3 id="bleed_margin"><code>bleed_margin</code></h3>
<p>Set the bleed margin. You can also specify as follows.</p>
<div class="sourceCode" id="cb2"><pre class="sourceCode latex"><code class="sourceCode latex"><a class="sourceLine" id="cb2-1" data-line-number="1"><span class="bu">\usepackage</span>[bleed_margin={top=3mm,bottom=5mm,gutter=0mm,fore-edge=2mm}]{<span class="ex">jlreq-trimmarks</span>}</a></code></pre></div>
<h2 id="jlreqtrimmarkssetup"><code>\jlreqtrimmarkssetup</code></h2>
<p>Set the additional settings with the keyval style.</p>
<h3 id="banner"><code>banner</code></h3>
<p>The things which the package outputs when <code>show=banner</code> is specified in the package option. Normally it is showed in the left of the top. You can also put them in many places with</p>
<div class="sourceCode" id="cb3"><pre class="sourceCode latex"><code class="sourceCode latex"><a class="sourceLine" id="cb3-1" data-line-number="1"><span class="fu">\jlreqtrimmarkssetup</span>{</a>
<a class="sourceLine" id="cb3-2" data-line-number="2"> banner={</a>
<a class="sourceLine" id="cb3-3" data-line-number="3"> <Position (top/bottom, left/right, center)>={</a>
<a class="sourceLine" id="cb3-4" data-line-number="4"> <more precise position>={</a>
<a class="sourceLine" id="cb3-5" data-line-number="5"> <odd/even>={</a>
<a class="sourceLine" id="cb3-6" data-line-number="6"> <content></a>
<a class="sourceLine" id="cb3-7" data-line-number="7"> }</a>
<a class="sourceLine" id="cb3-8" data-line-number="8"> }</a>
<a class="sourceLine" id="cb3-9" data-line-number="9"> }</a>
<a class="sourceLine" id="cb3-10" data-line-number="10"> }</a>
<a class="sourceLine" id="cb3-11" data-line-number="11">}</a></code></pre></div>
<p>Here is an example.</p>
<div class="sourceCode" id="cb4"><pre class="sourceCode latex"><code class="sourceCode latex"><a class="sourceLine" id="cb4-1" data-line-number="1"><span class="fu">\jlreqtrimmarkssetup</span>{</a>
<a class="sourceLine" id="cb4-2" data-line-number="2"> banner={</a>
<a class="sourceLine" id="cb4-3" data-line-number="3"> top-right={</a>
<a class="sourceLine" id="cb4-4" data-line-number="4"> vertical={</a>
<a class="sourceLine" id="cb4-5" data-line-number="5"> odd={In the right of the top, only in odd pages, vertical mode.},</a>
<a class="sourceLine" id="cb4-6" data-line-number="6"> even={In the right of the top, only in even pages, vertical mode.},</a>
<a class="sourceLine" id="cb4-7" data-line-number="7"> },</a>
<a class="sourceLine" id="cb4-8" data-line-number="8"> horizontal={In the right of the top, horizontal mode.}, <span class="co">% does not depend on the parity of the page number</span></a>
<a class="sourceLine" id="cb4-9" data-line-number="9"> corner={In the corner of the right of the top, horizontal mode.},</a>
<a class="sourceLine" id="cb4-10" data-line-number="10"> in-horizontal={In the right of the top, horizontal mode, in the trim area.},</a>
<a class="sourceLine" id="cb4-11" data-line-number="11"> in-vertical={In the right of the top, vertical mode, in the trim area.},</a>
<a class="sourceLine" id="cb4-12" data-line-number="12"> },</a>
<a class="sourceLine" id="cb4-13" data-line-number="13"> bottom-center={</a>
<a class="sourceLine" id="cb4-14" data-line-number="14"> left={In the left in the center of the bottom}, <span class="co">% odd=, even= is also available</span></a>
<a class="sourceLine" id="cb4-15" data-line-number="15"> right={In the right in the center of the bottom},</a>
<a class="sourceLine" id="cb4-16" data-line-number="16"> in={In the trim area in the center of the bottom.},</a>
<a class="sourceLine" id="cb4-17" data-line-number="17"> }</a>
<a class="sourceLine" id="cb4-18" data-line-number="18"> }</a>
<a class="sourceLine" id="cb4-19" data-line-number="19">}</a></code></pre></div>
<p>A possible combination of <code>top/bottom/center</code> and <code>left/right/center/gutter/fore-edge</code> can be used for the position. You can use <code>\thepage</code> to output the number of the page.</p>
<p>The keys can be ommited. For example:</p>
<div class="sourceCode" id="cb5"><pre class="sourceCode latex"><code class="sourceCode latex"><a class="sourceLine" id="cb5-1" data-line-number="1"><span class="fu">\jlreqtrimmarkssetup</span>{</a>
<a class="sourceLine" id="cb5-2" data-line-number="2"> banner={</a>
<a class="sourceLine" id="cb5-3" data-line-number="3"> vertical={Vertical mode, in the top of the left},</a>
<a class="sourceLine" id="cb5-4" data-line-number="4"> odd={In the top of the left, only in odd pages.}, <span class="co">% regarded as `horizontal`</span></a>
<a class="sourceLine" id="cb5-5" data-line-number="5"> top-right={</a>
<a class="sourceLine" id="cb5-6" data-line-number="6"> odd={In the top of the right, only in odd pages, horizontal mode.}</a>
<a class="sourceLine" id="cb5-7" data-line-number="7"> }</a>
<a class="sourceLine" id="cb5-8" data-line-number="8"> }</a>
<a class="sourceLine" id="cb5-9" data-line-number="9">}</a></code></pre></div>
<h3 id="trimmarks_width"><code>trimmarks_width</code></h3>
<p>Set the width of trim marks.</p>
<h3 id="color"><code>color</code></h3>
<p>Set the color of the trim marks. You have to load a package which defines <code>\color</code> (`color' package or its variant) before loading this package to use this function. Here are some examples of specifying the color.</p>
<ul>
<li><code>color=c</code> -> <code>\color[cmyk]{1,0,0,0}</code></li>
<li><code>color=cyk</code> -> <code>\color[cmyk]{1,0,1,1}</code></li>
<li><code>black</code> -> <code>\color{black}</code></li>
<li><code>[cmyk]0.5,0.5,0.5,0</code> -> <code>\color[cmyk]{0.5,0.5,0.5,0}</code></li>
</ul>
<h2 id="license">LICENSE</h2>
<p>This package is distributed under the BSD 2-Clause License. See <a href="LICENSE" class="uri">LICENSE</a>.</p>
<h2 id="changelog">CHANGELOG</h2>
<ul>
<li>2018-05-19
<ul>
<li>First release.</li>
</ul></li>
<li>2018-06-17
<ul>
<li>Fixed a bug.</li>
</ul></li>
<li>2018-08-08
<ul>
<li>Extended <code>trimmarks_paper</code>.</li>
<li>Added a package option <code>landscape</code>.</li>
</ul></li>
<li>2018-09-01
<ul>
<li>Moved <code>bleed_margin</code> from <code>\jlreqtrimmarkssetup</code> to a package option.</li>
<li>jlreq-trimmarks works with unusugal<code>\mag</code>.</li>
<li>Fixed bugs.</li>
</ul></li>
<li>2018-12-10
<ul>
<li>Extended <code>banner</code> in <code>\jlreqtrimmarkssetup</code>.</li>
</ul></li>
<li>2019-04-01
<ul>
<li>Extended <code>banner</code> in <code>\jlreqtrimmarkssetup</code>.</li>
<li>Extended <code>bleed_margin</code>.</li>
</ul></li>
</ul>
<hr />
<p>Noriyuki Abe <a href="https://github.com/abenori/jlreq" class="uri">https://github.com/abenori/jlreq</a></p>
</article>
</body>
</html>
|