Lualatex/Japanese 文档在 TeXstudio 中编译良好,但在 MacTex 中则不行

Lualatex/Japanese 文档在 TeXstudio 中编译良好,但在 MacTex 中则不行

我无法编译以下文档。

我已全新安装 MacOS 10.14,并直接从 TUG 安装了完整版 MacTex 2018 发行版。我还使用 TexLive Utility 升级了所有软件包。

然后,我从 MacPorts 安装了 TexStudio 2.12.14 并尝试编译以下文档:

%% start of file `template.tex'.
%% Copyright 2006-2015 Xavier Danaux ([email protected]).
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License version 1.3c,
% available at http://www.latex-project.org/lppl/.


\documentclass[11pt,a4paper]{moderncv}      
\usepackage[ngerman]{babel}

\moderncvstyle{classic}                             
\moderncvcolor{grey}                               

\usepackage{luatexja-fontspec}
\setmainjfont[BoldFont=IPAexGothic]{IPAexMincho} % \mcfamily
\setsansjfont{IPAexGothic} % \gtfamily
\newjfontfamily\jisninety[CJKShape=JIS1990]{IPAexMincho}
\renewcommand*{\namefont}{\fontsize{18}{20}\mdseries\upshape}
\renewcommand*{\titlefont}{\fontsize{18}{20}\mdseries\upshape}

\usepackage{multicol}
\usepackage{fontawesome}
\usepackage{footmisc} 
\usepackage[scale=0.75]{geometry}
\setlength{\hintscolumnwidth}{3.5cm}               
\usepackage{tabularx}
\usepackage{ltablex}
\usepackage{tabu}
\usepackage{longtable}
\usepackage{array}
\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\renewcommand{\arraystretch}{1.3} 
\newcolumntype{b}{X}
\newcolumntype{s}{>{\hsize=.2\hsize}X}

\usepackage{booktabs}

% personal data
\name{芭蕉}{松尾} 
\address{123-3456}{日本語をかきましょう。}{日本語をかきましょう。}
\email{[email protected]}

%----------------------------------------------------------------------------------
%            content
%----------------------------------------------------------------------------------
\begin{document}

%-----       resume       ---------------------------------------------------------

\makecvtitle

\section{headline}

\cvitem{ghi}{\textit{this should actually compile just fine}}
\section{headline}
\cventry{00/2011 -- 03/2023}{Input}{More}{Input}{}{
    \begin{itemize}
        \item I studied.
\end{itemize}}
\cventry{00/2011 -- 03/2023}{Input}{More}{Input}{}{
    \begin{itemize}
        \item Stuff
\end{itemize}}

\section{headline}

\cventry{00/2011 -- 03/2023}{Input}{More}{Input}{}
{Stuff and stuff
    \begin{itemize}
        \item This is one.
        \item And another one.
    \end{itemize}}


\section{headline\footnotemark}
\cvitemwithcomment{日本語}{C1/C1/C1}{}

\footnotetext{This is a footnote}

\end{document}

我收到以下错误(向下滚动):

LaTeX Font Warning: Font shape `JY3/IPAexMincho(0)/m/sl' undefined
(Font)              using `JY3/IPAexMincho(0)/m/n' instead on input line 52.

LaTeX Font Info:    Try loading font information for OT1+lmr on input line 52.
(/usr/local/texlive/2018/texmf-dist/tex/latex/lm/ot1lmr.fd
File: ot1lmr.fd 2009/10/30 v1.6 Font defs for Latin Modern
)
LaTeX Font Info:    Try loading font information for OML+lmm on input line 52.

(/usr/local/texlive/2018/texmf-dist/tex/latex/lm/omllmm.fd
File: omllmm.fd 2009/10/30 v1.6 Font defs for Latin Modern
)
LaTeX Font Info:    Try loading font information for OMS+lmsy on input line 52.

(/usr/local/texlive/2018/texmf-dist/tex/latex/lm/omslmsy.fd
File: omslmsy.fd 2009/10/30 v1.6 Font defs for Latin Modern
)
LaTeX Font Info:    Try loading font information for OMX+lmex on input line 52.

(/usr/local/texlive/2018/texmf-dist/tex/latex/lm/omxlmex.fd
File: omxlmex.fd 2009/10/30 v1.6 Font defs for Latin Modern
)
LaTeX Font Info:    External font `lmex10' loaded for size
(Font)              <10> on input line 52.
LaTeX Font Info:    External font `lmex10' loaded for size
(Font)              <7> on input line 52.
LaTeX Font Info:    External font `lmex10' loaded for size
(Font)              <5> on input line 52.
LaTeX Font Info:    Font shape `JY3/IPAexMincho(0)/m/n' will be
(Font)              scaled to size 6.73553pt on input line 52.
LaTeX Font Info:    Font shape `JY3/IPAexMincho(0)/m/n' will be
(Font)              scaled to size 4.8111pt on input line 52.

