]> git.lyx.org Git - lyx.git/blobdiff - src/LaTeXFeatures.cpp
Add empty line after last \bibitem in bibliography (#12041)
[lyx.git] / src / LaTeXFeatures.cpp
index 347a3e04501113d6d1afb0cca100891d6eadb767..7c23a851cafa9fafdef18bf88e1bbeff9afbe393 100644 (file)
@@ -28,6 +28,7 @@
 #include "LaTeXPackages.h"
 #include "Layout.h"
 #include "LyXRC.h"
+#include "OutputParams.h"
 #include "TextClass.h"
 #include "TexRow.h"
 #include "texstream.h"
@@ -39,9 +40,9 @@
 #include "support/docstring.h"
 #include "support/filetools.h"
 #include "support/lstrings.h"
-#include "support/regex.h"
 
 #include <algorithm>
+#include <regex>
 
 
 using namespace std;
@@ -832,15 +833,15 @@ TexString getSnippets(std::list<TexString> const & list)
 } // namespace
 
 
-void LaTeXFeatures::addPreambleSnippet(TexString ts, bool allow_dupes)
+void LaTeXFeatures::addPreambleSnippet(TexString snippet, bool allow_dupes)
 {
-       addSnippet(preamble_snippets_, move(ts), allow_dupes);
+       addSnippet(preamble_snippets_, move(snippet), allow_dupes);
 }
 
 
-void LaTeXFeatures::addPreambleSnippet(docstring const & str, bool allow_dupes)
+void LaTeXFeatures::addPreambleSnippet(docstring const & snippet, bool allow_dupes)
 {
-       addSnippet(preamble_snippets_, TexString(str), allow_dupes);
+       addSnippet(preamble_snippets_, TexString(snippet), allow_dupes);
 }
 
 
@@ -1262,8 +1263,8 @@ string const LaTeXFeatures::getPackages() const
 
        if (mustProvide("changebar")) {
                packages << "\\usepackage";
-               if (runparams_.flavor == OutputParams::LATEX
-                   || runparams_.flavor == OutputParams::DVILUATEX)
+               if (runparams_.flavor == Flavor::LaTeX
+                   || runparams_.flavor == Flavor::DviLuaTeX)
                        packages << "[dvips]";
                packages << "{changebar}\n";
        }
@@ -1277,8 +1278,8 @@ string const LaTeXFeatures::getPackages() const
 
        // [pdf]lscape is used to rotate longtables
        if (mustProvide("lscape")) {
-               if (runparams_.flavor == OutputParams::LATEX
-                   || runparams_.flavor == OutputParams::DVILUATEX)
+               if (runparams_.flavor == Flavor::LaTeX
+                   || runparams_.flavor == Flavor::DviLuaTeX)
                        packages << "\\usepackage{lscape}\n";
                else
                        packages << "\\usepackage{pdflscape}\n";
@@ -1525,10 +1526,10 @@ TexString LaTeXFeatures::getMacros() const
                macros << "\\XeTeXdashbreakstate 0" << '\n';
 
        if (mustProvide("papersize")) {
-               if (runparams_.flavor == OutputParams::LATEX
-                   || runparams_.flavor == OutputParams::DVILUATEX)
+               if (runparams_.flavor == Flavor::LaTeX
+                   || runparams_.flavor == Flavor::DviLuaTeX)
                        macros << papersizedvi_def << '\n';
-               else if  (runparams_.flavor == OutputParams::LUATEX)
+               else if  (runparams_.flavor == Flavor::LuaTeX)
                        macros << papersizepdflua_def << '\n';
                else
                        macros << papersizepdf_def << '\n';
@@ -1654,13 +1655,13 @@ TexString LaTeXFeatures::getMacros() const
        if (mustProvide("textquotedbl"))
                macros << textquotedbl_def << '\n';
        if (mustProvide("textquotesinglep")) {
-               if (runparams_.flavor == OutputParams::XETEX)
+               if (runparams_.flavor == Flavor::XeTeX)
                        macros << textquotesinglep_xetex_def << '\n';
                else
                        macros << textquotesinglep_luatex_def << '\n';
        }
        if (mustProvide("textquotedblp")) {
-               if (runparams_.flavor == OutputParams::XETEX)
+               if (runparams_.flavor == Flavor::XeTeX)
                        macros << textquotedblp_xetex_def << '\n';
                else
                        macros << textquotedblp_luatex_def << '\n';
@@ -1688,7 +1689,7 @@ TexString LaTeXFeatures::getMacros() const
        if (mustProvide("lyxgreyedout")) {
                // We need different version for RTL (#8647)
                if (hasRTLLanguage()) {
-                       if (runparams_.flavor == OutputParams::LUATEX)
+                       if (runparams_.flavor == Flavor::LuaTeX)
                                if (useBabel())
                                        macros << lyxgreyedout_luartl_babel_def;
                                else