#LyX 2.4 created this file. For more info see https://www.lyx.org/
-\lyxformat 575
+\lyxformat 578
\begin_document
\begin_header
\save_transient_properties true
\end_inset
.
+\change_inserted -712698321 1562592950
+
+\end_layout
+
+\begin_layout Description
+
+\change_inserted -712698321 1562593040
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\change_inserted -712698321 1562592954
+BibInToc
+\end_layout
+
+\end_inset
+
+ [
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\change_inserted -712698321 1562592950
+
+\emph on
+0
+\end_layout
+
+\end_inset
+
+,
+\begin_inset space \thinspace{}
+\end_inset
+
+
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\change_inserted -712698321 1562592950
+1
+\end_layout
+
+\end_inset
+
+] If the document class adds the bibliography to the table of contents,
+ add this option with value
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\change_inserted -712698321 1562592996
+1
+\change_unchanged
+
+\end_layout
+
+\end_inset
+
+ (or
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\change_inserted -712698321 1562593006
+true
+\change_unchanged
+
+\end_layout
+
+\end_inset
+
+).
+ This prevents the bibliography from being added twice.
+\change_unchanged
+
\end_layout
\begin_layout Description
#LyX 2.4 created this file. For more info see https://www.lyx.org/
-\lyxformat 575
+\lyxformat 578
\begin_document
\begin_header
\save_transient_properties true
\begin_inset Flex Code
status collapsed
+\begin_layout Plain Layout
+BibInToc
+\end_layout
+
+\end_inset
+
+ [
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\emph on
+0
+\end_layout
+
+\end_inset
+
+,
+\begin_inset space \thinspace{}
+\end_inset
+
+
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+1
+\end_layout
+
+\end_inset
+
+] Falls die Dokumentklasse das Literaturverzeichnis per Voreinstellung im
+ Inhaltsverzeichnis aufführt, fügen Sie diese Option mit dem Wert
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+1
+\end_layout
+
+\end_inset
+
+ (oder
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+true
+\end_layout
+
+\end_inset
+
+) hinzu.
+ Dies verhindert, dass das Literaturverzeichnis zweimal erscheint.
+\end_layout
+
+\begin_layout Description
+\begin_inset Flex Code
+status collapsed
+
\begin_layout Plain Layout
CiteEngine <engine>
\end_layout
# Modularized Jan '08 by Richard Heck <rgheck@brown.edu>
# Moved "number within sections" to modules Aug '09 (Paul Rubin <rubin@msu.edu>)
-Format 74
+Format 75
Columns 1
Sides 2
PageStyle Headers
+BibInToc true
Provides amsmath 1
Provides makeidx 1
# This script will update a .layout file to current format
# The latest layout format is also defined in src/TextClass.cpp
-currentFormat = 75
+currentFormat = 76
# Incremented to format 4, 6 April 2007, lasgouttes
# New Argument tags FreeSpacing, InsertOnNewline
# New InsetLayout tag ParbreakIgnored
+# Incremented to format 76, 8 July 2019 by spitz
+# New textclass tag BibInToc
+
# Do not forget to document format change in Customization
# Manual (section "Declaring a new text class").
i += 1
continue
- if format >= 65 and format <= 74:
+ if format >= 65 and format <= 75:
# nothing to do.
i += 1
continue
// You should also run the development/tools/updatelayouts.py script,
// to update the format of all of our layout files.
//
-int const LAYOUT_FORMAT = 75; // spitz: FreeSpacing (Argument)
+int const LAYOUT_FORMAT = 76; // spitz: BibInToc
// Layout format for the current lyx file format. Controls which format is
has_output_format_(false), defaultfont_(sane_font),
titletype_(TITLE_COMMAND_AFTER), titlename_("maketitle"),
min_toclevel_(0), max_toclevel_(0), maxcitenames_(2),
- cite_full_author_list_(true)
+ cite_full_author_list_(true), bibintoc_(false)
{
}
TC_DEFAULTBIBLIO,
TC_FULLAUTHORLIST,
TC_OUTLINERNAME,
- TC_TABLESTYLE
+ TC_TABLESTYLE,
+ TC_BIBINTOC
};
{ "addtohtmlpreamble", TC_ADDTOHTMLPREAMBLE },
{ "addtohtmlstyles", TC_ADDTOHTMLSTYLES },
{ "addtopreamble", TC_ADDTOPREAMBLE },
+ { "bibintoc", TC_BIBINTOC },
{ "citeengine", TC_CITEENGINE },
{ "citeenginetype", TC_CITEENGINETYPE },
{ "citeformat", TC_CITEFORMAT },
}
break;
+ case TC_BIBINTOC:
+ if (lexrc.next())
+ bibintoc_ = lexrc.getBool();
+ break;
+
case TC_FULLAUTHORLIST:
if (lexrc.next())
cite_full_author_list_ &= lexrc.getBool();
std::map<CiteEngineType, std::vector<CitationStyle> > class_cite_styles_;
///
std::map<std::string, docstring> outliner_names_;
+ /// Does this class put the bibliography to toc by itself?
+ bool bibintoc_;
private:
///////////////////////////////////////////////////////////////////
// helper routines for reading layout files
size_t max_citenames() const { return maxcitenames_; }
///
bool const & fullAuthorList() const { return cite_full_author_list_; }
+ ///
+ bool const & bibInToc() const { return bibintoc_; }
protected:
/// Constructs a DocumentClass based upon a LayoutFile.
DocumentClass(LayoutFile const & tc);
#include "GuiApplication.h"
#include "LyXRC.h"
#include "qt_helpers.h"
+#include "TextClass.h"
#include "Validator.h"
#include "ButtonPolicy.h"
void GuiBibtex::updateContents()
{
- bool bibtopic = usingBibtopic();
- bool biblatex = usingBiblatex();
+ bool const bibtopic = usingBibtopic();
+ bool const biblatex = usingBiblatex();
if (biblatex)
setTitle(qt_("Biblatex Bibliography"));
QString const bibstyle = styleFile();
- bibtocCB->setChecked(bibtotoc() && !bibtopic);
- bibtocCB->setEnabled(!bibtopic);
+ bool const hasbibintoc = buffer().params().documentClass().bibInToc()
+ && !biblatex;
+
+ bibtocCB->setChecked((bibtotoc() && !bibtopic) || hasbibintoc);
+ bibtocCB->setEnabled(!bibtopic && !hasbibintoc);
btPrintCO->clear();
btPrintCO->addItem(qt_("all cited references"), toqstr("btPrintCited"));
<< "\\end{btSect}\n";
}
// bibtotoc option
- if (!bibtotoc.empty() && !buffer().masterParams().useBibtopic()) {
+ if (!bibtotoc.empty() && !buffer().masterParams().useBibtopic()
+ && !buffer().masterParams().documentClass().bibInToc()) {
// set label for hyperref, see http://www.lyx.org/trac/ticket/6470
if (buffer().masterParams().pdfoptions().use_hyperref)
os << "\\phantomsection";