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 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165
|
@echo off
rem ڹԱµ·
cd /d "%~dp0"
title CQUThesisԶ
set flag=%1
if %flag%x == x (
set flag=thesis
)
if %flag%x == thesisx (
call:thesis
goto :EOF
)
if %flag%x == thesisxx (
call:thesisx
goto :EOF
)
if %flag%x == docx (
call:extract
call:document
goto :EOF
)
if %flag%x == cleanx (
call:cleanaux
goto :EOF
)
if %flag%x == cleanpdfx (
call:cleanpdf
goto :EOF
)
if %flag%x == cleanallx (
call:cleanaux
call:cleanpdf
goto :EOF
)
if %flag%x == extractx (
call:extract
goto :EOF
)
if %flag%x == allx (
call:thesis
call:document
goto :EOF
)
if %flag%x == buildx (
call:extract
call:thesis
goto :EOF
)
if %flag%x == buildxx (
call:extract
call:thesis
call:document
goto :EOF
)
:help
echo *************************************************************
echo CQUThesisԶWindows
echo ѧҵLaTeXģ壺 https://github.com/nanmu42/CQUThesis
echo (C) 2016-2017 LPPL 1.3Э鿪Դ
echo ԴGithubLiam0205/sduthesisڴл
echo *************************************************************
echo *
echo ÷
echo makewin []
echo
echo help չʾϢ
echo thesis ͨlatexmkܣٵرģ˫ʱĬУ
echo thesisx һı루ϵͳûװlatexmkһƼģ
echo doc CQUThesisûĵ
echo clean .auxļ
echo cleanpdf .pdfļ
echo cleanall .auxļԼ.pdfļ
echo extract .dtxļȡģ
echo all thesis + doc
echo build extract + thesis
echo buildx extract + thesis + doc
echo *
echo ***********************Happy TeXing**************************
echo ************************д죡***************************
goto :EOF
:checkfiles
IF NOT EXIST cquthesis.cls call:extract
IF NOT EXIST cquthesis.cfg call:extract
goto :EOF
:thesis
call:checkfiles
echo ȷϵͳȷlatexmk...
echo ʹlatexmkܱ...
latexmk -xelatex main.tex
echo * *
echo *********̫ˣıɣ**********
echo * *
goto pauseIfDoubleClicked
:thesisx
call:checkfiles
echo ı......
xelatex main.tex
bibtex main.tex
xelatex main.tex
xelatex main.tex
xelatex main.tex
echo * *
echo ***************̫ˣıɣ*****************
echo ʾٶȽƼʹmakewin thesisб롣
echo * *
goto :EOF
:cleanaux
echo .auxļ...
for %%i in (*.aux *.bbl *.equ *.glo *.gls *.hd *.idx *.ilg *.ind *.lof *.lot *.out *.blg *.log *.thm *.toc *.synctex.gz *.lofEN *.lotEN *.equEN) do (
del %%i
)
echo .auxļɡ
goto :EOF
:cleanpdf
echo .pdfļ...
for %%i in (*.pdf) do (
del %%i
)
echo .pdfļɡ
goto :EOF
:clean_all
call:cleanaux
call:cleanpdf
goto :EOF
:extract
echo ȡCQUThesisģļ...
latex cquthesis.ins
echo * *
echo *******ģļȡ********
echo * *
goto :EOF
:document
echo CQUThesisûĵ...
set cmode=-interaction=batchmode
xelatex cquthesis.dtx
makeindex -s gind.ist -o cquthesis.ind cquthesis.idx
makeindex -s gglo.ist -o cquthesis.gls cquthesis.glo
xelatex cquthesis.dtx
xelatex cquthesis.dtx
xelatex cquthesis.dtx
echo * *
echo *******ûĵ********
echo * *
goto :EOF
:pauseIfDoubleClicked
setlocal enabledelayedexpansion
set testl=%cmdcmdline:"=%
set testr=!testl:%~nx0=!
if not "%testl%" == "%testr%" pause *
goto :EOF
|