0

I have a book project that will be peppered with citations, as epigraphs to chapters and in the body of the text. I plan to have an index of the citations with proper reference to the source. Some citations will be extracted from articles or books, while others will be indirect quotes from newspaper accounts or transcripted from audio or video sources, some may even be apocryphal (and reported as such). I wish to have the detailed source of the citation relegated to an appendix, much like a bibliography, while keeping a short reference to the source next to it in the body of the text.

In the appendix, the citation would be listed much like books are in a bibliography, with the ability to control the formatting for each element: italics, bold, style for quote marks, parskip, indent, etc.. In addition, the actual bibliographic reference would also be quoted. Perhaps there already is a package designed for this? If not, I will be happy for a quick and dirty hack.

What I have in mind is cloning the bibliography environment and modifying the names, e.g. change @Article to @Quotesource, change title to text, etc. and where the display styles would be modified to suit my need. I suspect that if I attempt this hacking, I will soon run into bugs, so if something like this already exists, that would be better.

Just to clarify what I have in mind, here would be a dream implementation:

Desired output in the body of the text:

enter image description here

Desired output in the appendix:

enter image description here

Desired citation input:

enter image description here

Usual bibliographic input:

enter image description here

Input in the body of the text along the lines of:

enter image description here

% !TeX TXS-program:compile = txs:///xelatex
% !TEX encoding = UTF-8 Unicode
% !BIB TXS-program = biber
\documentclass{book}
\usepackage{filecontents}
\begin{filecontents}{biblio.bib}
\@Book{Shakespeare:Hamlet:Folio1,
  author =       {William Shakespeare},
  title =        {Mr. {W}illiam {S}hakespeares Comedies, Histories, \& Tragedies: Published According to the True Originall Copies [The ``First Folio'']},
  publisher =    {Isaac Jaggard and Ed Blount},
  Year =         {1623}
}
\@Book{Shakespeare:Hamlet:Quarto1,
  author =       {William Shakespeare},
  title =        {The {T}ragicall {H}istorie of {H}amlet {P}rince of {D}enmarke. As it hath beene diuerse times acted by his {H}ighnesse seruants in the {C}ittie of {L}ondon : as also in the two {V}niuersities of {C}ambridge and {O}xford, and else-where [The ``First Quarto'']},
  publisher =    {Nicholas Ling \& J. Trundell (London)},
  Year =         {1603}
}
\@Book{Shakespeare:Hamlet:Quarto2,
  author =       {William Shakespeare},
  title =        {The {T}ragicall {Historie} of Hamlet, {P}rince of {D}enmarke. Newly imprinted and enlarged to almost as much againe as it was, according to the true and perfect {C}oppie [The ``Second Quarto'']},
  publisher =    {Nicholas Ling},
  Year =         {1604}
}
\end{filecontents}
\usepackage[paperwidth=20.3cm,paperheight=27.2cm]{geometry}% committed to this
\usepackage{libertine}% pretty, I think
\usepackage{ifxetex}% be flexible when compiling
\ifxetex
  \usepackage{fontspec}
  \defaultfontfeatures{Ligatures={TeX}}
\else
  \usepackage[utf8]{inputenc}
  \usepackage[T1]{fontenc}
  \usepackage{lmodern} 
\fi
\usepackage[english]{babel}% I also use French
\usepackage[babel]{csquotes}% pass babel to csquotes
\usepackage{epigraph}
\setlength{\epigraphwidth}{8cm}
\usepackage{hyperref}
\usepackage[backend = biber, 
            style = authoryear,
            bibencoding = utf8,
            language = english,
            url = true]{biblatex}
\addbibresource{biblio.bib}
\usepackage{verbatim}% provides !verb||! command and comment environment
\usepackage{listings}% provides lstlisting command
\usepackage[usenames,dvipsnames,svgnames]{xcolor}% to paint a background color
\lstset{%
  language=[LaTeX]TeX,
  backgroundcolor=\color{gray!10}, % package xcolor needed
  frameround=ffff,
  frame=single,
  rulecolor=\color{NavyBlue},
  keywordstyle=\color{RoyalBlue},
  basicstyle=\scriptsize\ttfamily,
  stringstyle=\ttfamily,
  showstringspaces=false,
  breaklines=true,
  columns=fullflexible,
  tabsize=2,
  keepspaces
}

