Pandoc, Citations and APA formatting

725 views
Skip to first unread message

Chris Lott

unread,
Feb 12, 2012, 3:55:23 PM2/12/12
to Pandoc Discussion
Is this a proper venue for questions and discussion about citation
styles used in coordination with Pandoc? I'm unclear on the
relationship, but have some questions about issues I am trying to deal
with in conjunction with Pandoc and APA formatting...

If not, does anyone know who/where I should ask?

In case this is a good place, I'm using a BibTeX .bib file (produced
with JabRef) and the APA.csl from file from the repository mentioned
in the Pandoc User's Guide:
https://github.com/citation-style-language/styles

The Pandoc command I am running is:
pandoc -f markdown -t html --bibliography=ed655.bib -s -o
article-review-1-moos.html --csl=apa.csl article-review-1-moos.mtxt

I've tried with both the apa.csl from the repository and one that came
with the Mendeley citation manager.

Either way, Pandoc is producing some obviously incorrect output in the
references list/bibliography. In particular, a 3-author article is
being output as:
Deci, E. K. R. R. R. (2001). etc etc

When it should be:
Deci, E., Koestner, R., & Ryan, R.

The names are listed properly (in full) in the .bib file

Also, APA specifies that journal titles are in all lower case except
the initial letter, the first letter after a colon, and proper nouns.
But I am getting citations with titles like:
Extrinsic Rewards and Instrinsic Motivation in Education: Reconsidered
Once Again

Which reflects the input I have in the .bib file, but is a clear
problem when switching between formats, as I often do. It seems to me
that the .csl file should at least get the first two items right (I
can understand not getting proper nouns right).

Or maybe I am misunderstanding the idea of .csl files...

c
--
Chris Lott <ch...@chrislott.org>

Chris Lott

unread,
Feb 12, 2012, 3:59:13 PM2/12/12
to Pandoc Discussion
On Sun, Feb 12, 2012 at 11:55 AM, Chris Lott <ch...@chrislott.org> wrote:
> Is this a proper venue for questions and discussion about citation
> styles used in coordination with Pandoc? I'm unclear on the
> relationship, but have some questions about issues I am trying to deal
> with in conjunction with Pandoc and APA formatting...

I forgot one other problem: the bibliography entries should reflect
vol and no of sources for journal articles:
etc etc. 55(3)

But apa.csl is only giving the volume number:
etc etc. 55

andrea rossato

unread,
Feb 12, 2012, 4:15:56 PM2/12/12
to pandoc-...@googlegroups.com

The problems you report look like citeproc-hs bugs. Could you please
report them on the bug tracker? You can find it here:

http://code.google.com/p/citeproc-hs/issues

Can you please attach a minimal example to reproduce them? This would be
very helpful.

Thanks,
Andrea

Chris Lott

unread,
Feb 12, 2012, 6:03:19 PM2/12/12
to pandoc-...@googlegroups.com
On Sun, Feb 12, 2012 at 12:15 PM, andrea rossato
<andrea....@gmail.com> wrote:
> Chris Lott <ch...@chrislott.org> writes:
>> On Sun, Feb 12, 2012 at 11:55 AM, Chris Lott <ch...@chrislott.org> wrote:
>>> Is this a proper venue for questions and discussion about citation
>>> styles used in coordination with Pandoc? I'm unclear on the
>>> relationship, but have some questions about issues I am trying to deal
>>> with in conjunction with Pandoc and APA formatting...

I submitted bug reports, but one of them was my error in not entering
authors correctly in the .bib file and I've requested it closed. The
lack of a journal number still appears to be a bug.

I'm also puzzling out the differences, if any, between the csl files
that are provided in the git repository, that are provided by Zotero
group, and that come with programs like Mendeley.

Getting closer to being able to reliably use Pandoc for the majority of my work!

John MacFarlane

unread,
Feb 12, 2012, 9:41:05 PM2/12/12
to pandoc-...@googlegroups.com
+++ Chris Lott [Feb 12 12 11:55 ]:

> Is this a proper venue for questions and discussion about citation
> styles used in coordination with Pandoc? I'm unclear on the
> relationship, but have some questions about issues I am trying to deal
> with in conjunction with Pandoc and APA formatting...

On the general question: Yes, this is a good place to ask about
citation issues. A citation bug could be due either to pandoc,
citeproc-hs, or the csl stylesheet itself -- but we have experts on
all three components on this list.

andrea rossato

unread,
Feb 13, 2012, 11:46:07 AM2/13/12
to pandoc-...@googlegroups.com
Chris Lott <ch...@chrislott.org> writes:
>
> I'm also puzzling out the differences, if any, between the csl files
> that are provided in the git repository, that are provided by Zotero
> group, and that come with programs like Mendeley.

I think the best place to get the most updated styles is here:
http://citationstyles.org/styles/

>
> Getting closer to being able to reliably use Pandoc for the majority of my work!

This is good news!

Andrea

Chris Lott

unread,
Feb 13, 2012, 1:17:30 PM2/13/12
to pandoc-...@googlegroups.com
On Mon, Feb 13, 2012 at 7:46 AM, andrea rossato
<andrea....@gmail.com> wrote:
> Chris Lott <ch...@chrislott.org> writes:
>>
>> I'm also puzzling out the differences, if any, between the csl files
>> that are provided in the git repository, that are provided by Zotero
>> group, and that come with programs like Mendeley.
>
> I think the best place to get the most updated styles is here:
> http://citationstyles.org/styles/

