emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Richard Lawrence <richard.lawrence@berkeley.edu>
To: emacs-orgmode@gnu.org
Subject: org-cite and org-citeproc
Date: Sat, 28 Mar 2015 11:53:10 -0700	[thread overview]
Message-ID: <87twx5hs2x.fsf@berkeley.edu> (raw)

[-- Attachment #1: Type: text/plain, Size: 2373 bytes --]

Hi everyone,

I thought I should send an update to let you know that org-citeproc [1],
the command-line citation processing tool I've been working on, now
supports multi-cites.  I believe that means it is now capable of
processing all citations in the basic citation syntax.  It can output
plain text, HTML, and ODT (and a Pandoc native format, mostly useful for
debugging).

org-citeproc hooks up with the Org exporters via Aaron Ecay's org-cite [2]
library, so that it is possible to export a document containing
citations as text, HTML, or ODT.  A sample Org document, bib file, CSL file,
and outputs are attached.

I am pretty convinced at this point that the approach that the
combination of org-cite and org-citeproc represents is viable, even if
org-citeproc is not the tool (or one of the tools) that the Org
community eventually adopts.  If you'd like to help out with developing
it, here are some things that would be useful:

1) If you are comfortable building a Haskell program and running an
unstable branch of Org, it would be great to have people test org-cite
and org-citeproc with more realistic documents, and with other CSL
files.  The basic things work, but there are surely many corner cases to
be weeded out.

2) If you know Haskell, I would appreciate feedback on the org-citeproc
code.  I am pretty new to Haskell and suspect there is a lot in my code
that could be cleaned up or made more idiomatic.

3) If you know Elisp, there are plenty of things still TODO in
org-cite.el.  I haven't hacked on this much except to get it working
with org-citeproc.

4) I would also be interested in seeing a parallel implementation in
org-cite of citation processing via Zotero.  I think the infrastructure
org-cite provides should make it relatively easy to get something like
this working, perhaps in combination with the zotxt plugin.  This would
provide two benefits: it would help prove the org-cite API is general
enough, and it would provide an alternative to org-citeproc for people
who already have a CSL implementation (namely Zotero) installed and
don't want to build/install a separate Haskell program just to process
citations.

Here's the code:

[1] https://github.com/wyleyr/org-citeproc
[2] https://github.com/wyleyr/org-mode  (This branch contains the version
of org-cite needed to work with org-citeproc.)

Thanks for looking!

Best,
Richard


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Test document --]
[-- Type: text/x-org, Size: 3979 bytes --]

#+OPTIONS: ':nil *:t -:t ::t <:t H:3 \n:nil ^:t arch:nil author:t
#+OPTIONS: c:nil creator:comment d:(not "LOGBOOK") date:t e:t
#+OPTIONS: email:nil f:t inline:t num:t p:nil pri:nil prop:nil stat:t
#+OPTIONS: tags:t tasks:t tex:t timestamp:t title:t toc:t todo:t |:t
#+TITLE: Org-Citeproc tests
#+DESCRIPTION: 
#+KEYWORDS:
#+LANGUAGE: en
#+SELECT_TAGS: export
#+EXCLUDE_TAGS: noexport
#+CREATOR: Emacs 23.4.1 (Org mode 8.3beta)
#+CSL_FILE: chicago-author-date.csl
#+BIBDB: bibtex testdoc.bib

* Org markup
** Simple citations
*** Parenthetical 
Some great ideas occur in books [@Brandom1994]. Others in articles
[@Hofweber2007]. Still others are in collections of previously
published work [@Russell1919], or in conference proceedings
[@Rogers1996]; sometimes they are the proceedings themselves
[@RogersKepser2007].  Sometimes, a great idea can be found in a
dissertation [@Caponigro2003], and sometimes on just a handout
[@Ross1985].  Some remain forever unpublished [@Faraci1970].

*** In-text 
Some great ideas occur in books, such as @Brandom1994. Others in
articles, such as @Hofweber2007. Still others are in collections of
previously published work, such as @Russell1919, or in conference
proceedings like @Rogers1996; sometimes they are the proceedings
themselves such as @RogersKepser2007.  Sometimes, a great idea can be
found in a dissertation, such as @Caponigro2003, and sometimes on just
a handout like @Ross1985.  Some remain forever unpublished, such as
@Faraci1970.

*** With prefix and suffix data
Some great ideas occur in books [(cite): see @Brandom1994 chapter 7]. 
Others in articles [(cite): @Hofweber2007 section 1]. Still others
are in collections of previously published work, such as 
[cite: @Russell1919 cf. section 3], or in conference proceedings 
[(cite): e.g., @Rogers1996].  Sometimes, a great idea can be found in a
dissertation, like an idea by [cite: see @Caponigro2003 chapter 1],
and sometimes on just a handout, like others by [cite: e.g., @Ross1985].

