From 1c32172efb18e8d08ea483e2460813670ebfe1a5 Mon Sep 17 00:00:00 2001 From: xue <> Date: Sat, 30 Sep 2006 18:40:40 +0000 Subject: merge from 3.0 branch till 1451. --- buildscripts/texbuilder/Page2Tex.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'buildscripts') 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 +?> -- cgit v1.2.3