Thanks. I am now using that, but experiencing the same issue that sees
like it must be related to hs-citeproc because the same .csl files
work fine with multiple authors and showing the journal issue number
using Zotero or Mendeley...

>> Getting closer to being able to reliably use Pandoc for the majority of my work!
>
> This is good news!

You have no idea :) Thanks for your help.

Bruce

unread,
Feb 13, 2012, 1:37:42 PM2/13/12
to pandoc-discuss


On Feb 13, 1:17 pm, Chris Lott <ch...@chrislott.org> wrote:
> On Mon, Feb 13, 2012 at 7:46 AM, andrea rossato
>
> <andrea.ross...@gmail.com> wrote:
> > Chris Lott <ch...@chrislott.org> writes:
>
> >> I'm also puzzling out the differences, if any, between the csl files
> >> that are provided in the git repository, that are provided by Zotero
> >> group, and that come with programs like Mendeley.
>
> > I think the best place to get the most updated styles is here:
> >http://citationstyles.org/styles/
>
> Thanks. I am now using that, but experiencing the same issue that sees
> like it must be related to hs-citeproc because the same .csl files
> work fine with multiple authors and showing the journal issue number
> using Zotero or Mendeley..

A couple of points:

First, yes, github is the preferred source, as most projects pull
their styles from there.

Second, the best way to determine where the bug is to compare output
with Zotero (though this is a little hard, perhaps, because it may not
catch issues with the input data).

If you see a difference between Zotero and pandoc, then there's
probably a bug in the latter.

If the output is consistent, but still wrong, double check your data,
and if you don't see anything, the issue is probably the style (which
you can report on github).

Bruce

Rintze Zelle

unread,
Feb 14, 2012, 9:23:24 AM2/14/12
to pandoc-...@googlegroups.com
On Sunday, February 12, 2012 3:55:23 PM UTC-5, Chris Lott wrote:

Also, APA specifies that journal titles are in all lower case except
the initial letter, the first letter after a colon, and proper nouns.
But I am getting citations with titles like:
Extrinsic Rewards and Instrinsic Motivation in Education: Reconsidered
Once Again

Which reflects the input I have in the .bib file, but is a clear
problem when switching between formats, as I often do. It seems to me
that the .csl file should at least get the first two items right (I
can understand not getting proper nouns right).

Because proper nouns make it hard to automatically convert titles to sentence case, the recommendation is to store all titles in sentence case. It's much easier to convert from sentence to title case than the other way around. The downside of adding sentence casing to the APA CSL style would be that you would have to manually correct proper nouns in titles, every time you cite the item. Storing titles in sentence case is a one-time task, and thus (in our view) preferable.

Rintze

Chris Lott

unread,
Feb 14, 2012, 12:37:16 PM2/14/12
to pandoc-...@googlegroups.com

On Tuesday, February 14, 2012, Rintze Zelle <rintze...@gmail.com> wrote:
>
> Because proper nouns make it hard to automatically convert titles to sentence case, the recommendation is to store all titles in sentence case. It's much easier to convert from sentence to title case than the other way around. The downside of adding sentence casing to the APA CSL style would be that you would have to manually correct proper nouns in titles, every time you cite the item. Storing titles in sentence case is a one-time task, and thus (in our view) preferable.
> Rintze

Thanks... that part I figured out and begrudgingly admitted it makes sense.

The problem with the citation of multiple authors and the lack of an issue number appear to be problem with hs-citeproc, as thje .csl works fine with Zotero and Mendeley. I'm hoping to hear of a fix before I have to manually adjust 80+ entries. Fixing proper nouns is easy...fixing multiple authors is rather painful because it means looking up all the first names :)

John MacFarlane

unread,
Feb 14, 2012, 2:56:56 PM2/14/12
to pandoc-...@googlegroups.com
+++ Chris Lott [Feb 14 12 08:37 ]:

> The problem with the citation of multiple authors and the lack of an
> issue number appear to be problem with hs-citeproc, as thje .csl works
> fine with Zotero and Mendeley.

What's the problem with multiple authors? It seems to work fine.

pandoc tests/markdown-citation.txt --biblio tests/biblio.bib --csl apa.csl

gives me (snipping):

Doe, J., & Roe, J. (2007). Why Water Is Wet. In S. Smith (Ed.), *Third
Book*. Oxford: Oxford University Press.

Chris Lott

unread,
Feb 14, 2012, 3:49:51 PM2/14/12
to pandoc-...@googlegroups.com
The multiple authors issue was my fault and I closed the ticket.

The other issue, unless I am misunderstanding--numbers/issue numbers--
remains and apparently will do so, because the author(s) of
hs-citeproc (presumably...or whoever is responding to tickets) believe
that a user should have to put APA specific field names (aka 'issue')
where every other implementation I can find uses the synonymous field
'number' which means "issue number" -- as does every reference and
discussion I've found--which means maintaining or changing the BibTeX
database when I want to switch formats so that every number field
becomes issue or vice-versa.

That is not a tenable solution given what I use Pandoc for, nor in the
spirit of how I understand BibTeX is supposed to work: multiple
outputs from one database, leaving my only solution to stop using
Pandoc behind for all writing that needs citations, which is
unfortunately almost all of what I do.

It's an (unfortunate) design decision, from my perspective, but so it goes!

c

> --
> You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
> To post to this group, send email to pandoc-...@googlegroups.com.
> To unsubscribe from this group, send email to pandoc-discus...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/pandoc-discuss?hl=en.
>

Reply all
Reply to author
Forward
0 new messages