\setlength\parindent{0pt}
\usepackage{parskip}

\begin{document}

\chapter{Questions Princes Ask}

\epigraph{To be or not to be, that is the Question}{William Shakespeare (Hamlet, 1623)}

I have a book project that will be peppered with citations, as epigraphs to chapters and in the body of the text. I plan to have an index of the citations with proper reference to the source. Some citations will be extracted from articles or books, while others will be indirect quotes from newspaper accounts or transcripted from audio or video sources, some may even be apocryphal (and reported as such). I wish to have the detailed source of the citation relegated to an appendix, much like a bibliography, while keeping a short reference to the source next to it in the body of the text. 

In the appendix, the citation would be listed much like books are in a bibliography, with the ability to control the formatting for each element: italics, bold, style for quote marks, parskip, indent, etc.. In addition, the actual bibliographic reference would also be quoted. Perhaps there already is a package designed for this? If not, I will be happy for a quick and dirty hack.

What I have in mind is cloning the bibliography environment and modifying the names, e.g. change \texttt{@Article} to \texttt{@Quotesource}, change \texttt{title} to \texttt{text}, etc. and where the display styles would be modified to suit my need. I suspect that if I attempt this hacking, I will soon run into bugs, so if something like this already exists, that would be better.  

\newpage
The \texttt{.bib} equivalent would be filled with citations entry like the following:
\begin{lstlisting}
\@Quotesource{Shakespeare:2bNot:Folio1,
  text =                        {To be or not to be, that is the {Q}uestion},
  author =                  {William Shakespeare},
  bio =                         {William Shakespeare (26 April 1564 [baptised] – 23 April 1616) was an English poet, playwright, and actor, widely regarded as the greatest writer in the English language and the world's pre-eminent dramatist.},
  hour =                        {}, % empty in this example
  day =                         {}, % empty in this example
  month =                   {}, % empty in this example
  year =                        {circa 1603},
  century =                 {XVII},
  language =                {English},
  country =                 {England},
  type =                        {written, published, dated}, % as opposed to e.g. 'oral tradition, undated'
  status =                  {Several written sources exist, all consistent with William Shakespeare being the source.}, % as opposed to e.g. 'apocryphal' or 'doubtful'
  context =                 {The opening phrase of a soliloquy in the "Nunnery Scene" of William Shakespeare's play Hamlet.},
  description =         {In the speech, a despondent Prince Hamlet contemplates death and suicide while waiting for Ophelia, the love of his life. He bemoans the pains and unfairness of life but acknowledges the alternative might be still worse.},
  significance =        {One of the most widely known and quoted lines in modern English, and the soliloquy has been referenced in innumerable works of theatre, literature and music.},
  variant =                 {Shakespeare:2bNot:Quarto1, Shakespeare:2bNot:Quarto2},
  bibref =                  {Shakespeare:Hamlet:Folio1}% label in the .bib file
}

\@Quotevariant{Shakespeare:2bNot:Quarto1
  text = {To be, or not to be, that is the question},
  year = {1603}, % overwrites year given in \@Quotesource, other info unchanged
  bibref = {Shakespeare:Hamlet:Quarto1}% reference to label in the .bib file
}

\@Quotevariant{Shakespeare:2bNot:Quarto2
  text = {To be, or not to be, I there's the point},
  year = {1604}, % overwrites year given in \@Quotesource, other info unchanged
  bibref = {Shakespeare:Hamlet:Quarto2}% reference to label in the .bib file
}

\end{lstlisting}

\newpage
In the .bib file, I would have a standard bibliographic entry like:

\begin{lstlisting}

\@Book{Shakespeare:Hamlet:Folio1,
  author =       {William Shakespeare},
  title =        {Mr. {W}illiam {S}hakespeares Comedies, Histories, \& Tragedies: Published According to the True Originall Copies [The ``First Folio'']},
  publisher =    {Isaac Jaggard and Ed Blount},
  Year =         {1623}
}

\@Book{Shakespeare:Hamlet:Quarto1,
  author =       {William Shakespeare},
  title =        {The {T}ragicall {H}istorie of {H}amlet {P}rince of {D}enmarke. As it hath beene diuerse times acted by his {H}ighnesse seruants in the {C}ittie of {L}ondon : as also in the two {V}niuersities of {C}ambridge and {O}xford, and else-where [The ``First Quarto'']},
  publisher =    {Nicholas Ling \& J. Trundell (London)},
  Year =         {1603}
}

\@Book{Shakespeare:Hamlet:Quarto2,
  author =       {William Shakespeare},
  title =        {The {T}ragicall {Historie} of Hamlet, {P}rince of {D}enmarke. Newly imprinted and enlarged to almost as much againe as it was, according to the true and perfect {C}oppie [The ``Second Quarto'']},
  publisher =    {Nicholas Ling},
  Year =         {1604}
}

\end{lstlisting}

\newpage
In the body of the latex file, something like this:
\begin{lstlisting}
\begin{document}

\quote[titleyear,parencite]{Shakespeare:2bNot:Folio1} is more than just a cool quote.

\appendix

\nocite{Shakespeare:2bNot:Quarto1}% list the citation in appendix
\nocite{Shakespeare:2bNot:Quarto2}% even though it's not quoted in the text

\printquote[author, text, bio, century, type, status, context, significance,  variant]{Shakespeare:2bNot}


\end{document}
\end{lstlisting}

The expected output would be something like this:

\bigskip
``To be or not to be'' (Hamlet, 1623) is more than just a cool quote. 

\bigskip
where the citations would be listed in the appendix in a separate section. Below I fake the desired output with some hard-coding.

\newpage
\section*{Citations}
\nocite{Shakespeare:Hamlet:Quarto1}
\nocite{Shakespeare:Hamlet:Quarto2}

\textbf{[1]} William Shakespeare. \textit{To be or not to be, that is the Question}. 
\begin{quote}
\textbf{Author}: William Shakespeare (26 April 1564 [baptised] – 23 April 1616) was an English poet, playwright, and actor, widely regarded as the greatest writer in the English language and the world's pre-eminent dramatist.

\textbf{Century}: XVII. 

\textbf{Status}: written, published, dated. 

\textbf{Context}: The opening phrase of a soliloquy in the ``Nunnery Scene'' of William Shakespeare's play Hamlet. 

\textbf{Description}: In the speech, a despondent Prince Hamlet contemplates death and suicide while waiting for Ophelia, the love of his life. He bemoans the pains and unfairness of life but acknowledges the alternative might be still worse. 

\textbf{Significance}: One of the most widely known and quoted lines in modern English, and the soliloquy has been referenced in innumerable works of theatre, literature and music. 

\textbf{Variant}: Shakespeare, \textit{The First Quarto} (1603), Shakespeare, \textit{The Second Quarto} (1604).
\end{quote}

\textbf{[2]} William Shakespeare. \textit{To be or not to be, I there's the point}. 
\begin{quote}
\textbf{Variant of}: \textbf{[1]}, \textbf{[3]}.
\end{quote}

\textbf{[3]} William Shakespeare. \textit{To be or not to be,  that is the question}. 
\begin{quote}
\textbf{Variant of}: \textbf{[1]}, \textbf{[2]}.
\end{quote}


\bigskip\bigskip

with, naturally, some flexibility in defining styles. 

[The empty page that follows is unexpected] 

\printbibliography


\end{document}
1
  • The screenshots, code, and verbal description are not 100% consistent with one another, but I hope I was clear enough to make for a productive discussion.
    – PatrickT
    May 3, 2016 at 4:26

1 Answer 1

1

Not a direct answer but rather a pointer to a possible route to a solution. Last year I developed a BibTeX style for a book catalogue bookdb.bst which involved extending one of the regular BibTeX files. Run texdoc bookdb to view the User Manual and possibly read bookdb.bst if you want the gory internal details. The User Manual doesn't describe the internal code but there will be an article about this in the next issue of TUGboat. Good luck.

1
  • Thanks Peter, sounds just like the sort of thing I'll need. I'll look into this over the next few days (now is rather late, I'm supposed to be in bed in my timezone, and the next two days very busy with other things, so it'll take me a couple of days to get to the nitty gritty!)
    – PatrickT
    May 2, 2016 at 18:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .