Posted by franqui on November 9, 2007 at 3:48pm
Hi folks:
I've been playing around with the module, and I found an error when converting html tags to latex commands (more precisely, when converting the tag <em> to the \emph{} command).
For some reason I got a "\" before the opening curly bracket, so the command - \emph{ whatever } - was not properly recongized.
I just changed the line 361 of the file drutex.module:
function _drutex_create_regex($entity, $format = -1) {
$pattern = $entity->pattern;
$replacement = preg_replace('@<var>([^<]+)</var>@se', "$$1", $entity->replace$
switch ($entity->type) {
case 'latex-command':
$pattern = "/\\$pattern\{(.*?)\}/s";
return array($pattern, $replacement);
case 'tag':
$pattern = "@<$pattern( [^>]*)?>(.*?)</$pattern>@s";
return array($pattern, $replacement);
case 'tag2command':
$pattern = "@<$pattern( [^>]*)?>(.*?)</$pattern>@s";
$replacement = "\\$replacement{\$2}";
return array($pattern, $replacement);The second line in the 'tag2command' case seemed to be wrong. The original line was:
$replacement = "\\$replacement{\$2}";Now the TeX generation is working fine. Have you guys the same problem?
Cheers,
Fran.
Comments
hi...working with views
this is the error tat pops out on trying to change the settings
do help me ..please....its urgent
do contact me in gmail...passion1067@gmail.com
or feel free to call me in 91-9995426663
warning: syntax error, unexpected $end, expecting TC_DOLLAR_CURLY or TC_QUOTED_STRING or '"' in ./modules/views/help/views.help.ini on line 190 in D:\Zend\Apache2\htdocs\projects\prasanth\drupal\modules\advanced_help\advanced_help.module on line 667.