Esempio n. 1
0
             }
         }
     }
     fclose($fFeatures);
     $fCategories = fopen($texFolder . "categories.tex", "w+");
     fwrite($fCategories, "\\cwiki{" . getTexCommandName($baseCat->getTitle()) . "}" . PHP_EOL);
     foreach ($baseCat->getFullCategoryTree() as $c) {
         if ($c->namespace == "Category") {
             fwrite($fCategories, "\\cwiki{" . getTexCommandName($c->getTitle()) . "}" . PHP_EOL);
         }
     }
     fclose($fCategories);
     $fPages = fopen($texFolder . "pages.tex", "w+");
     foreach ($allPages as $p) {
         if (strstr($p->getFullTitle(), ":") == FALSE) {
             fwrite($fPages, "\\pwiki{" . getTexCommandName($p->getTitle()) . "}" . PHP_EOL);
         }
     }
     fclose($fPages);
     //formatTex();
 } else {
     if ($args['mode'] == 'matrixif' || $args['mode'] == 'matrixis' || $args['mode'] == 'matrixts') {
         $output = $texFolderMatrix . $args['mode'] . ".tex";
         if ($args['output'] != '') {
             $output = $texFolderMatrix . $args['output'] . ".tex";
         }
         var_dump($output);
         $ilist = array();
         $tlist = array();
         if ($args['ilist'] != '') {
             $ilist = file(realpath($args['ilist']), FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
Esempio n. 2
0
 function toTexMacro()
 {
     $tex = "\\newcommand{\\" . getTexCommandName($this->getTitle()) . "FeatureTitle}{" . $this->getTitle() . "}" . PHP_EOL;
     $tex .= "\\newcommand{\\" . getTexCommandName($this->getTitle()) . "FeatureIntent}{" . formatter::toTex($this->intent) . "}" . PHP_EOL;
     $tex .= "\\newcommand{\\" . getTexCommandName($this->getTitle()) . "FeatureDescription}{" . formatter::toTex($this->description) . "}" . PHP_EOL;
     $tex .= "\\newcommand{\\" . getTexCommandName($this->getTitle()) . "FeatureIllustration}{" . formatter::toTex($this->illustration) . "}" . PHP_EOL;
     return $tex;
 }