[sword-svn] r3343 - trunk/src/modules/filters
refdoc at crosswire.org
refdoc at crosswire.org
Sat Mar 14 08:35:50 MST 2015
Author: refdoc
Date: 2015-03-14 08:35:50 -0700 (Sat, 14 Mar 2015)
New Revision: 3343
Modified:
trunk/src/modules/filters/teilatex.cpp
Log:
start of the teilatex filter, may change still substantially
Modified: trunk/src/modules/filters/teilatex.cpp
===================================================================
--- trunk/src/modules/filters/teilatex.cpp 2015-03-14 15:00:03 UTC (rev 3342)
+++ trunk/src/modules/filters/teilatex.cpp 2015-03-14 15:35:50 UTC (rev 3343)
@@ -100,17 +100,7 @@
}
else if (tag.isEndTag()) {
- SWBuf rend = u->lastHi;
- if (rend == "italic" || rend == "ital")
- buf += "}";
- else if (rend == "bold")
- buf += "}";
- else if (rend == "super" || rend == "sup")
- buf += "}";
- else if (rend == "sub")
- buf += "}";
- else if (rend == "overline")
- buf += "}";
+ buf += "}";
}
}
@@ -119,9 +109,9 @@
if ((!tag.isEndTag()) && (!tag.isEmpty())) {
SWBuf n = tag.getAttribute("n");
if (n != "") {
- buf += "<b>";
+ buf += "\\teiEntryFree{";
buf += n;
- buf += "</b>";
+ buf += "}";
}
}
}
@@ -131,9 +121,9 @@
if ((!tag.isEndTag()) && (!tag.isEmpty())) {
SWBuf n = tag.getAttribute("n");
if (n != "") {
- buf += "<br /><b>";
+ buf += "\n\\teiSense{";
buf += n;
- buf += "</b>";
+ buf += "}";
}
}
}
@@ -162,30 +152,32 @@
!strcmp(tag.getName(), "pron") /*||
!strcmp(tag.getName(), "def")*/) {
if ((!tag.isEndTag()) && (!tag.isEmpty())) {
- buf += "<i>";
+ buf += "\\tei";
+ buf += tag.getName();
+ buf += "{";
}
else if (tag.isEndTag()) {
- buf += "</i>";
+ buf += "}";
}
}
// <tr>
else if (!strcmp(tag.getName(), "tr")) {
if ((!tag.isEndTag()) && (!tag.isEmpty())) {
- buf += "<i>";
+ buf += "\\teitr";
}
else if (tag.isEndTag()) {
- buf += "</i>";
+ buf += "}";
}
}
// orth
else if (!strcmp(tag.getName(), "orth")) {
if ((!tag.isEndTag()) && (!tag.isEmpty())) {
- buf += "<b>";
+ buf += "\\teiorth{";
}
else if (tag.isEndTag()) {
- buf += "</b>";
+ buf += "}";
}
}
@@ -250,7 +242,7 @@
}
else {
buf += u->lastTextNode.c_str();
- buf += "</a>";
+ buf += "}";
u->suspendTextPassThru = false;
}
More information about the sword-cvs
mailing list