(/usr/local/texlive/2018/texmf-dist/tex/latex/microtype/mt-mvs.cfg
File: mt-mvs.cfg 2006/07/05 v1.1 microtype config. file: Marvosym Euro (RS)
)
\makecvheadpicturebox=\box113
\makecvheaddetailswidth=\skip88
\makecvheadpicturewidth=\skip89
\makecvheadnamebox=\box114

! Undefined control sequence.
MT@font@list .../sl/10 ,JT3/IPAexMincho(0)/m/n/10 
                                                  ,JY3/IPAexMincho(0)/m/n/10...
l.52 \makecvtitle

The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

LaTeX Font Info:    Font shape `JT3/IPAexMincho(0)/m/n' will be
(Font)              scaled to size 17.31995pt on input line 52.
LaTeX Font Info:    Font shape `JY3/IPAexMincho(0)/m/n' will be
(Font)              scaled to size 17.31995pt on input line 52.
LaTeX Font Info:    External font `lmex10' loaded for size
(Font)              <10.95> on input line 53.
LaTeX Font Info:    External font `lmex10' loaded for size
(Font)              <8> on input line 53.
LaTeX Font Info:    External font `lmex10' loaded for size
(Font)              <6> on input line 53.
LaTeX Font Info:    Font shape `JY3/IPAexMincho(0)/m/n' will be
(Font)              scaled to size 7.69775pt on input line 53.
LaTeX Font Info:    Font shape `JY3/IPAexMincho(0)/m/n' will be
(Font)              scaled to size 5.77332pt on input line 53.
LaTeX Font Info:    Font shape `JT3/IPAexMincho(0)/m/n' will be
(Font)              scaled to size 13.85594pt on input line 53.
LaTeX Font Info:    Font shape `JY3/IPAexMincho(0)/m/n' will be
(Font)              scaled to size 13.85594pt on input line 53.

LaTeX Font Warning: Font shape `JT3/IPAexMincho(0)/m/it' undefined
(Font)              using `JT3/IPAexMincho(0)/m/n' instead on input line 55.

LaTeX Font Info:    Font shape `JT3/IPAexMincho(0)/m/n' will be
(Font)              scaled to size 10.53629pt on input line 55.

LaTeX Font Warning: Font shape `JY3/IPAexMincho(0)/m/it' undefined
(Font)              using `JY3/IPAexMincho(0)/m/n' instead on input line 55.


LaTeX Font Warning: Font shape `JT3/IPAexMincho(0)/bx/n' undefined
(Font)              using `JT3/IPAexMincho(0)/m/n' instead on input line 60.

LaTeX Font Info:    Font shape `JT3/IPAexMincho(0)/m/n' will be
(Font)              scaled to size 10.53629pt on input line 60.

LaTeX Font Warning: Font shape `JY3/IPAexMincho(0)/bx/n' undefined
(Font)              using `JY3/IPAexMincho(0)/m/n' instead on input line 60.

(load cache: /Users/david/Library/texlive/2018/texmf-var/luatexja/extra_lmromans
lant10-regular.luc)
LaTeX Font Info:    Font shape `JT3/IPAexMincho(0)/m/sl' will be
(Font)              scaled to size 10.53629pt on input line 60.
LaTeX Font Info:    Font shape `JY3/IPAexMincho(0)/m/sl' will be
(Font)              scaled to size 10.53629pt on input line 60.
LaTeX Font Info:    Font shape `JT3/IPAexMincho(0)/bx/n' will be
(Font)              scaled to size 10.53629pt on input line 64.
LaTeX Font Info:    Font shape `JY3/IPAexMincho(0)/bx/n' will be
(Font)              scaled to size 10.53629pt on input line 64.


Package hyperref Warning: Token not allowed in a PDF string (Unicode):
(hyperref)                removing `\footnotemark' on input line 76.

同时还有一堆警告:

  • 您已请求包moderncvheadi', but the package provides moderncvheadi'。
  • 字体形状JT3/mc/m/it' undefined(Font) using改为 JT3/mc/m/n'
  • 字体形状JT3/IPAexMincho(0)/m/sl' undefined(Font) using 改为 JT3/IPAexMincho(0)/m/n'
  • 某些字体形状不可用,因此用默认字体形状代替。

