Skip to content

Commit

Permalink
added simplest as playgorund for citing and referencing
Browse files Browse the repository at this point in the history
  • Loading branch information
homberghp committed May 8, 2024
1 parent 93c5c4f commit c984634
Show file tree
Hide file tree
Showing 2 changed files with 118 additions and 1 deletion.
13 changes: 12 additions & 1 deletion references.bib
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ @misc{WikiBooks:2011:LaTeX
title = {LaTeX - Wikibooks, open books for an open world},
shorthand={\LaTeX\ Wiki, 2024},
sortname={wiki latex},
month = {Sept},
month = 9,
year = {2011},
url = {http://en.wikibooks.org/wiki/LaTeX}
}
Expand Down Expand Up @@ -93,3 +93,14 @@ @misc{ Nobody06
year = "2006"
}

@ONLINE{WikiBooks:2024:LaTeX,
label = {latex wikibook},
shorthand={\LaTeX\ Wiki, 2024},
sortname={wiki latex},
author = {Various Authors},
publisher={WikiBooks},
title = {LaTeX - Wikibooks, open books for an open world},
month = 5,
year = {2024},
url = {http://en.wikibooks.org/wiki/LaTeX}
}
106 changes: 106 additions & 0 deletions simplest.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
\documentclass[12pt,a4paper,dvipsnames]{article}

\usepackage{xcolor}
\usepackage[T1]{fontenc}
\usepackage[colorlinks=true, citecolor=blue]{hyperref}

\usepackage[
%style=authoryear,
backend=biber,
hyperref=true,
backref=true,
]{biblatex}

\usepackage{listings}
%\addbibresource{biblatex-examples.bib}
\addbibresource{references.bib}

% here the doc begins
% \DeclareCiteCommand{\cite}
% {\usebibmacro{prenote}}
% {\usebibmacro{citeindex}%
% \printtext[bibhyperref]{\usebibmacro{cite}}}
% {\multicitedelim}
% {\usebibmacro{postnote}}

% \DeclareCiteCommand*{\cite}
% {\usebibmacro{prenote}}
% {\usebibmacro{citeindex}%
% \printtext[bibhyperref]{\usebibmacro{citeyear}}}
% {\multicitedelim}
% {\usebibmacro{postnote}}

% \DeclareCiteCommand{\parencite}
% {\usebibmacro{prenote}}
% {\usebibmacro{citeindex}%
% \printtext[bibhyperref]{[\usebibmacro{cite}]}}
% {\multicitedelim}
% {\usebibmacro{postnote}}

% \makeatletter
% \newrobustcmd*{\parentexttrack}[1]{%
% \begingroup
% \blx@blxinit
% \blx@setsfcodes
% \blx@bibopenparen#1\blx@bibcloseparen
% \endgroup}

% \AtEveryCite{%
% \let\parentext=\parentexttrack%
% \let\bibopenparen=\bibopenbracket%
% \let\bibcloseparen=\bibclosebracket}
% \makeatother
\DefineBibliographyStrings{english}{
backrefpage={cited p.},
% backrefpage={},
backrefpages={cited pp.}
% backrefpages={}
}

\begin{document}

\section*{What it looks like}

Note that below, in the textcite citation variant, you see that cite command produces more that just the citation label.

\begin{itemize}
\item Simple cite looks like this: \cite{WikiBooks:2024:LaTeX}
\begin{itemize}
\item made with {\color{PineGreen}\tt{}\lstinline#Simple cite looks like this: \cite{WikiBooks:2024:LaTeX}#}
\end{itemize}
\item Parencite looks like this: \parencite{WikiBooks:2024:LaTeX}
\begin{itemize}
\item made with {\color{PineGreen}\tt{}\lstinline#Parencite looks like this: \parencite{WikiBooks:2024:LaTeX}#}
\end{itemize}
\item Textcite looks like this: ``\textcite{WikiBooks:2011:LaTeX}''
\begin{itemize}
\item made with {\color{PineGreen}\tt{}\lstinline#Textcite looks like this: ``\textcite{WikiBooks:2011:LaTeX}''#}
\end{itemize}
\item Simple citation looks like this \cite{latexcompanion}.
\begin{itemize}
\item made with {\color{PineGreen}\tt{}\lstinline#Simple citation looks like this \cite{latexcompanion}.#}
\end{itemize}
\item Parencite looks like this \parencite{latexcompanion}.
\begin{itemize}
\item made with {\color{PineGreen}\tt{}\lstinline#Parencite looks like this \parencite{latexcompanion}.#}
\end{itemize}
\item Text cite looks like this ``\textcite{latexcompanion}''.
\begin{itemize}
\item made with {\color{PineGreen}\tt{}\lstinline#Text cite looks like this ``\textcite{latexcompanion}''.#}
\end{itemize}
\item Simple cite looks like this \cite{texbook}
\begin{itemize}
\item made with {\color{PineGreen}\tt{}\lstinline#Simple cite looks like this \cite{texbook}#}
\end{itemize}
\item Paren cite looks like this \parencite{texbook}
\begin{itemize}
\item made with {\color{PineGreen}\tt{}\lstinline#Paren cite looks like this \parencite{texbook}#}
\end{itemize}
\item Text cite looks like this ``\textcite{texbook}''
\begin{itemize}
\item made with {\color{PineGreen}\tt{}\lstinline#Text cite looks like this ``\textcite{texbook}''#}
\end{itemize}
\end{itemize}
\clearpage
\printbibliography
\end{document}

0 comments on commit c984634

Please sign in to comment.