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

+ 3 - 0
generator.php

@@ -468,6 +468,7 @@ END;
         $tex = preg_replace("/\\\\includegraphics\s*(?<R>\[((?:[^\[\]]+|(?&R))*)\])(?<Q>{((?:[^{}]+|(?&Q))*)})/i",'\includegraphics${1}{'.$d.'/${4}}',$tex);
         $tex = preg_replace("/\n\s*\\\\maketitle/i","",$tex);
         $tex = preg_replace("/\\\\IEEEoverridecommandlockouts/i","",$tex);
+        $tex = preg_replace("/\\\\twocolumn/i","",$tex);
         $tex = preg_replace("/\n\s*\\\\tikzexternalize/i","",$tex);
         [$ups,$ps] = getusepackages($tex);
         global $included_usepackages;
@@ -502,6 +503,8 @@ END;
 
         if (stripos($tex,"\appendices") !== false || stripos($tex,"\appendix") !== false)
           $tex = handle_appendix($tex);
+        if (!str_starts_with($tex,"\\makeatletter\n\def\\relativepath{\\import@path}\n\\makeatother\n"))
+          $tex = "\\makeatletter\n\def\\relativepath{\\import@path}\n\\makeatother\n" . $tex;
         file_put_contents($file,$tex);
       }
     }