我认为这与字体(IPAexMincho)不存在有关,但包 ipaex 实际上已安装(包含在 MacTex 中,虽然我不确定这是否是我需要的,因为在 Linux 中包的名称不同)。

此外,此处的文档编译得非常好,因此不可能缺少字体:

\documentclass{ltjsarticle}

\usepackage{luatexja-fontspec}

\setmainfont[Ligatures=TeX]{TeXGyreTermes}
\setsansfont[Ligatures=TeX]{TeXGyreHeros}
\setmainjfont[BoldFont=IPAexGothic]{IPAexMincho}
\setsansjfont{IPAexGothic}
\newjfontfamily\jisninety[CJKShape=JIS1990]{IPAexMincho}

\begin{document}

mainのフォント.  {\bfseries boldのフォント.  }{\sffamily\gtfamily sansのフォント.  }

通常の「辻」.  {\jisninety JIS90字形の「辻」.  }


\end{document}

如能得到帮助将非常感激:)

我也尝试过使用另一个前端,TexMaker 5.0.3,从相应的网站作为 dmg 安装。

这是第一个文档对应的文件列表,它比我的 Linux 机器(编译良好)上的更为最新:

 *File List*
moderncv.cls    2015/07/28 v2.0.0 modern curriculum vitae and letter document cl
ass
  size11.clo    2018/09/03 v1.4i Standard LaTeX file (size option)
etoolbox.sty    2018/08/19 v2.5f e-TeX tools for LaTeX (JAW)
  ifthen.sty    2014/09/29 v1.1c Standard LaTeX ifthen package (DPC)
  xcolor.sty    2016/05/11 v2.12 LaTeX color extensions (UK)
   color.cfg    2016/01/02 v1.6 sample color configuration
  luatex.def    2018/01/08 v1.0l Graphics/color driver for luatex
colortbl.sty    2018/12/12 v1.0d Color table columns (DPC)
   array.sty    2018/12/30 v2.4k Tabular extension package (FMi)
 ifxetex.sty    2010/09/12 v0.6 Provides ifxetex conditional
ifluatex.sty    2016/05/16 v1.4 Provides the ifluatex switch (HO)
 fontenc.sty
   t1enc.def    2018/08/11 v2.0j Standard LaTeX file
   t1lmr.fd    2009/10/30 v1.6 Font defs for Latin Modern
 lmodern.sty    2009/10/30 v1.6 Latin Modern Fonts
     url.sty    2013/09/16  ver 3.4  Verb mode for urls, etc.
graphicx.sty    2017/06/01 v1.1a Enhanced LaTeX Graphics (DPC,SPQR)
  keyval.sty    2014/10/28 v1.15 key=value parser (DPC)
graphics.sty    2017/06/25 v1.2c Standard LaTeX Graphics (DPC,SPQR)
    trig.sty    2016/01/03 v1.10 sin cos tan (DPC)
graphics.cfg    2016/06/04 v1.11 sample graphics configuration
fancyhdr.sty    2019/01/31 v3.10 Extensive control of page headers and footers
tweaklist.sty    
    calc.sty    2017/05/25 v4.3 Infix arithmetic (KKT,FJ)
  xparse.sty    2018-10-17 L3 Experimental document command parser
   expl3.sty    2019-02-15 L3 programming layer (loader) 
expl3-code.tex    2019-02-15 L3 programming layer 
l3pdfmode.def    2019-02-15 v L3 Experimental driver: PDF mode
microtype.sty    2018/01/14 v2.7a Micro-typographical refinements (RS)
microtype-luatex.def    2018/01/14 v2.7a Definitions specific to luatex (RS)
microtype.cfg    2018/01/14 v2.7a microtype main configuration file (RS)
moderncvcollection.sty    2015/07/28 v2.0.0 moderncv collections
moderncvcompatibility.sty    2015/07/28 v2.0.0 modern curriculum vitae and lette
r compatibility patches
   babel.sty    2018/11/13 3.27 The Babel package
 ngerman.ldf    2018/12/08 v2.11 German support for babel (post-1996 orthography
)
moderncvstyleclassic.sty    2015/07/28 v2.0.0 modern curriculum vitae and letter
 style scheme: classic
