diff --git a/chapters/ch02_motivation.tex b/chapters/ch02_motivation.tex index 910f5e5..317c124 100644 --- a/chapters/ch02_motivation.tex +++ b/chapters/ch02_motivation.tex @@ -49,6 +49,15 @@ \section{Multiperson literal work} As this sample is a multipart document, it can be used as a reference or a start for your own document. + +\section{Good documentation and online support} +%% this paragraph to show dual use of citations. +Most documentation can be found on line. Overleaf has a very good set of documentation> Overleaf has as mainproduct a build service for \LaTeX\ documents and may students are using and have used it succesfully. + +The original sources of documentation are Lesly Lamports Latex Book \textcite{latexbook}, and expanded on that is the \LaTeX\ Companion \parencite{latexcompanion}. + + + %%% Local Variables: %%% mode: latex %%% TeX-master: "main.tex" diff --git a/chapters/ch04_graphics.tex b/chapters/ch04_graphics.tex index dd42c7e..fdee3ac 100644 --- a/chapters/ch04_graphics.tex +++ b/chapters/ch04_graphics.tex @@ -58,7 +58,6 @@ \section{PDF from an UML package} % something like on the next page. % and using a wrapfigure \begin{wrapfigure}{r}{.4\textwidth} - \includegraphics[width=.4\textwidth]{images/doorsystem.pdf} \caption{A class diagram made with Visual Paradigm} \label{fig:classdiagram} @@ -101,12 +100,17 @@ \section{PDF from an UML package} Look on the next page how it is done properly. \clearpage +\begin{figure} + \includegraphics[width=\linewidth]{images/HWIO.pdf} + \caption{UML made with Visual Paradigm, export to svg and then adapted with inkscape and end exported to pdf} +\end{figure} \begin{figure}[htbp] \includegraphics[width=\linewidth]{images/perishablesales.pdf} \caption{\label{fig:cashregistertest}Vector format (exported as pdf), with functional colour and a legend} \end{figure} + \subsection{Stylish UML Class diagram} \label{sec:stylish} In the diagram of figure~\vref{fig:cashregistertest} above has style and uses functional colours which are simply explained in a legend. diff --git a/chapters/ch08_citingsimple.tex b/chapters/ch08_citingsimple.tex index 7d09f11..d435591 100644 --- a/chapters/ch08_citingsimple.tex +++ b/chapters/ch08_citingsimple.tex @@ -17,26 +17,35 @@ \chapter{Citing is simple} you use to organize you bibliography. The files with these data are called .bib files. -\section{bibtex} -Using bibtex is easy. -For instance if your bib contains this entry \cite{bibtexsite} +\section{Bib\LaTeX} +Bibtex is the traditional way of using citations and creating a bibliography, but its +role has all but been taken over by the more modern \BibLaTeX. +Both are equally simple to use for the most common use. For each reference that you want to use in your report +you should have a definition like below. Look in the \texttt{references.bib} file for more examples. + +For instance if your bib contains this entry for \texttt{Nobody}: \begin{lstlisting}[language=BibTeX] @misc{ Nobody06, - author = "Nobody Jr", - title = "My Article", - year = "2006" } + author = "Nobody Jr", + shorthand={Nobody}, + sortname={nobody}, + title = "My Article", + year = "2006" +} \end{lstlisting} \lstset{language=BibTeX} -Then citing Nobody~\cite{Nobody06} is easy as -pie:\lstinline|\cite{Nobody06}| +Then citing Nobody~\parencite{Nobody06} is easy as +pie:\lstinline|\parencite{Nobody06}| + +textcite ``\textcite{Nobody06}'', cite \cite{Nobody06}, parencite \parencite{Nobody06} Then you need to add one compilation step to your normal workflow: \begin{lstlisting}[language=sh] -$ latex myarticle -$ bibtex myarticle -$ latex myarticle -$ latex myarticle +$ pdflatex myarticle +$ biber myarticle +$ pdflatex myarticle +$ pdflatex myarticle \end{lstlisting} You can of course easily add that to the makefile introduced in an @@ -47,8 +56,53 @@ \section{bibtex} bibliography style (defined in a .bst file), which is most likely already define for or by that journal -\subsection{Biblatex and biber} +\subsection{BibLaTeX and Biber} + A bit more modern is biblatex, which has a much simpler definition format for bst files. The is a separate \textbf{biber} program to do the processing instead of the bibtex run. -I have used biber in this version of this latex sample. +I have used biber in this version of this latex sample. \parencite{biblatexsite}. + +\section{What style to choose} + +It appears that Fontys Venlo promotes the so called Harvard style, but that has three issues: +\begin{enumerate*} +\item It is not well defined. +\item Finding a reference in the bibliography is not trivial, because the style does not use the label. + in the bibliography, making it less useable or at least reader friendly. +\item It is NOT what Fontys Venlo uses internally. +\end{enumerate*} + +The official 'harvard'-like style that is promoted by the the slides on canvas +produces the bibliography in ~\vref{fig:harvard}, which is actually authoryear. + +\begin{figure} + \shadowbox{\parbox{\linewidth}{ + \centering \includegraphics{images/harvardreferences.pdf}}} + \caption{\label{fig:harvard}No labels that are easily matched with the references in the report text.} +\end{figure} + +The style that Fontys uses internally can be emulated with the +settings used in this report and with a bibliography that uses the +fields \texttt{shorthand} and \texttt{shortname} like below +in~\vref{bib:companion} to give the author control on both what is +used in either citation and the bibliography and also the sorting +applied in the bibliography. This provides the best of both worlds. + + +\begin{lstlisting}[language=BibTeX,caption={\label{bib:companion}Using \texttt{shorthand} for label and \texttt{sortname}for sorting}] + @BOOK{latexcompanion, + author = "Frank Mittelbach and Michel Goossens", + shorthand={Companion, 2004}, + sortname={companion}, + title = "The {\LaTeX }Companion Second Edition", + publisher = "Addison-Wesley", + year = 2004 +} +\end{lstlisting} + + +As most documentation, with a complete installation, you may want to +use the command \texttt{texdoc biblatex} to be presented with the +documentaton of \textbf{biblatex} in this case in the default pdf viewer. + diff --git a/configuration/thesis_config.tex b/configuration/thesis_config.tex index b200eb2..bb1b85e 100644 --- a/configuration/thesis_config.tex +++ b/configuration/thesis_config.tex @@ -41,7 +41,23 @@ {\end{description} } -\usepackage[style=alphabetic]{biblatex} +%% citation and bibliography style. +%% This style depends on 'sortname' and 'shorthand' fields in the bib file. +%% This gives you control on what is shown in the labels. +%% If you ommit the shorthand, the styles fall back to a numeric label +\usepackage[ +backend=biber, +hyperref=true, +backref=true, +]{biblatex} +\DefineBibliographyStrings{english}{ + backrefpage={cited on p.}, + backrefpages={cited on pp.} +} +% end citation bibliography style. + + +% support multiple languages. \usepackage[\Languages]{babel} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} @@ -141,7 +157,7 @@ linkcolor=BlueViolet, filecolor=DarkOrchid, citecolor=PineGreen, - urlcolor=RoyalPurple, + urlcolor=RoyalPurple, } \usepackage{cleveref}[2012/02/15] \crefformat{footnote}{#2\footnotemark[#1]#3} diff --git a/images/HWIO.pdf b/images/HWIO.pdf new file mode 100644 index 0000000..8164766 Binary files /dev/null and b/images/HWIO.pdf differ diff --git a/images/harvardreferences.pdf b/images/harvardreferences.pdf new file mode 100644 index 0000000..7405ded Binary files /dev/null and b/images/harvardreferences.pdf differ diff --git a/main.tex b/main.tex index 9e7b0b1..a52e12e 100644 --- a/main.tex +++ b/main.tex @@ -10,7 +10,9 @@ \title{\documentname} \author{\studentname} \date{\place, \today} -\bibliography{references,SEN2Bibliography} +\addbibresource{references.bib} +% \addbibresource{SEN2Bibliography.bib} +% \addbibresource{biblatex-examples.bib} % remember to provide data for information page in infopage.tex % add glossary @@ -30,10 +32,9 @@ \input{partials/informationpage} \include{partials/preface} \include{partials/summary_en} - -\input{partials/statementofauthenticity} +\include{partials/statementofauthenticity} %% usual tables like table of contents, table of figures etc. -\input{partials/preambletables} +\include{partials/preambletables} % Define arabic numbering for the pages that belong to the main content \pagenumbering{arabic} @@ -55,12 +56,9 @@ %% supress post file when not required %% \IfFileExists{IncludeOnly.tex}{}{% -%% % Set bibliography style to Harvard -%% %\bibliographystyle{abbrvnat} - % Add the bibliography at the end \addcontentsline{toc}{chapter}{References} -\printbibliography[title={\color{gray}References}] +\printbibliography[title={References}] % Add appendix %\begin{appendices} diff --git a/references.bib b/references.bib index c614c27..5d74f04 100644 --- a/references.bib +++ b/references.bib @@ -1,51 +1,66 @@ @misc{google, - title={Google}, - url={https://google.com}, - journal={google.com}, - author={Oogle, Gregor}, - year={2018}, - urldate = {2018-10-08} + title={Google}, + sortname={google}, + shorthand={Google}, + url={https://google.com}, + journal={google.com}, + author={Oogle, Gregor}, + year={2018}, + urldate = {2018-10-08} } @book{goetz2006java, - title={Java concurrency in practice}, - author={Goetz, Brian and Peierls, Tim}, - year={2006}, - publisher={Pearson Education} + title={Java concurrency in practice}, + shorthand={JCIP}, + sortname={jcip}, + author={Goetz, Brian and Peierls, Tim}, + year={2006}, + publisher={Pearson Education} } @article{cattell2011scalable, - title={Scalable SQL and NoSQL data stores}, - author={Cattell, Rick}, - journal={Acm Sigmod Record}, - volume={39}, - number={4}, - pages={12--27}, - year={2011}, - publisher={ACM} -}@BOOK{texbook, + title={Scalable SQL and NoSQL data stores}, + shorthand={Scalabel SQL}, + sortname={Scalabel SQL}, + author={Cattell, Rick}, + journal={Acm Sigmod Record}, + volume={39}, + number={4}, + pages={12--27}, + year={2011}, + publisher={ACM} +} + +@BOOK{texbook, author = "Donald E. Knuth", + shorthand={\TeX{}book}, + sortname={texbook}, title= "The {{\TeX}book}", publisher = "Addison-Wesley", year = 1984 - } +} @BOOK{latexbook, author = "Leslie Lamport", + shorthand={Lamport, 1986}, + sortname={lamport}, title = "{\LaTeX \rm:} {A} Document Preparation System", publisher = "Addison-Wesley", year = 1986 - } +} @BOOK{latexcompanion, author = "Frank Mittelbach and Michel Goossens", + shorthand={Companion, 2004}, + sortname={companion}, title = "The {\LaTeX }Companion Second Edition", publisher = "Addison-Wesley", year = 2004 - } +} @misc{WikiBooks:2011:LaTeX, title = {LaTeX - Wikibooks, open books for an open world}, - howpublished={wikibooks}, + shorthand={\LaTeX\ Wiki, 2024}, + sortname={wiki latex}, month = {Sept}, year = {2011}, url = {http://en.wikibooks.org/wiki/LaTeX} @@ -53,14 +68,28 @@ @misc{WikiBooks:2011:LaTeX @misc{bibtexsite, author={bibtex}, + shorthand={BibTex project, 2024}, + sortname={bibtex}, year={2014}, title={Home page BibTeX project}, howpublished={web}, url={http://www.bibtex.org/Using/} } +@misc{biblatexsite, + author={biblatex}, + shorthand={BibLaTex project, 2024}, + sortname={bibtex}, + year={2014}, + title={CTAN BibLaTeX site}, + howpublished={web}, + url={https://ctan.org/pkg/biblatex} +} @misc{ Nobody06, - author = "Nobody Jr", - title = "My Article", - year = "2006" + author = "Nobody Jr", + shorthand={Nobody}, + sortname={nobody}, + title = "My Article", + year = "2006" } +