#include "gettext.h"
#include "Language.h"
#include "LaTeXFeatures.h"
+#include "Messages.h"
#include "Color.h"
#include "Font.h"
#include "Lexer.h"
#include "LyXRC.h"
#include "TextClassList.h"
#include "OutputParams.h"
-#include "tex-strings.h"
#include "Spacing.h"
#include "TexRow.h"
#include "VSpace.h"
#include <sstream>
-
-namespace lyx {
-
-using support::bformat;
-using support::rtrim;
-using support::tokenPos;
-
using std::endl;
using std::string;
using std::istringstream;
using std::ostringstream;
using std::pair;
-namespace Alert = lyx::frontend::Alert;
+using lyx::support::bformat;
+using lyx::support::rtrim;
+using lyx::support::tokenPos;
+
+
+static char const * const string_paragraph_separation[] = {
+ "indent", "skip", ""
+};
+
+
+static char const * const string_quotes_language[] = {
+ "english", "swedish", "german", "polish", "french", "danish", ""
+};
+
+
+static char const * const string_papersize[] = {
+ "default", "custom", "letterpaper", "executivepaper", "legalpaper",
+ "a3paper", "a4paper", "a5paper", "b3paper", "b4paper", "b5paper", ""
+};
+
+
+static char const * const string_orientation[] = {
+ "portrait", "landscape", ""
+};
+static char const * const string_footnotekinds[] = {
+ "footnote", "margin", "fig", "tab", "alg", "wide-fig", "wide-tab", ""
+};
+
+
+static char const * const tex_graphics[] = {
+ "default", "dvips", "dvitops", "emtex",
+ "ln", "oztex", "textures", "none", ""
+};
+
+
+namespace lyx {
+
// Local translators
namespace {
{}
+docstring const BufferParams::B_(string const & l10n) const
+{
+ BOOST_ASSERT(language);
+ return getMessages(language->code()).get(l10n);
+}
+
+
AuthorList & BufferParams::authors()
{
return pimpl_->authorlist;
"class or style file required by it is not\n"
"available. See the Customization documentation\n"
"for more information.\n"), from_utf8(classname));
- Alert::warning(_("Document class not available"),
+ frontend::Alert::warning(_("Document class not available"),
msg + _("LyX will not be able to produce output."));
}
} else if (token == "\\begin_preamble") {
// thailatex does not use the inputenc package, but sets up
// babel directly for tis620-0 encoding, therefore we must
// not request inputenc for tis620-0 encoding
- if (!encodings.empty() || doc_encoding != "tis620-0") {
+ if (!encodings.empty() && doc_encoding != "tis620-0") {
os << "\\usepackage[";
std::set<string>::const_iterator it = encodings.begin();
std::set<string>::const_iterator const end = encodings.end();
os << "]{inputenc}\n";
texrow.newline();
}
+ // utf8-plain is for XeTeX users (inputenc not desired)
} else if (inputenc != "default" && inputenc != "tis620-0" &&
- inputenc != "ascii") {
+ inputenc != "ascii" && inputenc != "utf8-plain") {
os << "\\usepackage[" << from_ascii(inputenc)
<< "]{inputenc}\n";
texrow.newline();
}
+ // The encoding "armscii8" is only available when the package "armtex" is loaded.
+ // armscii8 is used for Armenian.
+ if (language->encoding()->latexName() == "armscii8" || inputenc == "armscii8") {
+ os << "\\usepackage{armtex}\n";
+ texrow.newline();
+ }
+
if (use_geometry || nonstandard_papersize) {
os << "\\usepackage{geometry}\n";
texrow.newline();