summaryrefslogtreecommitdiff
path: root/Make.bat
blob: e57cca77a41e4f5b5ad9965c52ff11d30b4484c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
@echo off

@rem Copyright (c) 2008-2009 solvethis
@rem Copyright (c) 2010-2012 Casper Ti. Vector
@rem Public domain.

set JOB=thesis
@rem 这个变量的值可以为 latex、pdflatex 或 xelatex。
set LATEX=latex
set BIBTEX=biber -l zh__pinyin --output-safechars
set DVIPDF=dvipdfmx

if "%LATEX%"=="latex" (set DODVIPDF=%DVIPDF% %JOB%
) else (set DODVIPDF=echo No need to run %DVIPDF%.)
if "%1"=="" goto doc
if "%1"=="doc" goto doc
if "%1"=="clean" (goto clean) else (goto usage)

:doc
%LATEX% %JOB%
%BIBTEX% %JOB%
%LATEX% %JOB%
%LATEX% %JOB%
%DODVIPDF%
goto end

:clean
del *.aux *.bbl *.bcf *.blg *.dvi *.lof *.log *.lot *.run.xml *.toc *.out
del missfont.log chap\*.aux
goto end

:usage
echo %0 [doc] [clean]
goto end

:end
pause

@rem vim:ts=4:sw=4