Daniel Gruss %!s(int64=2) %!d(string=hai) anos
pai
achega
0bdcc729c5
Modificáronse 2 ficheiros con 9 adicións e 7 borrados
  1. 6 6
      generator.php
  2. 3 1
      main.tex.php

+ 6 - 6
generator.php

@@ -472,10 +472,10 @@ TODO
 
 \\newpage
 \begin{center}
-{\Large \\textbf{
-$paper_fulltitle%
-}}\\\\\
-\\vspace{0.6cm}
+{\Large \bfseries
+
+$paper_fulltitle
+}\\vspace{0.6cm}
 {\large $authors%
 } % TODO: check author list
 {\large $institute%
@@ -518,7 +518,7 @@ END;
       $tex = preg_replace("/\\\begin{abstract}/i",'\section*{Abstract}',$tex);
       $tex = preg_replace("/\\\\newcommand/i",'\declarecommand',$tex);
       $tex = preg_replace("/\\\\renewcommand/i",'\declarecommand',$tex);
-      //$tex = preg_replace("/\\\\DeclareRobustCommand/i",'\declarecommand',$tex);
+      $tex = preg_replace("/\\\\DeclareRobustCommand\s*(?<R>{((?:[^{}]+|(?&R))*)})\s*(?<Q>{((?:[^{}]+|(?&Q))*)})/i",'\declarecommand',$tex);
       $tex = preg_replace("/\\\\newenvironment/i",'\declareenvironment',$tex);
       $tex = preg_replace("/\\\\renewenvironment/i",'\declareenvironment',$tex);
       $tex = preg_replace("/\\\\NewDocumentEnvironment/i",'\DeclareDocumentEnvironment',$tex);
@@ -801,7 +801,7 @@ END;
   }
   if (isset($options["--compile"]))
   {
-    exec('latexmk -latexoption="-shell-escape" -g -pdf main.tex');
+    passthru('latexmk -latexoption="-shell-escape" -g -pdf main.tex');
   }
   else
   {

+ 3 - 1
main.tex.php

@@ -1,4 +1,6 @@
-\documentclass[paper=a4,fontsize=11pt,twoside,titlepage,parskip=half-,openright]{scrbook}
+\documentclass[paper=a4,fontsize=11pt,twoside,titlepage,parskip=half-,openright,draft]{scrbook} % TODO remove draft
+
+\overfullrule=20pt % TODO fix the overfull hboxes
 
 \newif\ifbeischnittzugabe\beischnittzugabefalse % TODO set to true for final upload (required by flyeralarm)