
我最近將 Mactex 更新到了 2016 版本。現在,使用 Mactex 2016 編譯五個不同的 main.tex 檔案會產生相同的錯誤。如果有人有任何建議,我將不勝感激?謝謝:麥克
at \begin{document} in Main.tex missing number treated as zero
at \begin{document} in Main.tex illegal unit of measure (pt inserted)
at \begin{document} in Main.text missing number treated as zero
at \begin{document} in Main.tex illegal unit of measure (pt inserted)
我的 MWE 是:
\documentclass[12pt,british,twoside,openany,headings=small]{scrbook}
\usepackage{fontspec}
\usepackage{microtype}
\usepackage{ragged2e}
\usepackage{babel}
\usepackage[automark,headsepline=.25pt]{scrlayer-scrpage}
\addtokomafont{pageheadfoot}{\scshape\small}%changed to small caps in headers
\clearpairofpagestyles% remove default header and footer content
\cehead{Ben Francis}
\cohead{\rightmark}% section in header
\ofoot{} %Author Name
\ifoot{} % Chapter Number
\ohead{\pagemark}
\usepackage{geometry}
\geometry{paperwidth=5.06in,paperheight=7.81in,
verbose,
margin=0.75in,
headheight=0.1in,
headsep=0.15in,
footskip=0.45in,
}
\renewcommand*\raggedsection{\centering}
\addtokomafont{disposition}{\rmfamily} %for headings
\setkomafont{section}{\fontsize{35}{30}\selectfont}
\setkomafont{subsubsection}{\small}
\linespread{1.05}
\usepackage{lipsum}% dummy text
\begin{document}
\addchap{ONE}
\addsec{First section}
\lipsum
\addchap{TWO}
\addsec{Second section}
\lipsum
\addchap{THREE}
\addsec{Third section}
\lipsum
\end{document}
答案1
2016-06-26 編輯
此錯誤typearea.sty
在 2016 年 6 月 17 日發布的 Komascript 3.21 中修復。
更新你的 TeX 發行版,問題就會消失。
原帖
這是一個簡單的拼字錯誤typearea.sty
(缺少反斜線),將在下次更新時修正。作為解決方法,請使用pagesize=false
中建議的選項http://www.komascript.de/release3.20
typearea 中的正確程式碼(第 477 行)應如下所示:
\newcommand{\set@pdftexpagesize}{%
\scr@ifundefinedorrelax{pdfpagewidth}{%
\scr@ifundefinedorrelax{pagewidth}{}{\pagewidth=\paperwidth}%
}{\pdfpagewidth=\paperwidth}%
\scr@ifundefinedorrelax{pdfpageheight}{%
\scr@ifundefinedorrelax{pageheight}{}{\pageheight=\paperheight}%
}{\pdfpageheight=\paperheight}%
}