Failure to compile (2013-09-03 00:00 by sealbeam #70159)
Using MikTex 2.9 (Windows 8), with LuaTeX, Version beta-0.76.0-2013062820 (rev 4627) (format=lualatex 2013.9.1, the following document fails to compile, with this message:
! LuaTeX error ...iles (x86)/MiKTeX 2.9/tex/luatex/luatexja/ltj-rmlgbm.lua:102:
bad argument #1 to 'open' (string expected, got nil)
stack traceback:
[C]: in function 'open'
...iles (x86)/MiKTeX 2.9/tex/luatex/luatexja/ltj-rmlgbm.lua:102: in function 'o
pen_cmap_file'
...iles (x86)/MiKTeX 2.9/tex/luatex/luatexja/ltj-rmlgbm.lua:136: in function 'm
ake_cid_font'
...iles (x86)/MiKTeX 2.9/tex/luatex/luatexja/ltj-rmlgbm.lua:225: in function 'r
ead_cid_font'
...iles (x86)/MiKTeX 2.9/tex/luatex/luatexja/ltj-rmlgbm.lua:372: in main chunk
[C]: in function 'require'
... Files (x86)/MiKTeX 2.9/tex/luatex/luatexja/luatexja.lua:10: in function 'lo
ad_module'
... Files (x86)/MiKTeX 2.9/tex/luatex/luatexja/luatexja.lua:61: in main chunk
[C]: in function 'dofile'
[string "\directlua "]:1: in main chunk.
l.163 }
?
! Emergency stop.
l.163 }
End of file on the terminal!
\documentclass{ltjsarticle}
% usepackage{luatexja} Not needed if ltjs or ltj doc classes are
% used.
\usepackage{luatexja-fontspec}
% NOTE: If a font is not specified, Ryumin-Light is used, but
% substitued by Adobe Kozuka Mincho in Adobe Reader. See p. 6 of the
% manual.
% For ruby (furigana), use these characters:
% | FF5C fullwidth vertical line
% ( FF08 fullwidth left parenthesis Also, use this when enclosing
% Japanese words
% )FF09 fullwidth right parenthesis Also, use this when enclosing
% Japanese words Enclose English with hex 28, 29 (regular keys)
%% \char"8FBF\addjfontfeature{CJKShape=JIS1990}\char"8FBF This
%% produces the IVS for the char. U+8FBF
RE: Failure to compile (2013-12-24 15:29 by LiTuX #71135)
[Reply To Message #70160]
> LuaTeX-ja requires CMap UniJIS2004-UTF32 and Adobe-Japan1-UCS2.
> (Other CMaps are needed when you want to use
> "non-embedded" Chinese or Korean fonts.)
>
> In MikTeX, they are located in ...\MiKTeX 2.9\poppler\cMap\Adobe-Japan1.
> It seems that LuaTeX somehow could not find them.
Hi, I'm using MikTeX portable 2.9 and meet the same question.
Are there any work around for this problem?
RE: Failure to compile (2013-12-24 17:53 by h7k #71138)
[メッセージ #71135 への返信]
> [Reply To Message #70160]
> > LuaTeX-ja requires CMap UniJIS2004-UTF32 and Adobe-Japan1-UCS2.
> > (Other CMaps are needed when you want to use
> > "non-embedded" Chinese or Korean fonts.)
> >
> > In MikTeX, they are located in ...\MiKTeX 2.9\poppler\cMap\Adobe-Japan1.
> > It seems that LuaTeX somehow could not find them.
>
> Hi, I'm using MikTeX portable 2.9 and meet the same question.
> Are there any work around for this problem?
Sorry for inconvenience. Please run the following batch file:
(last updated 2013-12-24 17:53 JST)
REM --------
set TEST=%TEMP%\ltj-test
set MIKTEX="C:\Program Files\MiKTeX 2.9"
set CMAP=%MIKTEX%\poppler\cMap
mkdir %TEST%
cd %TEST%
REM Japanese (required)
copy %CMAP%\Adobe-Japan1\Adobe-Japan1-UCS2 .
copy %CMAP%\Adobe-Japan1\UniJIS2004-UTF32-H .
echo "\input luatexja.sty \end" | luatex
REM Korean
copy %CMAP%\Adobe-Korea1\Adobe-Korea1-UCS2 .
copy %CMAP%\Adobe-Korea1\UniKS-UTF32-H .
echo "\input luatexja.sty \jfont\test=psft:ltjtest:cid=Adobe-Korea1-2;jfm=jis \end" | luatex
REM Simplified Chinese
copy %CMAP%\Adobe-GB1\Adobe-GB1-UCS2 .
copy %CMAP%\Adobe-GB1\UniGB-UTF32-H .
echo "\input luatexja.sty \jfont\test=psft:ltjtest:cid=Adobe-GB1-5;jfm=jis \end" | luatex
REM Traditional Chinese
copy %CMAP%\Adobe-CNS1\Adobe-CNS1-UCS2 .
copy %CMAP%\Adobe-CNS1\UniCNS-UTF32-H .
echo "\input luatexja.sty \jfont\test=psft:ltjtest:cid=Adobe-CNS1-5;jfm=jis \end" | luatex
REM cleanup
cd %USERPROFILE%
del /q /f %TEST%
REM --------
If this batch file successfully runs,
four files ”ltj-cid-*.lua” are created in
C:\Users\(username)\AppData\Local\MiKTeX\2.9 .
Then, the error should not occur again.