>+ >+# author user SchAirport on trac I'm not sure what to do with this.
>+def make_bbl(name): #Creates .bbl from .tex >+ arg = "bibtex " + name[:-4] #name[:-4] is the name of the file without extension >+ os.system(arg) >+ This is not necessary (and wrong). The bbl file is generated anyway, and we might have specified a custom bibtex command. >+ >+def insert_bib(name,outputfilename): #Inserts the contents of the .bbl file instead of the bibliography in a new .tex file >+ fileold = name[:-4] + ".tex" #The old .tex file >+ texfile = open(fileold, 'r') The filename is supplied as the first parameter to the script right, so there is no need to do this. >+def make_clean(name): #Cleans files created in the process >+ extensions = ['aux', 'bbl', 'blg', 'dvi', 'log', 'spl'] >+ files = [f for f in os.listdir(os.getcwd()) if os.path.isfile(f)] #puts every filename in the current directory in a list >+ filesinteresting = [f for f in files if name[:-4] in f] #Every file with the same name as the original file >+ for f in filesinteresting: >+ overall = sum([(f[-3:]==ext) for ext in extensions]) #Is 1 if f has any of the extensions, 0 otherwise >+ if overall: >+ os.remove(f) This is not necessary, we're working in the temp directory anyway. >+ if len(sys.argv) >= 3: >+ outputfile = str(sys.argv[2]) Shouldn't this be 2 then ? >+\Format ltxbib tex "LaTeX (plain,embed bib)" "" "" "%%" "document" > \Format pdflatex tex "LaTeX (pdflatex)" "" "" "%%" "document" >+\Format pdfltxbib tex "LaTeX (pdflatex,embed bib)" "" "" "%%" "document" Why, maybe again, do we need a pdflatex version ? >- scripts/tex_copy.py >+ scripts/tex_copy.py \ >+ scripts/inline_bib.py A little glitch. I guess we keep this file sorted alphabetically, but don't hold me to that. Vincent