Compare commits

..

No commits in common. "308a0da7db1a2ecc3379b879c34576ec0925dfb7" and "f20b039b80bbe73d2ca751dcafc6f1b6cbde170b" have entirely different histories.

7 changed files with 63 additions and 65 deletions

View File

@ -1,75 +1,74 @@
\chapter{Reference management} \chapter{Literaturverwaltung}
\label{sec:literature} \label{sec:literature}
For typesetting our first theses in \LaTeX{}, the last core functionality to learn is citing literature. Um die ersten Studien- oder Abschlussarbeiten in \LaTeX\ zu setzen, fehlt uns jetzt nur noch eine Möglichkeit, Literatur zu referenzieren.
Our references are gathered in a bibliography file. Unsere Literatursammlung liegt in der sogenannten .bib-Datei.
Once we reference one of its entries from our \LaTeX{} document, Bib\TeX{} (a program similar to the standard \acro{PDF}\LaTeX{} compiler) can insert automatically generated citations. Wenn wir aus unserem \LaTeX-Dokument darauf verweisen, kann uns das Programm Bib\TeX{} (ähnlich zum Compiler \acro{PDF}\LaTeX) an der richtigen Stelle die richtigen Zitationen in einem vorher festgelegten Bibliografiestil einfügen.
It will format them in a bibliography style of our choice.
\section{The bibliography file} \section{Die Bibliografie-Datei}
Our \textbf{bibliography collection} consists of multiple literature entries in a pre-defined format, such that they can be processed by Bib\TeX{}. In der .bib-Datei sammeln wir unsere Literatureinträge in einem Format, das durch Bib\TeX{} verarbeitbar ist.
An exemplary item can be seen in \cref{lst:bibfile-sample-entry}. Einen beispielhaften Eintrag aus einer .bib-Datei zeigt \cref{lst:bibfile-sample-entry}.
\begin{figure}[H] \begin{figure}[H]
\begin{minted}[autogobble]{latex} \begin{minted}[autogobble]{latex}
@article{turing1990, @article{turing1990, % Dokumentenart und Bezeichner für den \cite-Befehl
title={The chemical basis of morphogenesis}, title={The chemical basis of morphogenesis}, % Titel
author={Turing, Alan Mathison}, author={Turing, Alan Mathison}, % Autor
journal={Bulletin of mathematical biology}, journal={Bulletin of mathematical biology}, % Titel des Journals
volume={52}, volume={52}, % Band des Journals
pages={153--197}, pages={153--197}, % Seitenzahl im Journal
year={1990}, year={1990}, % Erscheinungsjahr
publisher={Springer} publisher={Springer} % Verleger des Journals
} }
\end{minted} \end{minted}
\caption{Exemplary bibliography entry} \caption{Beispielhafter Eintrag einer .bib-Datei}
\label{lst:bibfile-sample-entry} \label{lst:bibfile-sample-entry}
\end{figure} \end{figure}
The type of the bibliography entry is specified after the opening \texttt{@} sign (e.\,g., article, book, proceedings, …). Nach einem \texttt{@}-Zeichen wird die Art des Literaturverzeichniseintrags angegeben (z.\,B. article, book, proceedings).
What follows is a list of important attributes like title and author. Es folgt eine Auflistung wichtiger Attribute wie Titel, Autor:in und abhängig vom Eintragstyp weiterer Felder.
Whether they are required or not depends on the entry type. Der erste Eintrag nach der öffnenden geschwungenen Klammer ist der wichtigste:
In any case, we will need the first entry after the opening braces: the Bib\TeX{} key. Unter diesem Kürzel wird der Eintrag später in \LaTeX{} angesprochen.
This is the identifier that we will use to reference the entry in our \LaTeX{} document. Diese sogenannten Bib\TeX-Keys müssen eindeutig sein und können frei vergeben werden.
Bib\TeX{} keys can be chosen freely, but have to be unique. Üblich sind Kombinationen aus Autor:innen, Publikationsjahren und Themen.
Typically, they will consist of a combination of authors, publication dates, and topics.
\textbf{Bibliography files} can be compiled manually, yet it is more common to use programs like JabRef,\footnote{Cf. \url{https://www.jabref.org/}.} Zotero\footnote{Cf. \url{https://www.zotero.org/}.} or the widely-used software Citavi\footnote{Vgl. \url{https://www.citavi.com/de}.}. Die .bib-Datei kann manuell zusammengetragen werden.
While JabRef operates directly on your bibliography file, Zotero and Citavi projects\footnote{Vgl. \url{https://www1.citavi.com/sub/manual5/de/exporting_to_bibtex.html}.} can be exported to bibliography files to use them in \LaTeX{} documents. Viel häufiger allerdings werden dafür Programme wie JabRef,\footnote{Vgl. \url{https://www.jabref.org/}.} Zotero\footnote{Vgl. \url{https://www.zotero.org/}.} oder das weit verbreitete Citavi\footnote{Vgl. \url{https://www.citavi.com/de}.} verwendet.
Während JabRef direkt eine .bib-Datei als Datenbank verwendet, lassen sich Zotero- und Citavi-Projekte\footnote{Vgl. \url{https://www1.citavi.com/sub/manual5/de/exporting_to_bibtex.html}.} in .bib-Dateien exportieren.
\textbf{Bibliography entries} are provided by many academic search engines, including Google Scholar (cf. \cref{fig:google-scholar-bibtex}). .bib-Datei-Einträge werden unter anderem auch von Google Scholar zur Verfügung gestellt (vgl. \cref{fig:google-scholar-bibtex}).
When using them, make sure that the entries are cohesive across your reference collection and complete with regard to their attributes. Hierbei ist es wichtig, darauf zu achten, dass die Einträge einheitlich und möglichst vollständig sind.
A high-quality (although, unfortunately, incomplete) source for Bib\TeX{} entries is the dblp Computer Science Library\footnote{Available at \url{https://dblp.org/search}.}. Als hochwertige (wenn auch leider nicht vollständige) Quelle für Bib\TeX-Einträge kann die dblp Computer Science Library\footnote{Verfügbar unter \url{https://dblp.org/search}.} dienen.
\begin{figure}[H] \begin{figure}[H]
\includegraphics[width=\textwidth]{graphics/google_bibtex1.jpg} \includegraphics[width=\textwidth]{graphics/google_bibtex1.jpg}
\includegraphics[width=\textwidth]{graphics/google_bibtex2.jpg} \includegraphics[width=\textwidth]{graphics/google_bibtex2.jpg}
\caption{Loading Bib\TeX{} entries from Google Scholar} \caption{Bib\TeX-Einträge in Google Scholar abrufen}
\label{fig:google-scholar-bibtex} \label{fig:google-scholar-bibtex}
\end{figure} \end{figure}
\section{Citing} \section{Zitieren}
Bib\TeX{} extends \LaTeX{} by several commands (cf. \cref{tbl:bibtex-commands}). Durch Bib\TeX{} wird \LaTeX{} um einige Befehle zum Zitieren erweitert (vgl. \cref{tbl:bibtex-commands}).
Make sure to include the \mintinline{sh}{natbib} package for this purpose. Zusätzlich benötigt wird das Paket \mintinline{sh}{natbib}.
\begin{table}[H] \begin{table}[H]
\centering \centering
\begin{tabular}{ll} \begin{tabular}{ll}
\toprule \toprule
Function & Command \\ \midrule Funktion & Befehl \\ \midrule
Citing sources & \mintinline{latex}{\cite{<source>}} \\ Quelle zitieren & \mintinline{latex}{\cite{<quelle>}} \\
Citing pages & \mintinline{latex}{\cite[p. 15]{<source>}} \\ Seite zitieren & \mintinline{latex}{\cite[S. 15]{<quelle>}} \\
Custom citations & \mintinline{latex}{\cite[<prefix>][<suffix>]{<source>}} \\ Weitere Zusätze zitieren & \mintinline{latex}{\cite[<präfix>][<suffix>]{<quelle>}} \\
Including the bibliography & \mintinline{latex}{\bibliography{<bibliographyfile>}} \\ .bib-Datei einbinden & \mintinline{latex}{\bibliography{<.bib-datei>}} \\
Setting the bibliography style & \mintinline{latex}{\bibliographystyle{<style>}} \\ \bottomrule Zitierstil ändern & \mintinline{latex}{\bibliographystyle{<zitierstil>}} \\ \bottomrule
\end{tabular} \end{tabular}
\caption{Commands for citations} \caption{Befehle zum Zitieren von Literatur}
\label{tbl:bibtex-commands} \label{tbl:bibtex-commands}
\end{table} \end{table}
The \mintinline{latex}{<source>} of a citation is always a Bib\TeX key. Als \mintinline{latex}{<quelle>} einer Zitation wird immer der Bib\TeX-Key angegeben.
The list of available citation styles\footnote{Head to Overleaf for a rather complete list: \url{https://www.overleaf.com/learn/latex/Biblatex_citation_styles}} includes alpha, natdin, and apa. Verfügbare Zitierstile\footnote{Eine vollständigere Liste ist bei Overleaf zu finden: \url{https://www.overleaf.com/learn/latex/Biblatex_citation_styles}} sind zum Beispiel alpha, natdin und apa.
The table of references will always appear where the \mintinline{latex}{\bibliography{}} command was put. Das Literaturverzeichnis erscheint immer an der Stelle, an der der Befehl \mintinline{latex}{\bibliography{}} aufgerufen wurde.
The \mintinline{latex}{\cite} command comes with many variants.\footnote{Cf. \url{https://www.economics.utoronto.ca/osborne/latex/BIBTEX.HTM.}} Zum Befehl \mintinline{latex}{\cite} existieren zahlreiche weitere Varianten.\footnote{Vgl. \url{https://www.economics.utoronto.ca/osborne/latex/BIBTEX.HTM.}}
\Example{lst:natdin-example}{literature/natdin-example}{literature/natdin-example_bib}{Examplery citations in the \mintinline{latex}{natdin} style.} \Example{lst:natdin-example}{literature/natdin-example}{literature/natdin-example_bib}{Beispiel für Zitationen im Stil \mintinline{latex}{natdin}.}

View File

@ -1,10 +1,10 @@
\inputminted[breaklines]{bibtex}{exercises/literature/literature.done.bib} \inputminted[breaklines]{bibtex}{exercises/literature/literature.done.bib}
\begin{minted}[breaklines]{latex} \begin{minted}[breaklines]{latex}
The first-mentioned book \citep{lamport1994} has been written by the creator of \LaTeX{}, Leslie Lamport himself. Das erstgenannte Buch \citep{lamport1994} wurde vom Schöpfer von LaTeX, Leslie Lamport, selbst verfasst.
A more recent publication is \glqq{}\LaTeX\ in 24 Hours\grqq{} \citep{datta2017}. Da es bereits etwas betagter ist, geben wir euch mit \glqq{}\LaTeX\ in 24 Hours\grqq{} \citep{datta2017} noch ein aktuelleres Buch in die Hand.
There is a plethora of further handbooks \citep*[e.\,g.,][]{goossensmittelbach2002}. Es gibt eine Unmenge weiterer Handbücher \citep*[u.\thinspace a.][]{goossensmittelbach2002}.
\bibliographystyle{natdin} \bibliographystyle{natdin}
\bibliography{exercises/literature/literature.done.bib} \bibliography{exercises/literature/literature.done.bib}
\end{minted} \end{minted}

View File

@ -1,6 +1,6 @@
The first-mentioned book (Lamport, 1994) has been written by the creator of \LaTeX{}, Leslie Lamport himself. Das erstgenannte Buch (Lamport, 1994) wurde vom Schöpfer von LaTeX, Leslie Lamport, selbst verfasst.
A more recent publication is \glqq{}\LaTeX\ in 24 Hours\grqq{} (Datta, 2017). Da es bereits etwas betagter ist, geben wir euch mit \glqq{}\LaTeX\ in 24 Hours\grqq{} (Datta, 2017) noch ein aktuelleres Buch in die Hand.
There is a plethora of further handbooks (e.\,g., Goossens, Mittelbach and Samarin, 2002). Es gibt eine Unmenge weiterer Handbücher (u.\thinspace a. Goossens, Mittelbach u. Samarin, 2002).
~\\ ~\\

View File

@ -1,19 +1,18 @@
\begin{enumerate} \begin{enumerate}
\item Use Google Scholar to retrieve Bib\TeX{} entries for the following \LaTeX{} \item Sucht bei Google Scholar die Bib\TeX-Einträge für folgende \LaTeX"=Handbücher:
handbooks:
\begin{itemize} \begin{itemize}
\item Leslie Lamport (1994): \LaTeX. A Document Preparation System. \item Leslie Lamport (1994): \LaTeX. A Document Preparation System.
\item Dilip Datta (2017): \LaTeX\ in 24 Hours. A Practical Guide for Scientific Writing. \item Dilip Datta (2017): \LaTeX\ in 24 Hours. A Practical Guide for Scientific Writing.
\item Frank Mittelbach / Michel Goossens (2002): Der \LaTeX-Begleiter. \item Frank Mittelbach / Michel Goossens (2002): Der \LaTeX-Begleiter.
\end{itemize} \end{itemize}
\item Compare the entries with the results that \url{dblp.org} finds for the same titles. \item Vergleicht die Einträge mit den Ergebnissen, die euch \url{dblp.org} für dieselben Bücher liefert.
\item Create a new Bib\TeX{} file called \mintinline{sh}{literature.bib} in the \mintinline{latex}{exercises/literature} folder. \item Erstellt im Ordner \mintinline{latex}{exercises/literature} eine neue Bib\TeX-Datei mit dem Namen \mintinline{sh}{literature.bib}.
\item Add the Bib\TeX{} entries to the newly created Bib\TeX{} files. For this, select your preferred source among Google Scholar and dblp. \item Fügt die Bib\TeX-Einträge in die Bib\TeX-Datei ein. Wählt hierfür aus Google Scholar und dblp die aus eurer Sicht geeigneteren Einträge.
\item Assign unique and meaningful Bib\TeX{} keys. \item Vergebt aussagekräftige Bib\TeX-Keys.
\item Include the Bib\TeX{} file in a suitable location, where later on the references should be listed. \item Bindet die Bib\TeX-Datei an einer geeigneten Stelle ein, an der später auch das Literaturverzeichnis zu sehen sein soll.
\item Cite the three handbooks in the file\\\mintinline{sh}{exercises/literature/literature.tex}. \item Zitiert die drei Handbücher in der Datei\\\mintinline{sh}{exercises/literature/literature.tex}.
\item Make use of the \mintinline{sh}{natdin} biliography style. \item Wählt den Bibliographiestil \mintinline{sh}{natdin}.
\item \textbf{Note}: If compiling fails, it may help to remove all auxiliary files \\(\mintinline{sh}{main.aux/bbl/blg/loc/out/pdf/soc/toc}) before compiling again. \item \textbf{Hinweis}: Sollte das Kompilieren fehlschlagen, kann es hilfreich sein, einmal alle Hilfsdateien (\mintinline{sh}{main.aux/bbl/blg/loc/out/pdf/soc/toc}) zu löschen und neu zu kompilieren.
\end{enumerate} \end{enumerate}
\exercisematerial{exercises/literature/literature} \exercisematerial{exercises/literature/literature}

View File

@ -1,3 +1,3 @@
This text thrives on prominently-placed citations \cite[e.\,g.,][]{Frank1957} of much more prominent literary works \cite[cf.][p. 7]{Orwell1957}, of which \cite{Hawking1988} is only one. Dieser Text lebt von prominent platzierten Zitaten \cite[u.\thinspace a.][]{Frank1957} noch viel prominenterer literarischer Werke \cite[vgl.][S. 7]{Orwell1957}, derer \cite{Hawking1988} nur eines ist.
\bibliographystyle{natdin} \bibliographystyle{natdin}
\bibliography{collection} \bibliography{collection}

View File

@ -1,12 +1,12 @@
\documentclass[a5paper, pdftex, 12pt]{scrartcl} \documentclass[a5paper, pdftex, 12pt]{scrartcl}
\usepackage[utf8]{inputenc} \usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc} \usepackage[T1]{fontenc}
\usepackage[english]{babel} \usepackage[ngerman]{babel}
\usepackage{natbib} \usepackage{natbib}
\begin{document} \begin{document}
\thispagestyle{empty} \thispagestyle{empty}
This text thrives on prominently-placed citations \cite[e.\,g.,][]{Frank1957} of much more prominent literary works \cite[cf.][p. 7]{Orwell1957}, of which \cite{Hawking1988} is only one. Dieser Text lebt von prominent platzierten Zitaten \cite[u.\thinspace a.][]{Frank1957} noch viel prominenterer literarischer Werke \cite[vgl.][S. 7]{Orwell1957}, derer \cite{Hawking1988} nur eines ist.
\bibliographystyle{natdin} \bibliographystyle{natdin}
\bibliography{listings/literature/collection} \bibliography{listings/literature/collection}