Skip to content

Commit

Permalink
better citation style
Browse files Browse the repository at this point in the history
  • Loading branch information
homberghp committed May 8, 2024
1 parent ba21ac5 commit 93c5c4f
Show file tree
Hide file tree
Showing 8 changed files with 161 additions and 51 deletions.
9 changes: 9 additions & 0 deletions chapters/ch02_motivation.tex
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 5 additions & 1 deletion chapters/ch04_graphics.tex
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down Expand Up @@ -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.
Expand Down
82 changes: 68 additions & 14 deletions chapters/ch08_citingsimple.tex
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.

20 changes: 18 additions & 2 deletions configuration/thesis_config.tex
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down Expand Up @@ -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}
Expand Down
Binary file added images/HWIO.pdf
Binary file not shown.
Binary file added images/harvardreferences.pdf
Binary file not shown.
14 changes: 6 additions & 8 deletions main.tex
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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}
Expand All @@ -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}
Expand Down
81 changes: 55 additions & 26 deletions references.bib
Original file line number Diff line number Diff line change
@@ -1,66 +1,95 @@
@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}
}

@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"
}

0 comments on commit 93c5c4f

Please sign in to comment.