]> git.lyx.org Git - lyx.git/commitdiff
Was forgetting to add the caption to the list of listings
authorEnrico Forestieri <forenr@lyx.org>
Sat, 10 Jun 2017 19:00:43 +0000 (21:00 +0200)
committerEnrico Forestieri <forenr@lyx.org>
Sat, 10 Jun 2017 19:00:43 +0000 (21:00 +0200)
src/LaTeXFeatures.cpp

index bf8cf24f0744fdfec7856af72a829f7cb057863f..54cf237eb5a822441d2142240b81a8fd514a5964 100644 (file)
@@ -423,6 +423,8 @@ 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"