|
[Rivet-svn] r2174 - trunk/docblackhole at projects.hepforge.org blackhole at projects.hepforge.orgFri Dec 11 12:48:25 GMT 2009
Author: buckley Date: Fri Dec 11 12:48:25 2009 New Revision: 2174 Log: Various doc builder updates Modified: trunk/doc/Makefile.am trunk/doc/mk-analysis-latex trunk/doc/readplot.py Modified: trunk/doc/Makefile.am ============================================================================== --- trunk/doc/Makefile.am Thu Dec 10 22:16:10 2009 (r2173) +++ trunk/doc/Makefile.am Fri Dec 11 12:48:25 2009 (r2174) @@ -4,7 +4,7 @@ EXTRA_DIST = compare-histos.txt heppennames.sty cone.png h-physrev3.bst hepnames.sty JHEP3.cls \ make-plots.html bend.png hepnicenames.sty JHEP.bst make-plots.txt rivet-manual.tex preamble.tex \ compare-histos.html hepparticles.sty maybemath.sty refs.bib rivet-manual.pdf thinker.png \ - hepunits.sty underscore.sty microtype.sty + hepunits.sty underscore.sty microtype.sty readplot.py DOCS = @@ -28,7 +28,7 @@ if ENABLE_PYEXT -analyses.tex: $(top_srcdir)/include/Rivet/Analyses mk-analysis-latex +analyses.tex: $(top_srcdir)/include/Rivet/Analyses $(top_srcdir)/data/plotinfo $(top_srcdir)/data/anainfo mk-analysis-latex LD_LIBRARY_PATH=$(top_srcdir)/src/.libs:$(FASTJETLIBPATH):$(HEPMCLIBPATH):$(LD_LIBRARY_PATH):$(prefix)/lib \ DYLD_LIBRARY_PATH=$(top_srcdir)/src/.libs:$(FASTJETLIBPATH):$(HEPMCLIBPATH):$(DYLD_LIBRARY_PATH):$(prefix)/lib \ RIVET_DATA_PATH=$(top_srcdir)/data/anainfo \ @@ -56,9 +56,7 @@ $(LATEX) $<; true egrep $(MAKEIDX) $< && ($(MAKEINDEX) $(DOCNAME) && cp $(DOCNAME).toc $(DOCNAME).toc.bak && $(LATEX) $<) > /dev/null; true egrep -c $(RERUNBIB) $(DOCNAME).log && ($(BIBTEX) $(DOCNAME) && cp $(DOCNAME).toc $(DOCNAME).toc.bak && $(LATEX) $<); true - egrep $(RERUN) $(DOCNAME).log && cp $(DOCNAME).toc $(DOCNAME).toc.bak && $(LATEX) $<; true - egrep $(RERUN) $(DOCNAME).log && cp $(DOCNAME).toc $(DOCNAME).toc.bak && $(LATEX) $<; true - egrep $(RERUN) $(DOCNAME).log && cp $(DOCNAME).toc $(DOCNAME).toc.bak && $(LATEX) $<; true + while true; do if egrep $(RERUN) $(DOCNAME).log; then cp $(DOCNAME).toc $(DOCNAME).toc.bak && $(LATEX) $<; else break; fi; done; true if cmp -s $(DOCNAME).toc $(DOCNAME).toc.bak; then true; else $(LATEX) $<; true; fi $(RM) $(DOCNAME).toc.bak; true Modified: trunk/doc/mk-analysis-latex ============================================================================== --- trunk/doc/mk-analysis-latex Thu Dec 10 22:16:10 2009 (r2173) +++ trunk/doc/mk-analysis-latex Fri Dec 11 12:48:25 2009 (r2174) @@ -47,12 +47,14 @@ def texify(s): t = s \ - .replace("&", "\\&") \ - .replace("->", "\\ensuremath{\\to}") \ - .replace("_", "\\_") \ - .replace("^", "") \ - .replace("pT", "\\pT") \ - .replace("sqrt(s)", "\\ensuremath{\\sqrt{s}}") + .replace(r"&", r"\&") \ + .replace(r"\\&", r"\&") \ + .replace(r"#", r"\#") \ + .replace(r"->", r"\ensuremath{\to}") \ + .replace(r"pT", r"\pT") \ + .replace(r"sqrt(s)", r"\ensuremath{\sqrt{s}}") + # .replace(r"_", r"\_") \ + # .replace(r"^", r"") \ return t @@ -63,12 +65,14 @@ for aname in sorted(list(all_analyses)): page = "" ana = rivet.AnalysisLoader.getAnalysis(aname) - page += "\\subsection{%s}\n" % aname + page += "\\subsection{%s}\n" % aname.replace(r"_", r"\_") page += "\\textbf{%s}\\newline\n" % ana.summary() - page += "\\textbf{Experiment:} %s (%s) \\newline\n" % (ana.experiment(), ana.collider()) - spiresbase = "http://www.slac.stanford.edu/spires/find/hep/www?rawcmd=key" - page += "\\textbf{Spires ID:} \\href{%s+%s}{%s}\\newline\n" % \ - (spiresbase, ana.spiresId(), ana.spiresId()) + if ana.experiment(): + page += "\\textbf{Experiment:} %s (%s) \\newline\n" % (ana.experiment(), ana.collider()) + if ana.spiresId(): + spiresbase = "http://www.slac.stanford.edu/spires/find/hep/www?rawcmd=key" + page += "\\textbf{Spires ID:} \\href{%s+%s}{%s}\\newline\n" % \ + (spiresbase, ana.spiresId(), ana.spiresId()) page += "\\textbf{Status:} %s\\newline\n" % ana.status() @@ -86,7 +90,7 @@ page += " \\item %s\n" % s page += "\\end{itemize}\n" else: - page += "\\textbf{No authors listed}\n" + page += "\\textbf{No authors listed}\\ \n" if ana.references(): @@ -105,7 +109,7 @@ page += " \\item %s\n" % r page += "\\end{itemize}\n" else: - page += "\\textbf{No references listed}\n" + page += "\\textbf{No references listed}\\ \n" if ana.runInfo(): @@ -119,7 +123,7 @@ page += " \\item %s\n" % l page += "\\end{itemize}\n" else: - page += "\\textbf{No run details listed}\n" + page += "\\textbf{No run details listed}\\ \n" for para in ana.description().split("\n\n"): @@ -130,12 +134,12 @@ import readplot info = readplot.plotinfo(ana.name()) if info: - page += "\n\\vspace{1em}\\noindent" + page += "\n\\vspace{1em}\n\\noindent\n" page += "\\textbf{Histograms:}\n \\penalty 100\n" page += "\\begin{itemize}\n" - for hpath in info.keys(): + for hpath in sorted(info.keys()): htitle = info[hpath]["TITLE"] - page += " \\item %s (\kbd{%s})\n" % (htitle, hpath) + page += " \\item %s (\kbd{%s})\n" % (htitle, hpath.replace(r"_", r"\_")) page += "\\end{itemize}\n" except: pass Modified: trunk/doc/readplot.py ============================================================================== --- trunk/doc/readplot.py Thu Dec 10 22:16:10 2009 (r2173) +++ trunk/doc/readplot.py Fri Dec 11 12:48:25 2009 (r2174) @@ -1,11 +1,14 @@ #! /usr/bin/env python +## TODO: Why don't these tests work within 'make'? + + ## Make "set" a builtin type on Python < 2.4 -if not 'set' in dir(__builtins__): +if 'set' not in dir(__builtins__): from sets import Set as set ## Make "sorted" a builtin function on Python < 2.4 -if not 'sorted' in dir(__builtins__): +if 'sorted' not in dir(__builtins__): def sorted(iterable, cmp=None, key=None, reverse=None): rtn = iterable rtn.sort(cmp)#, key, reverse)
More information about the Rivet-svn mailing list |