find . -name "*.pdf" -exec pdftops -eps {} \;
The other difficulty was related doflattening the tex files and including the bibliography rather than the bib file. So I would not have to deal with this nonsense again, I wrote a short script to do this for me. I hope to expand this in the future to also handle the renaming of the figures in order of appearance; but for now that remains a manual step. The scrip is attached to the end this post
""" This script helps generate the camera ready version of papers. - it flattens the latex file by including all dependencies (recursively) - it includes the bibliography from a bbl removing the need for a bib file TODO: - automatically rename the figures in order of their apparence in the paper """ import re import sys all_lines = [] r_input = re.compile("\\\\input\{([a-zA-Z].*)\}") def add_line(line): #if (line.startswith("%") == False): # all_lines.append(line); all_lines.append(line); def process_line(line): m = r_input.match(line) if (m != None): input_file = "%s.tex" % m.groups()[0] print "including tex from", input_file f = open(input_file, "r"); lines = f.readlines() f.close(); for line in lines: process_line(line); elif (line.startswith("\\bibliography{")): print "including bib from", f_bib f = open(f_bib, "r") lines = f.readlines(); f.close() for line in lines: process_line(line); else: #print "[%s]" % line, line.find("\\bibliography{"), line.startswith("\\bibliography{") add_line(line) if __name__ == "__main__": if (len(sys.argv) != 3): print "Usage: %sEND
No comments:
Post a Comment