| 1 |
BXpapersize Package |
| 2 |
=================== |
| 3 |
|
| 4 |
LaTeX: To synchronize output paper size with layout paper size |
| 5 |
|
| 6 |
As is well known, in LaTeX processing layout paper size specified by |
| 7 |
document class options is not automatically applied to output paper |
| 8 |
size. By employing this package, authors can make output paper size |
| 9 |
be identical to layout paper size. They can also set output paper size |
| 10 |
to arbitrary values. |
| 11 |
|
| 12 |
It should be noted that there are many packages that try to synchronize |
| 13 |
paper sizes, possibly in a slightly different manner. This package |
| 14 |
allows authors to decide whether the setting made by this package |
| 15 |
should have higher or lower priority over the settings made by others. |
| 16 |
|
| 17 |
### System requirement |
| 18 |
|
| 19 |
* TeX format: LaTeX. |
| 20 |
* TeX engine: Anything. |
| 21 |
* DVI driver (in DVI mode): dvips, dvipdfmx, or whatever supports |
| 22 |
‘papersize’ special. |
| 23 |
* Dependent packages: |
| 24 |
- ifpdf, ifxetex, ifluatex, ifvtex |
| 25 |
- xkeyval |
| 26 |
- atbegshi |
| 27 |
- pxatbegshi: on (u)pLaTeX |
| 28 |
|
| 29 |
### Installation |
| 30 |
|
| 31 |
- `*.sty` → $TEXMF/tex/latex/BXpapersize |
| 32 |
|
| 33 |
### License |
| 34 |
|
| 35 |
This package is distributed under the MIT License. |
| 36 |
|
| 37 |
|
| 38 |
The bxpapersize Package |
| 39 |
----------------------- |
| 40 |
|
| 41 |
### Package Loading |
| 42 |
|
| 43 |
\usepackage[<option>,...]{bxpapersize} |
| 44 |
|
| 45 |
The available options are described hereafter. |
| 46 |
|
| 47 |
#### Annihilation |
| 48 |
|
| 49 |
* `disabled`: Disables all functionality of this package. It may be |
| 50 |
useful to resolve conflict caused by some packages depending on |
| 51 |
the bxpapersize package. Note that once `disabled` is used there |
| 52 |
is no way to enable the functionality. |
| 53 |
* `nodvidriver`: A synonym for `disabled`. |
| 54 |
* `autodvidriver`: Negation of `disabled`/`nodvidriver`. |
| 55 |
Note: Options `dvips` and `dvipdfmx` also negate `disabled`. |
| 56 |
|
| 57 |
#### Priority |
| 58 |
|
| 59 |
**Important**: The `priority` option is not (yet) supported under the |
| 60 |
new LaTeX kernel 2020-10-01. |
| 61 |
|
| 62 |
* `priority=<value>`: In DVI mode, this decides the priority of the |
| 63 |
‘papersize’ specials issued by this package relative to the |
| 64 |
‘papersize’ specials issued by others. |
| 65 |
The set of valid values is: |
| 66 |
- `low`: Priotizes specials by others. |
| 67 |
- `middle`/`default` (default): Does not care about priority. |
| 68 |
- `high`: Priotizes specials by this package. |
| 69 |
Note: The priority setting will be ignored in PDF mode. |
| 70 |
* `olddvips`: Must be specified when you use dvips older than that |
| 71 |
included in TeX Live 2017, so as to make the `priority` option |
| 72 |
work correctly. |
| 73 |
|
| 74 |
#### Other options |
| 75 |
|
| 76 |
Any key-value pairs that are valid in `\papersizesetup` can be used |
| 77 |
as package options. |
| 78 |
|
| 79 |
% to begin with deactivated state |
| 80 |
\usepackage[active=false]{bxpapersize} |
| 81 |
|
| 82 |
Note that the default values of the `\papersizesetup` command are also |
| 83 |
applied when the package is loaded. For example, `size=real` will be |
| 84 |
in effect when this package is loaded without the `size` option key. |
| 85 |
|
| 86 |
### Usage |
| 87 |
|
| 88 |
Once the package is loaded, the output paper size will be adjusted, |
| 89 |
respecting the settings given by the package options. By default, the |
| 90 |
output papersize will be made identical to the layout paper size. |
| 91 |
|
| 92 |
% For many cases, it's enough. |
| 93 |
\usepackage{bxpapersize} |
| 94 |
|
| 95 |
You can change the settings of this package using `\papersizesetup` |
| 96 |
command, invoked as follows: |
| 97 |
|
| 98 |
\papersizesetup[<key>=<value>,...] |
| 99 |
|
| 100 |
The available keys are listed below: |
| 101 |
|
| 102 |
* `active=true|false`: Temporarily activates/deactivates the function |
| 103 |
of this package. |
| 104 |
* `size=<value>`: Decides what the output paper size should be. |
| 105 |
Available values are: |
| 106 |
- `real`: The output should be equal to the layout paper size |
| 107 |
given by `\paperwidth/height`, except that the stock paper size |
| 108 |
given by `\stockwidth/height` will be employed instead when |
| 109 |
it is available. |
| 110 |
- `real*`: The output should be equal to the layout paper size, |
| 111 |
even if the stock paper size is available. |
| 112 |
- `{<width>,<height>}`: The output should be equal to the |
| 113 |
specified values. |
| 114 |
- `<width>*<height>`: The alternative form of `{<width>,<height>}`. |
| 115 |
It is provided because option strings including braces are not |
| 116 |
permitted in the package option list. |
| 117 |
- `<papersize-name>`: The output should be equal to the given |
| 118 |
size. The set of available paper-size names is the same as in the |
| 119 |
[geometry package] and is listed below: |
| 120 |
a0paper--a6paper, b0paper--b6paper, c0paper--c6paper, b0j--b6j, |
| 121 |
ansiapaper--ansiepaper, letterpaper, legalpaper, executivepaper, |
| 122 |
screen. |
| 123 |
- `landscape`, `truedimen`: These are used in combination with |
| 124 |
`<papersize-name>` options, and have the same meaning as in the |
| 125 |
geometry package. |
| 126 |
- `box`: The output should be the actual size of the TeX box |
| 127 |
to be shipped out. It is provided for advanced users. |
| 128 |
|
| 129 |
[geometry package]: https://www.ctan.org/pkg/geometry |
| 130 |
|
| 131 |
Note that, however, what happens about output paper size when some |
| 132 |
settings are changed in the midst of pages differs among TeX engines |
| 133 |
and/or DVI drivers. Thus such usage should be employed only by advanced |
| 134 |
users. |
| 135 |
|
| 136 |
The comamnd `\bxpapersizesetup` is a synonym for `\papersizesetup`, |
| 137 |
so as to cope with command name conflict. Namely, `\papersizesetup` |
| 138 |
will be not (re)defined if the command of that name is already defined, |
| 139 |
but `\bxpapersizesetup` will be always provided. |
| 140 |
|
| 141 |
|
| 142 |
Revision History |
| 143 |
---------------- |
| 144 |
|
| 145 |
* Version 0.6 ‹2022/04/28› |
| 146 |
- Add `autodvidriver` option. |
| 147 |
- Rearrange spec on driver options. |
| 148 |
* Version 0.5 ‹2020/10/01› |
| 149 |
- Support LaTeX kernel 2020/10/01. |
| 150 |
(But priority setting is not yet supported.) |
| 151 |
* Version 0.4 ‹2019/10/05› |
| 152 |
- Load pxatbegshi to properly handle pTeX tate mode. |
| 153 |
- Remove (experimental) `adjustmag` option. |
| 154 |
* Version 0.3b ‹2017/10/08› |
| 155 |
- Support pTeX-ng (ApTeX) engine properly. |
| 156 |
- (Experimental) Add `adjustmag` option. |
| 157 |
* Version 0.3a ‹2017/05/02› |
| 158 |
- Support format `size=<width>*<height>` |
| 159 |
* Version 0.3 ‹2017/02/08› |
| 160 |
- As to `size=real`, the stock size becomes taken into account, |
| 161 |
and the new value `real*` is provided. |
| 162 |
- Make `nodvidriver` synonym for `disabled`. |
| 163 |
- Make `\papersizesetup` synonym for `\bxpapersizesetup`. |
| 164 |
- Add `olddvips`. |
| 165 |
- Support `size=<papersize-name>`. together with `landscape` and |
| 166 |
`truedimen`. |
| 167 |
* Version 0.2 ‹2016/03/26› |
| 168 |
- The first public version. |
| 169 |
|
| 170 |
-------------------- |
| 171 |
Takayuki YATO (aka. "ZR") |
| 172 |
https://github.com/zr-tex8r |