diff --git a/src/plugins/textreport/DetAncestralReport.py b/src/plugins/textreport/DetAncestralReport.py index 43eb6c8b7..32f101b5f 100644 --- a/src/plugins/textreport/DetAncestralReport.py +++ b/src/plugins/textreport/DetAncestralReport.py @@ -84,6 +84,7 @@ class DetAncestorReport(Report): gen - Maximum number of generations to include. pagebgg - Whether to include page breaks between generations. + pageben - Whether to include page break before End Notes. firstName - Whether to use first names instead of pronouns. fulldate - Whether to use full dates instead of just year. listchildren - Whether to list children. @@ -105,6 +106,7 @@ class DetAncestorReport(Report): menu = options_class.menu self.max_generations = menu.get_option_by_name('gen').get_value() self.pgbrk = menu.get_option_by_name('pagebbg').get_value() + self.pgbrkenotes = menu.get_option_by_name('pageben').get_value() self.fulldate = menu.get_option_by_name('fulldates').get_value() self.listchildren = menu.get_option_by_name('listc').get_value() self.includenotes = menu.get_option_by_name('incnotes').get_value() @@ -204,6 +206,8 @@ class DetAncestorReport(Report): if self.inc_events: self.write_family_events(family) if self.inc_sources: + if self.pgbrkenotes: + self.doc.page_break() endnotes.write_endnotes(self.bibli, self.database, self.doc, printnotes=self.inc_srcnotes) @@ -676,6 +680,11 @@ class DetAncestorOptions(MenuReportOptions): pagebbg.set_help( _("Whether to start a new page after each generation.")) menu.add_option(category_name,"pagebbg",pagebbg) + + pageben = BooleanOption(_("Page break before end notes"),False) + pageben.set_help( + _("Whether to start a new page before the end notes.")) + menu.add_option(category_name,"pageben",pageben) category_name = _("Content") diff --git a/src/plugins/textreport/DetDescendantReport.py b/src/plugins/textreport/DetDescendantReport.py index e40f30723..0ecd7e67e 100644 --- a/src/plugins/textreport/DetDescendantReport.py +++ b/src/plugins/textreport/DetDescendantReport.py @@ -87,6 +87,7 @@ class DetDescendantReport(Report): gen - Maximum number of generations to include. pagebgg - Whether to include page breaks between generations. + pageben - Whether to include page break before End Notes. fulldates - Whether to use full dates instead of just year. listc - Whether to list children. incnotes - Whether to include notes. @@ -116,6 +117,7 @@ class DetDescendantReport(Report): menu = options_class.menu self.max_generations = menu.get_option_by_name('gen').get_value() self.pgbrk = menu.get_option_by_name('pagebbg').get_value() + self.pgbrkenotes = menu.get_option_by_name('pageben').get_value() self.fulldate = menu.get_option_by_name('fulldates').get_value() self.listchildren = menu.get_option_by_name('listc').get_value() self.inc_notes = menu.get_option_by_name('incnotes').get_value() @@ -277,6 +279,8 @@ class DetDescendantReport(Report): self.write_person(key) if self.inc_sources: + if self.pgbrkenotes: + self.doc.page_break() endnotes.write_endnotes(self.bibli, self.database, self.doc, printnotes=self.inc_srcnotes) @@ -770,6 +774,11 @@ class DetDescendantOptions(MenuReportOptions): _("Whether to start a new page after each generation.")) menu.add_option(category_name, "pagebbg", pagebbg) + pageben = BooleanOption(_("Page break before end notes"),False) + pageben.set_help( + _("Whether to start a new page before the end notes.")) + menu.add_option(category_name,"pageben",pageben) + category_name = _("Content") usecall = BooleanOption(_("Use callname for common name"), False)