moderncviconsmarvosym.sty    2015/07/28 v2.0.0 modern curriculum vitae and lette
r icons: marvosym
    tikz.sty    2019/02/02 v3.1.1 (3.1.1)
     pgf.sty    2019/02/02 v3.1.1 (3.1.1)
  pgfrcs.sty    2019/02/02 v3.1.1 (3.1.1)
everyshi.sty    2001/05/15 v3.00 EveryShipout Package (MS)
  pgfrcs.code.tex
 pgfcore.sty    2019/02/02 v3.1.1 (3.1.1)
  pgfsys.sty    2019/02/02 v3.1.1 (3.1.1)
  pgfsys.code.tex
pgfsyssoftpath.code.tex    2019/02/02 v3.1.1 (3.1.1)
pgfsysprotocol.code.tex    2019/02/02 v3.1.1 (3.1.1)
 pgfcore.code.tex
pgfcomp-version-0-65.sty    2019/02/02 v3.1.1 (3.1.1)
pgfcomp-version-1-18.sty    2019/02/02 v3.1.1 (3.1.1)
  pgffor.sty    2019/02/02 v3.1.1 (3.1.1)
 pgfkeys.sty    
 pgfkeys.code.tex
 pgfmath.sty    
 pgfmath.code.tex
  pgffor.code.tex
    tikz.code.tex
moderncvheadi.sty    2015/07/28 v2.0.0 modern curriculum vitae and letter header
 variant: 1
moderncvbodyi.sty    2015/07/28 v2.0.0 modern curriculum vitae and letter body v
ariant: 1
    umvs.fd
moderncvcolorgrey.sty    2015/07/28 v2.0.0 modern curriculum vitae and letter co
lor scheme: grey
luatexja-fontspec.sty    2019/01/28 fontspec support of LuaTeX-ja
l3keys2e.sty    2018-10-17 LaTeX2e option processing using LaTeX3 keys
luatexja.sty    2019/01/28 Japanese Typesetting with Lua(La)TeX
luatexja-core.sty    2017/11/12 Core of LuaTeX-ja
luatexbase.sty    2015/10/04 v1.3 luatexbase interface to LuaTeX 
ctablestack.sty    2015/10/01 v1.0 Catcode table stable support
 ltxcmds.sty    2016/05/16 v1.23 LaTeX kernel commands for general use (HO)
pdftexcmds.sty    2018/09/10 v0.29 Utility functions of pdfTeX for LuaTeX (HO)
infwarerr.sty    2016/05/16 v1.4 Providing info/warning/error messages (HO)
   ifpdf.sty    2018/09/07 v3.3 Provides the ifpdf switch
 xkeyval.sty    2014/12/03 v2.7a package option processing (HA)
 xkeyval.tex    2014/12/03 v2.7a key=value parser (HA)
atbegshi.sty    2016/06/09 v1.18 At begin shipout hook (HO)
everyhook.sty    2014/11/26 v1.2 (SVN Rev: 12)\ Hooks for low level TeX everyX p
rimitives.
svn-prov.sty    2010/04/24 v3.1862 Package Date/Version from SVN Keywords
ltj-base.sty    2017/05/05
ltj-latex.sty    2018/08/24 LaTeX support of LuaTeX-ja
lltjfont.sty    2019/01/29 Patch to NFSS2 for LuaTeX-ja
   tuenc.def    2018/08/11 v2.0j Standard LaTeX file
everysel.sty    2011/10/28 v1.2 EverySelectfont Package (MS)
lltjdefs.sty    2019/02/11 Default font settings of LuaTeX-ja
lltjcore.sty    2018/06/15 Patch to LaTeX2e Kernel for LuaTeX-ja
filehook.sty    2011/10/12 v0.5d Hooks for input files
lltjp-geometry.sty    2018/01/19 Patch to geometry for LuaTeX-ja with vertical w
riting mode
luatexja-compat.sty    2018/03/29 Compatibility with pTeX
fontspec.sty    2019/02/12 v2.7b Font selection for XeLaTeX and LuaLaTeX
fontspec-luatex.sty    2019/02/12 v2.7b Font selection for XeLaTeX and LuaLaTeX
 fontenc.sty
   tuenc.def    2018/08/11 v2.0j Standard LaTeX file
fontspec.cfg
luatexja-fontspec-26h.sty    2019/01/28 fontspec support of LuaTeX-ja
multicol.sty    2018/12/27 v1.8v multicolumn formatting (FMi)
fontawesome.sty    2016/05/15 v4.6.3.1 font awesome icons
fontawesomesymbols-generic.tex
fontawesomesymbols-xeluatex.tex
footmisc.sty    2011/06/06 v5.5b a miscellany of footnote facilities
geometry.sty    2018/04/16 v5.8 Page Geometry
  ifvtex.sty    2016/05/16 v1.6 Detect VTeX and its facilities (HO)
