blob: 6232434028afcc5dc11f579f8affd24efbc86de4 (
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
|
@echo off
rem nomake script for EPS figures
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 "%e2e%"=="" set e2e=eps2eps
if "%epstool%"=="" set epstool=epstool
if "%epstopdf%"=="" set epstopdf=epstopdf
if "%e2eflags%"=="" set e2eflags=-dSAFER
if "%etflags%"=="" set etflags=--quiet --copy --bbox
if "%e2efiles%"=="" set e2efiles=*.eps
if "%e2pfiles%"=="" set e2pfiles=*.eps
if "%fbbfiles%"=="" set fbbfiles=*.eps
if "%figclfiles%"=="" set figclfiles=*.pdf
if "%suffix%"=="" set suffix=~
rem end of configuration
setlocal enabledelayedexpansion
if "%1"=="" (
:default
call :help
goto :eof
)
:start
if "%1"=="" goto :eof
if "%1"=="help" (
:help
echo List of targets:
echo clean clean PDF files
echo epstoeps optimize EPS files
echo epstopdf convert all figures to PDF
echo fixbb fix BoundingBox of EPS files
echo help ^(default^) show this message
goto :eof
)
if "%1"=="clean" (
:clean
del /s %figclfiles% 2> nul
goto :eof
)
if "%1"=="epstopdf" (
:epstopdf
if "%2" neq "" set e2pfiles=%2 %3 %4 %5 %6 %7 %8 %9
for %%f in (!e2pfiles!) do (
if not exist "%%~nf.pdf" (
%epstopdf% "%%f"
echo epstopdf: %%f
)
)
goto :eof
)
if "%1"=="fixbb" (
:fixbb
if "%2" neq "" set fbbfiles=%2 %3 %4 %5 %6 %7 %8 %9
for %%f in (!fbbfiles!) do (
%epstool% %etflags% "%%f" "%%f%suffix%"
move "%%f%suffix%" "%%f" > nul
echo fixbb: %%f
)
goto :eof
)
if "%1"=="epstoeps" (
:epstoeps
if "%2" neq "" set e2efiles=%2 %3 %4 %5 %6 %7 %8 %9
for %%f in (!e2efiles!) do (
%e2e% %e2eflags% "%%f" "%%f%suffix%"
move "%%f%suffix%" "%%f" > nul
echo epstoeps: %%f
)
goto :eof
)
if "%1" neq "" echo Don't know how to make %1
:end
shift & goto :start
|