3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
9 * Full author contact details are available in file CREDITS.
14 #include "support/std_ostream.h"
16 #include "paragraph.h"
29 pair<bool, string> escapeChar(char c)
35 return make_pair(true, string(" "));
37 case '\0': // Ignore :-)
83 return make_pair(false, str);
87 int openTag(ostream & os, Paragraph::depth_type depth,
88 bool mixcont, string const & latexname)
90 if (!latexname.empty() && latexname != "!-- --") {
92 os << string(depth, ' ');
93 os << '<' << latexname << '>';
103 int closeTag(ostream & os, Paragraph::depth_type depth,
104 bool mixcont, string const & latexname)
106 if (!latexname.empty() && latexname != "!-- --") {
108 os << endl << string(depth, ' ');
109 os << "</" << latexname << '>';
119 unsigned int closeEnvTags(ostream & ofs, bool mixcont,
120 string const & environment_inner_depth,
121 lyx::depth_type total_depth)
124 if (environment_inner_depth != "!-- --") {
125 string item_name= "listitem";
126 lines += closeTag(ofs, total_depth, mixcont, item_name);
127 if (environment_inner_depth == "varlistentry")
128 lines += closeTag(ofs, total_depth, mixcont,
129 environment_inner_depth);