[LyX/master] Add empty line after last \bibitem in bibliography (#12041)

Juergen Spitzmueller spitz at lyx.org
Thu Dec 3 06:17:25 UTC 2020


commit 4a13a29042a05dfeba57ea4d2299d96d6ac7d30e
Author: Juergen Spitzmueller <spitz at lyx.org>
Date:   Thu Dec 3 07:46:39 2020 +0100

    Add empty line after last \bibitem in bibliography (#12041)
---
 src/output_latex.cpp |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/output_latex.cpp b/src/output_latex.cpp
index 8f8459f..4bb1400 100644
--- a/src/output_latex.cpp
+++ b/src/output_latex.cpp
@@ -349,6 +349,11 @@ static void finishEnvironment(otexstream & os, OutputParams const & runparams,
 				popLanguageName();
 			}
 		}
+		if (data.style->latextype == LATEX_BIB_ENVIRONMENT)
+			// bibliography needs a blank line after
+			// each item for backref to function properly
+			// (see #12041)
+			os << '\n';
 		state->nest_level_ -= 1;
 		string const & name = data.style->latexname();
 		if (!name.empty())


More information about the lyx-cvs mailing list