summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/bxnewfont/README.md
blob: 34ba546697e0c098761c60cf152b7b25682f2a3f (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
BXnewfont Package
=================

LaTeX: Enhanced `\newfont` command

This package provides a new command `\newfontx`. It is similar to
the old (and deprecated) command `\newfont` in function, but is more
compatible with NFSS. In particular, one can safely change font size
after invoking a font command defined by `\newfontx`. The new command
will be useful to users who know much of the old '\newfont` command
but are unfamiliar with the detail of NFSS.

### System requirement

  * TeX format: LaTeX.
  * TeX engine: Anything.
  * Dependent packages: None.

### Installation

  - `*.sty` → $TEXMF/tex/latex/BXnewfont

### License

This package is distributed under the MIT License.

The bxnewfont Package
---------------------

### Package Loading

    \usepackage[<option>]{bxdvidriver}

Available options:

  * `newfont`: Makes `\newfont` an alias of `newfontx`.

### Usage

  * `\newfontx\CMD[<encoding>]{<tfm-name><at-clause>}`: Defines `\CMD`
    to be a “font command” (pseudo-fontdef token). Here the format
    of the mandatory argument is exactly same as that of `\newfont`
    (`<at-clause>` can be empty). The optional argument specifies the
    NFSS encoding name (such as `T1`) of the TFM to be used, and
    defaults to the current font encoding. (If you don’t know what
    it means, then you probably need not care about this argument.)

    When the defined `\CMD` command is invoked, the current font will
    changes to what is specified by the argument, just as the original
    `\newfont`. But unlike `\newfont`, it does not break consistency
    of LaTeX NFSS. Specifically, NFSS is set at the following state:

      - The family is what was auto-generated for `\CMD`.
      - The series is `m` and the shape is `n`.
      - The encoding and size are what was specified by the arguments
        of `\newfontx`.

    It means that further use of “LaTeX’s font commands” will
    probably result in what you will expect. In particular, font size
    can be safely changed. The use of `\itshape` has no effect ---
    of course, because LaTeX does not know the TFM name of the italic
    counterpart --- and no unfavorable effect either.

  * `\newfontx*\CMD[<encoding>]{<tfm-name>}`: Same as the `\newfontx`,
    except that “font commands” defined by `\newfontx*` does not
    fix font size (note the absence of `<at-clause>`). Namely, invoking
    `\CMD` does not change the current font size. This variant surely
    diverges from the original `\newfont`, but will be more useful.

Revision History
----------------

  * Version 0.2b ‹2017/05/01›
      - Change the rule for automatic quoting. Namely, names which are
        judged as illegal by mktextfm should be quoted.
  * Version 0.2a ‹2016/08/08›
      - Now “TFM” names can contain spaces with suitable quoting.
        This enables one to specify OpenType fonts on Unicode engines.
      - An experimental command `\newfontjascale` is added.
  * Version 0.2  ‹2016/03/27›
      - The first public version.

--------------------
Takayuki YATO (aka. "ZR")  
http://zrbabbler.sp.land.to/