Debian Codegraph @

texmf-dist/source/latex/mdframed/mdframedmake.bat

raw
1 ::################################################################
2 ::## Makefile for mdframed project folder (WINDOWS)
3 ::##
4 ::## $Id: mdframedmake.bat 427 2012-06-06 12:24:09Z marco $
5 ::################################################################
6 @echo off
7 title Compiling mdframed.dtx (Windows)
8 ::
9 :: You can use a prompt to call a special mode of this file.
10 :: mdframedmake all -- standard mode, run docsty examples clean
11 :: mdframedmake docsty -- typesets the documentation and the package
12 :: mdframemdmake examples -- all example files
13 :: mdframedmake clean -- remove all helpfiles created by mdframed
14 ::
15 set mode=all
16 for %%I in (d docsty) do (if /I %%Ix equ %1x set mode=docsty)
17 for %%I in (e examples) do (if /I %%Ix equ %1x set mode=examples)
18 for %%I in (cx cleanx) do (if /I %%I equ %1x set mode=clean)
19 ::
20 call:%mode%
21 echo.
22 echo Finished
23 echo.
24 pause
25 goto:eof
26 ::
27 ::############################
28 ::## Subroutines
29 ::############################
30 ::
31 :all
32 call:docsty mdframed
33 call:examples
34 call:clean
35 goto:eof
36 ::
37 :docsty
38 echo.
39 echo Typesetting %1.dtx
40 pdflatex --draftmode --interaction=nonstopmode %1.dtx >NUL
41 if not errorlevel 1 (
42 echo comipilation in draftmode without errors
43 if exist %1.glo (
44 makeindex -q -t %1.glolog -s gglo.ist -o %1.gls %1.glo >NUL
45 if not errorlevel 1 (
46 echo compiliation of glossar without errors
47 ) else (
48 echo compilation of glossar with errors
49 )
50 )
51 if exist %1.idx (
52 makeindex -q -t %1.idxlog -s gind.ist %1.idx >NUL
53 if not errorlevel 1 (
54 echo compiliation of index without errors
55 ) else (
56 echo compilation of index with errors
57 )
58 )
59 pdflatex --interaction=nonstopmode %1.dtx >NUL
60 if not errorlevel 1 (
61 echo Second pdflatex compiliation without errors
62 pdflatex --interaction=nonstopmode %1.dtx >NUL
63 ) else (
64 echo Second pdflatex compiliation with errors
65 )
66 ) else (
67 echo compilation in draftmode with errors
68 )
69 goto:eof
70 ::
71 :examples
72 call:pdf mdframed-example-default
73 call:pdf mdframed-example-tikz
74 call:ps mdframed-example-pstricks
75 call:pdf mdframed-example-texsx
76 goto:eof
77 ::
78 :pdf
79 echo.
80 echo Typesetting %1
81 pdflatex --draftmode --interaction=nonstopmode %1.tex >NUL
82 if not errorlevel 1 (
83 echo compilation in draftmode without errors
84 echo Run pdflatex again on %1.tex
85 pdflatex --interaction=nonstopmode %1.tex >NUL
86 echo Typesetting %1 finished
87 ) else (
88 echo compilation in draftmode with errors)
89 goto:eof
90 ::
91 :ps
92 echo.
93 echo Typesetting %1
94 latex -draftmode -interaction=nonstopmode %1.tex >NUL
95 if not errorlevel 1 (
96 echo compilation in draftmode without errors
97 echo Run LaTeX again on %1.tex
98 latex -interaction=nonstopmode %1.tex >NUL
99 dvips -q %1.dvi
100 call ps2pdf %1.ps
101 echo Typesetting %1 finished
102 ) else (
103 echo compilation in draftmode with errors)
104 goto:eof
105 ::
106 :clean
107 echo.
108 echo Removing help files
109 ::
110 for %%I in (aux dtxe dvi glo glolog gls hd ins idx idxlog ilg ind log out ps thm tmp toc xdv) do (
111 if exist mdframed.%%I del mdframed.%%I
112 for %%J in (default tikz pstricks texsx) do (
113 if exist mdframed-example-%%J.%%I del mdframed-example-%%J.%%I
114 )
115 )
116 echo Removing finished
117 goto:eof