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 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292
|
<!DOCTYPE html>
<html lang="ja">
<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="これは何">これは何?</h2>
<p>トンボ(トリムマーク)を出力するためのパッケージです.<a
href="https://osdn.jp/projects/luatex-ja/wiki/FrontPage">LuaTeX-ja</a> /
pLaTeX / upLaTeX / dvipdfmx / Dvips /
dviout上で動きます.jlreqクラスファイルのみでなく,汎用的に動くように設計されています.以下の機能を提供します.</p>
<ul>
<li>トンボの出力</li>
<li>可能な場合には,TrimBox / BleedBoxを設定</li>
<li>紙サイズの設定</li>
</ul>
<p>なお,本パッケージは<a
href="https://www.w3.org/TR/jlreq/ja/">日本語組版処理の要件</a>
(JLReq)とは無縁です.JLReqにはトンボに関する記述はありません.</p>
<h2 id="インストール">インストール</h2>
<p>$TEXMF/tex/latex/jlreq内にjlreq-trimmarks.styとjlreq-helpers.styを配置してください.</p>
<h2 id="使い方">使い方</h2>
<p>ドライバおよびエンジンを指定して<code>\usepackage</code>で読み込みます.エンジンは省略が可能です.</p>
<pre><code>\usepackage[dvipdfmx,platex]{jlreq-trimmarks}</code></pre>
<p>なお,クラスファイルの<code>tombow</code>オプションは使わないでください.</p>
<h2 id="ノート">ノート</h2>
<p>jlreq-trimmarksは紙サイズを設定しますが,その他のパッケージとの兼ね合いで正しく機能しないことがあります.その際は<a
href="https://github.com/zr-tex8r/BXpapersize">bxpapersize</a>のようなより強力なパッケージを試してみてください.</p>
<h2 id="オプション">オプション</h2>
<p>以下のパッケージオプションを受け付けます.keyval形式です.</p>
<h3 id="platex-uplatex-lulatex"><code>platex</code>,
<code>uplatex</code>, <code>lulatex</code></h3>
<p>エンジンの指定です.省略時は,</p>
<ul>
<li><code>jlreq</code>クラスファイルを読み込んでいる場合はそれと連動する</li>
<li>そうでなければ自動推定</li>
</ul>
<p>です.</p>
<h3
id="dvipdfmxdvipsdviout"><code>dvipdfmx</code>,<code>dvips</code>,<code>dviout</code></h3>
<p>dviドライバの指定です.エンジンに<code>lualatex</code>を利用する場合は指定する必要はありません.省略時は<code>dvipdfmx</code>が使われます.</p>
<h3 id="trimmarks_paper"><code>trimmarks_paper</code></h3>
<p>トンボ付きの紙サイズを指定します.</p>
<ul>
<li><code>trimmarks_paper=a4</code>のように,<code>a0--a10</code>,
<code>b0--b10</code>, <code>c2--c8</code>(BはJIS
B列)を指定できる他,<code>trimmarks_paper={<width>,<height>}</code>と直接寸法を指定することができます.</li>
<li><code>a4+{1cm,2cm}</code>や<code>{10cm,20cm}+{1cm,2cm}</code>のように<code><紙サイズ>+{<寸法横>,<寸法縦>}</code>とした場合は,指定された紙サイズから指定された寸法だけ増やした紙サイズを設定します.</li>
<li><code>a4+2cm</code>は<code>a4+{2cm,2cm}</code>と等価です.</li>
<li><code>+2cm</code>と紙サイズの部分を省略すると,現在の紙サイズを利用します.</li>
<li>デフォルトは<code>+2in</code>です.</li>
</ul>
<h3 id="landscape"><code>landscape</code></h3>
<p>紙のサイズの縦と横とを入れ替えます.ただし入れ替えるのは<code>trimmarks_paper</code>で明示的に指定された値に限ります.例えば<code>landscape,trimmarks_paper=+{1cm,2cm}</code>とすると,もともとの紙サイズ(これは入れ替わらない)の横幅が2cm増え,縦幅が1cm増えた紙サイズとなります.</p>
<h3 id="show"><code>show</code></h3>
<p>出力する対象を指定します.<code>show={trimmarks,banner,digital}</code>のようにカンマ区切りのリストを与えます.引数を与えない場合は全て表示します.</p>
<ul>
<li><code>trimmarks</code>:トンボ自身を出力します.</li>
<li><code>banner</code>:日付などを出力します.</li>
<li><code>digital</code>:TrimBoxとBleedBoxの設定を行います(デジタルトンボ).</li>
<li><code>no</code>:何も表示しません.</li>
</ul>
<h3 id="bleed_margin"><code>bleed_margin</code></h3>
<p>仕上がりと裁ち落としの間(ドブ)の長さを指定します.次のようにすると,上下左右を独立に変更できます.</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>パッケージオプションで指定できない設定を行えます.keyval形式です.</p>
<h3 id="banner"><code>banner</code></h3>
<p><code>show=banner</code>時に出力される文字列.通常は左上に出力されますが,四つ角および上下左右の中心に出力することもできます.指定は</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> <場所(上下,左右中央)>={</span>
<span id="cb3-4"><a href="#cb3-4" aria-hidden="true" tabindex="-1"></a> <細かな位置>={</span>
<span id="cb3-5"><a href="#cb3-5" aria-hidden="true" tabindex="-1"></a> <ページ数の偶奇に応じて>={</span>
<span id="cb3-6"><a href="#cb3-6" aria-hidden="true" tabindex="-1"></a> <表示項目></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>のようになります.キー名は省略することもできます.例えば次のように指定します.</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> tate={</span>
<span id="cb4-5"><a href="#cb4-5" aria-hidden="true" tabindex="-1"></a> odd={奇数ページの右上に縦書きで表示},</span>
<span id="cb4-6"><a href="#cb4-6" aria-hidden="true" tabindex="-1"></a> even={偶数ページの右上に縦書きで表示},</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> yoko={右上に横書きで表示}, <span class="co">% ページの偶奇によらず共通</span></span>
<span id="cb4-9"><a href="#cb4-9" aria-hidden="true" tabindex="-1"></a> corner={右上角に横書きで表示},</span>
<span id="cb4-10"><a href="#cb4-10" aria-hidden="true" tabindex="-1"></a> in-yoko={右上版面内に横書きで表示},</span>
<span id="cb4-11"><a href="#cb4-11" aria-hidden="true" tabindex="-1"></a> in-tate={右上版面内に縦書きで表示},</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={中央下の左に表示}, <span class="co">% odd=, even=も使用可能</span></span>
<span id="cb4-15"><a href="#cb4-15" aria-hidden="true" tabindex="-1"></a> right={中央下の右に表示},</span>
<span id="cb4-16"><a href="#cb4-16" aria-hidden="true" tabindex="-1"></a> in={中央下の版面内に表示},</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> center-gutter={</span>
<span id="cb4-19"><a href="#cb4-19" aria-hidden="true" tabindex="-1"></a> above={ノド側中央の上側に表示},</span>
<span id="cb4-20"><a href="#cb4-20" aria-hidden="true" tabindex="-1"></a> below={ノド側中央の下側に表示},</span>
<span id="cb4-21"><a href="#cb4-21" aria-hidden="true" tabindex="-1"></a> },</span>
<span id="cb4-22"><a href="#cb4-22" aria-hidden="true" tabindex="-1"></a> }</span>
<span id="cb4-23"><a href="#cb4-23" aria-hidden="true" tabindex="-1"></a>}</span></code></pre></div>
<p>場所は<code>top/bottom/center</code>と<code>left/right/center/gutter/fore-edge</code>の可能な組み合わせが指定可能です.各項目に<code>\thepage</code>を指定するとページ数を出力できます.</p>
<p>次のような指定も可能です.</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> tate={左上に縦書き}, <span class="co">% 場所が省略されるとtop-leftと見なされる.</span></span>
<span id="cb5-4"><a href="#cb5-4" aria-hidden="true" tabindex="-1"></a> odd={左上奇数ページ}, <span class="co">% 省略されたのでyokoと見なされる.</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={右上奇数ページ} <span class="co">% ここもyokoが省略されている.</span></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>トンボ自身の太さを指定します.</p>
<h3 id="-color"><code> color</code></h3>
<p>トンボの色.この機能を利用するには,あらかじめ<code>\color</code>を定義するパッケージ(<code>color</code>パッケージまたはその派生)を読み込んでおく必要があります.ここでの指定は次のようにして<code>\color</code>命令に変換されます.</p>
<ul>
<li><p><code>cy</code>や<code>myk</code>のように<code>cmyk</code>という文字列の一部の場合は,<code>cmyk</code>で指定された色のみの色になります.例えば<code>color=cy</code>は<code>\color[cmyk]{1,0,1,0}</code>となります.</p></li>
<li><p>そうでない場合は<code>\color</code>の引数に回されます.<code>[***]</code>という形が先行する場合は,<code>\color</code>のオプションとして扱われます.例えば以下のようになります.</p>
<ul>
<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></li>
</ul>
<h3 id="trimmarks_pattern"><code>trimmarks_pattern</code></h3>
<p>トンボの形.直接の描画コードを指定します.次のように<code>centers</code>に指定すると,上下左右の真ん中のトンボの形が変わります.指定するのは上の真ん中のトンボの描画コードであり,そのほかの場所にはそれを回転したものが描画されます.なお,指定前に<code>graphicx</code>パッケージを読み込んでおく必要があります.また<code>\jlreqtrimmarkswidth</code>には</p>
<div class="sourceCode" id="cb6"><pre
class="sourceCode latex"><code class="sourceCode latex"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\jlreqtrimmarkssetup</span>{</span>
<span id="cb6-2"><a href="#cb6-2" aria-hidden="true" tabindex="-1"></a> trimmarks_pattern = {</span>
<span id="cb6-3"><a href="#cb6-3" aria-hidden="true" tabindex="-1"></a> centers = {</span>
<span id="cb6-4"><a href="#cb6-4" aria-hidden="true" tabindex="-1"></a> <span class="fu">\raisebox</span>{3mm}{</span>
<span id="cb6-5"><a href="#cb6-5" aria-hidden="true" tabindex="-1"></a> <span class="fu">\vrule</span> width10mm height<span class="fu">\jlreqtrimmarkswidth</span> depth 0pt</span>
<span id="cb6-6"><a href="#cb6-6" aria-hidden="true" tabindex="-1"></a> <span class="fu">\vrule</span> height10mm width<span class="fu">\jlreqtrimmarkswidth</span> depth 3mm</span>
<span id="cb6-7"><a href="#cb6-7" aria-hidden="true" tabindex="-1"></a> <span class="fu">\vrule</span> width10mm height<span class="fu">\jlreqtrimmarkswidth</span> depth 0pt</span>
<span id="cb6-8"><a href="#cb6-8" aria-hidden="true" tabindex="-1"></a> }</span>
<span id="cb6-9"><a href="#cb6-9" aria-hidden="true" tabindex="-1"></a> }</span>
<span id="cb6-10"><a href="#cb6-10" aria-hidden="true" tabindex="-1"></a> }</span>
<span id="cb6-11"><a href="#cb6-11" aria-hidden="true" tabindex="-1"></a>}</span></code></pre></div>
<p>上下左右の形を個別に指定することもできます.例えば上の真ん中のみ変更するには<code>top-center=<描画コード></code>を指定します.同様に<code>bottom-center</code>,<code>left-center</code>,<code>right-center</code>が指定できます.個別指定には<code>graphicx</code>パッケージは不要です.</p>
<h2 id="ライセンス">ライセンス</h2>
<p>このパッケージは二条項BSDライセンスの元で配布されています.詳しくは<a
href="LICENSE">LICENSE</a>をご覧ください.</p>
<h2 id="履歴">履歴</h2>
<ul>
<li>2018-05-19
<ul>
<li>最初のバージョン</li>
</ul></li>
<li>2018-06-17
<ul>
<li>バグ修正.</li>
</ul></li>
<li>2018-08-08
<ul>
<li><code>trimmarks_paper</code>を拡張.</li>
<li>パッケージオプション<code>landscape</code>を追加.</li>
</ul></li>
<li>2018-09-01
<ul>
<li><code>bleed_margin</code>を<code>\jlreqtrimmarkssetup</code>からパッケージオプションに移した.</li>
<li><code>\mag</code>が<code>1000</code>でない場合も動くようにした(つもり)</li>
<li>バグ修正</li>
</ul></li>
<li>2018-12-10
<ul>
<li><code>\jlreqtrimmarkssetup</code>内の<code>banner</code>を拡張.</li>
</ul></li>
<li>2019-04-01
<ul>
<li><code>\jlreqtrimmarkssetup</code>内の<code>banner</code>を更に拡張.</li>
<li><code>bleed_margin</code>を拡張.</li>
</ul></li>
<li>2020-05-01
<ul>
<li><code>\jlreqtrimmarkssetup</code>の<code>banner</code>を使わない場合,<code>\@bannertoken</code>の中身を偶奇ページ両方に出力するようにした.</li>
<li><code>\jlreqtrimmarkssetup</code>の<code>banner</code>を使う場合,<code>\@bannertoken</code>の中身を無視するようにした.</li>
<li><code>\jlreqtrimmarkssetup</code>の<code>banner_font</code>が指定された場合,<code>\@bannerfont</code>を無視するようにした.</li>
</ul></li>
<li>2021-07-22
<ul>
<li>expl3コードとの親和性を高めた.</li>
</ul></li>
<li>2021-08-12
<ul>
<li><code>etoolbox</code>に依存しないようにした.</li>
</ul></li>
<li>2022-07-13
<ul>
<li>読み込み時にエラーが出るバグ修正.</li>
</ul></li>
<li>2022-11-28
<ul>
<li><code>trimmarks_pattern</code>を<code>\jlreqtrimmarkssetup</code>に追加.</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>
|