diff --git a/src/latex-struct/Subtable.vala b/src/latex-struct/Subtable.vala index 532b476..db03215 100644 --- a/src/latex-struct/Subtable.vala +++ b/src/latex-struct/Subtable.vala @@ -10,7 +10,7 @@ namespace LAview { /** * Caption of the table. */ - public string caption { get; set; default = ""; } + public Text caption { get; set; default = new Text(""); } /** * Any text before the ``Subtable``. @@ -316,8 +316,9 @@ namespace LAview { s.append (before); - if (caption != "") { - s.append (caption); + var caption_text = caption.generate (); + if (caption_text != "") { + s.append (caption_text); if (size != 0) s.append ("\\tabularnewline"); } diff --git a/src/latex-struct/TableParser.vala b/src/latex-struct/TableParser.vala index c16a9de..3229e20 100644 --- a/src/latex-struct/TableParser.vala +++ b/src/latex-struct/TableParser.vala @@ -63,7 +63,7 @@ namespace LAview { uint matched_tag_abspos_right) throws ParseError { // TODO: Similar ro TabularParser::process_tabularnewline (), make a template method? if (in_caption) { - subtable.caption = contents[row_abs_pos:tag_left_abspos].compress (); + subtable.caption = new Text (contents[row_abs_pos:tag_left_abspos].compress ()); in_caption = false; } else { TokenType token = add_cell (subcontents); @@ -349,7 +349,7 @@ namespace LAview { void end_subtable (Table.ATable table, TableTagType subtable_type, uint tag_left_abspos) { if (in_caption) { - subtable.caption = contents[row_abs_pos:tag_left_abspos].compress (); + subtable.caption = new Text (contents[row_abs_pos:tag_left_abspos].compress ()); in_caption = false; } else { subtable.after = contents[row_abs_pos:tag_left_abspos];