summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/disser/include/latex.nmk.cmd
blob: 2cdc9f56b82e65eb72026bffafd1a4d128d64e6e (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
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
@echo off

rem nomake script for LaTeX projects
rem Author: Stanislav Kruchinin <stanislav.kruchinin@gmail.com>

if "%CMDEXTVERSION%"=="" (
	echo Error: This script requires command interpreter from Windows 2000 or above.
	goto :eof
)

if "%texmf%"=="" set texmf=%programfiles%\miktex-2.6

set target=thesis

set arch=7z
set bibtex=bibtex8
set epstool=epstool
set epstopdf=epstopdf
set ps2pdf=gswin32c
set dvips=dvips
set l2h=latex2html
set mktexlsr=mktexlsr
set pdftex=pdflatex
set psnup=psnup
set tex=latex

set archext=zip
set archflags=a -t%archext%
set archive=%target%.%archext%
set bibtexflags=-H -c cp1251
set l2hflags=-dir html -iso_language RU.RU -split 3 -short_index ^
             -numbered_footnotes -no_footnode -white -antialias ^
             -html_version 4.0
set ps2pdfflags=-dBATCH -dNOPAUSE -sDEVICE=pdfwrite -g4960x7016 -r600 ^
	  -dCompatibilityLevel#1.2 -sOutputFile=%target%_2on1.pdf -c save pop ^
	  -f %target%_2on1.ps
set psnupflags=-2 -pA4
set texflags=-src-specials -terminal=oem

set clext=*.bbl *.bak *.aux *.blg *.out *.toc *.log *.dvi *.tmp *.pdf *.ps
set clfiles= %clext% %target%.%arc%
set srcfiles=*
set suffix=~

rem end of configuration

if "%1"=="" (
:default
	call :dvi
goto :eof
)

:start
if "%1"=="" goto :eof

if "%1"=="dvi" (
:dvi
	%tex% %texflags% %target%.tex
	%bibtex% %bibtexflags% %target%
	%tex% %texflags% %target%.tex
	%tex% %texflags% %target%.tex
goto :eof
)

if "%1"=="pdf" (
:pdf
	call :epstopdf
	%pdftex% %texflags% %target%.tex
	%bibtex% %bibtexflags% %target%
	%pdftex% %texflags% %target%.tex
	%pdftex% %texflags% %target%.tex
goto :eof
)

if "%1"=="pdf_2on1" (
:pdf2on1
	if not exist %target%.ps call :ps2on1
	%ps2pdf% %ps2pdfflags% 2 > nul 2>&1
goto :eof
)

if "%1"=="ps" (
:ps
	if not exist %target%.dvi call :dvi
	%dvips% -o %target%.ps %target%.dvi
goto :eof
)

if "%1"=="ps_2on1" (
:ps2on1
	if not exist %target%.ps call :ps
	%psnup% %psnupflags% %target%.ps > %target%_2on1.ps
goto :eof
)

if "%1"=="html" (
:html
	if not exist %target%.dvi call :dvi
	%l2h% %l2hflags% %target%.tex
goto :eof
)

if "%1"=="clean" (
:clean
	del /s %clfiles% 2> nul
	if exist %target%.%arctype% del %target%.%arctype%
goto :eof
)

if "%1"=="srcdist" (
:srcdist
	call :clean
	%arch% %archflags% %archive% %srcfiles%
goto :eof
)

if "%1"=="epstopdf" (
:epstopdf
	cd fig & call nomake.cmd epstopdf & cd ..
goto :eof	
)

if "%1"=="fixbb" (
:fixbb
	cd fig & call nomake.cmd fixbb & cd ..
goto :eof
)

if "%1"=="help" (
:help
	echo Targets:
	echo   dvi      - ^(default^) build DVI
	echo   clean    - remove ouptut files
	echo   epstopdf - convert all figures to PDF
	echo   fixbb    - fix BoundingBox
	echo   help     - show help
	echo   html     - build HTML
	echo   pdf      - build PDF
	echo   pdf_2on1 - build PDF with 2 pages on one landscape-oriented A4
	echo   ps       - build PS
	echo   ps_2on1  - build PS with 2 pages on one landscape-oriented A4
	echo   srcdist  - build source distribution %archive%
goto :eof
)

if "%1" neq "" echo Don't know how to make %1
:end
shift & goto :start