diff options
Diffstat (limited to 'buildscripts/texbuilder/Page2Tex.php')
-rw-r--r-- | buildscripts/texbuilder/Page2Tex.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/buildscripts/texbuilder/Page2Tex.php b/buildscripts/texbuilder/Page2Tex.php index feda4873..912fb82a 100644 --- a/buildscripts/texbuilder/Page2Tex.php +++ b/buildscripts/texbuilder/Page2Tex.php @@ -7,8 +7,8 @@ class Page2Tex private $_base;
private $_dir;
- private $_verb_find = array('\$','\%', '\{', '\}', "\t",'``');
- private $_verb_replace = array('$', '%', '{','}', " ",'"');
+ private $_verb_find = array('\$','\%', '\{', '\}', "\t",'``','`');
+ private $_verb_replace = array('$', '%', '{','}', " ",'"','\'');
function __construct($base, $dir, $current='')
{
@@ -87,7 +87,7 @@ class Page2Tex function texttt($matches)
{
- return '\texttt{'.str_replace(array('#','_'),array('\#','\_'), $matches[1]).'}';
+ return '\texttt{'.str_replace(array('#','_','&'),array('\#','\_','\&'), $matches[1]).'}';
}
function get_current_path()
@@ -130,6 +130,7 @@ class Page2Tex $html = preg_replace('/<\/?p>/', '', $html);
$html = preg_replace('/(\s+|\(+|\[+)"/', '$1``', $html);
+ $html = preg_replace('/(\s+|\(+|\[+)\'/', '$1`', $html);
//escape { and }
$html = preg_replace('/([^\s]+){([^}]*)}([^\s]+)/', '$1\\\{$2\\\}$3', $html);
@@ -286,4 +287,4 @@ class Page2Tex }
-?>
\ No newline at end of file +?>
|