Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken margin citations in PDF and footnote citations in HTML #48

Open
jlorieau opened this issue Sep 16, 2017 · 1 comment
Open

Broken margin citations in PDF and footnote citations in HTML #48

jlorieau opened this issue Sep 16, 2017 · 1 comment

Comments

@jlorieau
Copy link

jlorieau commented Sep 16, 2017

First, thank you for coding and sharing this template. It's very promising and helpful to academics.

The tufte format uses footnotes to place citations in the margin. When compiling the template in HTML format, the citations indeed appear in the margin--though without a footnote number, which would be a useful feature for scientists.

When compiling the tufte-handout (or tufte-book) template in PDF, citations do not appear in the margin as they do in the latex-tufte template.

I was able to fix this in part with a rudimentary solution, by adding the following to the YAML header.

header-includes:
  - \setcitestyle{super}
  - \renewcommand*{\citep}[1]{{\cite{#1}}}
  - \renewcommand*{\citet}[1]{{\cite{#1}}}

This effectively redefines the natbib \citep and \citet commands to use the \cite commands compatible with tufte-handouts and tufte-book. This solution doesn't adversely impact the margin citations in HTML format. However, it would be nice to still have a textual version of the \citet that includes a footnote reference (ex: Smith et al. 2000 3).

The Tufte classes appear to rely on natbib. I also tried various solutions with biblatex on the post-processed .tex file---using nobib as a documentclass option, or natbib=true as a package option to biblatex---but I couldn't get these to work.

Altogether, I'm reporting a bug and requesting a feature:

  • Bug: I expect the tufte-handout and tufte-book PDF outputs to match those of latex-tufte.

  • Feature: I'd like to request that the HTML can (optionally) output margin citations with a superscript number.

@yihui
Copy link
Member

yihui commented Jan 23, 2018

Thanks for your report and experiments, but unfortunately I don't have enough LaTeX sorcery myself to make this happen... 😞

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants