Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Supported ways to set fonts with uplatex that don't affect open_bracket_pos? #136

Open
glandium opened this issue Jul 24, 2024 · 6 comments

Comments

@glandium
Copy link

Take the following document:

\documentclass[
  uplatex,
  tate,
  book,
  paper=a6,
  hanging_punctuation,
  open_bracket_pos=zenkakunibu_nibu,
  number_of_lines=16,
]{jlreq}
\title{テスト}
\usepackage{bxpapersize}

\begin{document}
\chapter{てすと}
「てすと」

てすと
\end{document}

I was trying to use pxchfon to be able to switch fonts in a convenient way, but to be able to use more than \setminchofont and \setgothicfont, you either need pxbabel (for e.g. \setkoreanminchofont) or otf (for e.g. \setboldminchofont).

Unfortunately, adding either \usepackage[burasage,deluxe]{otf} or \usepackage[main=japanese]{pxbabel} in the above document makes open_bracket_pos ignored (notwithstanding other differences).

Are there other options? Or maybe there's a jlreq bug here?

@abenori
Copy link
Owner

abenori commented Jul 24, 2024

The reason is the following: open_bracket_pos is implemented using special JFM, but otf package uses its own JFM and therefore the setting by jlreq class file is ignored. Using \usepackage{jlreq-deluxe} instead of otf package should work. See https://github.com/h20y6m/jlreq-deluxe.
I have no idea about pxbabel.

@glandium
Copy link
Author

Unfortunately, for some reason I don't understand, using jlreq-deluxe fails:

pathsea: Running mktextfm zu-bzjlreq--upnmlminrn-v
/usr/share/texlive/texmf-dist/web2c/mktexnam: Could not map typeface abbreviation u- for zu-bzjlreq--upnmlminrn-v.
/usr/share/texlive/texmf-dist/web2c/mktexnam: Need to update /usr/share/texlive/texmf-dist/fonts/map/fontname/special.map?
mktextfm: Running mf-nowin -progname=mf \mode:=ljfour; mag:=1; ; nonstopmode; input zu-bzjlreq--upnmlminrn-v
This is METAFONT, Version 2.71828182 (TeX Live 2025/dev/Debian) (preloaded base=mf)


kpathsea: Running mktexmf zu-bzjlreq--upnmlminrn-v
! I can't find file `zu-bzjlreq--upnmlminrn-v'.
<*> ...nonstopmode; input zu-bzjlreq--upnmlminrn-v
                                                  
Please type another input file name
! Emergency stop.
<*> ...nonstopmode; input zu-bzjlreq--upnmlminrn-v
                                                  
Transcript written on mfput.log.
grep: zu-bzjlreq--upnmlminrn-v.log: No such file or directory
mktextfm: `mf-nowin -progname=mf \mode:=ljfour; mag:=1; ; nonstopmode; input zu-bzjlreq--upnmlminrn-v' failed to make zu-bzjlreq--upnmlminrn-v.tfm.
kpathsea: Appending font creation commands to /tmp/missfont.log.

! Font JT2/hmc/m/n/10=zu-bzjlreq--upnmlminrn-v at 10.0pt not loadable: Metric (
TFM) file not found.
<to be read again> 
                   relax 
l.15 \begin{document}

(that's with both jlreq-deluxe and pxchfon)

@glandium
Copy link
Author

... but only when enabling unicode in pxchfon

@abenori
Copy link
Owner

abenori commented Jul 25, 2024

Can you explain what you did?

@glandium
Copy link
Author

This works:

\usepackage{jlreq-deluxe}
\usepackage{pxchfon}

This doesn't:

\usepackage{jlreq-deluxe}
\usepackage[unicode]{pxchfon}

@h20y6m
Copy link

h20y6m commented Jul 25, 2024

The jlreq-deluxe package does not provide the zu-* JFM/VFs needed for pxchfon with the unicode option.
If you would like to use them, you can generate them using the jfmutil command.

$ jfmutil jodel --unicode ubzjlreq bzjlreq
$ jfmutil jodel --unicode ubzjlreqv bzjlreq

("b": for hanging_punctuation, "z": for open_bracket_pos=zenkakunibu_nibu)

Put the generated .tfm/.vf files in a directory where your TeX and DVI-ware can find them (e.g. ~/texmf/fonts/{tfm,vf}/).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants