Lines Matching refs:this

46     $this->id = cleanID($id);
47 $this->ns = getNS(cleanID($id));
48 $this->namespace_mode = $namespace_mode;
49 $this->nsbpc = $nsbpc_obj;
50 $this->conf = $conf;
51 $this->set_prefix();
52 $this->_set_texit_dir();
53 $this->_set_media_dir();
54 $this->bibfn = $this->generate_bib();
55 $this->get_all_files();
56 $this->conf['latexentities'] = false; // we generate it at compile time
57 $this->texit_render_obj = false;
67 return $this->confToHash($basefn);
136 $needsupdate = $this->_needs_update($basefn, $destfn);
142 if ($this->_needs_update(wikiFN($page['id']), $destfn)) {
156 $bibtext .= $this->parse_refnotes_page($fn);
177 if (!$this->conf['use_prefix']) {
178 $this->prefix = '';
181 if (!empty($this->conf['pre_prefix'])) {
182 $this->prefix = $this->conf['pre_prefix'].":";
184 $this->prefix .= $this->ns;
185 if ($this->conf['prefix_separator']) {
186 $this->prefix = str_replace(':', $this->conf['prefix_separator'], $this->prefix);
187 $this->prefix .= $this->conf['prefix_separator'];
219 $path .= '/'.str_replace(':','/',$this->ns);
221 $this->_create_dir($path);
222 $this->mediadir = $path;
227 $path = $this->conf['texitdir'];
230 $path .= '/'.str_replace(':','/',$this->ns);
231 $this->_create_dir($path);
233 $this->texitdir = $path;
237 return $this->mediadir.'/'.$this->get_common_basename().".zip";
241 return $this->bibfn;
247 return $this->texitdir.'/'.'texit.bib';
251 return $this->mediadir.'/'.$this->prefix.$this->get_common_basename().".pdf";
255 return $this->ns.':'.$this->prefix.$this->get_common_basename().".pdf";
259 return $this->texitdir.'/'.$this->get_common_basename().".pdf";
268 if ($this->namespace_mode) {
271 return $this->_escape_fn(noNS($this->id));
282 if ($this->namespace_mode) {
285 $found = $this->nsbpc->getConfFN($header_name, $this->ns);
292 if ($this->namespace_mode) {
305 if ($this->namespace_mode) {
306 return $this->texitdir."/all.tex";
308 return $this->texitdir.'/'.$this->get_common_basename().".tex";
316 $found = $this->nsbpc->getConfFN("texit-footer", $this->ns);
331 return $this->texitdir."/footer.tex";
338 $found = $this->nsbpc->getConfFN("texit-commands", $this->ns);
353 return $this->texitdir."/commands.tex";
361 if ($this->namespace_mode) {
363 $nsdir = str_replace(':', '/', $this->ns);
372 if ($this->conf['includestart'] == false) {
378 return array(array('id' => $this->id));
393 $id_array = $this->get_all_IDs();
401 $dest = $this->texitdir.'/'.noNS($value['id'])."-content.tex";
402 $dest = $this->_escape_fn($dest);
406 $base = $this->get_base_header_fn();
410 $result[$base] = array('type' => 'header', 'fn' => $this->get_dest_header_fn());
411 $base = $this->get_base_commands_fn();
415 $result[$base] = array('type' => 'commands', 'fn' => $this->get_dest_commands_fn());
416 $bib = $this->get_base_bib_fn();
418 $result[$bib] = array('type' => 'bib', 'fn' => $this->get_dest_bib_fn());
420 $footer = $this->get_base_footer_fn();
422 $result[$footer] = array('type' => 'footer', 'fn' => $this->get_dest_footer_fn());
424 $this->all_files = $result;
438 $this->simple_copy($base, $dest);
444 foreach($this->all_files as $value) {
477 if (!$this->conf['latexentities'])
479 $this->conf['latexentities'] = $this->get_entities();
481 if (!$this->texit_render_obj)
483 $this->texit_render_obj = new texitrender_plugin_texit($this);
485 $this->texit_render_obj->process($base, $dest);
520 if (!is_array($this->all_files)) {
521 $this->get_all_files();
523 if (!is_array($this->all_files)) {
527 foreach($this->all_files as $base => $dest) {
529 if ($this->_needs_update($base, $destfn)) {
533 $this->compile_header($base, $destfn, $this->all_files);
536 $this->simple_copy($base, $destfn);
539 $this->simple_copy($base, $destfn);
542 $this->simple_copy($base, $destfn);
545 $this->compile_tex($base, $destfn);
558 if (!is_dir($this->texitdir)) {
559 die("TeXit: directory $this->texitdir doesn't exit");
561 chdir($this->texitdir);
563 if (isset($this->conf['latexmk_path'])
564 && trim($this->conf['latexmk_path']) != "") {
565 $basecmdline = $this->conf['latexmk_path'] . DIRECTORY_SEPARATOR;
570 if ($this->bibfn) {
573 switch ($this->conf['latex_mode'])
592 $file = basename($this->get_dest_header_fn());
615 $zipfn = $this->get_zip_fn();
626 $zip->addFile($this->get_pdf_texit_fn(), basename($this->get_pdf_texit_fn()));
627 foreach($this->all_files as $base => $dest) {
639 $needsupdate = $this->setup_files();
640 $pdftexitfn = $this->get_pdf_texit_fn();
641 $pdfmediafn = $this->get_pdf_media_fn();
642 $pdfmediaid = $this->get_pdf_media_id();
643 $zipfn = $this->get_zip_fn();
645 $this->_do_latexmk();
649 $this->simple_copy($pdftexitfn, $pdfmediafn);
651 if ($this->conf['use_zip'] && ($needsupdate || !@file_exists($zipfn))) {
652 $this->compile_zip();
654 return $this->id_to_url($pdfmediaid);