blob: f6f164b74a19eb33d971e5da870b696654566bf8 (
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
|
@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
)
set epstool=epstool
set epstopdf=epstopdf
set etflags=--quiet --copy --bbox
set figclfiles=*.pdf
set suffix=~
rem end of configuration
if "%1"=="" (
:default
call :help
goto :eof
)
:start
if "%1"=="" goto :eof
if "%1"=="help" (
:help
echo Targets:
echo clean - clean generated PDF files
echo epstopdf - convert all figures to PDF
echo fixbb - fix BoundingBox
echo help - ^(default^) show this message
goto :eof
)
if "%1"=="clean" (
:clean
del /s %figclfiles% 2> nul
goto :eof
)
if "%1"=="epstopdf" (
:epstopdf
for /f "usebackq" %%n in (`dir *.eps /s /b`) do call :conv %%n
goto :end
:conv
%epstopdf% "%1"
echo epstopdf: %~nx1...done
goto :eof
)
if "%1"=="fixbb" (
:fixbb
for /f "usebackq" %%n in (`dir *.eps /s /b`) do call :fix %%n
goto :end
:fix
%epstool% %etflags% %1 %1.%suffix%
move %1.%suffix% %1 > nul
echo fixbb: %~nx1...done
goto :eof
)
if "%1" neq "" echo Don't know how to make %1
:end
shift & goto :start
|