]> git.lyx.org Git - features.git/commitdiff
Handle bibliography irritations in thesis template
authorJuergen Spitzmueller <spitz@lyx.org>
Sat, 29 Dec 2018 14:05:08 +0000 (15:05 +0100)
committerJuergen Spitzmueller <spitz@lyx.org>
Sat, 29 Dec 2018 17:07:17 +0000 (18:07 +0100)
Outsource the bibliography to an own child, which is then also included
in the children's "Standalone" branch

Add some clarifying notes.

Fixes: #10748
(cherry picked from commit 12aaeb259fac8e41c9e729919ff719cf7ab096e0)

lib/Makefile.am
lib/examples/thesis/Appendix.lyx
lib/examples/thesis/Bibliography.lyx [new file with mode: 0644]
lib/examples/thesis/chapter-1.lyx
lib/examples/thesis/chapter-2.lyx
lib/examples/thesis/thesis.lyx
status.23x

index 8df4630999fd125d3e08fa17a6c8bd2efdf4a63e..e08654d3c030f05b3c1e4adfe3ef6e262d38e34a 100644 (file)
@@ -283,6 +283,7 @@ dist_thesisexamples_DATA = \
        examples/thesis/Acknowledgments.lyx \
        examples/thesis/alpha.bst \
        examples/thesis/Appendix.lyx \
+       examples/thesis/Bibliography.lyx \
        examples/thesis/chapter-1.lyx \
        examples/thesis/chapter-2.lyx \
        examples/thesis/Summary.lyx \
index 766974b7b9bdc104f7ab4618ea418703127e1905..ea2c1aad69775478d0cd11c00c73e82b6567c855 100644 (file)
@@ -126,8 +126,8 @@ customHeadersFooters
 \justification true
 \use_refstyle 0
 \use_minted 0
-\branch NoChildDocument
-\selected 0
+\branch Standalone
+\selected 1
 \filename_suffix 0
 \color #ff0000
 \end_branch
@@ -356,26 +356,31 @@ The next section
 \end_layout
 
 \begin_layout Standard
-\begin_inset Branch NoChildDocument
+\begin_inset Branch Standalone
 inverted 0
-status collapsed
+status open
 
 \begin_layout Standard
-\begin_inset CommandInset bibtex
-LatexCommand bibtex
-bibfiles "biblio/Plasma"
-options "biblio/alpha"
+\begin_inset Note Note
+status open
 
+\begin_layout Plain Layout
+The contents of this branch is only output if this chapter is processed
+ on its own, i.
+\begin_inset space \thinspace{}
 \end_inset
 
-
+e., not from the master.
+ This allows you to have a bibliography and a nomenclature if you only want
+ to output this chapter.
 \end_layout
 
-\begin_layout Standard
-\begin_inset CommandInset nomencl_print
-LatexCommand printnomenclature
-set_width "custom"
-width "2.5cm"
+\end_inset
+
+
+\begin_inset CommandInset include
+LatexCommand include
+filename "Bibliography.lyx"
 
 \end_inset
 
