[sword-svn] r3085 - trunk/src/modules/filters
refdoc at crosswire.org
refdoc at crosswire.org
Sat Mar 8 15:29:44 MST 2014
Author: refdoc
Date: 2014-03-08 15:29:44 -0700 (Sat, 08 Mar 2014)
New Revision: 3085
Modified:
trunk/src/modules/filters/teihtmlhref.cpp
trunk/src/modules/filters/teirtf.cpp
trunk/src/modules/filters/teixhtml.cpp
Log:
Implementation of API-158 TEI "subscript" argument for <rend>
Modified: trunk/src/modules/filters/teihtmlhref.cpp
===================================================================
--- trunk/src/modules/filters/teihtmlhref.cpp 2014-03-08 07:16:58 UTC (rev 3084)
+++ trunk/src/modules/filters/teihtmlhref.cpp 2014-03-08 22:29:44 UTC (rev 3085)
@@ -93,6 +93,8 @@
buf += "<i>";
else if (rend == "bold")
buf += "<b>";
+ else if (rend == "subscript")
+ buf += "<small><sub>";
else if (rend == "sup")
buf += "<small><sup>";
@@ -105,6 +107,8 @@
buf += "</i>";
else if (rend == "bold")
buf += "</b>";
+ else if (rend == "subscript")
+ buf += "</small></sub>";
else if (rend == "sup")
buf += "</sup></small>";
}
Modified: trunk/src/modules/filters/teirtf.cpp
===================================================================
--- trunk/src/modules/filters/teirtf.cpp 2014-03-08 07:16:58 UTC (rev 3084)
+++ trunk/src/modules/filters/teirtf.cpp 2014-03-08 22:29:44 UTC (rev 3085)
@@ -80,6 +80,8 @@
buf += "{\\i1 ";
else if (rend == "bold")
buf += "{\\b1 ";
+ else if (rend == "subscript")
+ buf += "{\\sub ";
else if (rend == "sup")
buf += "{\\super ";
Modified: trunk/src/modules/filters/teixhtml.cpp
===================================================================
--- trunk/src/modules/filters/teixhtml.cpp 2014-03-08 07:16:58 UTC (rev 3084)
+++ trunk/src/modules/filters/teixhtml.cpp 2014-03-08 22:29:44 UTC (rev 3085)
@@ -95,6 +95,8 @@
buf += "<b>";
else if (rend == "sup")
buf += "<small><sup>";
+ else if (rend == "subscript")
+ buf += "<small><sub>";
else if (rend == "overline")
buf += "<span style=\"text-decoration:overline\">";
@@ -109,6 +111,8 @@
buf += "</b>";
else if (rend == "sup")
buf += "</sup></small>";
+ else if (rend == "subscript")
+ buf += "</small></sub>";
else if (rend == "overline")
buf += "</span>";
}
More information about the sword-cvs
mailing list