*** Citations to works with tricky field data
In some cases, the authors have names which are tricky to represent in
BibTeX, like @BelnapSteel1976, or @Vaanaanen2011.
@denDikkenMeinungerWilder2000 has a lead author that should probably
be capitalized in sentence-initial position. Sometimes, it's the
journal name which is difficult [@Belnap1970].

** Multi-cite citations
*** Parenthetical, keys only
Some great ideas occur in books, articles, or collections
[(cite): @Brandom1994; @Hofweber2007; @Russell1919].  

Some occur in conference proceedings or dissertations
[(cite): @Rogers1996; @RogersKepser2007; @Caponigro2003], and 
sometimes remain unpublished [(cite): @Ross1985; @Faraci1970].

*** Parenthetical, with prefix and suffix data for individual works
Some great ideas occur in books, articles, or collections
[(cite): see @Brandom1994 chapter 7; also @Hofweber2007; @Russell1919 is the locus classicus].  
Some occur in conference proceedings or dissertations
[(cite): @Rogers1996; for an overview, see @RogersKepser2007 and references therein].

*** Parenthetical, with common prefix and suffix data
Some great ideas occur in books, articles, or collections
[(cite): For more on this topic, see ; @Brandom1994; @Hofweber2007; @Russell1919; and references therein].  

*** All in-text, keys only
Some great ideas occur in books, articles, or collections
such as [cite: @Brandom1994; @Hofweber2007; @Russell1919].  

Some occur in conference proceedings or dissertations like
[cite: @Rogers1996; @RogersKepser2007; @Caponigro2003], and 
sometimes remain unpublished, like [cite: @Ross1985; @Faraci1970].

*** All in-text, with common prefix and suffix
Some great ideas occur in books, articles, or collections.
[cite: See: ; @Brandom1994; @Hofweber2007; @Russell1919; and references therein.]  

Some occur in conference proceedings or dissertations. 
[cite: For more on this topic, see ; @Rogers1996; @RogersKepser2007; @Caponigro2003].

* References
#+BIBLIOGRAPHY: here

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: Bibtex database for test document --]
[-- Type: text/x-bibtex, Size: 2610 bytes --]

