lib/coderunner/run.rb in coderunner-0.14.21 vs lib/coderunner/run.rb in coderunner-0.14.22
- old
+ new
@@ -1076,8 +1076,40 @@
def actual_number_of_processors
raise "Please specify the processor layout using the -n or (n:) option" unless @nprocs
@nprocs.split('x').slice(0..1).map{|n| n.to_i}.inject(1){|ntot, n| ntot*n}
end
+def latex_report_header
+#gsub is a hack which removes 14 spaces from the beginning of the file. This allows nice code indentation here.
+<<-EOF.gsub(/^ {4}/, "")
+ % Set up
+ \\documentclass[11pt, twocolumn]{report}
+ \\usepackage{amsmath}
+ \\usepackage{amsthm}
+ \\usepackage{amssymb}
+ \\usepackage{graphicx}
+ \\usepackage{caption}
+ \\usepackage{subcaption}
+ \\usepackage{wrapfig}
+ \\usepackage{epstopdf}
+ \\usepackage{fullpage}
+
+ \\newcommand{\\newfig}[1]{
+ \\includegraphics[width=\\linewidth]{#1}
+ }
+
+ \\begin{document}
+
+ % Title Page
+ \\title{Run summary for run number #{id}}
+ \\date{#{Time.now}}
+ \\author{CodeRunner}
+
+ \\maketitle
+
+EOF
+
+end
+
end
end