forked from liubenyuan/nudtpaper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
maketest.bat
64 lines (50 loc) · 1.13 KB
/
maketest.bat
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
call makeclear.bat
chcp 65001
if exist "thesis.tex" (
copy thesis.tex thesis.texbak /Y
echo PLEASE NOTE: thesis.tex is backuped with file thesis.texbak!!!!
pause
) else (
echo thesis.tex is not exist!
)
del /Q thesis.pdf thesis-bibtex.pdf
xelatex nudtpaper.ins
for /f "delims=:" %%m in ('"findstr /n documentclass thesis.tex"') do echo %%m & set num=%%m
echo num=%num%
echo.>tmp.txt
set /a k=0
for /f "tokens=1 delims=" %%j in ('"findstr .* thesis.tex"') do (
set /a k+=1
setlocal enabledelayedexpansion
echo !k!
if !k!==%num% (
echo num=%num%
echo.%%j
echo.\documentclass[doctor,twoside,fz]{nudtpaper} >>tmp.txt
) else (
echo.%%j >>tmp.txt
)
endlocal
)
del /q thesis.tex
ren tmp.txt thesis.tex
call makeclear.bat
xelatex thesis.tex
bibtex thesis
xelatex thesis.tex
xelatex thesis.tex
copy thesis.pdf thesis-bibtex.pdf
call makeclear.bat
xelatex nudtpaper.ins
xelatex nudtpaper.dtx
makeindex -s gind nudtpaper
makeindex -s gglo -o nudtpaper.gls nudtpaper.glo
xelatex nudtpaper.dtx
xelatex nudtpaper.dtx
xelatex thesis.tex
biber thesis
xelatex thesis.tex
xelatex thesis.tex
goto endlabel
:endlabel
echo test finished!