@book{Brandom1994,
  author={Robert Brandom},
  title={Making it Explicit},
  publisher={Harvard University Press},
  year={1994}
}
@article{Hofweber2007,
  author={Hofweber, Thomas},
  title={Innocent Statements and their Metaphysically Loaded Counterparts},
  journal={Philosophers' Imprint},
  year={2007},
  volume={7},
  number={1},
  month={February}
}
@incollection{Russell1919,
  author={Bertrand Russell},
  title={Descriptions},
  booktitle={The Philosophy of Language},
  publisher={Oxford University Press},
  year={2001},
  editor={A. P. Martinich},
  chapter={15},
  pages={221--227},
  edition={Fourth}
}
@inproceedings{Rogers1996,
  author={James Rogers},
  title={A model-theoretic framework for theories of syntax},
  booktitle={Proceedings of the 34th annual meeting on Association for Computational Linguistics},
  year={1996},
  pages={10--16},
  address={Santa Cruz, CA, USA},
  organization={Association for Computational Linguistics}
}
@proceedings{RogersKepser2007,
  title={Model-theoretic syntax at 10},
  year={2007},
  editor={James Rogers and Stephan Kepser},
  organization={Association for Logic, Language and Information}
}
@phdthesis{Caponigro2003,
  author={Ivano Caponigro},
  title={Free not to ask: On the semantics of free relatives and Wh-words cross-linguistically},
  school={University of California, Los Angeles},
  year={2003},
  note={Cited text available at http://idiom.ucsd.edu/~ivano/Papers/2003_dissertation_revised_7-13-05.pdf}
}
@misc{Ross1985,
  author={Ross, John R.},
  title={The source of pseudocleft sentences},
  howpublished={Handout of a talk given at New York University},
  month={November},
  year={1985}
}
@unpublished{Faraci1970,
  author={Faraci, R.},
  title={On the deep question of pseudo-clefts},
  year={1970}
}
@book{BelnapSteel1976,
  author={Belnap, Jr., Nuel D. and Steel, Jr., Thomas B.},
  title={The logic of questions and answers},
  publisher={Yale University Press},
  year={1976}
}
@book{Vaanaanen2011,
  author={Jouko V\"{a}\"{a}n\"{a}\"{a}nen},
  title={Models and Games},
  publisher={Cambridge University Press},
  year={2011},
  volume={132},
  series={Cambridge studies in advanced mathematics}
}
@article{denDikkenMeinungerWilder2000,
  author={{den Dikken}, Marcel and Andr\'{e} Meinunger and Chris Wilder},
  title={Pseudoclefts and ellipsis},
  journal={Studia Linguistica},
  year={2000},
  volume={54},
  pages={41--89}
}
@article{Belnap1970,
  author={Belnap, Nuel},
  title={Conditional assertion and restricted quantification},
  journal={No\^{u}s},
  year={1970},
  volume={4},
  number={1},
  pages={1--12}
}

[-- Attachment #4: Test document rendered as text --]
[-- Type: text/plain, Size: 7146 bytes --]

			  ━━━━━━━━━━━━━━━━━━━━
			   ORG-CITEPROC TESTS


			    Richard Lawrence
			  ━━━━━━━━━━━━━━━━━━━━


Table of Contents
─────────────────

1 Org markup
.. 1.1 Simple citations
..... 1.1.1 Parenthetical
..... 1.1.2 In-text
..... 1.1.3 With prefix and suffix data
..... 1.1.4 Citations to works with tricky field data
.. 1.2 Multi-cite citations
..... 1.2.1 Parenthetical, keys only
..... 1.2.2 Parenthetical, with prefix and suffix data for individual works
..... 1.2.3 Parenthetical, with common prefix and suffix data
..... 1.2.4 All in-text, keys only
..... 1.2.5 All in-text, with common prefix and suffix
2 References





1 Org markup
════════════

1.1 Simple citations
────────────────────

1.1.1 Parenthetical
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  Some great ideas occur in books (Brandom 1994). Others in articles
  (Hofweber 2007). Still others are in collections of previously
  published work (Russell 2001), or in conference proceedings (Rogers
  1996); sometimes they are the proceedings themselves (Rogers and
  Kepser 2007).  Sometimes, a great idea can be found in a dissertation
  (Caponigro 2003), and sometimes on just a handout (Ross 1985).  Some
  remain forever unpublished (Faraci 1970).


1.1.2 In-text
╌╌╌╌╌╌╌╌╌╌╌╌╌

  Some great ideas occur in books, such as Brandom (1994). Others in
  articles, such as Hofweber (2007). Still others are in collections of
  previously published work, such as Russell (2001), or in conference
  proceedings like Rogers (1996); sometimes they are the proceedings
  themselves such as Rogers and Kepser (2007).  Sometimes, a great idea
  can be found in a dissertation, such as Caponigro (2003), and
  sometimes on just a handout like Ross (1985).  Some remain forever
  unpublished, such as Faraci (1970).


1.1.3 With prefix and suffix data
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  Some great ideas occur in books (see Brandom 1994 chapter 7).  Others
  in articles (Hofweber 2007 section 1). Still others are in collections
  of previously published work, such as Russell (2001 cf. section 3), or
  in conference proceedings (e.g., Rogers 1996).  Sometimes, a great
  idea can be found in a dissertation, like an idea by Caponigro (see
  2003 chapter 1), and sometimes on just a handout, like others by Ross
  (e.g., 1985).


1.1.4 Citations to works with tricky field data
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  In some cases, the authors have names which are tricky to represent in
  BibTeX, like N. D. Belnap Jr. and Steel (1976), or Väänäänen (2011).
  den Dikken, Meinunger, and Wilder (2000) has a lead author that should
  probably be capitalized in sentence-initial position. Sometimes, it's
  the journal name which is difficult (N. Belnap 1970).


1.2 Multi-cite citations
────────────────────────

1.2.1 Parenthetical, keys only
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  Some great ideas occur in books, articles, or collections (Brandom
  1994; Hofweber 2007; Russell 2001).

  Some occur in conference proceedings or dissertations (Rogers 1996;
  Rogers and Kepser 2007; Caponigro 2003), and sometimes remain
  unpublished (Ross 1985; Faraci 1970).


1.2.2 Parenthetical, with prefix and suffix data for individual works
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  Some great ideas occur in books, articles, or collections (see Brandom
  1994 chapter 7; also Hofweber 2007; Russell 2001 is the locus
  classicus).  Some occur in conference proceedings or dissertations
  (Rogers 1996; for an overview, see Rogers and Kepser 2007 and
  references therein).


1.2.3 Parenthetical, with common prefix and suffix data
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  Some great ideas occur in books, articles, or collections (For more on
  this topic, see Brandom 1994; Hofweber 2007; Russell 2001, and
  references therein).


1.2.4 All in-text, keys only
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  Some great ideas occur in books, articles, or collections such as
  Brandom (1994), Hofweber (2007), Russell (2001).

  Some occur in conference proceedings or dissertations like Rogers
  (1996), Rogers and Kepser (2007), Caponigro (2003), and sometimes
  remain unpublished, like Ross (1985), Faraci (1970).


1.2.5 All in-text, with common prefix and suffix
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  Some great ideas occur in books, articles, or collections.  See:
  Brandom (1994), Hofweber (2007), Russell (2001), and references
  therein.

  Some occur in conference proceedings or dissertations.  For more on
  this topic, see Rogers (1996), Rogers and Kepser (2007), Caponigro
  (2003).


2 References
════════════

  Belnap, Nuel. 1970. “Conditional Assertion and Restricted Quantification.”
  _Noûs_ 4 (1): 1–12.

  Belnap, Nuel D., Jr., and Thomas B. Steel Jr. 1976. _The Logic of Questions and
  Answers_. Yale University Press.

  Brandom, Robert. 1994. _Making It Explicit_. Harvard University Press.

  Caponigro, Ivano. 2003. “Free Not to Ask: On the Semantics of Free Relatives and
  Wh-Words Cross-Linguistically.” PhD thesis, University of California, Los
  Angeles.

  den Dikken, Marcel, André Meinunger, and Chris Wilder. 2000. “Pseudoclefts and
  Ellipsis.” _Studia Linguistica_ 54: 41–89.

  Faraci, R. 1970. “On the Deep Question of Pseudo-Clefts.”

  Hofweber, Thomas. 2007. “Innocent Statements and Their Metaphysically Loaded
  Counterparts.” _Philosophers’ Imprint_ 7 (1).

  Rogers, James. 1996. “A Model-Theoretic Framework for Theories of Syntax.” In
  _Proceedings of the 34th Annual Meeting on Association for Computational
  Linguistics_, 10–16. Santa Cruz, CA, USA: Association for Computational
  Linguistics.

  Rogers, James, and Stephan Kepser, eds. 2007. _Model-Theoretic Syntax at 10_.
  Association for Logic, Language; Information.

  Ross, John R. 1985. “The Source of Pseudocleft Sentences.” Handout of a talk
  given at New York University.

  Russell, Bertrand. 2001. “Descriptions.” In _The Philosophy of Language_, edited
  by A. P. Martinich, Fourth, 221–27. Oxford University Press.

  Väänäänen, Jouko. 2011. _Models and Games_. Vol. 132. Cambridge Studies in
  Advanced Mathematics. Cambridge University Press.

[-- Attachment #5: Test document rendered as HTML --]
[-- Type: text/html, Size: 12689 bytes --]

[-- Attachment #6: Test document rendered as ODT --]
[-- Type: application/vnd.oasis.opendocument.text, Size: 12730 bytes --]

             reply	other threads:[~2015-03-28 18:54 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-28 18:53 Richard Lawrence [this message]
2015-03-31  8:16 ` Eric S Fraga
2015-03-31 19:13   ` Richard Lawrence
2015-03-31 19:34     ` Nick Dokos
2015-03-31 20:29       ` Thomas S. Dye
2015-03-31 21:57         ` Richard Lawrence
2015-04-01  0:41           ` Thomas S. Dye
2015-04-01 15:42             ` Richard Lawrence
2015-04-01 19:41               ` Thomas S. Dye
2015-04-02 15:57                 ` Richard Lawrence
2015-04-02 16:45                   ` Thomas S. Dye
2015-03-31 21:12     ` Eric S Fraga
2015-04-01  7:49       ` Andreas Leha
2015-04-02 14:29         ` Eric S Fraga
2015-04-02 15:11           ` Richard Lawrence
2015-04-02 19:26             ` Andreas Leha
2015-03-31 22:03     ` Rasmus
2015-04-01 14:39       ` Richard Lawrence
2015-04-02  0:08         ` Rasmus
2015-04-02 15:26           ` Richard Lawrence
2015-04-02 15:51 ` Aaron Ecay
2015-04-02 17:38   ` Richard Lawrence
2015-04-06 18:51     ` Richard Lawrence
2015-06-16 19:36       ` Matt Price
2015-06-18 22:44         ` Richard Lawrence
2015-04-02 19:17   ` Rasmus
2015-04-03  2:56     ` Richard Lawrence

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87twx5hs2x.fsf@berkeley.edu \
    --to=richard.lawrence@berkeley.edu \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).