summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/disser/include/latex.nmk.cmd
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/disser/include/latex.nmk.cmd')
-rw-r--r--Master/texmf-dist/doc/latex/disser/include/latex.nmk.cmd147
1 files changed, 93 insertions, 54 deletions
diff --git a/Master/texmf-dist/doc/latex/disser/include/latex.nmk.cmd b/Master/texmf-dist/doc/latex/disser/include/latex.nmk.cmd
index 2cdc9f56b82..6a162d08b38 100644
--- a/Master/texmf-dist/doc/latex/disser/include/latex.nmk.cmd
+++ b/Master/texmf-dist/doc/latex/disser/include/latex.nmk.cmd
@@ -8,39 +8,43 @@ if "%CMDEXTVERSION%"=="" (
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
+if "%target%"=="" set target=thesis
+
+if "%arch%"=="" set arch=7z
+if "%bibtex%"=="" set bibtex=bibtex8
+if "%epstool%"=="" set epstool=epstool
+if "%epstopdf%"=="" set epstopdf=epstopdf
+if "%ps2pdf%"=="" set ps2pdf=gswin32c
+if "%dvips%"=="" set dvips=dvips
+if "%l2h%"=="" set l2h=latex2html
+if "%mktexlsr%"=="" set mktexlsr=mktexlsr
+if "%pdflatex%"=="" set pdflatex=pdflatex
+if "%psbook%"=="" set psbook=psbook
+if "%psnup%"=="" set psnup=psnup
+if "%latex%"=="" set latex=latex
+if "%l2rtf%"=="" set l2rtf=latex2rtf
+
+if "%archext%"=="" set archext=zip
+if "%archflags%"=="" set archflags=a -t%archext%
+if "%archive%"=="" set archive=%target%.%archext%
+if "%bibtexflags%"=="" set bibtexflags=-H -c cp1251
+if "%l2hflags%"=="" (
+ set l2hflags=-dir html -iso_language RU.RU -split 3 -short_index ^
+ -numbered_footnotes -no_footnode -white -antialias ^
+ -html_version 4.0
+)
+if "%ps2pdfflags%"=="" (
+ set ps2pdfflags=-dBATCH -dNOPAUSE -sDEVICE=pdfwrite -g4960x7016 -r600 ^
+ -dCompatibilityLevel#1.2
+)
+if "%psnupflags%"=="" set psnupflags=-2 -pA4
+if "%pdflatexflags%"=="" set pdflatexflags=--shell-escape
+if "%latexflags%"=="" set latexflags=-src-specials
set clext=*.bbl *.bak *.aux *.blg *.out *.toc *.log *.dvi *.tmp *.pdf *.ps
-set clfiles= %clext% %target%.%arc%
-set srcfiles=*
-set suffix=~
+if "%clfiles%"=="" set clfiles= %clext% %target%.%arc%
+if "%srcfiles%"=="" set srcfiles=*
+if "%suffix%"=="" set suffix=~
rem end of configuration
@@ -55,27 +59,41 @@ if "%1"=="" goto :eof
if "%1"=="dvi" (
:dvi
- %tex% %texflags% %target%.tex
- %bibtex% %bibtexflags% %target%
- %tex% %texflags% %target%.tex
- %tex% %texflags% %target%.tex
+ %latex% %latexflags% %target%.tex
+ if exist %target%.bib (
+ %bibtex% %bibtexflags% %target%
+ %latex% %latexflags% %target%.tex
+ ) else (
+ echo Warning: Bibliography file does not exist
+ )
+ %latex% %latexflags% %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
+ %pdflatex% %pdflatexflags% %target%.tex
+ if exist %target%.bib (
+ %bibtex% %bibtexflags% %target%
+ %pdflatex% %pdflatexflags% %target%.tex
+ )
+ %pdflatex% %pdflatexflags% %target%.tex
goto :eof
)
if "%1"=="pdf_2on1" (
:pdf2on1
- if not exist %target%.ps call :ps2on1
- %ps2pdf% %ps2pdfflags% 2 > nul 2>&1
+ if not exist %target%_2on1.ps call :ps2on1
+ %ps2pdf% %ps2pdfflags% -sOutputFile=%target%_2on1.pdf ^
+ -c save pop -f %target%_2on1.ps
+goto :eof
+)
+
+if "%1"=="pdf_booklet" (
+:pdfbooklet
+ if not exist %target%_booklet.ps call :psbooklet
+ %ps2pdf% %ps2pdfflags% -sOutputFile=%target%_booklet.pdf ^
+ -c save pop -f %target%_booklet.ps
goto :eof
)
@@ -93,6 +111,13 @@ if "%1"=="ps_2on1" (
goto :eof
)
+if "%1"=="ps_booklet" (
+:psbooklet
+ if not exist %target%.ps call :ps
+ %psbook% %target%.ps | %psnup% -2 > %target%_booklet.ps
+goto :eof
+)
+
if "%1"=="html" (
:html
if not exist %target%.dvi call :dvi
@@ -100,6 +125,11 @@ if "%1"=="html" (
goto :eof
)
+if "%1"=="rtf" (
+ call :dvi
+ %l2rtf% -F -M12 -i russian -a %target%.aux -b %target%.bbl %target%.tex
+)
+
if "%1"=="clean" (
:clean
del /s %clfiles% 2> nul
@@ -114,6 +144,12 @@ if "%1"=="srcdist" (
goto :eof
)
+if "%1"=="epstoeps" (
+:epstoeps
+ cd fig & call nomake.cmd epstoeps & cd ..
+goto :eof
+)
+
if "%1"=="epstopdf" (
:epstopdf
cd fig & call nomake.cmd epstopdf & cd ..
@@ -128,18 +164,21 @@ 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%
+ echo List of targets:
+ echo dvi ^(default^) build DVI
+ echo clean remove output files
+ echo epstoeps optimize EPS files
+ echo epstopdf convert figures to PDF
+ echo fixbb fix BoundingBox of EPS files
+ echo help show list of targets
+ echo html convert to HTML
+ echo pdf_2on1 build PDF with two A5 pages on one A4 ordered by number
+ echo pdf_book build PDF booklet ^(two A5 on A4^)
+ echo ps build PS
+ echo ps_2on1 build PS with two A5 pages on A4 ordered by number
+ echo ps_book build PS booklet ^(two A5 on A4^)
+ echo rtf convert to RTF
+ echo srcdist build source distribution %archive%
goto :eof
)