有人可以解释一下为什么这个文件在 Windows 上的 MikTex 上编译成功并且没有错误,但在使用 TexLive 2015 的 Linux 上却出现错误吗?
\documentclass[10pt]{book}
\usepackage[T1]{fontenc}
\usepackage{ntheorem}
\usepackage[charter]{mathdesign}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc} %DO NOT USE WITH LUALATEX, only with pdflatex
\usepackage[tracking,protrusion=true,expansion=true]{microtype}
\begin{document}
[Parallel and perpendicular symbol from Mathematica to $\LaTeX$]
\end{document}
现在在Linux上:
pdflatex foo2.tex
This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015) (preloaded format=pdflatex)
restricted \write18 enabled.
entering extended mode
(./foo2.tex
LaTeX2e <2015/10/01> patch level 2
Babel <3.9m> and hyphenation patterns for 79 languages loaded.
(/usr/local/texlive/2015/texmf-dist/tex/latex/base/book.cls
Document Class: book 2014/09/29 v1.4h Standard LaTeX document class
...
(/usr/local/texlive/2015/texmf-dist/tex/latex/base/bk10.clo))
(/usr/local/texlive/2015/texmf-dist/tex/latex/base/fontenc.sty
(/usr/local/texlive/2015/texmf-dist/tex/latex/base/t1enc.def))
(/usr/local/texlive/2015/texmf-dist/tex/latex/mathdesign/mdbch/mdamdbch.fd)
(/usr/local/texlive/2015/texmf-dist/tex/latex/mathdesign/mdbch/mdbmdbch.fd)
! You can't use `\spacefactor' in math mode.
\@->\spacefactor
\@m {}
l.13 ...dicular symbol from Mathematica to $\LaTeX
$]
?
现在在 Windows 上(当然是同一个文件)
X:\data\latex\10>pdflatex foo2.tex
This is pdfTeX, Version 3.1415926-2.5-1.40.14 (MiKTeX 2.9 64-bit)
entering extended mode
(X:\data\latex\10\foo2.tex
LaTeX2e <2011/06/27>
.....
(C:\Users\me\AppData\Roaming\MiKTeX\2.9\tex\latex\mathdesign\mdbch\omxmdbch.fd)
(C:\Users\me\AppData\Roaming\MiKTeX\2.9\tex\latex\mathdesign\mdbch\mdamdbch.fd)
(C:\Users\me\AppData\Roaming\MiKTeX\2.9\tex\latex\mathdesign\mdbch\mdbmdbch.fd)
[1{C:/Users/me/AppData/Local/MiKTeX/2.9/pdftex/config/pdftex.map}]
(X:\data\latex\10\foo2.aux) ){C:/Users/me/AppData/Roaming/MiKTeX/2.9/fonts/enc/
dvips/ly1/texnansi.enc}<C:/Users/me/AppData/Roaming/MiKTeX/2.9/fonts/type1/bits
trea/charter/bchr8a.pfb><C:/Users/me/AppData/Roaming/MiKTeX/2.9/fonts/type1/mat
hdesign/mdbch/md-chr8t.pfb>
Output written on foo2.pdf (1 page, 16230 bytes).
Transcript written on foo2.log.
没有错误。
我需要做什么才能使这个文件在 Linux 上编译成功?
列出 Linux 上的文件
*File List*
book.cls 2014/09/29 v1.4h Standard LaTeX document class
bk10.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
fontenc.sty
t1enc.def 2005/09/27 v1.99g Standard LaTeX file
ntheorem.sty 2011/08/15 1.33
ifthen.sty 2014/09/29 v1.1c Standard LaTeX ifthen package (DPC)
mathdesign.sty 2013/08/29 v2.31 Math Design Project
keyval.sty 2014/10/28 v1.15 key=value parser (DPC)
mdbch.cfg
mdbch.sty 2013/08/29 v2.31 bitstream bitstream charter + mdbch (Math Desi
gn Project)
mdfont.def 2013/08/29 v2.31 (Math Design Project)
mdsffont.def 2013/08/29 v2.31 (Math Design Project)
mdttfont.def 2013/08/29 v2.31 (Math Design Project)
xkeyval.sty 2014/12/03 v2.7a package option processing (HA)
xkeyval.tex 2014/12/03 v2.7a key=value parser (HA)
t1mdbch.fd 2013/08/29 Fontinst v1.933 font definitions for T1/mdbch.
fontenc.sty
t1enc.def 2005/09/27 v1.99g Standard LaTeX file
babel.sty 2015/08/03 3.9m The Babel package
english.ldf 2012/08/20 v3.3p English support from the babel system
inputenc.sty 2015/03/17 v1.2c Input encoding file
utf8.def 2015/09/07 v1.1p UTF-8 support for inputenc
t1enc.dfu 2015/09/07 v1.1p UTF-8 support for inputenc
ot1enc.dfu 2015/09/07 v1.1p UTF-8 support for inputenc
omsenc.dfu 2015/09/07 v1.1p UTF-8 support for inputenc
microtype.sty 2013/05/23 v2.5a Micro-typographical refinements (RS)
microtype-pdftex.def 2013/05/23 v2.5a Definitions specific to pdftex (RS)
microtype.cfg 2013/05/23 v2.5a microtype main configuration file (RS)
mdacmr.fd
mdbcmr.fd
mt-bch.cfg 2007/03/03 v1.5 microtype config. file: Bitstream Charter (RS)
***********
)
从 Windows 列出文件
*File List*
book.cls 2007/10/19 v1.4h Standard LaTeX document class
bk10.clo 2007/10/19 v1.4h Standard LaTeX file (size option)
fontenc.sty
t1enc.def 2005/09/27 v1.99g Standard LaTeX file
ntheorem.sty 2011/08/15 1.33
ifthen.sty 2001/05/26 v1.1c Standard LaTeX ifthen package (DPC)
mathdesign.sty 2013/08/29 v2.31 Math Design Project
keyval.sty 1999/03/16 v1.13 key=value parser (DPC)
mdbch.cfg
mdbch.sty 2013/08/29 v2.31 bitstream bitstream charter + mdbch (Math Desi
gn Project)
mdfont.def 2013/08/29 v2.31 (Math Design Project)
mdsffont.def 2013/08/29 v2.31 (Math Design Project)
mdttfont.def 2013/08/29 v2.31 (Math Design Project)
xkeyval.sty 2012/10/14 v2.6b package option processing (HA)
xkeyval.tex 2012/10/14 v2.6b key=value parser (HA)
t1mdbch.fd 2013/08/29 Fontinst v1.933 font definitions for T1/mdbch.
fontenc.sty
t1enc.def 2005/09/27 v1.99g Standard LaTeX file
babel.sty 2008/07/08 v3.8m The Babel package
bblopts.cfg 2006/07/31 v1.0 MiKTeX 'babel' configuration
english.ldf 2012/08/20 v3.3p English support from the babel system
inputenc.sty 2008/03/30 v1.1d Input encoding file
utf8.def 2008/04/05 v1.1m UTF-8 support for inputenc
t1enc.dfu 2008/04/05 v1.1m UTF-8 support for inputenc
ot1enc.dfu 2008/04/05 v1.1m UTF-8 support for inputenc
omsenc.dfu 2008/04/05 v1.1m UTF-8 support for inputenc
microtype.sty 2013/05/23 v2.5a Micro-typographical refinements (RS)
microtype-pdftex.def 2013/05/23 v2.5a Definitions specific to pdftex (RS)
microtype.cfg 2013/05/23 v2.5a microtype main configuration file (RS)
mdacmr.fd
mdbcmr.fd
mt-bch.cfg 2007/03/03 v1.5 microtype config. file: Bitstream Charter (RS)
***********
)
答案1
babel.def
不同之处在于2012 年和 2013 年之间的变化:
TeXLive 2012babel.def
包含
\bbl@redefine\LaTeX{\textlatin{\org@LaTeX}}
示例就这样编译了。
随后,这一重新定义已被删除。现在 的定义\LaTeX
保持不变,并且不再能在当前 tex 系统中用于数学。