of release 1.10.</EM>
<P>
<B>NOTE:</B><EM>The font markups for bold, italic, underlining, subscript and
-superscript </EM>(<TT><B></TT>, <TT><I></TT>, <TT><U></TT>, <TT><SUB></TT>; and <TT><SUP></TT>)
-<EM>are only available in versions after 14 October 2011, and are
+superscript </EM>(<TT><B></TT>, <TT><I></TT>, <TT><U></TT>, <TT><SUB></TT> and <TT><SUP></TT>)
+<EM>are only available in versions after 14 October 2011, and
+the markup for strike-through (<TT><S></TT>) requires versions later than 15 September 2013.
+In addition, all of these markups are
currently only available via the cairo and svg renderers.
-In addition, the horizontal and vertical rules </EM>(<TT><HR></TT> and <TT><VR></TT>)
+The horizontal and vertical rules </EM>(<TT><HR></TT> and <TT><VR></TT>)
<EM>are only available in versions
later than 8 July 2011.
</EM>
<TD ALIGN=LEFT>|</TD>
<TD ALIGN=LEFT><B><SUP></B> <I>text</I> <B></SUP></B></TD>
</TR>
+<TR>
+ <TD ALIGN=RIGHT></TD>
+ <TD ALIGN=LEFT>|</TD>
+ <TD ALIGN=LEFT><B><S></B> <I>text</I> <B></S></B></TD>
+</TR>
<TR>
<TD ALIGN=RIGHT><I>table</I></TD>
<TD ALIGN=LEFT>:</TD>
<!-- No attributes -->
>
</PRE>
+<P>
+ <!-- Strike-through text -->
+<PRE><S
+ <!-- No attributes -->
+>
+</PRE>
<P>
<!-- Horizontal rule -->
<PRE><HR
of release 1.10.</EM>
<P>
<B>NOTE:</B><EM>The font markups for bold, italic, underlining, subscript and
-superscript </EM>(<TT><B></TT>, <TT><I></TT>, <TT><U></TT>, <TT><SUB></TT>; and <TT><SUP></TT>)
-<EM>are only available in versions after 14 October 2011, and are
+superscript </EM>(<TT><B></TT>, <TT><I></TT>, <TT><U></TT>, <TT><SUB></TT> and <TT><SUP></TT>)
+<EM>are only available in versions after 14 October 2011, and
+the markup for strike-through (<TT><S></TT>) requires versions later than 15 September 2013.
+In addition, all of these markups are
currently only available via the cairo and svg renderers.
-In addition, the horizontal and vertical rules </EM>(<TT><HR></TT> and <TT><VR></TT>)
+The horizontal and vertical rules </EM>(<TT><HR></TT> and <TT><VR></TT>)
<EM>are only available in versions
later than 8 July 2011.
</EM>
<!-- No attributes -->
>
</PRE>
+<P>
+ <!-- Strike-through text -->
+<PRE><S
+ <!-- No attributes -->
+>
+</PRE>
<P>
<!-- Horizontal rule -->
<PRE><HR
label = text | table
text = textitem | text textitem
-textitem = string | T_<BR/> | T_<FONT> text T_</FONT> | T_<I> text T_</I> | T_<B> text T_</B> | T_<U> text T_</U> | T_<SUB> text T_</SUB> |T_<SUP> text T_</SUP>
+textitem = string | T_<BR/> | T_<FONT> text T_</FONT> | T_<I> text T_</I> | T_<B> text T_</B> | T_<U> text T_</U> | T_<SUB> text T_</SUB> |T_<SUP> text T_</SUP> | T_<S> text T_</S>
table = [ T_<FONT> ] T_<TABLE> rows T_</TABLE> [ T_</FONT> ]
rows = row | rows row | rows T_<HR/> row
row = T_<TR> cells T_</TR>
} else if (strcasecmp(name, "B") == 0) {
htmllval.font = mkFont(0, HTML_BF, 0);
state.tok = T_bold;
+ } else if (strcasecmp(name, "S") == 0) {
+ htmllval.font = mkFont(0, HTML_S, 0);
+ state.tok = T_s;
} else if (strcasecmp(name, "U") == 0) {
htmllval.font = mkFont(0, HTML_UL, 1);
state.tok = T_underline;
state.tok = T_n_sup;
} else if (strcasecmp(name, "SUB") == 0) {
state.tok = T_n_sub;
+ } else if (strcasecmp(name, "S") == 0) {
+ state.tok = T_n_s;
} else if (strcasecmp(name, "BR") == 0) {
if (state.tok == T_br)
state.tok = T_BR;
s = "T_underline";
break;
case T_n_underline:
- s = "T_underline";
+ s = "T_n_underline";
break;
case T_italic:
s = "T_italic";
break;
case T_n_italic:
- s = "T_italic";
+ s = "T_n_italic";
break;
case T_bold:
s = "T_bold";
break;
case T_n_bold:
- s = "T_bold";
+ s = "T_n_bold";
+ break;
+ case T_s:
+ s = "T_s";
+ break;
+ case T_n_s:
+ s = "T_n_s";
break;
default:
s = "<unknown>";
%token T_end_br T_end_img T_row T_end_row T_html T_end_html
%token T_end_table T_end_cell T_end_font T_string T_error
-%token T_n_italic T_n_bold T_n_underline T_n_sup T_n_sub
+%token T_n_italic T_n_bold T_n_underline T_n_sup T_n_sub T_n_s
%token T_HR T_hr T_end_hr
%token T_VR T_vr T_end_vr
%token <i> T_BR T_br
%token <img> T_IMG T_img
%token <tbl> T_table
%token <cell> T_cell
-%token <font> T_font T_italic T_bold T_underline T_sup T_sub
+%token <font> T_font T_italic T_bold T_underline T_sup T_sub T_s
%type <txt> fonttext
%type <cell> cell cells
| bold text n_bold
| sup text n_sup
| sub text n_sub
+ | strike text n_strike
;
font : T_font { pushFont ($1); }
n_bold : T_n_bold {popFont();}
;
+strike : T_s {pushFont($1);}
+ ;
+
+n_strike : T_n_s {popFont();}
+ ;
+
underline : T_underline {pushFont($1);}
;
extern "C" {
#endif
-/* Bold, Italic, Underline */
+/* Bold, Italic, Underline, Sup, Sub, Strike */
#define HTML_BF 1
#define HTML_IF 2
#define HTML_UL 4
#define HTML_SUP 8
#define HTML_SUB 16
+#define HTML_S 32
/* font information
* If name or color is NULL, or size < 0, that attribute
typedef struct {
char* name;
char* color;
- int flags:7; /* HTML_UL, HTML_IF, HTML_BF */
- int cnt; /* reference count */
+ int flags:7; /* HTML_UL, HTML_IF, HTML_BF, etc. */
+ int cnt:(sizeof(int) * 8 - 7); /* reference count */
double size;
} htmlfont_t;
gvprintf(job, " font-weight=\"bold\"");
if ((flags & HTML_IF) && !style)
gvprintf(job, " font-style=\"italic\"");
- if ((flags & HTML_UL))
- gvprintf(job, " text-decoration=\"underline\"");
+ if ((flags & (HTML_UL|HTML_S))) {
+ int comma = 0;
+ gvprintf(job, " text-decoration=\"");
+ if ((flags & HTML_UL)) {
+ gvprintf(job, "underline");
+ comma = 1;
+ }
+ if ((flags & HTML_S))
+ gvprintf(job, "%sline-through", (comma?",":""));
+ gvprintf(job, "\"");
+ }
if ((flags & HTML_SUP))
gvprintf(job, " baseline-shift=\"super\"");
if ((flags & HTML_SUB))
agxbput(&xb," style=\"italic\"");
if (flags & HTML_UL)
agxbput(&xb," underline=\"single\"");
+ if (flags & HTML_S)
+ agxbput(&xb," strikethrough=\"true\"");
agxbput (&xb,">");
if (flags & HTML_SUP)