-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFigureOrder
More file actions
executable file
·34 lines (33 loc) · 1.11 KB
/
FigureOrder
File metadata and controls
executable file
·34 lines (33 loc) · 1.11 KB
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
#!/bin/tcsh
#Get the figures in order from your paper.
# - Makes a subdirectory 'submit,'
# - Copies all relevant tex files to ./submit
# - Copies and orders all figures to .submit
#When you submit to ApJ:
# - Make the paper (to get the bbl and ms.aux files)
# - Tar the whole damned thing
# - submit.
set directory = submit
if( ! -e $directory ) mkdir $directory
#Only grab relevant files: relevant tex files and meta files.
cp `tex_figs -i` $directory
cp apj-jour.bib apj.bst emulateapj.cls ms.bib $directory
set plt_format = "pdf"
cd $directory
set figs = (`tex_figs -g -f $plt_format`)
set counter = 1
set ExtraTextForCollisions = AND_SOME_EXTRA_TEXT_TO_AVOID_NAME_COLLISIONS
set Live = True
while( $counter <= $#figs)
set InitialName = $figs[$counter]
set DestText = "f"$ExtraTextForCollisions$counter".$plt_format"
set DestFileName = "f"$counter".$plt_format"
echo $InitialName $DestFileName
if( $Live == True ) then
cp ../$InitialName $DestFileName
sed -i .bak "s,$InitialName,$DestText," *.tex
endif
@ counter ++
end
if( $Live == True ) sed -i .bak "s,$ExtraTextForCollisions,," *.tex
#end