diff --git a/lib/examples/thesis/Bibliography.lyx b/lib/examples/thesis/Bibliography.lyx
new file mode 100644 (file)
index 0000000..1c2126f
--- /dev/null
@@ -0,0 +1,460 @@
+#LyX 2.3 created this file. For more info see http://www.lyx.org/
+\lyxformat 544
+\begin_document
+\begin_header
+\save_transient_properties true
+\origin /systemlyxdir/examples/thesis/
+\textclass scrbook
+\begin_preamble
+% in case somebody want to have the label "Equation"
+%\renewcommand{\eqref}[1]{Equation~(\negthinspace\autoref{#1})}
+
+% that links to image floats jumps to the beginning
+% of the float and not to its caption
+\usepackage[figure]{hypcap}
+
+% the pages of the TOC is numbered roman
+% and a pdf-bookmark for the TOC is added
+\let\myTOC\tableofcontents
+\renewcommand\tableofcontents{%
+  \frontmatter
+  \pdfbookmark[1]{\contentsname}{}
+  \myTOC
+  \mainmatter }
+
+% makes caption labels bold
+% for more info about these settings, see
+% https://ctan.org/tex-archive/macros/latex/contrib/koma-script/doc/scrguien.pdf
+\setkomafont{captionlabel}{\bfseries}
+\setcapindent{1em}
+
+% enables calculations
+\usepackage{calc}
+
+% fancy page header/footer settings
+% for more information see section 9 of
+% ftp://www.ctan.org/pub/tex-archive/macros/latex2e/contrib/fancyhdr/fancyhdr.pdf
+\renewcommand{\chaptermark}[1]{\markboth{#1}{#1}}
+\renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}
+
+% increases the bottom float placement fraction
+\renewcommand{\bottomfraction}{0.5}
+
+% avoids that floats are placed above its sections
+\let\mySection\section\renewcommand{\section}{\suppressfloats[t]\mySection}
+
+% increases link area for cross-references and autoname them
+% if you change the document language to e.g. French
+% you must change "extrasenglish" to "extrasfrench"
+% if you uncomment the following lines, you cannot use the reference version Ref+Text in LyX
+%\AtBeginDocument{%
+% \renewcommand{\ref}[1]{\autoref{#1}}
+%}
+%\def\refnamechanges{%
+% \renewcommand*{\equationautorefname}[1]{}
+% \renewcommand{\sectionautorefname}{sec.\negthinspace}
+% \renewcommand{\subsectionautorefname}{sec.\negthinspace}
+% \renewcommand{\subsubsectionautorefname}{sec.\negthinspace}
+% \renewcommand{\figureautorefname}{Fig.\negthinspace}
+% \renewcommand{\tableautorefname}{Tab.\negthinspace}
+%}
+%\@ifpackageloaded{babel}{\addto\extrasenglish{\refnamechanges}}{\refnamechanges}
+\end_preamble
+\options intoc,bibliography=totoc,index=totoc,BCOR10mm,captions=tableheading,titlepage
+\use_default_options true
+\master thesis.lyx
+\begin_modules
+customHeadersFooters
+\end_modules
+\maintain_unincluded_children false
+\language english
+\language_package default
+\inputencoding auto
+\fontencoding global
+\font_roman "lmodern" "default"
+\font_sans "lmss" "default"
+\font_typewriter "lmtt" "default"
+\font_math "auto" "auto"
+\font_default_family default
+\use_non_tex_fonts false
+\font_sc false
+\font_osf false
+\font_sf_scale 100 100
+\font_tt_scale 100 100
+\use_microtype false
+\use_dash_ligatures false
+\graphics default
+\default_output_format default
+\output_sync 0
+\bibtex_command bibtex
+\index_command default
+\float_placement h
+\paperfontsize 12
+\spacing single
+\use_hyperref true
+\pdf_title "Your title"
+\pdf_author "Your name"
+\pdf_bookmarks true
+\pdf_bookmarksnumbered true
+\pdf_bookmarksopen true
+\pdf_bookmarksopenlevel 1
+\pdf_breaklinks false
+\pdf_pdfborder true
+\pdf_colorlinks false
+\pdf_backref false
+\pdf_pdfusetitle false
+\pdf_quoted_options "pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
+\papersize a4paper
+\use_geometry false
+\use_package amsmath 2
+\use_package amssymb 2
+\use_package cancel 1
+\use_package esint 1
+\use_package mathdots 1
+\use_package mathtools 1
+\use_package mhchem 1
+\use_package stackrel 1
+\use_package stmaryrd 1
+\use_package undertilde 1
+\cite_engine basic
+\cite_engine_type default
+\biblio_style plain
+\use_bibtopic false
+\use_indices false
+\paperorientation portrait
+\suppress_date false
+\justification true
+\use_refstyle 0
+\use_minted 0
+\branch Standalone
+\selected 1
+\filename_suffix 0
+\color #ff0000
+\end_branch
+\index Index
+\shortcut idx
+\color #008000
+\end_index
+\secnumdepth 3
+\tocdepth 2
+\paragraph_separation skip
+\defskip medskip
+\is_math_indent 1
+\math_indentation default
+\math_numbering_side default
+\quotes_style english
+\dynamic_quotes 0
+\papercolumns 1
+\papersides 2
+\paperpagestyle fancy
+\tracking_changes false
+\output_changes false
+\html_math_output 0
+\html_css_as_file 0
+\html_be_strict false
+\end_header
+
+\begin_body
+
+\begin_layout Left Header
+\begin_inset Argument 1
+status open
+
+\begin_layout Plain Layout
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+chaptername
+\end_layout
+
+\end_inset
+
+
+\begin_inset space ~
+\end_inset
+
+
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+thechapter
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+rightmark
+\end_layout
+
+\end_inset
+
+
+\begin_inset Note Note
+status collapsed
+
+\begin_layout Plain Layout
+Enable page headers and add the chapter to the header line.
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Right Header
+\begin_inset Argument 1
+status open
+
+\begin_layout Plain Layout
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+leftmark
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Left Footer
+\begin_inset Argument 1
+status open
+
+\begin_layout Plain Layout
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+thepage
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Center Footer
+
+\end_layout
+
+\begin_layout Right Footer
+\begin_inset Argument 1
+status open
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+
+
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+thepage
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Left Header
+\begin_inset Argument 1
+status collapsed
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+
+
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+rightmark
+\end_layout
+
+\end_inset
+
+
+\begin_inset Note Note
+status collapsed
+
+\begin_layout Plain Layout
+remove the chapter from the header line
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Right Header
+\begin_inset Argument 1
+status open
+
+\begin_layout Plain Layout
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+leftmark
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\begin_inset Note Note
+status collapsed
+
+\begin_layout Plain Layout
+restore the right header line
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset bibtex
+LatexCommand bibtex
+bibfiles "thesisExample"
+options "alpha"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Newpage cleardoublepage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Left Header
+\begin_inset Argument 1
+status open
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+
+Nomenclature
+\begin_inset Note Note
+status collapsed
+
+\begin_layout Plain Layout
+print 
+\begin_inset Quotes eld
+\end_inset
+
+Nomenclature
+\begin_inset Quotes erd
+\end_inset
+
+ in the header line
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Right Header
+\begin_inset Argument 1
+status open
+
+\begin_layout Plain Layout
+Nomenclature
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset nomencl_print
+LatexCommand printnomenclature
+set_width "custom"
+width "2.5cm"
+
+\end_inset
+
+
+\begin_inset Note Note
+status open
+
+\begin_layout Plain Layout
+The width of the nomenclature entries can be changed by clicking on the
+ nomenclature inset.
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_body
+\end_document
index cb82e74f77e6d70b4518f16c5d3262f7078dab64..54b1636d3fe3346612f217e0c355c3d5571b652d 100644 (file)
@@ -126,8 +126,8 @@ customHeadersFooters
 \justification true
 \use_refstyle 0
 \use_minted 0
-\branch NoChildDocument
-\selected 0
+\branch Standalone
+\selected 1
 \filename_suffix 0
 \color #ff0000
 \end_branch
@@ -371,15 +371,24 @@ name "sec:The-next-section"
 \end_layout
 
 \begin_layout Standard
-\begin_inset Branch NoChildDocument
+\begin_inset Branch Standalone
 inverted 0
-status collapsed
+status open
 
 \begin_layout Standard
-\begin_inset CommandInset bibtex
-LatexCommand bibtex
-bibfiles "thesisExample"
-options "alpha"
+\begin_inset Note Note
+status open
+
+\begin_layout Plain Layout
+The contents of this branch is only output if this chapter is processed
+ on its own, i.
+\begin_inset space \thinspace{}
+\end_inset
+
+e., not from the master.
+ This allows you to have a bibliography and a nomenclature if you only want
+ to output this chapter.
+\end_layout
 
 \end_inset
 
@@ -387,10 +396,9 @@ options "alpha"
 \end_layout
 
 \begin_layout Standard
-\begin_inset CommandInset nomencl_print
-LatexCommand printnomenclature
-set_width "custom"
-width "2.5cm"
+\begin_inset CommandInset include
+LatexCommand include
+filename "Bibliography.lyx"
 
 \end_inset
 
index 3603692ba6a07b38346e9418480f6e5b3edac033..6a58aa9532a442f053855a8d0c4218603d011556 100644 (file)
@@ -126,8 +126,8 @@ customHeadersFooters
 \justification true
 \use_refstyle 0
 \use_minted 0
-\branch NoChildDocument
-\selected 0
+\branch Standalone
+\selected 1
 \filename_suffix 0
 \color #ff0000
 \end_branch
@@ -340,15 +340,24 @@ The next section
 \end_layout
 
 \begin_layout Standard
-\begin_inset Branch NoChildDocument
+\begin_inset Branch Standalone
 inverted 0
-status collapsed
+status open
 
 \begin_layout Standard
-\begin_inset CommandInset bibtex
-LatexCommand bibtex
-bibfiles "thesisExample"
-options "alpha"
+\begin_inset Note Note
+status open
+
+\begin_layout Plain Layout
+The contents of this branch is only output if this chapter is processed
+ on its own, i.
+\begin_inset space \thinspace{}
+\end_inset
+
+e., not from the master.
+ This allows you to have a bibliography and a nomenclature if you only want
+ to output this chapter.
+\end_layout
 
 \end_inset
 
@@ -356,10 +365,9 @@ options "alpha"
 \end_layout
 
 \begin_layout Standard
-\begin_inset CommandInset nomencl_print
-LatexCommand printnomenclature
-set_width "custom"
-width "2.5cm"
+\begin_inset CommandInset include
+LatexCommand include
+filename "Bibliography.lyx"
 
 \end_inset
 
index 376871df1b7f80932f7b01f9df68fd67cab15134..a659296aef00b8e93a8495bedf2bf5e62069fb34 100644 (file)
@@ -148,6 +148,11 @@ customHeadersFooters
 \filename_suffix 0
 \color #faf0e6
 \end_branch
+\branch Standalone
+\selected 0
+\filename_suffix 0
+\color #faf0e6
+\end_branch
 \index Index
 \shortcut idx
 \color #008000
@@ -184,7 +189,7 @@ Notes:
 \end_layout
 
 \begin_layout Itemize
-When renaming this file, you must also rename it in all its subdocuments
+When renaming this file, you must also rename it in all its sub-documents
  in the document settings in the menu 
 \family sans
 Document\SpecialChar menuseparator
@@ -209,6 +214,14 @@ master
 document
 \end_layout
 
+\begin_layout Itemize
+The bibliography database can be changed in the 
+\emph on
+Bibliography
+\emph default
+ sub-document, which also includes the nomenclature.
+\end_layout
+
 \begin_layout Itemize
 For special settings like the header/footer lines or the font of captions,
  see also the document preamble (menu 
@@ -229,7 +242,7 @@ If you change the document language you also need to check the document
 \begin_layout Itemize
 This file is not designed to change the document class.
  You can use it nevertheless as starting point if you have to use a special
- docment class provided by your university, but no support can be granted
+ document class provided by your university, but no support can be granted
  for this transition.
 \end_layout
 
@@ -942,161 +955,23 @@ Appendix is of course optional
 \end_layout
 
 \begin_layout Standard
-\begin_inset Newpage cleardoublepage
-\end_inset
-
-
-\end_layout
-
-\begin_layout Left Header
-\begin_inset Argument 1
-status open
-
-\begin_layout Plain Layout
-
-\end_layout
-
-\end_inset
-
-
-\begin_inset ERT
-status collapsed
-
-\begin_layout Plain Layout
-
-
-\backslash
-rightmark
-\end_layout
-
-\end_inset
-
-
 \begin_inset Note Note
-status collapsed
-
-\begin_layout Plain Layout
-remove the chapter from the header line
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Right Header
-\begin_inset Argument 1
 status open
 
 \begin_layout Plain Layout
-\begin_inset ERT
-status collapsed
-
-\begin_layout Plain Layout
-
-
-\backslash
-leftmark
+The bibliography and nomenclature are in an own sub-document, so that they
+ can be included from individual chapters as well.
 \end_layout
 
 \end_inset
 
 
-\end_layout
-
-\end_inset
-
-
-\begin_inset Note Note
-status collapsed
-
-\begin_layout Plain Layout
-restore the right header line
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\begin_inset CommandInset bibtex
-LatexCommand bibtex
-bibfiles "thesisExample"
-options "alpha"
-
-\end_inset
-
-
 \end_layout
 
 \begin_layout Standard
-\begin_inset Newpage cleardoublepage
-\end_inset
-
-
-\end_layout
-
-\begin_layout Left Header
-\begin_inset Argument 1
-status open
-
-\begin_layout Plain Layout
-
-\end_layout
-
-\end_inset
-
-Nomenclature
-\begin_inset Note Note
-status collapsed
-
-\begin_layout Plain Layout
-print 
-\begin_inset Quotes eld
-\end_inset
-
-Nomenclature
-\begin_inset Quotes erd
-\end_inset
-
- in the header line
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Right Header
-\begin_inset Argument 1
-status open
-
-\begin_layout Plain Layout
-Nomenclature
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\begin_inset CommandInset nomencl_print
-LatexCommand printnomenclature
-set_width "custom"
-width "2.5cm"
-
-\end_inset
-
-
-\begin_inset Note Note
-status open
-
-\begin_layout Plain Layout
-The width of the nomenclature entries can be changed by clicking on the
- nomenclature inset.
-\end_layout
+\begin_inset CommandInset include
+LatexCommand include
+filename "Bibliography.lyx"
 
 \end_inset
 
index 5e577dde9b1592b3d9087bfc4e6c11f01721cb4d..090770daa33a45fd839172903296fc6cb7144b5c 100644 (file)
@@ -50,6 +50,8 @@ What's new
 
 * DOCUMENTATION AND LOCALIZATION
 
+- Minor rework of the thesis example file in order to clear some confusion about
+  the included bibliography (bug 10748).
 
 
 * BUILD/INSTALLATION