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

Internally reference citations #51

Open
ausmeyer opened this issue Jun 2, 2015 · 3 comments
Open

Internally reference citations #51

ausmeyer opened this issue Jun 2, 2015 · 3 comments

Comments

@ausmeyer
Copy link

ausmeyer commented Jun 2, 2015

It would be really nice to internally reference citations that get automagically formatted. For example, the latex internal references.

For that matter, having internal references to sections and subsections would be nice as well.

@hubgit
Copy link
Contributor

hubgit commented Jun 2, 2015

Could you give an example of what this would look like?

@ausmeyer
Copy link
Author

ausmeyer commented Jun 2, 2015

Yes, it basically just means putting a label in the markdown code that inserts a different bit of text in the compiled document. So for references in latex you basically enter the citation information in a separate document (not unlike the references.md file). The format of that references file looks like so (I just copied this from a manuscript of mine):

@Article{label1,
title = {Natural Selection on the Influenza Virus Genome},
author = {Y. Suzuki},
journal = {Mol. Biol. Evol.},
volume = {23},
pages = {1902--1911},
year = 2006
}

@Article{label2,
author = {S. E. Hensley and S. R. Das and A. L. Bailey and L. M. Schmidt and H. D. Hickman and A. Jayaraman and K. Viswanathan and R. Raman and R. Sasisekharan and J. R. Bennink and J. W. Yewdell},
title = {Hemagglutinin receptor binding avidity drives influenza {A} virus antigenic drift},
journal = {Science},
volume = 326,
pages = {734--736},
year = 2009
}

Then, when you want to cite an first article, you simply put a tag in the text to indicate that is the citation you want. In latex, the tag is \cite{label1} or \cite{label2}. In a sentence in the manuscript, it would look like:

There is a long tradition of research aimed at identifying important regions of the hemagglutinin protein, and by proxy, the sites that determine sequence-cluster transitions \cite{label1}.

Or you could cite two papers like:

There is a long tradition of research aimed at identifying important regions of the hemagglutinin protein, and by proxy, the sites that determine sequence-cluster transitions \cite{label1, label2}.

Then, when the paper is typeset, the typesetting program makes it look like so:

There is a long tradition of research aimed at identifying important regions of the hemagglutinin protein, and by proxy, the sites that determine sequence-cluster transitions (Suzuki, 2006).

Or like this for two:

There is a long tradition of research aimed at identifying important regions of the hemagglutinin protein, and by proxy, the sites that determine sequence-cluster transitions (Suzuki, 2006; Hensley 2009).

In addition, the typesetting program adds the cited paper or papers to the references section as:

  1. Suzuki Y (2006) Natural selection on the influenza virus genome. Mol Biol Evol 23: 1902–1911.

Or for two:

  1. Suzuki Y (2006) Natural selection on the influenza virus genome. Mol Biol Evol 23: 1902–1911.
  2. Hensley SE, Das SR, Bailey AL, Schmidt LM, Hickman HD, et al. (2009) Hemagglutinin receptor binding avidity drives influenza A virus antigenic drift. Science 326: 734–736.

The numbering and appearance in the references section, happens in order of appearance in the manuscript.

I know it sounds complicated, but I think it is relatively simple to implement. It is conceptually the same thing for internal reference to sections and figures. You could just have some sort of label tag in the markdown that means you don't have to keep track of figure numbers when you're referencing them. Here is a huge document on them.

http://en.wikibooks.org/wiki/LaTeX/Labels_and_Cross-referencing

@adunning
Copy link

adunning commented Jun 6, 2015

This has already been implemented in Markdown (and in a very clever way) with pandoc-citeproc. It would be fantastic if it could be integrated here somehow.

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

3 participants