Hanging indents in bibliography
I'm not sure what 'chicago-fullnotes-bibliography' is, but if it is based on biblatex
, the following lengths are probably what you want to redefine to your liking:
\setlength{\bibhang}{11pt}% the hanging indent
\setlength{\bibitemsep}{6pt}% the separation b/w basic items
\setlength{\bibinitsep}{\baselineskip}% insert blank line between different initial letters
These will work with the memoir
class; change the lengths to suit your needs.
If you are not using biblatex
, but need to follow the Chicago style, I recommend you switch sooner rather than later to biblatex
and biber
, and use the biblatex-chicago
contributed style. It implements CMS 16th ed., and is under active development. The author is also responsive to feedback about potential problems.
The answer provided by @jon just gives me an error message.
But I found the following workaround to be working nicely. If your bibliography should appear at the end of the document (the default), just add the following lines at the very end of the Markdown document:
\noindent
\vspace{-2em}
\setlength{\parindent}{-0.5in}
\setlength{\leftskip}{0.5in}
\setlength{\parskip}{15pt}
However, if you're manually defining the position of the bibliography (using the tag <div id="refs"></div>
), you have to wrap the above lines and the <div>
tag in a Latex group to limit the formatting changes to the bibliography only:
\begingroup
\noindent
\vspace{-2em}
\setlength{\parindent}{-0.5in}
\setlength{\leftskip}{0.5in}
\setlength{\parskip}{15pt}
<div id="refs"></div>
\endgroup
Explanation of the commands:
\setlength{\parindent}
and\setlength{\leftskip}
define the hanging indentation of the bibiography entries.\setlength{\parskip}
defines the spacing between bibliography entries.\noindent
is needed in order to also have the very first bibliography entry correctly hanging indented.\vspace{-2em}
reduces the vertical spacing between the bibliography and the last paragraph before it (because\noindent
adds a blank paragraph).
source: https://groups.google.com/d/msg/pandoc-discuss/4SKA5E11rO4/fDGiNSOsIMkJ
(I don't have the reputation to simply make this a comment, but I also wanted to concatenate both replies above for future googlers like me)
Pandoc’s built-in bibliography formatting uses citeproc to generate the “bibliography.” That is, although it reads a .bib
file and generates a .pdf
through an engine like XeLaTeX, it never actually calls biber, etc.
If you output a pandoc-generated bibliography to a .tex
file, you get something like this at the very end:
\hypertarget{refs}{}
\leavevmode\hypertarget{ref-nightwood}{}%
Barnes, Djuna. 1936. \emph{Nightwood}. New York: New Directions.
\leavevmode\hypertarget{ref-fama_melancholic_2014}{}%
Fama, Katherine A. ``Melancholic Remedies: Djuna Barnes's
\emph{Nightwood} as Narrative Theory.'' \emph{Journal of Modern
Literature} 37, no. 2 (2014): 39--58.
\url{https://doi.org/10.2979/jmodelite.37.2.39}.
As a result, @jon’s solution cannot fix the inherent problem in Pandoc, because the resulting output is not marked in such a way to react to something like \bibhang
.
Hence the “easiest” solution is to force a change in formatting, akin to what @salim-b suggests.
A similar solution to the one offered is to install pandoc-citeproc-preamble, which inserts a short .tex
file before where the bibliography would be created. The basic version of that is:
\section*{References}
\setlength{\parindent}{-0.2in}
\singlespacing
\small
\setlength{\leftskip}{0.2in}
\setlength{\parskip}{8pt}
\vspace*{-0.4in}
\noindent
In my own practice (as indicated in the template simple-essay), I simply append a file similar to the quoted bit above when summoning Pandoc:
pandoc -sr markdown+yaml_metadata_block+citations \
--pdf-engine=xelatex --template=template.tex \
--filter pandoc-citeproc \
./metadata.yml ./tmp/main.md ./bibliography-preamble.tex \
-o output.pdf
Pandoc does have a feature, however, to convert its citation syntax into BibLaTeX commands. Adding the flag --biblatex
at compile time will fill the resulting .tex
file with all the \autocite
s and so on one would want. As the documentation clearly notes, however:
This option is not for use with the pandoc-citeproc filter or with PDF output. It is intended for use in producing a LaTeX file that can be processed with bibtex or biber.
In that case, the full incantation is something like:
pandoc -sr markdown+yaml_metadata_block+citations \
--biblatex ./metadata.yml ./tmp/main.md \
-o output.tex ; xelatex output.tex ; biber output ; xelatex output.tex ; xelatex output.tex
And, in fact, this is, I believe, the solution I will personally use moving forward. I get a properly formatted bibliography using a tool reacting properly/semantically to its environment, not the kind of kludge that Citeproc produces.