namespace {
-void output_arguments(ostream &, Parser &, bool, bool, string, Context &,
+void output_arguments(ostream &, Parser &, bool, bool, const string &, Context &,
Layout::LaTeXArgMap const &);
}
/// If we have ambiguous quotation marks, make a smart guess
/// based on main quote style
-string guessQuoteStyle(string in, bool const opening)
+string guessQuoteStyle(string const & in, bool const opening)
{
string res = in;
if (prefixIs(in, "qr")) {// straight quote
res = "brs";
else if (preamble.quotesStyle() == "french")
res = "frs";
+ else if (preamble.quotesStyle() == "hungarian")
+ res = "hrd";
else if (preamble.quotesStyle() == "swedish")
res = opening ? "sld" : "srd";
} else if (in == "els") {// `
res = "fld";
else if (preamble.quotesStyle() == "russian")
res = "rld";
+ else if (preamble.quotesStyle() == "hungarian")
+ res = "hrs";
} else if (in == "ald") {// <<
if (preamble.quotesStyle() == "swiss")
res = "crd";
res = "frd";
else if (preamble.quotesStyle() == "russian")
res = "rrd";
+ else if (preamble.quotesStyle() == "hungarian")
+ res = "hls";
} else if (in == "ars") {// >
if (preamble.quotesStyle() == "swiss")
res = "cls";
} else if (in == "gld") {// ,,
if (preamble.quotesStyle() == "polish")
res = "pld";
+ else if (preamble.quotesStyle() == "hungarian")
+ res = "hld";
else if (preamble.quotesStyle() == "russian")
res = "rls";
} else if (in == "gls") {// ,
}
-string const fromPolyglossiaEnvironment(string const s)
+string const fromPolyglossiaEnvironment(string const & s)
{
// Since \arabic is taken by the LaTeX kernel,
// the Arabic polyglossia environment is upcased
}
-string uncapitalize(string const s)
+string uncapitalize(string const & s)
{
docstring in = from_ascii(s);
char_type t = lowercase(s[0]);
}
-bool isCapitalized(string const s)
+bool isCapitalized(string const & s)
{
docstring in = from_ascii(s);
char_type t = uppercase(s[0]);
/// try to convert \p s to a valid InsetCommand argument
/// without trying to recode macros.
-string convert_literate_command_inset_arg(string s)
+string convert_literate_command_inset_arg(string const & s)
{
// LyX cannot handle newlines in a latex command
return subst(s, "\n", " ");
}
-void output_arguments(ostream & os, Parser & p, bool outer, bool need_layout, string const prefix,
+void output_arguments(ostream & os, Parser & p, bool outer, bool need_layout, string const & prefix,
Context & context, Layout::LaTeXArgMap const & latexargs)
{
if (context.layout->latextype != LATEX_ITEM_ENVIRONMENT || !prefix.empty()) {
}
-void copy_file(FileName const & src, string dstname)
+void copy_file(FileName const & src, string const & dstname)
{
if (!copyFiles())
return;
if (t.cs() == "newpage" ||
(t.cs() == "pagebreak" && !p.hasOpt()) ||
t.cs() == "clearpage" ||
- t.cs() == "cleardoublepage") {
+ t.cs() == "cleardoublepage" ||
+ t.cs() == "nopagebreak") {
context.check_layout(os);
begin_inset(os, "Newpage ");
os << t.cs();