3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
7 * \author Jean-Marc Lasgouttes
10 * Full author contact details are available in file CREDITS.
19 #include "support/convert.h"
20 #include "support/lstrings.h"
31 using std::istringstream;
33 using std::ostringstream;
38 // filled in preamble.C
39 std::map<char, int> special_columns;
46 ColInfo() : align('n'), valign('n'), rightlines(0), leftlines(0) {}
49 /// vertical alignment
53 /// special column alignment
55 /// number of lines on the right
57 /// number of lines on the left
62 /// row type for longtables
69 /// part of head on first page
73 /// part of foot on last page
80 RowInfo() : topline(false), bottomline(false), type(LT_NORMAL),
82 /// horizontal line above
84 /// horizontal line below
86 /// These are for longtabulars only
87 /// row type (head, foot, firsthead etc.)
89 /// row for a pagebreak
97 /// A multicolumn cell. The number of columns is <tt>1 + number
98 /// of CELL_PART_OF_MULTICOLUMN cells</tt> that follow directly
99 CELL_BEGIN_OF_MULTICOLUMN,
100 /// This is a dummy cell (part of a multicolumn cell)
101 CELL_PART_OF_MULTICOLUMN
107 CellInfo() : multi(CELL_NORMAL), align('n'), valign('n'),
108 leftlines(0), rightlines(0), topline(false),
109 bottomline(false), rotate(false) {}
116 /// vertical cell alignment
118 /// number of lines on the left
120 /// number of lines on the right
122 /// do we have a line above?
124 /// do we have a line below?
126 /// is the cell rotated?
128 /// width for multicolumn cells
130 /// special formatting for multicolumn cells
135 /// translate a horizontal alignment (as stored in ColInfo and CellInfo) to LyX
136 inline char const * verbose_align(char c)
151 /// translate a vertical alignment (as stored in ColInfo and CellInfo) to LyX
152 inline char const * verbose_valign(char c)
154 // The default value for no special alignment is "top".
167 // stripped down from tabluar.C. We use it currently only for bools and
169 string const write_attribute(string const & name, bool const & b)
171 // we write only true attribute values so we remove a bit of the
172 // file format bloat for tabulars.
173 return b ? ' ' + name + "=\"true\"" : string();
177 string const write_attribute(string const & name, string const & s)
179 return s.empty() ? string() : ' ' + name + "=\"" + s + '"';
183 /*! rather brutish way to code table structure in a string:
188 \multicolumn{2}{c}{4} & 5 //
194 gets "translated" to:
197 HLINE 1 TAB 2 TAB 3 HLINE HLINE LINE
198 \hline HLINE \multicolumn{2}{c}{4} TAB 5 HLINE HLINE LINE
199 HLINE 6 TAB 7 HLINE HLINE LINE
200 HLINE 8 HLINE \endhead HLINE LINE
204 char const TAB = '\001';
205 char const LINE = '\002';
206 char const HLINE = '\004';
210 * Move the information in leftlines, rightlines, align and valign to the
211 * special field. This is necessary if the special field is not empty,
212 * because LyX ignores leftlines, rightlines, align and valign in this case.
214 void ci2special(ColInfo & ci)
216 if (ci.width.empty() && ci.align == 'n')
217 // The alignment setting is already in special, since
218 // handle_colalign() never stores ci with these settings
219 // and ensures that leftlines == 0 and rightlines == 0 in
223 if (!ci.width.empty()) {
226 ci.special += ">{\\raggedright}";
229 ci.special += ">{\\raggedleft}";
232 ci.special += ">{\\centering}";
235 if (ci.valign == 'n')
238 ci.special += ci.valign;
239 ci.special += '{' + ci.width + '}';
242 ci.special += ci.align;
244 for (int i = 0; i < ci.leftlines; ++i)
245 ci.special.insert(0, "|");
246 for (int i = 0; i < ci.rightlines; ++i)
256 * Handle column specifications for tabulars and multicolumns.
257 * The next token of the parser \p p must be an opening brace, and we read
258 * everything until the matching closing brace.
259 * The resulting column specifications are filled into \p colinfo. This is
260 * in an intermediate form. fix_colalign() makes it suitable for LyX output.
262 void handle_colalign(Parser & p, vector<ColInfo> & colinfo,
263 ColInfo const & start)
265 if (p.get_token().cat() != catBegin)
266 cerr << "Wrong syntax for table column alignment.\n"
267 "Expected '{', got '" << p.curr_token().asInput()
270 ColInfo next = start;
271 for (Token t = p.get_token(); p.good() && t.cat() != catEnd;
274 cerr << "t: " << t << " c: '" << t.character() << "'\n";
277 // We cannot handle comments here
278 if (t.cat() == catComment) {
279 if (t.cs().empty()) {
283 cerr << "Ignoring comment: " << t.asInput();
287 switch (t.character()) {
291 // new column, horizontal aligned
292 next.align = t.character();
293 if (!next.special.empty())
295 colinfo.push_back(next);
301 // new column, vertical aligned box
302 next.valign = t.character();
303 next.width = p.verbatim_item();
304 if (!next.special.empty())
306 colinfo.push_back(next);
311 if (colinfo.empty()) {
312 if (next.special.empty())
316 } else if (colinfo.back().special.empty())
317 ++colinfo.back().rightlines;
318 else if (next.special.empty())
321 colinfo.back().special += '|';
324 // text before the next column
325 string const s = trim(p.verbatim_item());
326 if (next.special.empty() &&
328 // Maybe this can be converted to a
329 // horizontal alignment setting for
330 // fixed width columns
331 if (s == "\\raggedleft")
333 else if (s == "\\raggedright")
335 else if (s == "\\centering")
338 next.special = ">{" + s + '}';
340 next.special += ">{" + s + '}';
344 // text after the last column
345 string const s = trim(p.verbatim_item());
347 // This is not possible in LaTeX.
348 cerr << "Ignoring separator '<{"
349 << s << "}'." << endl;
351 ColInfo & ci = colinfo.back();
353 ci.special += "<{" + s + '}';
358 // *{n}{arg} means 'n' columns of type 'arg'
359 string const num = p.verbatim_item();
360 string const arg = p.verbatim_item();
361 size_t const n = convert<unsigned int>(num);
362 if (!arg.empty() && n > 0) {
364 for (size_t i = 0; i < n; ++i)
368 handle_colalign(p2, colinfo, next);
371 cerr << "Ignoring column specification"
372 " '*{" << num << "}{"
373 << arg << "}'." << endl;
378 // text instead of the column spacing
380 // text in addition to the column spacing
381 next.special += t.character();
382 next.special += '{' + p.verbatim_item() + '}';
385 // try user defined column types
386 if (special_columns.find(t.character()) !=
387 special_columns.end()) {
389 next.special += t.character();
391 special_columns[t.character()];
392 for (int i = 0; i < nargs; ++i)
393 next.special += '{' +
396 colinfo.push_back(next);
399 cerr << "Ignoring column specification"
400 " '" << t << "'." << endl;
405 // Maybe we have some column separators that need to be added to the
408 if (!next.special.empty()) {
409 ColInfo & ci = colinfo.back();
411 ci.special += next.special;
412 next.special.erase();
418 * Move the left and right lines and alignment settings of the column \p ci
419 * to the special field if necessary.
421 void fix_colalign(ColInfo & ci)
423 if (ci.leftlines > 1 || ci.rightlines > 1)
429 * LyX can't handle more than one vertical line at the left or right side
431 * This function moves the left and right lines and alignment settings of all
432 * columns in \p colinfo to the special field if necessary.
434 void fix_colalign(vector<ColInfo> & colinfo)
436 // Try to move extra leftlines to the previous column.
437 // We do this only if both special fields are empty, otherwise we
438 // can't tell wether the result will be the same.
439 for (size_t col = 0; col < colinfo.size(); ++col) {
440 if (colinfo[col].leftlines > 1 &&
441 colinfo[col].special.empty() && col > 0 &&
442 colinfo[col - 1].rightlines == 0 &&
443 colinfo[col - 1].special.empty()) {
444 ++colinfo[col - 1].rightlines;
445 --colinfo[col].leftlines;
448 // Try to move extra rightlines to the next column
449 for (size_t col = 0; col < colinfo.size(); ++col) {
450 if (colinfo[col].rightlines > 1 &&
451 colinfo[col].special.empty() &&
452 col < colinfo.size() - 1 &&
453 colinfo[col + 1].leftlines == 0 &&
454 colinfo[col + 1].special.empty()) {
455 ++colinfo[col + 1].leftlines;
456 --colinfo[col].rightlines;
459 // Move the lines and alignment settings to the special field if
461 for (size_t col = 0; col < colinfo.size(); ++col)
462 fix_colalign(colinfo[col]);
467 * Parse hlines and similar stuff.
468 * \returns wether the token \p t was parsed
470 bool parse_hlines(Parser & p, Token const & t, string & hlines,
471 bool is_long_tabular)
473 BOOST_ASSERT(t.cat() == catEscape);
475 if (t.cs() == "hline")
478 else if (t.cs() == "cline")
479 hlines += "\\cline{" + p.verbatim_item() + '}';
481 else if (is_long_tabular && t.cs() == "newpage")
482 hlines += "\\newpage";
491 /// Position in a row
493 /// At the very beginning, before the first token
495 /// After the first token and before any column token
497 /// After the first column token. Comments and whitespace are only
498 /// treated as tokens in this position
500 /// After the first non-column token at the end
506 * Parse table structure.
507 * We parse tables in a two-pass process: This function extracts the table
508 * structure (rows, columns, hlines etc.), but does not change the cell
509 * content. The cell content is parsed in a second step in handle_tabular().
511 void parse_table(Parser & p, ostream & os, bool is_long_tabular,
512 RowPosition & pos, unsigned flags)
514 // table structure commands such as \hline
517 // comments that occur at places where we can't handle them
521 Token const & t = p.get_token();
524 cerr << "t: " << t << " flags: " << flags << "\n";
527 // comments and whitespace in hlines
530 case IN_HLINES_START:
532 if (t.cat() == catComment) {
537 // We can't handle comments here,
538 // store them for later use
539 comments += t.asInput();
541 } else if (t.cat() == catSpace ||
542 t.cat() == catNewline) {
543 // whitespace is irrelevant here, we
544 // need to recognize hline stuff
553 // We need to handle structure stuff first in order to
554 // determine wether we need to output a HLINE separator
555 // before the row or not.
556 if (t.cat() == catEscape) {
557 if (parse_hlines(p, t, hlines, is_long_tabular)) {
560 pos = IN_HLINES_START;
565 case IN_HLINES_START:
572 else if (t.cs() == "tabularnewline" ||
576 cerr << "Warning: Converting TeX "
577 "'\\cr' to LaTeX '\\\\'."
579 // stuff before the line break
580 os << comments << HLINE << hlines << HLINE
582 //cerr << "hlines: " << hlines << endl;
589 else if (is_long_tabular &&
590 (t.cs() == "endhead" ||
591 t.cs() == "endfirsthead" ||
592 t.cs() == "endfoot" ||
593 t.cs() == "endlastfoot")) {
594 hlines += t.asInput();
598 // these commands are implicit line
600 os << comments << HLINE << hlines
607 pos = IN_HLINES_START;
609 case IN_HLINES_START:
617 // We need a HLINE separator if we either have no hline
618 // stuff at all and are just starting a row or if we just
619 // got the first non-hline token.
622 // no hline tokens exist, first token at row start
623 case IN_HLINES_START:
624 // hline tokens exist, first non-hline token at row
626 os << hlines << HLINE << comments;
632 // Oops, there is still cell content after hline
633 // stuff. This does not work in LaTeX, so we ignore
635 cerr << "Ignoring '" << hlines << "' in a cell"
646 // If we come here we have normal cell content
650 if (t.cat() == catMath) {
651 // we are inside some text mode thingy, so opening new math is allowed
652 Token const & n = p.get_token();
653 if (n.cat() == catMath) {
654 // TeX's $$...$$ syntax for displayed math
656 parse_math(p, os, FLAG_SIMPLE, MATH_MODE);
658 p.get_token(); // skip the second '$' token
660 // simple $...$ stuff
663 parse_math(p, os, FLAG_SIMPLE, MATH_MODE);
668 else if (t.cat() == catSpace || t.cat() == catNewline)
671 else if (t.cat() == catLetter ||
672 t.cat() == catSuper ||
674 t.cat() == catOther ||
675 t.cat() == catActive ||
676 t.cat() == catParameter)
679 else if (t.cat() == catBegin) {
681 parse_table(p, os, is_long_tabular, pos,
686 else if (t.cat() == catEnd) {
687 if (flags & FLAG_BRACE_LAST)
689 cerr << "unexpected '}'\n";
692 else if (t.cat() == catAlign) {
697 else if (t.cat() == catComment)
700 else if (t.cs() == "(") {
702 parse_math(p, os, FLAG_SIMPLE2, MATH_MODE);
706 else if (t.cs() == "[") {
708 parse_math(p, os, FLAG_EQUATION, MATH_MODE);
712 else if (t.cs() == "begin") {
713 string const name = p.getArg('{', '}');
714 active_environments.push_back(name);
715 os << "\\begin{" << name << '}';
716 if (is_math_env(name)) {
717 parse_math(p, os, FLAG_END, MATH_MODE);
719 parse_table(p, os, is_long_tabular, pos,
722 os << "\\end{" << name << '}';
723 active_environments.pop_back();
726 else if (t.cs() == "end") {
727 if (flags & FLAG_END) {
728 // eat environment name
729 string const name = p.getArg('{', '}');
730 if (name != active_environment())
731 p.error("\\end{" + name + "} does not match \\begin{"
732 + active_environment() + "}");
735 p.error("found 'end' unexpectedly");
742 // We can have comments if the last line is incomplete
745 // We can have hline stuff if the last line is incomplete
746 if (!hlines.empty()) {
747 // this does not work in LaTeX, so we ignore it
748 cerr << "Ignoring '" << hlines << "' at end of tabular"
754 void handle_hline_above(RowInfo & ri, vector<CellInfo> & ci)
757 for (size_t col = 0; col < ci.size(); ++col)
758 ci[col].topline = true;
762 void handle_hline_below(RowInfo & ri, vector<CellInfo> & ci)
764 ri.bottomline = true;
765 for (size_t col = 0; col < ci.size(); ++col)
766 ci[col].bottomline = true;
770 } // anonymous namespace
773 void handle_tabular(Parser & p, ostream & os, bool is_long_tabular,
776 string posopts = p.getOpt();
777 if (!posopts.empty()) {
778 // FIXME: Convert this to ERT
780 cerr << "horizontal longtable";
782 cerr << "vertical tabular";
783 cerr << " positioning '" << posopts << "' ignored\n";
786 vector<ColInfo> colinfo;
788 // handle column formatting
789 handle_colalign(p, colinfo, ColInfo());
790 fix_colalign(colinfo);
792 // first scan of cells
793 // use table mode to keep it minimal-invasive
794 // not exactly what's TeX doing...
795 vector<string> lines;
797 RowPosition rowpos = ROW_START;
798 parse_table(p, ss, is_long_tabular, rowpos, FLAG_END);
799 split(ss.str(), lines, LINE);
801 vector< vector<CellInfo> > cellinfo(lines.size());
802 vector<RowInfo> rowinfo(lines.size());
805 //cerr << "// split into rows\n";
806 for (size_t row = 0; row < rowinfo.size(); ++row) {
809 cellinfo[row].resize(colinfo.size());
812 vector<string> dummy;
813 //cerr << "\n########### LINE: " << lines[row] << "########\n";
814 split(lines[row], dummy, HLINE);
816 // handle horizontal line fragments
817 // we do only expect this for a last line without '\\'
818 if (dummy.size() != 3) {
819 if ((dummy.size() != 1 && dummy.size() != 2) ||
820 row != rowinfo.size() - 1)
821 cerr << "unexpected dummy size: " << dummy.size()
822 << " content: " << lines[row] << "\n";
825 lines[row] = dummy[1];
827 //cerr << "line: " << row << " above 0: " << dummy[0] << "\n";
828 //cerr << "line: " << row << " below 2: " << dummy[2] << "\n";
829 //cerr << "line: " << row << " cells 1: " << dummy[1] << "\n";
831 for (int i = 0; i <= 2; i += 2) {
832 //cerr << " reading from line string '" << dummy[i] << "'\n";
835 Token t = p1.get_token();
836 //cerr << "read token: " << t << "\n";
837 if (t.cs() == "hline") {
839 if (rowinfo[row].topline) {
840 if (row > 0) // extra bottomline above
841 handle_hline_below(rowinfo[row - 1], cellinfo[row - 1]);
843 cerr << "dropping extra hline\n";
844 //cerr << "below row: " << row-1 << endl;
846 handle_hline_above(rowinfo[row], cellinfo[row]);
847 //cerr << "above row: " << row << endl;
850 //cerr << "below row: " << row << endl;
851 handle_hline_below(rowinfo[row], cellinfo[row]);
853 } else if (t.cs() == "cline") {
854 string arg = p1.verbatim_item();
855 //cerr << "read cline arg: '" << arg << "'\n";
859 size_t from = convert<unsigned int>(t[0]);
861 cerr << "Could not parse "
862 "cline start column."
865 // 1 based index -> 0 based
867 if (from >= colinfo.size()) {
868 cerr << "cline starts at non "
870 << (from + 1) << endl;
871 from = colinfo.size() - 1;
873 size_t to = convert<unsigned int>(t[1]);
875 cerr << "Could not parse "
879 // 1 based index -> 0 based
881 if (to >= colinfo.size()) {
882 cerr << "cline ends at non "
885 to = colinfo.size() - 1;
887 for (size_t col = from; col <= to; ++col) {
888 //cerr << "row: " << row << " col: " << col << " i: " << i << endl;
890 rowinfo[row].topline = true;
891 cellinfo[row][col].topline = true;
893 rowinfo[row].bottomline = true;
894 cellinfo[row][col].bottomline = true;
897 } else if (t.cs() == "endhead") {
899 rowinfo[row].type = LT_HEAD;
900 for (int r = row - 1; r >= 0; --r) {
901 if (rowinfo[r].type != LT_NORMAL)
903 rowinfo[r].type = LT_HEAD;
905 } else if (t.cs() == "endfirsthead") {
907 rowinfo[row].type = LT_FIRSTHEAD;
908 for (int r = row - 1; r >= 0; --r) {
909 if (rowinfo[r].type != LT_NORMAL)
911 rowinfo[r].type = LT_FIRSTHEAD;
913 } else if (t.cs() == "endfoot") {
915 rowinfo[row].type = LT_FOOT;
916 for (int r = row - 1; r >= 0; --r) {
917 if (rowinfo[r].type != LT_NORMAL)
919 rowinfo[r].type = LT_FOOT;
921 } else if (t.cs() == "endlastfoot") {
923 rowinfo[row].type = LT_LASTFOOT;
924 for (int r = row - 1; r >= 0; --r) {
925 if (rowinfo[r].type != LT_NORMAL)
927 rowinfo[r].type = LT_LASTFOOT;
929 } else if (t.cs() == "newpage") {
932 rowinfo[row - 1].newpage = true;
934 // This does not work in LaTeX
940 rowinfo[row].newpage = true;
942 cerr << "unexpected line token: " << t << endl;
948 vector<string> cells;
949 split(lines[row], cells, TAB);
950 for (size_t col = 0, cell = 0; cell < cells.size();
952 //cerr << "cell content: '" << cells[cell] << "'\n";
953 if (col >= colinfo.size()) {
954 // This does not work in LaTeX
955 cerr << "Ignoring extra cell '"
956 << cells[cell] << "'." << endl;
959 Parser p(cells[cell]);
961 //cells[cell] << "'\n";
962 if (p.next_token().cs() == "multicolumn") {
965 size_t const ncells =
966 convert<unsigned int>(p.verbatim_item());
968 // special cell properties alignment
970 handle_colalign(p, t, ColInfo());
971 ColInfo & ci = t.front();
973 // The logic of LyX for multicolumn vertical
974 // lines is too complicated to reproduce it
975 // here (see LyXTabular::TeXCellPreamble()).
976 // Therefore we simply put everything in the
980 cellinfo[row][col].multi = CELL_BEGIN_OF_MULTICOLUMN;
981 cellinfo[row][col].align = ci.align;
982 cellinfo[row][col].special = ci.special;
983 cellinfo[row][col].leftlines = ci.leftlines;
984 cellinfo[row][col].rightlines = ci.rightlines;
986 parse_text_in_inset(p, os, FLAG_ITEM, false, context);
987 if (!cellinfo[row][col].content.empty()) {
988 // This may or may not work in LaTeX,
989 // but it does not work in LyX.
990 // FIXME: Handle it correctly!
991 cerr << "Moving cell content '"
993 << "' into a multicolumn cell. "
994 "This will probably not work."
997 cellinfo[row][col].content += os.str();
999 // add dummy cells for multicol
1000 for (size_t i = 0; i < ncells - 1 && col < colinfo.size(); ++i) {
1002 cellinfo[row][col].multi = CELL_PART_OF_MULTICOLUMN;
1003 cellinfo[row][col].align = 'c';
1007 cellinfo[row][col].leftlines = colinfo[col].leftlines;
1008 cellinfo[row][col].rightlines = colinfo[col].rightlines;
1009 cellinfo[row][col].align = colinfo[col].align;
1011 parse_text_in_inset(p, os, FLAG_CELL, false, context);
1012 cellinfo[row][col].content += os.str();
1016 //cerr << "// handle almost empty last row what we have\n";
1017 // handle almost empty last row
1018 if (row && lines[row].empty() && row + 1 == rowinfo.size()) {
1019 //cerr << "remove empty last line\n";
1020 if (rowinfo[row].topline)
1021 rowinfo[row - 1].bottomline = true;
1022 for (size_t col = 0; col < colinfo.size(); ++col)
1023 if (cellinfo[row][col].topline)
1024 cellinfo[row - 1][col].bottomline = true;
1029 // Now we have the table structure and content in rowinfo, colinfo
1031 // Unfortunately LyX has some limitations that we need to work around.
1033 // Convert cells with special content to multicolumn cells
1034 // (LyX ignores the special field for non-multicolumn cells).
1035 for (size_t row = 0; row < rowinfo.size(); ++row) {
1036 for (size_t col = 0; col < cellinfo[row].size(); ++col) {
1037 if (cellinfo[row][col].multi == CELL_NORMAL &&
1038 !cellinfo[row][col].special.empty())
1039 cellinfo[row][col].multi = CELL_BEGIN_OF_MULTICOLUMN;
1043 //cerr << "// output what we have\n";
1044 // output what we have
1045 os << "\n<lyxtabular version=\"3\" rows=\"" << rowinfo.size()
1046 << "\" columns=\"" << colinfo.size() << "\">\n";
1048 << write_attribute("rotate", false)
1049 << write_attribute("islongtable", is_long_tabular)
1052 //cerr << "// after header\n";
1053 for (size_t col = 0; col < colinfo.size(); ++col) {
1054 os << "<column alignment=\""
1055 << verbose_align(colinfo[col].align) << "\""
1057 << verbose_valign(colinfo[col].valign) << "\""
1058 << write_attribute("leftline", colinfo[col].leftlines > 0)
1059 << write_attribute("rightline", colinfo[col].rightlines > 0)
1060 << write_attribute("width", colinfo[col].width)
1061 << write_attribute("special", colinfo[col].special)
1064 //cerr << "// after cols\n";
1066 for (size_t row = 0; row < rowinfo.size(); ++row) {
1068 << write_attribute("topline", rowinfo[row].topline)
1069 << write_attribute("bottomline", rowinfo[row].bottomline)
1070 << write_attribute("endhead",
1071 rowinfo[row].type == LT_HEAD)
1072 << write_attribute("endfirsthead",
1073 rowinfo[row].type == LT_FIRSTHEAD)
1074 << write_attribute("endfoot",
1075 rowinfo[row].type == LT_FOOT)
1076 << write_attribute("endlastfoot",
1077 rowinfo[row].type == LT_LASTFOOT)
1078 << write_attribute("newpage", rowinfo[row].newpage)
1080 for (size_t col = 0; col < colinfo.size(); ++col) {
1081 CellInfo const & cell = cellinfo[row][col];
1083 if (cell.multi != CELL_NORMAL)
1084 os << " multicolumn=\"" << cell.multi << "\"";
1085 os << " alignment=\"" << verbose_align(cell.align)
1087 << " valignment=\"" << verbose_valign(cell.valign)
1089 << write_attribute("topline", cell.topline)
1090 << write_attribute("bottomline", cell.bottomline)
1091 << write_attribute("leftline", cell.leftlines > 0)
1092 << write_attribute("rightline", cell.rightlines > 0)
1093 << write_attribute("rotate", cell.rotate);
1094 //cerr << "\nrow: " << row << " col: " << col;
1096 // cerr << " topline=\"true\"";
1097 //if (cell.bottomline)
1098 // cerr << " bottomline=\"true\"";
1099 os << " usebox=\"none\""
1100 << write_attribute("width", cell.width);
1101 if (cell.multi != CELL_NORMAL)
1102 os << write_attribute("special", cell.special);
1104 << "\n\\begin_inset Text\n"
1106 << "\n\\end_inset\n"
1112 os << "</lyxtabular>\n";