1

some backgrounds:

  • System: OS X 10.11.6 (El Capitan)
  • MacTex version: 2016
  • Software: TexShop (pTex configured exactly as here)

It is a feature of pxbabel that it provides multiple language support for pTex and upTex, such as in Chinese, Koreans, Russian, etc, through \foreignlanguge{language}{text}, and below is a document that is supposed to compile successfully.

\documentclass[a4paper,uplatex]{jsarticle}
\usepackage[english]{babel}
\usepackage[main=japanese]{pxbabel}
\begin{document}
\foreignlanguage{korean}{내가득합니다}
\end{document}

When trying to compile, however, the system returned with the following error message:

This is ptex2pdf[.lua] version 0.8.
Processing test.tex
This is e-upTeX, Version 3.14159265-p3.7-u1.21-160201-2.6 (utf8.uptex) (TeX Live 2016) (preloaded format=uplatex)
 restricted \write18 enabled.
entering extended mode
(./test.tex
pLaTeX2e <2016/09/08u01> (based on LaTeX2e <2016/03/31> patch level 3)
Babel <3.9r> and hyphenation patterns for 83 language(s) loaded.
(/usr/local/texlive/2016/texmf-dist/tex/platex/jsclasses/jsarticle.cls
Document Class: jsarticle 2016/09/08 okumura, texjporg
(/usr/local/texlive/2016/texmf-dist/tex/platex/jsclasses/jslogo.sty))
(/usr/local/texlive/2016/texmf-dist/tex/generic/babel/babel.sty
(/usr/local/texlive/2016/texmf-dist/tex/generic/babel-english/english.ldf
(/usr/local/texlive/2016/texmf-dist/tex/generic/babel/babel.def)))
(/usr/local/texlive/2016/texmf-dist/tex/platex/pxbase/pxbabel.sty
(/usr/local/texlive/2016/texmf-dist/tex/platex/pxbase/pxbase.sty
(/usr/local/texlive/2016/texmf-dist/tex/platex/pxbase/pxbase.def
(/usr/local/texlive/2016/texmf-dist/tex/platex/pxbase/pxbase.def))
(/usr/local/texlive/2016/texmf-dist/tex/platex/pxbase/ifuptex.sty)
(/usr/local/texlive/2016/texmf-dist/tex/platex/pxbase/pxbsjc.def))
(/usr/local/texlive/2016/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/local/texlive/2016/texmf-dist/tex/platex/pxbase/pxbasenc.def))
(./test.aux) [1] (./test.aux) )
Output written on test.dvi (1 page, 368 bytes).
Transcript written on test.log.
test.dvi -> test.pdf
[1
kpathsea: Running mktexpk --mfmode / --bdpi 600 --mag 0+555/600 --dpi 555 uphysmjm-h
mktexpk: don't know how to create bitmap font for uphysmjm-h.
mktexpk: perhaps uphysmjm-h is missing from the map file.
kpathsea: Appending font creation commands to missfont.log.

dvipdfmx:warning: Could not locate a virtual/physical font for TFM "uphysmjm-h".
dvipdfmx:warning: >> There are no valid font mapping entry for this font.
dvipdfmx:warning: >> Font file name "uphysmjm-h" was assumed but failed to locate that font.
dvipdfmx:fatal: Cannot proceed without .vf or "physical" font for PDF output...

Output file removed.
ptex2pdf processing of test.tex failed.

From "Could not locate a virtual/physical font for TFM "uphysmjm-h"" It seems that the code works but the system was unable to find the font for the Korean characters.

From other sources, I know that pxbabel is using this Korean font: http://kldp.net/unfonts/

I have spent hours looking at the [/usr/local/texlive] without any clue... is there any way that I can help the system connect between the pxbabel package to the Korean fonts it needs?

  • You say "pxbabel is using this Korean font (= UnFont)", but it's not true; pxbabel does nothing about physical font specification. Set fontmap for dvipdfmx properly. – Hironobu YAMASHITA Sep 19 '16 at 6:27
3

Pxbabel does nothing about "physical" font settings. So, you have to tell dvipdfmx which font you are going to use.

The easiest way to do that may be:

\documentclass[a4paper,uplatex]{jsarticle}
\usepackage[english]{babel}
\usepackage[main=japanese]{pxbabel}
\AtBeginDvi{\special{pdf:mapline uphysmjm-h UniKS-UTF16-H UnBatang.ttf}}
\AtBeginDvi{\special{pdf:mapline uphysmjm-v UniKS-UTF16-V UnBatang.ttf}}
\AtBeginDvi{\special{pdf:mapline uphygt-h UniKS-UTF16-H UnDotum.ttf}}
\AtBeginDvi{\special{pdf:mapline uphygt-v UniKS-UTF16-V UnDotum.ttf}}
\begin{document}
\foreignlanguage{korean}{내가득합니다}%
\foreignlanguage{korean}{\textgt{내가득합니다}}
\end{document}

Of course, first you have to install these fonts (.ttf) into your $TEXMFLOCAL (e.g. /usr/local/texlive/texmf-local/fonts/truetype/unfonts), and run sudo mktexlsr.

Update (2017-01-14): Norbert and I developed new map files for Chinese and Korean fonts, and the changes has been applied to TeX Live r42939--r42951. Now Korean fonts default to baekmuk, so the error will never happen after the update of your installation. Also, you can change the default font settings from baekmuk to unfonts by

(sudo) updmap-sys --setoption koEmbed unfonts

command.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.