| 1 |
<?php |
<?php |
| 2 |
// $Id$ |
// $Id: drutex_latex.inc,v 1.11 2006/09/06 02:25:41 dfg Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 13 |
return (object) array( |
return (object) array( |
| 14 |
'title' => t('LaTeX to HTML'), |
'title' => t('LaTeX to HTML'), |
| 15 |
'description' => t('Converts many LaTeX commands and environments to plain HTML.'), |
'description' => t('Converts many LaTeX commands and environments to plain HTML.'), |
| 16 |
'toggle' => true, |
'toggle' => TRUE, |
| 17 |
'weight' => 4 |
'weight' => 4 |
| 18 |
); |
); |
| 19 |
} |
} |
| 20 |
|
|
| 21 |
/** |
/** |
| 22 |
|
* Implementation of subhook_filter_tips(). |
| 23 |
|
*/ |
| 24 |
|
function drutex_latex_filter_tips($delta, $format, $long = FALSE) { |
| 25 |
|
if (user_access('access latex source')) { |
| 26 |
|
return t('Visit drutex/latex/nid to generate a LaTeX file of this node.'); |
| 27 |
|
} |
| 28 |
|
} |
| 29 |
|
|
| 30 |
|
/** |
| 31 |
|
* Implementation of subhook_link(). |
| 32 |
|
*/ |
| 33 |
|
function drutex_latex_link($type, $node = NULL, $teaser = FALSE) { |
| 34 |
|
if (user_access('access latex source')) { |
| 35 |
|
$latex_link = 'drutex/latex/'. $node->nid; |
| 36 |
|
$text = t('Generate LaTex file'); |
| 37 |
|
$links['drutex_latex_link'] = array( |
| 38 |
|
'title' => $text, |
| 39 |
|
'href' => $latex_link, |
| 40 |
|
); |
| 41 |
|
return $links; |
| 42 |
|
} |
| 43 |
|
} |
| 44 |
|
|
| 45 |
|
/** |
| 46 |
* Implementation of subhook_defaults(). |
* Implementation of subhook_defaults(). |
| 47 |
*/ |
*/ |
| 48 |
function drutex_latex_defaults() { |
function drutex_latex_defaults() { |
| 49 |
$D['drutex_latex_active'] = false; |
$D['drutex_latex_active'] = FALSE; |
| 50 |
return $D; |
return $D; |
| 51 |
} |
} |
| 52 |
|
|