doc: synchronise with the current code.
This commit is contained in:
parent
72b94a9776
commit
360891b42d
@ -1,5 +1,5 @@
|
|||||||
% Copyright (c) 2008-2009 solvethis
|
% Copyright (c) 2008-2009 solvethis
|
||||||
% Copyright (c) 2010-2016,2018 Casper Ti. Vector
|
% Copyright (c) 2010-2016,2018-2019 Casper Ti. Vector
|
||||||
% Public domain.
|
% Public domain.
|
||||||
%
|
%
|
||||||
% 使用前请先仔细阅读 pkuthss 和 biblatex-caspervector 的文档,
|
% 使用前请先仔细阅读 pkuthss 和 biblatex-caspervector 的文档,
|
||||||
@ -9,12 +9,8 @@
|
|||||||
% texdoc biblatex-caspervector
|
% texdoc biblatex-caspervector
|
||||||
% 调出。
|
% 调出。
|
||||||
|
|
||||||
% 采用了自定义的(包括大小写不同于原文件的)字体文件名,
|
|
||||||
% 并改动 ctex.cfg 等配置文件的用户请自行加入 nofonts 选项;
|
|
||||||
% 其它用户不用加入 nofonts 选项,加入之后反而会产生错误。
|
|
||||||
\documentclass[UTF8]{pkuthss}
|
\documentclass[UTF8]{pkuthss}
|
||||||
% 如果的确须要使脚注按页编号的话,可以去掉后面 footmisc 包的注释。
|
% 如果的确须要使脚注按页编号的话,可以去掉后面 footmisc 包的注释。
|
||||||
% 注意:在启用此设定的情况下,可能要多编译一次以产生正确的脚注编号。
|
|
||||||
%\usepackage[perpage]{footmisc}
|
%\usepackage[perpage]{footmisc}
|
||||||
|
|
||||||
% 使用 biblatex 排版参考文献,并规定其格式(详见 biblatex-caspervector 的文档)。
|
% 使用 biblatex 排版参考文献,并规定其格式(详见 biblatex-caspervector 的文档)。
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
% Documentation for pkuthss.
|
% Documentation for pkuthss.
|
||||||
%
|
%
|
||||||
% Copyright (c) 2008-2009 solvethis
|
% Copyright (c) 2008-2009 solvethis
|
||||||
% Copyright (c) 2010-2018 Casper Ti. Vector
|
% Copyright (c) 2010-2019 Casper Ti. Vector
|
||||||
%
|
%
|
||||||
% This work may be distributed and/or modified under the conditions of the
|
% This work may be distributed and/or modified under the conditions of the
|
||||||
% LaTeX Project Public License, either version 1.3 of this license or (at
|
% LaTeX Project Public License, either version 1.3 of this license or (at
|
||||||
@ -42,15 +42,14 @@
|
|||||||
\item 如果使用默认的文献列表和引用样式的话,还需要作者编写的 biblatex 样式
|
\item 如果使用默认的文献列表和引用样式的话,还需要作者编写的 biblatex 样式
|
||||||
(biblatex-caspervector\cupercite{biblatex-caspervector}),
|
(biblatex-caspervector\cupercite{biblatex-caspervector}),
|
||||||
此样式要求使用 biber 程序。
|
此样式要求使用 biber 程序。
|
||||||
\item 如果须要使用 Makefile 来实现自动编译,还需要 Make 工具;
|
\item 如果须要使用 latexmk 来实现自动编译,还需要 latexmk 工具。
|
||||||
但如果使用由批处理实现的伪“Makefile”就不用了。
|
|
||||||
\end{itemize}
|
\end{itemize}
|
||||||
|
|
||||||
\myemph{最新}的\myemph{完全版} \hologo{TeX} Live 系统(\myemph{%
|
\myemph{最新}的\myemph{完全版} \hologo{TeX} Live 系统(\myemph{%
|
||||||
注:某些 Linux 发行版软件仓库中的 \hologo{TeX} Live 有问题,
|
注:某些 Linux 发行版软件仓库中的 \hologo{TeX} Live 有问题,
|
||||||
建议使用独立安装版的 \hologo{TeX} Live%
|
建议使用独立安装版的 \hologo{TeX} Live%
|
||||||
\unemph{\footnote{\url{https://www.tug.org/texlive/}.}}。%
|
\unemph{\footnote{\url{https://www.tug.org/texlive/}.}}。%
|
||||||
})都已经包含除中文字体和 Make 之外所有要求的项目。%
|
})都已经包含除中文字体之外所有要求的项目。%
|
||||||
\myemph{%
|
\myemph{%
|
||||||
为了获得最好的支持,
|
为了获得最好的支持,
|
||||||
我们建议用户使用最新、完全版的 \hologo{TeX} 系统和各宏包。%
|
我们建议用户使用最新、完全版的 \hologo{TeX} 系统和各宏包。%
|
||||||
@ -66,12 +65,6 @@
|
|||||||
这些字体是 GB18030 字符集的,不存在上述问题。%
|
这些字体是 GB18030 字符集的,不存在上述问题。%
|
||||||
}
|
}
|
||||||
|
|
||||||
Linux 用户可以从软件源获得 GNU 的 make;
|
|
||||||
其它类 UNIX 系统应该也会提供 make 工具,请参阅相应的文档以获得帮助。%
|
|
||||||
Windows 用户可以从以下地址下载 Windows 下的 GNU make 工具:\\
|
|
||||||
\hspace*{\parindent}%
|
|
||||||
\url{http://gnuwin32.sourceforge.net/packages/make.htm}
|
|
||||||
|
|
||||||
\section{模版文件}\label{sec:doc-dir}
|
\section{模版文件}\label{sec:doc-dir}
|
||||||
|
|
||||||
在正确安装 pkuthss 文档模版之后,在终端/命令提示符中执行
|
在正确安装 pkuthss 文档模版之后,在终端/命令提示符中执行
|
||||||
@ -98,35 +91,32 @@ texdoc pkuthss
|
|||||||
因此 pkuthss 文档模版的作者建议用户使用支持 LF 换行的文本编辑器编辑文件。%
|
因此 pkuthss 文档模版的作者建议用户使用支持 LF 换行的文本编辑器编辑文件。%
|
||||||
}
|
}
|
||||||
|
|
||||||
模版中的重要文件有:
|
模版中的关键文件有:
|
||||||
\begin{itemize}
|
\begin{itemize}
|
||||||
\item \verb|Makefile|:
|
|
||||||
被 Make 工具调用的 Makefile,用于使编译工作自动化。
|
|
||||||
\item \verb|Make.bat|:%
|
|
||||||
Windows 下的伪“Makefile”,用 Windows 批处理实现。
|
|
||||||
\item \verb|ctexopts.cfg|、\verb|ctex-fontset-pkuthss.def|:
|
\item \verb|ctexopts.cfg|、\verb|ctex-fontset-pkuthss.def|:
|
||||||
比较常用的字体配置,适用于 2.0 及以后版本的
|
比较常用的字体配置,适用于 2.0 及以后版本的
|
||||||
ctex\cupercite{ctex} 宏包。
|
ctex\cupercite{ctex} 宏包。
|
||||||
|
\item \verb|latexmkrc|:
|
||||||
|
被 latexmk 工具读取的配置文件,用于使编译工作自动化。
|
||||||
|
\item \verb|Make.bat|:%
|
||||||
|
方便 Windows 用户使用的批处理文件,会调用 latexmk。
|
||||||
|
\item \verb|spine.tex|:书脊的源文件,具体用法请参考其中代码。
|
||||||
|
\item \verb|thesis.tex|:示例模版的主文件。
|
||||||
|
|
||||||
\item \verb|chap/|:目录,包含各章节内容:
|
\item \verb|chap/|:目录,包含各章节内容:
|
||||||
\begin{itemize}
|
\begin{itemize}
|
||||||
\item \verb|copyright.tex|:版权声明部分。
|
\item \verb|copy.tex|:版权声明部分。
|
||||||
\item \verb|originauth.tex|:
|
\item \verb|origin.tex|:
|
||||||
原创性声明和使用授权说明部分\cupercite{pku-originauth}。
|
原创性声明和使用授权说明部分\cupercite{pku-originauth}。
|
||||||
\end{itemize}
|
\end{itemize}
|
||||||
\myemph{%
|
\myemph{%
|
||||||
注:pkuthss 文档模版支持排版学校要求的二维码,
|
注:pkuthss 文档模版可排版学校要求的二维码,
|
||||||
请参考 \texttt{copyright.tex} 和
|
请参考 \texttt{copy.tex} 和 \texttt{origin.tex} 中的相关注释。%
|
||||||
\texttt{originauth.tex} 中的相关注释。%
|
|
||||||
}
|
}
|
||||||
\end{itemize}
|
\end{itemize}
|
||||||
|
|
||||||
\section{编译方式}\label{sec:compile}
|
\section{编译方式}\label{sec:compile}
|
||||||
|
|
||||||
首次编译前,请将 \verb|misc/| 目录中和用户系统中
|
|
||||||
ctex 宏包版本相匹配的配置文件复制到模版的主目录中,
|
|
||||||
详见第 \ref{sec:doc-dir} 节。
|
|
||||||
|
|
||||||
pkuthss 文档模版支持三种编译方式,即
|
pkuthss 文档模版支持三种编译方式,即
|
||||||
\begin{itemize}
|
\begin{itemize}
|
||||||
\item \hologo{LaTeX} -- dvipdfmx 方式:\\
|
\item \hologo{LaTeX} -- dvipdfmx 方式:\\
|
||||||
@ -140,42 +130,36 @@ pkuthss 文档模版支持三种编译方式,即
|
|||||||
\verb|xelatex| 和 \verb|xelatex|。
|
\verb|xelatex| 和 \verb|xelatex|。
|
||||||
\end{itemize}
|
\end{itemize}
|
||||||
\myemph{%
|
\myemph{%
|
||||||
注意:\hologo{XeLaTeX} 对非 UTF-8 编码的支持不好,
|
注意:在特定情形下,\texttt{latex}/\texttt{pdflatex}/\texttt{xelatex}
|
||||||
|
步骤可能须要执行多于 2 次,而下文推荐的 latexmk 工具会自动处理这类情形。
|
||||||
|
此外,\hologo{XeLaTeX} 对非 UTF-8 编码的支持不好,
|
||||||
因此 \hologo{XeLaTeX} 方式的编译不支持 GBK 编码。%
|
因此 \hologo{XeLaTeX} 方式的编译不支持 GBK 编码。%
|
||||||
}
|
}
|
||||||
|
|
||||||
pkuthss 文档模版附带的 Makefile 中已经对这三种编译方式进行了完整的配置。
|
pkuthss 文档模版附带的 \verb|latexmkrc| 中已经对这三种编译方式进行了完整的
|
||||||
用户只须要在 Makefile 中通过设定变量 \verb|JOB| 的值指定被编译的主文件名,
|
配置。用户只须要在 \verb|latexmkrc| 中通过设定变量 \verb|default_files|
|
||||||
并通过设定变量 \verb|LATEX| 的值指定采用哪种编译方式,
|
的值指定被编译的主文件名,并通过设定变量 \verb|pdf_mode| 的值指定采用
|
||||||
即可通过在主文件所在目录调用 Make 工具来实现自动编译:
|
哪种编译方式,即可通过在主文件所在目录调用 latexmk 工具来实现自动编译:
|
||||||
如果是在类 UNIX 环境下,则用户应该调用的命令名为 \verb|make|:
|
类 UNIX 环境下大致如下
|
||||||
\begin{Verbatim}
|
\begin{Verbatim}
|
||||||
cd /path/to/directory/with/thesis.tex
|
cd /path/to/directory/with/thesis.tex
|
||||||
make
|
latexmk
|
||||||
\end{Verbatim}
|
\end{Verbatim}
|
||||||
而如果是在 Windows 环境下,则用户应该调用的命令名可能为 \verb|mingw32-make|:
|
而在 Windows 环境下大致如下
|
||||||
\begin{Verbatim}
|
\begin{Verbatim}
|
||||||
cd \path\to\directory\with\thesis.tex
|
cd \path\to\directory\with\thesis.tex
|
||||||
mingw32-make
|
latexmk
|
||||||
\end{Verbatim}
|
\end{Verbatim}
|
||||||
|
|
||||||
用户如果不想配置 Windows 下的 GNU Make,
|
Windows 用户也可以使用批处理文件 \verb|Make.bat|:
|
||||||
则也可以使用由 Windows 批处理实现的伪“Makefile”,
|
在主文件所在目录双击此文件,它便会调用 latexmk 进行编译。\myemph{%
|
||||||
通过在主文件所在目录调用 \verb|make|\footnote{%
|
|
||||||
Windows 将批处理文件作为可执行文件,调用时可以不显式地指出扩展名。%
|
|
||||||
}:
|
|
||||||
\begin{Verbatim}
|
|
||||||
cd \path\to\directory\with\thesis.tex
|
|
||||||
make
|
|
||||||
\end{Verbatim}
|
|
||||||
\myemph{%
|
|
||||||
注意:%
|
注意:%
|
||||||
Windows 批处理对于 LF(\texttt{\string\n})换行的批处理文件支持有问题。
|
Windows 批处理对于 LF(\texttt{\string\n})换行的批处理文件支持有问题。
|
||||||
在命令提示符(cmd)下执行这些批处理文件时没有问题,
|
在命令提示符(cmd)下执行这些批处理文件时没有问题,
|
||||||
但双击文件图标执行时可能就会出错。
|
但双击文件图标执行时可能就会出错。
|
||||||
\hologo{TeX} Live 中安装的 \texttt{Make.bat} 和
|
\hologo{TeX} Live 中安装的 \texttt{Make.bat} 和
|
||||||
CTAN 上提供的压缩包里的 \texttt{Make.bat}
|
CTAN 上提供的压缩包里的 \texttt{Make.bat}
|
||||||
有可能是 LF(\texttt{\string\n})换行的。%
|
在正常情况下应该是 CRLF(\texttt{\string\r\string\n})换行的。%
|
||||||
}
|
}
|
||||||
|
|
||||||
% vim:ts=4:sw=4
|
% vim:ts=4:sw=4
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
% Documentation for pkuthss.
|
% Documentation for pkuthss.
|
||||||
%
|
%
|
||||||
% Copyright (c) 2008-2009 solvethis
|
% Copyright (c) 2008-2009 solvethis
|
||||||
% Copyright (c) 2010-2018 Casper Ti. Vector
|
% Copyright (c) 2010-2019 Casper Ti. Vector
|
||||||
%
|
%
|
||||||
% This work may be distributed and/or modified under the conditions of the
|
% This work may be distributed and/or modified under the conditions of the
|
||||||
% LaTeX Project Public License, either version 1.3 of this license or (at
|
% LaTeX Project Public License, either version 1.3 of this license or (at
|
||||||
@ -282,8 +282,8 @@ pkuthss 文档模版使用作者编写的 biblatex\cupercite{biblatex} 样式%
|
|||||||
\end{Verbatim}
|
\end{Verbatim}
|
||||||
在本文中将产生“\cite{ctex},\parencite{ctex},\supercite{ctex}”。
|
在本文中将产生“\cite{ctex},\parencite{ctex},\supercite{ctex}”。
|
||||||
|
|
||||||
就目前而言,在\myemph{除 3.0--3.3 之外版本的} biblatex 中,
|
就目前而言,在 biblatex 中,通过更复杂的设置,
|
||||||
通过更复杂的设置,还可以满足例如被引用的文献按照引用顺序排序,
|
还可以满足例如被引用的文献按照引用顺序排序,
|
||||||
而未引用的文献按照西文文献在前、中文文献在后排序这样的需求,
|
而未引用的文献按照西文文献在前、中文文献在后排序这样的需求,
|
||||||
详见 biblatex-caspervector 的文档\cupercite{biblatex-caspervector}。
|
详见 biblatex-caspervector 的文档\cupercite{biblatex-caspervector}。
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
% Documentation for pkuthss.
|
% Documentation for pkuthss.
|
||||||
%
|
%
|
||||||
% Copyright (c) 2008-2009 solvethis
|
% Copyright (c) 2008-2009 solvethis
|
||||||
% Copyright (c) 2010-2018 Casper Ti. Vector
|
% Copyright (c) 2010-2019 Casper Ti. Vector
|
||||||
%
|
%
|
||||||
% This work may be distributed and/or modified under the conditions of the
|
% This work may be distributed and/or modified under the conditions of the
|
||||||
% LaTeX Project Public License, either version 1.3 of this license or (at
|
% LaTeX Project Public License, either version 1.3 of this license or (at
|
||||||
@ -46,7 +46,7 @@
|
|||||||
可能引起一些问题,详见第 \ref{sec:req} 节。
|
可能引起一些问题,详见第 \ref{sec:req} 节。
|
||||||
|
|
||||||
Windows 批处理对于 LF(\texttt{\string\n})换行的批处理文件支持有问题,
|
Windows 批处理对于 LF(\texttt{\string\n})换行的批处理文件支持有问题,
|
||||||
解决方式见第 \ref{sec:compile} 节。
|
诊断方式见第 \ref{sec:compile} 节。
|
||||||
Windows 的“记事本”程序在查看 LF(\texttt{\string\n})
|
Windows 的“记事本”程序在查看 LF(\texttt{\string\n})
|
||||||
换行的文本文件时存在着一些问题,
|
换行的文本文件时存在着一些问题,
|
||||||
因此建议用户使用支持 LF 换行的文本编辑器编辑文件,
|
因此建议用户使用支持 LF 换行的文本编辑器编辑文件,
|
||||||
@ -68,27 +68,8 @@ hyperref\cupercite{hyperref} 宏包和一些宏包可能发生冲突。
|
|||||||
此文件通常和执行 \verb|texdoc hyperref|
|
此文件通常和执行 \verb|texdoc hyperref|
|
||||||
时打开的 pdf 文件位于同一目录中。
|
时打开的 pdf 文件位于同一目录中。
|
||||||
|
|
||||||
使用 \hologo{XeLaTeX} 的用户可能在已经安装字体的情况下遇到形如(其中
|
|
||||||
\verb|xxxxxxxx| 为具体字体名)
|
|
||||||
\begin{Verbatim}[fontsize = {\small}]
|
|
||||||
! fontspec error: "font-not-found"
|
|
||||||
! The font "xxxxxxxx" cannot be found.
|
|
||||||
! See the fontspec documentation for further information.
|
|
||||||
! For immediate help type H <return>.
|
|
||||||
\end{Verbatim}
|
|
||||||
的错误。
|
|
||||||
这种错误一般是(主要是非 Windows 平台的)用户采用了自定义的
|
|
||||||
(包括大小写不同于原文件的)字体文件名,
|
|
||||||
并改动 \verb|ctex.cfg| 等配置文件之后没有在调用
|
|
||||||
pkuthss 文档类时加入 \verb|nofonts| 选项,
|
|
||||||
又使用 \verb|xelatex| 编译造成的,使用
|
|
||||||
\begin{Verbatim}
|
|
||||||
\documentclass[nofonts, ...]{pkuthss} % “...”代表其它的选项。
|
|
||||||
\end{Verbatim}
|
|
||||||
即可解决此问题。
|
|
||||||
|
|
||||||
biber 运行时有一定概率出现形如(目录名可能稍有不同)
|
biber 运行时有一定概率出现形如(目录名可能稍有不同)
|
||||||
\begin{Verbatim}[fontsize = {\small}]
|
\begin{Verbatim}
|
||||||
data source .../par-xxxxxxxx/cache-xxxxxxxx/
|
data source .../par-xxxxxxxx/cache-xxxxxxxx/
|
||||||
inc/lib/Biber/LaTeX/recode_data.xml not found in .
|
inc/lib/Biber/LaTeX/recode_data.xml not found in .
|
||||||
\end{Verbatim}
|
\end{Verbatim}
|
||||||
@ -98,6 +79,21 @@ data source .../par-xxxxxxxx/cache-xxxxxxxx/
|
|||||||
遇到这种情况时,删除掉上述临时目录及其所有内容,
|
遇到这种情况时,删除掉上述临时目录及其所有内容,
|
||||||
再重新运行 biber 通常便可解决问题。
|
再重新运行 biber 通常便可解决问题。
|
||||||
|
|
||||||
|
就目前而言,amsthm\cupercite{amsthm} 宏包在后于 newtxmath\cupercite{newtx}
|
||||||
|
宏包被调用时会导致以下的错误:
|
||||||
|
\begin{Verbatim}
|
||||||
|
! LaTeX Error: Command \openbox already defined.
|
||||||
|
Or name \end... illegal, see p.192 of the manual.
|
||||||
|
\end{Verbatim}
|
||||||
|
解决此问题的最简单方法是在通过
|
||||||
|
\begin{Verbatim}
|
||||||
|
\usepackage{amsthm}
|
||||||
|
\end{Verbatim}
|
||||||
|
调用 amsthm 宏包之前加入以下命令:
|
||||||
|
\begin{Verbatim}
|
||||||
|
\let\openbox\relax
|
||||||
|
\end{Verbatim}
|
||||||
|
|
||||||
\section{文档格式可能存在的问题}
|
\section{文档格式可能存在的问题}
|
||||||
|
|
||||||
学校对学位论文格式的规定\cupercite{pku-thesisstyle}%
|
学校对学位论文格式的规定\cupercite{pku-thesisstyle}%
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
% Documentation for pkuthss.
|
% Documentation for pkuthss.
|
||||||
%
|
%
|
||||||
% Copyright (c) 2008-2009 solvethis
|
% Copyright (c) 2008-2009 solvethis
|
||||||
% Copyright (c) 2010-2012,2014-2015,2018 Casper Ti. Vector
|
% Copyright (c) 2010-2012,2014-2015,2018-2019 Casper Ti. Vector
|
||||||
%
|
%
|
||||||
% This work may be distributed and/or modified under the conditions of the
|
% This work may be distributed and/or modified under the conditions of the
|
||||||
% LaTeX Project Public License, either version 1.3 of this license or (at
|
% LaTeX Project Public License, either version 1.3 of this license or (at
|
||||||
|
|||||||
@ -1,3 +1,14 @@
|
|||||||
|
@online{amsthm,
|
||||||
|
author = {{Publications Technical Group, American Mathematical Society}},
|
||||||
|
title = {Using the amsthm Package},
|
||||||
|
edition = {Ver.\ 2.20.3},
|
||||||
|
type = {M/OL},
|
||||||
|
date = {2017-09},
|
||||||
|
url = {https://ctan.org/pkg/amsthm},
|
||||||
|
urldate = {2019-11-15},
|
||||||
|
language = {english},
|
||||||
|
}
|
||||||
|
|
||||||
@online{biber,
|
@online{biber,
|
||||||
author = {Kime, Philip and Charette, Fran\c{c}ois},
|
author = {Kime, Philip and Charette, Fran\c{c}ois},
|
||||||
title = {Biber: A backend bibliography processor for biblatex},
|
title = {Biber: A backend bibliography processor for biblatex},
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user