[liblouis-liblouisxml] [liblouisutdml] push by mwhapples - A patch to solve multiple brl nodes after math nodes. on 2014-03-06 09:07 GMT

  • From: liblouisutdml@xxxxxxxxxxxxxx
  • To: liblouis-liblouisxml@xxxxxxxxxxxxx
  • Date: Thu, 06 Mar 2014 09:07:57 +0000

Revision: ef4d05e743c3
Branch:   default
Author:   Michael Whapples <mwhapples@xxxxxxx>
Date:     Thu Mar  6 09:16:18 2014 UTC
Log:      A patch to solve multiple brl nodes after math nodes.
http://code.google.com/p/liblouisutdml/source/detail?r=ef4d05e743c3

Modified:
 /liblouisutdml/transcribe_math.c

=======================================
--- /liblouisutdml/transcribe_math.c    Mon Dec  2 06:19:53 2013 UTC
+++ /liblouisutdml/transcribe_math.c    Thu Mar  6 09:16:18 2014 UTC
@@ -34,6 +34,7 @@
 #include "louisutdml.h"

 static int mathTrans ();
+static void mathCreateBrlNode ();
 static void mathText (xmlNode * node, int action);
 static xmlNode *curLink;

@@ -49,6 +50,7 @@
     {
       insert_translation (ud->main_braille_table);
       curLink = node;
+      mathCreateBrlNode ();
     }
   else
     push_sem_stack (node);
@@ -115,12 +117,12 @@
   translationLength = ud->text_length;
   if (ud->format_for == utd)
     {
-      xmlNode *curBrlNode;
-      xmlNode *newNode = xmlNewNode (NULL, (xmlChar *) "brl");
-      xmlSetProp (newNode, (xmlChar *) "modifiers", (xmlChar *) "notext");
-      curBrlNode = xmlAddNextSibling (curLink, newNode);
-      link_brl_node (curBrlNode);
-      curLink = curBrlNode;
+      // xmlNode *curBrlNode;
+      // xmlNode *newNode = xmlNewNode (NULL, (xmlChar *) "brl");
+ // xmlSetProp (newNode, (xmlChar *) "modifiers", (xmlChar *) "notext");
+      // curBrlNode = xmlAddNextSibling (curLink, newNode);
+      // link_brl_node (curBrlNode);
+      // curLink = curBrlNode;
       ud->text_buffer[ud->text_length++] = ENDSEGMENT;
       translationLength++;
       k = lou_translate (ud->mathexpr_table_name,
@@ -155,3 +157,14 @@
 {
     insert_utf8 (node->content);
 }
+
+static void
+mathCreateBrlNode ()
+{
+  xmlNode *curBrlNode;
+  xmlNode *newNode = xmlNewNode (NULL, (xmlChar *) "brl");
+  xmlSetProp (newNode, (xmlChar *) "modifiers", (xmlChar *) "notext");
+  curBrlNode = xmlAddNextSibling (curLink, newNode);
+  link_brl_node (curBrlNode);
+  curLink = curBrlNode;
+}
For a description of the software, to download it and links to
project pages go to http://www.abilitiessoft.com

Other related posts:

  • » [liblouis-liblouisxml] [liblouisutdml] push by mwhapples - A patch to solve multiple brl nodes after math nodes. on 2014-03-06 09:07 GMT - liblouisutdml