#include "support/lstrings.h"
-using lyx::support::subst;
+
+namespace lyx {
+
+using support::subst;
using std::endl;
-using lyx::odocstream;
using std::string;
if (!lyxrc.language_command_end.empty() &&
previous_language->babel() != doc_language->babel()) {
- os << lyx::from_ascii(subst(
+ os << from_ascii(subst(
lyxrc.language_command_end,
"$$lang",
previous_language->babel()))
if (lyxrc.language_command_end.empty() ||
language->babel() != doc_language->babel()) {
- os << lyx::from_ascii(subst(
+ os << from_ascii(subst(
lyxrc.language_command_begin,
"$$lang",
language->babel()))
bool leftindent_open = false;
if (!pit->params().leftIndent().zero()) {
os << "\\begin{LyXParagraphLeftIndent}{"
- << lyx::from_ascii(pit->params().leftIndent().asLatexString())
+ << from_ascii(pit->params().leftIndent().asLatexString())
<< "}\n";
texrow.newline();
leftindent_open = true;
}
if (style->isEnvironment()) {
- os << "\\begin{" << lyx::from_ascii(style->latexname()) << '}';
+ os << "\\begin{" << from_ascii(style->latexname()) << '}';
if (style->optionalargs > 0) {
int ret = latexOptArgInsets(buf, *pit, os, runparams,
style->optionalargs);
}
}
if (style->latextype == LATEX_LIST_ENVIRONMENT) {
- // FIXME UNICODE
os << '{'
- << lyx::from_utf8(pit->params().labelWidthString())
+ << pit->params().labelWidthString()
<< "}\n";
} else if (style->labeltype == LABEL_BIBLIO) {
// ale970405
os << '{' << bibitemWidest(buf) << "}\n";
} else
- os << lyx::from_ascii(style->latexparam()) << '\n';
+ os << from_ascii(style->latexparam()) << '\n';
texrow.newline();
}
ParagraphList::const_iterator par = pit;
&& par->params().leftIndent() == pit->params().leftIndent());
if (style->isEnvironment()) {
- os << "\\end{" << lyx::from_ascii(style->latexname()) << "}\n";
+ os << "\\end{" << from_ascii(style->latexname()) << "}\n";
texrow.newline();
}
if (!lyxrc.language_command_end.empty() &&
previous_language->babel() != doc_language->babel())
{
- os << lyx::from_ascii(subst(lyxrc.language_command_end,
+ os << from_ascii(subst(lyxrc.language_command_end,
"$$lang",
previous_language->babel()))
<< endl;
if (lyxrc.language_command_end.empty() ||
language->babel() != doc_language->babel())
{
- os << lyx::from_ascii(subst(
+ os << from_ascii(subst(
lyxrc.language_command_begin,
"$$lang",
language->babel()))
}
}
- if (bparams.inputenc == "auto" &&
- language->encoding() != previous_language->encoding()) {
- os << "\\inputencoding{"
- << lyx::from_ascii(language->encoding()->latexName())
- << "}\n";
- texrow.newline();
+ if (false) {
+ if (bparams.inputenc == "auto" &&
+ language->encoding() != previous_language->encoding()) {
+ os << "\\inputencoding{"
+ << from_ascii(language->encoding()->latexName())
+ << "}\n";
+ texrow.newline();
+ }
}
// In an an inset with unlimited length (all in one row),
&& (pit == paragraphs.begin()
|| !boost::prior(pit)->hasSameLayout(*pit)))
{
- os << lyx::from_ascii(pit->params().spacing().writeEnvirBegin())
+ os << from_ascii(pit->params().spacing().writeEnvirBegin())
<< '\n';
texrow.newline();
}
switch (style->latextype) {
case LATEX_COMMAND:
- os << '\\' << lyx::from_ascii(style->latexname());
+ os << '\\' << from_ascii(style->latexname());
// Separate handling of optional argument inset.
if (style->optionalargs > 0) {
}
}
else
- os << lyx::from_ascii(style->latexparam());
+ os << from_ascii(style->latexparam());
break;
case LATEX_ITEM_ENVIRONMENT:
case LATEX_LIST_ENVIRONMENT:
}
// FIXME UNICODE
- os << lyx::from_utf8(everypar);
+ os << from_utf8(everypar);
bool need_par = pit->simpleTeXOnePar(buf, bparams,
outerFont(std::distance(paragraphs.begin(), pit), paragraphs),
os, texrow, runparams);
&& !is_command) {
if (!need_par)
os << '{';
- os << "\\" << lyx::from_ascii(font.latexSize()) << " \\par}";
+ os << "\\" << from_ascii(font.latexSize()) << " \\par}";
} else if (need_par) {
os << "\\par}";
} else if (is_command)
&& (boost::next(pit) == paragraphs.end()
|| !boost::next(pit)->hasSameLayout(*pit)))
{
- os << lyx::from_ascii(pit->params().spacing().writeEnvirEnd())
+ os << from_ascii(pit->params().spacing().writeEnvirEnd())
<< '\n';
texrow.newline();
}
// float.
if (lyxrc.language_command_end.empty())
- os << lyx::from_ascii(subst(
+ os << from_ascii(subst(
lyxrc.language_command_begin,
"$$lang",
doc_language->babel()))
<< endl;
else
- os << lyx::from_ascii(subst(
+ os << from_ascii(subst(
lyxrc.language_command_end,
"$$lang",
language->babel()))
was_title = true;
if (tclass.titletype() == TITLE_ENVIRONMENT) {
os << "\\begin{"
- << lyx::from_ascii(tclass.titlename())
+ << from_ascii(tclass.titlename())
<< "}\n";
texrow.newline();
}
}
} else if (was_title && !already_title) {
if (tclass.titletype() == TITLE_ENVIRONMENT) {
- os << "\\end{" << lyx::from_ascii(tclass.titlename())
+ os << "\\end{" << from_ascii(tclass.titlename())
<< "}\n";
}
else {
- os << "\\" << lyx::from_ascii(tclass.titlename())
+ os << "\\" << from_ascii(tclass.titlename())
<< "\n";
}
texrow.newline();
// It might be that we only have a title in this document
if (was_title && !already_title) {
if (tclass.titletype() == TITLE_ENVIRONMENT) {
- os << "\\end{" << lyx::from_ascii(tclass.titlename())
+ os << "\\end{" << from_ascii(tclass.titlename())
<< "}\n";
}
else {
- os << "\\" << lyx::from_ascii(tclass.titlename())
+ os << "\\" << from_ascii(tclass.titlename())
<< "\n";
}
texrow.newline();
}
}
+
+
+} // namespace lyx