tabularx.sty    2016/02/03 v2.11b `tabularx' package (DPC)
 ltablex.sty    2014/08/13 v1.1 Modified tabularx
longtable.sty    2014/10/28 v4.11 Multi-page Table package (DPC)+ FMi change
    tabu.sty    2019/01/11 v2.9 - flexible LaTeX tabulars (FC+tabu-fixed)
varwidth.sty    2009/03/30 ver 0.92;  Variable-width minipages
booktabs.sty    2016/04/27 v1.618033 publication quality tables
hyperref.sty    2018/11/30 v6.88e Hypertext links for LaTeX
hobsub-hyperref.sty    2016/05/16 v1.14 Bundle oberdiek, subset hyperref (HO)
hobsub-generic.sty    2016/05/16 v1.14 Bundle oberdiek, subset generic (HO)
  hobsub.sty    2016/05/16 v1.14 Construct package bundles (HO)
 intcalc.sty    2016/05/16 v1.2 Expandable calculations with integers (HO)
etexcmds.sty    2016/05/16 v1.6 Avoid name clashes with e-TeX commands (HO)
kvsetkeys.sty    2016/05/16 v1.17 Key value parser (HO)
kvdefinekeys.sty    2016/05/16 v1.4 Define keys (HO)
luatex-loader.sty    2016/05/16 v0.6 Lua module loader (HO)
pdfescape.sty    2016/05/16 v1.14 Implements pdfTeX's escape features (HO)
bigintcalc.sty    2016/05/16 v1.4 Expandable calculations on big integers (HO)
  bitset.sty    2016/05/16 v1.2 Handle bit-vector datatype (HO)
uniquecounter.sty    2016/05/16 v1.3 Provide unlimited unique counter (HO)
letltxmacro.sty    2016/05/16 v1.5 Let assignment for LaTeX macros (HO)
 hopatch.sty    2016/05/16 v1.3 Wrapper for package hooks (HO)
xcolor-patch.sty    2016/05/16 xcolor patch
atveryend.sty    2016/05/16 v1.9 Hooks at the very end of document (HO)
refcount.sty    2016/05/16 v3.5 Data extraction from label references (HO)
 hycolor.sty    2016/05/16 v1.8 Color options for hyperref/bookmark (HO)
 auxhook.sty    2016/05/16 v1.4 Hooks for auxiliary files (HO)
kvoptions.sty    2016/05/16 v3.12 Key value format for package options (HO)
  pd1enc.def    2018/11/30 v6.88e Hyperref: PDFDocEncoding definition (HO)
hyperref.cfg    2002/06/06 v1.2 hyperref configuration of TeXLive
   puenc.def    2018/11/30 v6.88e Hyperref: PDF Unicode definition (HO)
 hluatex.def    2018/11/30 v6.88e Hyperref driver for luaTeX
rerunfilecheck.sty    2016/05/16 v1.8 Rerun checks for auxiliary files (HO)
lltjp-array.sty    2018/03/29 Patch to array for LuaTeX-ja
lltjp-footmisc.sty    2017/05/05 Patch to footmisc for LuaTeX-ja
supp-pdf.mkii
epstopdf-base.sty    2016/05/15 v2.6 Base part for package epstopdf
  grfext.sty    2016/05/16 v1.2 Manage graphics extensions (HO)
epstopdf-sys.cfg    2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Live
  mt-cmr.cfg    2013/05/19 v2.2 microtype config. file: Computer Modern Roman (R
S)
 nameref.sty    2016/05/21 v2.44 Cross-referencing by name of section
gettitlestring.sty    2016/05/16 v1.5 Cleanup title references (HO)
20190421_test_CV.out
20190421_test_CV.out
  ot1lmr.fd    2009/10/30 v1.6 Font defs for Latin Modern
  omllmm.fd    2009/10/30 v1.6 Font defs for Latin Modern
 omslmsy.fd    2009/10/30 v1.6 Font defs for Latin Modern
 omxlmex.fd    2009/10/30 v1.6 Font defs for Latin Modern
  mt-mvs.cfg    2006/07/05 v1.1 microtype config. file: Marvosym Euro (RS)
 ***********

答案1

因此罪魁祸首是 TeXlive 2018,一切正常,可以使用 TeXlive 2019(预测试)(以及 2017)。

相关内容