X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FLaTeXFeatures.cpp;h=3f9eb6776267ab6fb3b0c00efb21a1c53d4d9898;hb=7c8d167f8ea3e641b0ec26f0c40ec33c4045bb68;hp=b10a9a27544623df2181f059a8f9ad668cbf9ad6;hpb=8dab1cfe7ee6a3bb6d5e57afb55cb357e1e8ec23;p=lyx.git diff --git a/src/LaTeXFeatures.cpp b/src/LaTeXFeatures.cpp index b10a9a2754..3f9eb67762 100644 --- a/src/LaTeXFeatures.cpp +++ b/src/LaTeXFeatures.cpp @@ -419,6 +419,19 @@ static docstring const rtloutputdblcol_def = from_ascii( "}\n" "\\@mparswitchtrue\n"); +static docstring const lyxmintcaption_def = from_ascii( + "\\long\\def\\lyxmintcaption[#1]#2{%\n" + " \\ifx#1t\\vskip\\baselineskip\\fi%\n" + " \\refstepcounter{listing}\\noindent%\n" + " \\addcontentsline{lol}{listing}%\n" + " {\\protect\\numberline{\\thelisting}{\\ignorespaces #2}}%\n" + " \\setbox\\@tempboxa\\hbox{\\listingscaption~\\thelisting: #2}%\n" + " \\ifdim \\wd\\@tempboxa >\\linewidth%\n" + " \\parbox[t]{\\linewidth}{\\unhbox\\@tempboxa}\\else%\n" + " \\hbox to\\linewidth{\\hfil\\box\\@tempboxa\\hfil}\\fi%\n" + " \\ifx#1b\\vskip\\baselineskip\\fi\n" + "}\n"); + ///////////////////////////////////////////////////////////////////// // @@ -669,7 +682,7 @@ TexString getSnippets(std::list const & list) return snip.release(); } -} //anon namespace +} // namespace void LaTeXFeatures::addPreambleSnippet(TexString ts, bool allow_dupes) @@ -961,6 +974,8 @@ char const * simplefeatures[] = { "todonotes", "forest", "varwidth", + "footnote", + "tablefootnote", }; char const * bibliofeatures[] = { @@ -984,7 +999,7 @@ int const nb_bibliofeatures = sizeof(bibliofeatures) / sizeof(char const *); int const nb_simplefeatures = sizeof(simplefeatures) / sizeof(char const *); -} +} // namespace string const LaTeXFeatures::getColorOptions() const @@ -1491,6 +1506,9 @@ TexString LaTeXFeatures::getMacros() const if (mustProvide("rtloutputdblcol")) macros << rtloutputdblcol_def; + if (mustProvide("lyxmintcaption")) + macros << lyxmintcaption_def; + return macros.release(); } @@ -1754,7 +1772,7 @@ docstring const i18npreamble(docstring const & templ, Language const * lang, return from_utf8(preamble); } -} +} // namespace docstring const LaTeXFeatures::getTClassI18nPreamble(bool use_babel,