summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/jlreq/jlreq-trimmarks.html
blob: 14be58383beb6b132bcf12e832ed61ef162c4935 (plain)
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
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
<!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=&lt;paper type&gt;</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={&lt;width&gt;,height&gt;}</code>: specify via the width and height.</li>
<li><code>trimmarks_paper=&lt;paper size&gt;+{&lt;width&gt;,&lt;height&gt;}</code> (e.g. <code>trimmarks_paper=a4+{1cm,2cm}</code>): <code>&lt;width&gt;</code> (resp. <code>&lt;height&gt;</code>) is added to the width (resp. height) of the paper size specified by <code>&lt;paper size&gt;</code> For <code>&lt;paper size&gt;</code>, one can use <code>&lt;paper type&gt;</code> or <code>{&lt;width&gt;,&lt;height&gt;}</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>&lt;paper size&gt;</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=+{1cm,2cm}</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"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[bleed_margin={top=3mm,bottom=5mm,gutter=0mm,fore-edge=2mm}]{<span class="ex">jlreq-trimmarks</span>}</span></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"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\jlreqtrimmarkssetup</span>{</span>
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a>  banner={</span>
<span id="cb3-3"><a href="#cb3-3" aria-hidden="true" tabindex="-1"></a>    &lt;Position (top/bottom, left/right, center)&gt;={</span>
<span id="cb3-4"><a href="#cb3-4" aria-hidden="true" tabindex="-1"></a>      &lt;more precise position&gt;={</span>
<span id="cb3-5"><a href="#cb3-5" aria-hidden="true" tabindex="-1"></a>        &lt;odd/even&gt;={</span>
<span id="cb3-6"><a href="#cb3-6" aria-hidden="true" tabindex="-1"></a>          &lt;content&gt;</span>
<span id="cb3-7"><a href="#cb3-7" aria-hidden="true" tabindex="-1"></a>        }</span>
<span id="cb3-8"><a href="#cb3-8" aria-hidden="true" tabindex="-1"></a>      }</span>
<span id="cb3-9"><a href="#cb3-9" aria-hidden="true" tabindex="-1"></a>    }</span>
<span id="cb3-10"><a href="#cb3-10" aria-hidden="true" tabindex="-1"></a>  }</span>
<span id="cb3-11"><a href="#cb3-11" aria-hidden="true" tabindex="-1"></a>}</span></code></pre></div>
<p>Here is an example.</p>
<div class="sourceCode" id="cb4"><pre class="sourceCode latex"><code class="sourceCode latex"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\jlreqtrimmarkssetup</span>{</span>
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a>  banner={</span>
<span id="cb4-3"><a href="#cb4-3" aria-hidden="true" tabindex="-1"></a>    top-right={</span>
<span id="cb4-4"><a href="#cb4-4" aria-hidden="true" tabindex="-1"></a>      vertical={</span>
<span id="cb4-5"><a href="#cb4-5" aria-hidden="true" tabindex="-1"></a>        odd={In the right of the top, only in odd pages, vertical mode.},</span>
<span id="cb4-6"><a href="#cb4-6" aria-hidden="true" tabindex="-1"></a>        even={In the right of the top, only in even pages, vertical mode.},</span>
<span id="cb4-7"><a href="#cb4-7" aria-hidden="true" tabindex="-1"></a>      },</span>
<span id="cb4-8"><a href="#cb4-8" aria-hidden="true" tabindex="-1"></a>      horizontal={In the right of the top, horizontal mode.}, <span class="co">% does not depend on the parity of the page number</span></span>
<span id="cb4-9"><a href="#cb4-9" aria-hidden="true" tabindex="-1"></a>      corner={In the corner of the right of the top, horizontal mode.},</span>
<span id="cb4-10"><a href="#cb4-10" aria-hidden="true" tabindex="-1"></a>      in-horizontal={In the right of the top, horizontal mode, in the trim area.},</span>
<span id="cb4-11"><a href="#cb4-11" aria-hidden="true" tabindex="-1"></a>      in-vertical={In the right of the top, vertical mode, in the trim area.},</span>
<span id="cb4-12"><a href="#cb4-12" aria-hidden="true" tabindex="-1"></a>    },</span>
<span id="cb4-13"><a href="#cb4-13" aria-hidden="true" tabindex="-1"></a>    bottom-center={</span>
<span id="cb4-14"><a href="#cb4-14" aria-hidden="true" tabindex="-1"></a>      left={In the left in the center of the bottom}, <span class="co">% odd=, even= is also available</span></span>
<span id="cb4-15"><a href="#cb4-15" aria-hidden="true" tabindex="-1"></a>      right={In the right in the center of the bottom},</span>
<span id="cb4-16"><a href="#cb4-16" aria-hidden="true" tabindex="-1"></a>      in={In the trim area in the center of the bottom.},</span>
<span id="cb4-17"><a href="#cb4-17" aria-hidden="true" tabindex="-1"></a>    }</span>
<span id="cb4-18"><a href="#cb4-18" aria-hidden="true" tabindex="-1"></a>  }</span>
<span id="cb4-19"><a href="#cb4-19" aria-hidden="true" tabindex="-1"></a>}</span></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"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\jlreqtrimmarkssetup</span>{</span>
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a>  banner={</span>
<span id="cb5-3"><a href="#cb5-3" aria-hidden="true" tabindex="-1"></a>    vertical={Vertical mode, in the top of the left},</span>
<span id="cb5-4"><a href="#cb5-4" aria-hidden="true" tabindex="-1"></a>    odd={In the top of the left, only in odd pages.}, <span class="co">% regarded as `horizontal`</span></span>
<span id="cb5-5"><a href="#cb5-5" aria-hidden="true" tabindex="-1"></a>    top-right={</span>
<span id="cb5-6"><a href="#cb5-6" aria-hidden="true" tabindex="-1"></a>      odd={In the top of the right, only in odd pages, horizontal mode.}</span>
<span id="cb5-7"><a href="#cb5-7" aria-hidden="true" tabindex="-1"></a>    }</span>
<span id="cb5-8"><a href="#cb5-8" aria-hidden="true" tabindex="-1"></a>  }</span>
<span id="cb5-9"><a href="#cb5-9" aria-hidden="true" tabindex="-1"></a>}</span></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> -&gt; <code>\color[cmyk]{1,0,0,0}</code></li>
<li><code>color=cyk</code> -&gt; <code>\color[cmyk]{1,0,1,1}</code></li>
<li><code>black</code> -&gt; <code>\color{black}</code></li>
<li><code>[cmyk]0.5,0.5,0.5,0</code> -&gt; <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">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>
<li>2020-05-01
<ul>
<li><code>jlreq-trimmarks</code> outputs the contents in <code>\@bannertoken</code> when <code>banner</code> in <code>\jlreqtrimmarkssetup</code> is not used.</li>
<li><code>\@bannertoken</code> is ignored when <code>banner</code> in <code>\jlreqtrimmarkssetup</code> is used.</li>
<li><code>\@bannerfont</code> is ignored when <code>banner_font</code> in <code>\jlreqtrimmarkssetup</code> is used.</li>
</ul></li>
<li>2021-07-22
<ul>
<li>It has more compatibility with expl3.</li>
</ul></li>
<li>2021-08-12
<ul>
<li>Removed dependence on <code>etoolbox</code> package.</li>
</ul></li>
<li>2022-07-13
<ul>
<li>Fixed a bug: an error occurred when loading.</li>
</ul></li>
</ul>
<hr />
<p>Noriyuki Abe <a href="https://github.com/abenori/jlreq">https://github.com/abenori/jlreq</a></p>
</article>
</body>
</html>