Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makefile defaults to latexmk #114

Merged
merged 11 commits into from
May 2, 2015
Prev Previous commit
Next Next commit
more doc updates on defaulting to latexmk
  • Loading branch information
alick committed May 1, 2015
commit 8dff25a85f52f952303e35cdcb494c2a26e8083a
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Makefile for ThuThesis

# Compiling method: xelatex/pdflatex/dvipdfmx/latexmk
# Compiling method: latexmk/xelatex/pdflatex/dvipdfmx
METHOD = latexmk
# Set opts for latexmk if you use it
LATEXMKOPTS = -xelatex
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ ThuThesis为 <b>T</b>sing<b>h</b>ua <b>U</b>niversity <b>Thesis</b> LaTeX Templa
# Makefile的用法

make [{all|thesis|shuji|doc|clean|distclean}] \
[METHOD={xelatex|pdflatex|dvipdfmx}] \
[METHOD={latexmk|xelatex|pdflatex|dvipdfmx}] \
[TEXI2DVI=<tex2dvi>]

## 目标
Expand All @@ -52,10 +52,10 @@ ThuThesis为 <b>T</b>sing<b>h</b>ua <b>U</b>niversity <b>Thesis</b> LaTeX Templa

## 参数
* **METHOD**:指定生成 pdf 的方式,缺省采用 xelatex。
* METHOD=latexmk 表示使用 latexmk 的方式生成 pdf。
* METHOD=xelatex 表示使用 xelatex 引擎编译生成 pdf;
* METHOD=pdflatex 表示使用 pdflatex 引擎编译生成 pdf;
* METHOD=dvipdfmx 表示使用 texi2dvi -> dvipdfmx 的方式生成 pdf。
* METHOD=latexmk 表示使用 latexmk 的方式生成 pdf。
* **TEXI2DVI**: `texi2dvi` 实用工具的文件名,该工具的作用是自动重复运行latex 若
干遍,直至所有交叉引用都正确为止。在有的发行版中该工具的文件名不叫
`texi2dvi`,譬如 CTeX 下的这个工具就叫 `texify`。遇到这种情况可以在命令
Expand Down
27 changes: 14 additions & 13 deletions thuthesis.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -292,16 +292,6 @@
% $ xelatex thuthesis.dtx % 生成说明文档 thuthesis.pdf
% \end{shell}
%
% \subsubsection{latexmk}
% \label{sec:latexmk}
% \texttt{latexmk} 命令支持全自动生成 \LaTeX{} 编写的文档,并且支持使用不同的工具
% 链来进行生成。从2015年开始, \thuthesis{} 改为默认用 \texttt{latexmk} 调用
% \texttt{xelatex} 生成。下面来看用 \texttt{latexmk} 进行生成的命令:
% \begin{shell}
% # 一句话就够了!
% $ latexmk -xelatex main
% \end{shell}
%
% \subsubsection{xelatex}
% \label{sec:xelatex}
% 很多用户对 \LaTeX{} 命令执行的次数不太清楚,一个基本的原则是多次运行 \LaTeX{}命
Expand Down Expand Up @@ -348,12 +338,21 @@
% 成 PDF。不过 PDF\LaTeX\ 增加了对 png,jpg 等标量图形的支持,比较方便。
% TeX Live 自从 2010 版本起自动调用 epstopdf 将 EPS 图形转化为 PDF。
%
% \subsubsection{latexmk}
% \label{sec:latexmk}
% \texttt{latexmk} 命令支持全自动生成 \LaTeX{} 编写的文档,并且支持使用不同的工具
% 链来进行生成,它会自动运行多次工具直到交叉引用都被解决。下面给出了一个用
% \texttt{latexmk} 调用 \texttt{xelatex} 生成最终文档的示例:
% \begin{shell}
% # 一句话就够了!
% $ latexmk -xelatex main
% \end{shell}
%
% \subsubsection{自动化过程}
% \label{sec:automation}
% 上面的例子只是给出一般情况下的使用方法。虽然命令很简单,但是每次都输入的话还是
% 非常罗嗦的,所以 \thuthesis{} 还提供了一些自动处理的文件。
% 非常罗嗦的,所以 \thuthesis{} 还提供了一个简单的 \file{Makefile}:
%
% 我们提供了一个简单的 \file{Makefile}:
% \begin{shell}
% $ make clean
% $ make cls # 生成 thuthesis.cls 和 thuthesis.cfg
Expand All @@ -362,7 +361,9 @@
% $ make shuji # 生成书脊 shuji.pdf
% \end{shell}
%
% \file{Makefile} 默认采用 Xe\LaTeX\ 编译,可以根据自己的需要修
% \thuthesis{} 的 Makefile 默认用 \texttt{latexmk} 调用
% \texttt{xelatex} 编译,此外还支持采用 \texttt{xelatex}、\texttt{pdflatex} 和
% \texttt{dvipdfmx} 方式编译,如有需要可以修
% 改 \file{Makefile} 开头的参数设置或通过命令行传递参数(请参看 \file{README.md})。
%
%
Expand Down