jlreq-trimmarks

What is this?

This package outputs trim (register) marks. It works with LuaTeX-ja / pLaTeX / upLaTeX / dvipdfmx / Dvips / dviout and any document class (not only with jlreq class). It provides the following.

Note that this package is independent from Requirements for Japanese Text Layout (JLReq). JLReq says nothing about trim marks.

Installation

Move jlreq-trimmarks.sty and jlre-helpers.sty to $TEXMF/tex/latex/jlreq.

How to use

Load it by \usepackage with specifying the TeX engine and the DVI driver.

\usepackage[dvipdfmx,platex]{jlreq-trimmarks}

Do not use tombow option in the document class.

Note

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., bxpapersize.

Options

The following package options (keyval style) are available.

platex, uplatex, lulatex

Set the engine. If it is not specified, then the engine is

dvipdfmx, dvips, dviout

Set the dvi driver. You do not have to specify it when using the engine lualatex. If it is not specified (with platex or uplatex), then dvipdfmx is used.

trimmarks_paper

Set the size of the paper including trim marks.

landscape

Swap the width and the height. This swaps only the width and height which is specified with the option trimmarks_paper. For example, landscape,trimmarks_paper=+{1cm,2cm}, adds 1cm to the height and 2cm to the width. But the current paper size is not swapped.

show

Specify the types of trim marks which the package outputs. It is specified with the comma separated list like show={trimmarks,banner,digital}. If no argument is given, everything will be showed.

bleed_margin

Set the bleed margin. You can also specify as follows.

\usepackage[bleed_margin={top=3mm,bottom=5mm,gutter=0mm,fore-edge=2mm}]{jlreq-trimmarks}

\jlreqtrimmarkssetup

Set the additional settings with the keyval style.

The things which the package outputs when show=banner 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

\jlreqtrimmarkssetup{
  banner={
    <Position (top/bottom, left/right, center)>={
      <more precise position>={
        <odd/even>={
          <content>
        }
      }
    }
  }
}

Here is an example.

\jlreqtrimmarkssetup{
  banner={
    top-right={
      vertical={
        odd={In the right of the top, only in odd pages, vertical mode.},
        even={In the right of the top, only in even pages, vertical mode.},
      },
      horizontal={In the right of the top, horizontal mode.}, % does not depend on the parity of the page number
      corner={In the corner of the right of the top, horizontal mode.},
      in-horizontal={In the right of the top, horizontal mode, in the trim area.},
      in-vertical={In the right of the top, vertical mode, in the trim area.},
    },
    bottom-center={
      left={In the left in the center of the bottom}, % odd=, even= is also available
      right={In the right in the center of the bottom},
      in={In the trim area in the center of the bottom.},
    }
  }
}

A possible combination of top/bottom/center and left/right/center/gutter/fore-edge can be used for the position. You can use \thepage to output the number of the page.

The keys can be ommited. For example:

\jlreqtrimmarkssetup{
  banner={
    vertical={Vertical mode, in the top of the left},
    odd={In the top of the left, only in odd pages.}, % regarded as `horizontal`
    top-right={
      odd={In the top of the right, only in odd pages, horizontal mode.}
    }
  }
}

trimmarks_width

Set the width of trim marks.

color

Set the color of the trim marks. You have to load a package which defines \color (`color' package or its variant) before loading this package to use this function. Here are some examples of specifying the color.

LICENSE

This package is distributed under the BSD 2-Clause License. See LICENSE.

CHANGELOG


Noriyuki Abe https://github.com/abenori/jlreq