From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Price Subject: Re: Some projects Date: Wed, 28 Oct 2015 11:31:20 -0400 Message-ID: References: <87wpub9jts.fsf@nicolasgoaziou.fr> <877fmazh2f.fsf@gmail.com> <87fv0x1t49.fsf@berkeley.edu> <874mhczfil.fsf@gmail.com> <87k2q8mqwj.fsf@gmx.us> <871tcgzcoc.fsf@gmail.com> <87bnbkmnc2.fsf@gmx.us> <87bnbjr7mz.fsf@fastmail.fm> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=001a113f9ae0e23c4005232be28f Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45917) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZrSh9-0006At-0q for emacs-orgmode@gnu.org; Wed, 28 Oct 2015 11:31:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZrSh7-0003Gi-8U for emacs-orgmode@gnu.org; Wed, 28 Oct 2015 11:31:22 -0400 Received: from mail-io0-x22f.google.com ([2607:f8b0:4001:c06::22f]:36778) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZrSh7-0003GT-24 for emacs-orgmode@gnu.org; Wed, 28 Oct 2015 11:31:21 -0400 Received: by ioll68 with SMTP id l68so14362818iol.3 for ; Wed, 28 Oct 2015 08:31:20 -0700 (PDT) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Cc: Org Mode --001a113f9ae0e23c4005232be28f Content-Type: multipart/alternative; boundary=001a113f9ae0e23c3905232be28d --001a113f9ae0e23c3905232be28d Content-Type: text/plain; charset=UTF-8 On Wed, Oct 28, 2015 at 10:36 AM, Matt Price wrote: > > That does seem to be an issue, but I bet it wouldn't be too hard to fix. > Currently outputformat is hardcoded on line 94 of lib/citeServer.js; I'm a > little slow at reading JS but I think replacing line 259 with a switch > statement analogous to the one for responseformat at line 291 would allow > one to use the full capacities of citeproc.js. I think the best route > would probably be to submit a patch to citeproc.js adding an org-mode > output format, propagating that up to citeproc-node, submitting a second > patch to citeproc-node, and then writing the org-internal functions > properly. We might also want to add an additional responseformat option. > >> Matt >> > > here is a very half-assed aproach that adds an org-mode outputformat to citeproc. it's incomplete but does much of wha it ought to. some of the elements I left in html b/c I'm not sure how they oughtto be handled in org. e.g., how do we handle smallcaps? (this is a patch to citeproc-node, so requires installing the repo from github first). --001a113f9ae0e23c3905232be28d Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


On Wed, Oct 28, 2015 at 10:36 AM, Matt Price <moptop99@gmail.com&= gt; wrote:

That does seem to be an issue, but I bet it wouldn= 't be too hard to fix.=C2=A0 Currently outputformat is hardcoded on lin= e 94 of lib/citeServer.js; I'm a little slow at reading JS but I think = replacing line 259 with a switch statement analogous to the one for respons= eformat at line 291 would allow one to use the full capacities of citeproc.= js.=C2=A0 I think the best route would probably be to submit a patch to cit= eproc.js adding an org-mode output format, propagating that up to citeproc-= node, submitting a second patch to citeproc-node, and then writing the org-= internal functions properly.=C2=A0 We might also want to add an additional = responseformat option.=C2=A0
Matt


here is a very half= -assed aproach that adds an org-mode outputformat to citeproc.=C2=A0 it'= ;s incomplete but does much of wha it ought to.=C2=A0 some of the elements = I left in html b/c I'm not sure how they oughtto be handled in org.=C2= =A0 e.g., how do we handle smallcaps?=C2=A0

(this is a patch to citeproc-node, so requires installing the rep= o from github first).
--001a113f9ae0e23c3905232be28d-- --001a113f9ae0e23c4005232be28f Content-Type: text/x-patch; charset=US-ASCII; name="add-org.patch" Content-Disposition: attachment; filename="add-org.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_igaylg7n0 ZGlmZiAtLWdpdCBhL2xpYi9jaXRlU2VydmVyLmpzIGIvbGliL2NpdGVTZXJ2ZXIuanMKa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jNjA7IikKKyAgICAgICAgICAgIC5yZXBsYWNlKC8+L2csICIm IzYyOyIpCisgICAgICAgICAgICAucmVwbGFjZSgiICAiLCAiJiMxNjA7ICIsICJnIikKKyAgICAg ICAgICAgIC5yZXBsYWNlKENTTC5TVVBFUlNDUklQVFNfUkVHRVhQLAorICAgICAgICAgICAgICAg ICAgICAgZnVuY3Rpb24oYUNoYXIpIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4g IjxzdXA+IiArIENTTC5TVVBFUlNDUklQVFNbYUNoYXJdICsgIjwvc3VwPiI7CisgICAgICAgICAg ICAgICAgICAgICB9KTsKKyAgICB9LAorICAgICJiaWJzdGFydCI6ICIqIEJpYmxpb2dyYXBoeVxu IiwKKyAgICAiYmliZW5kIjogIlxuIiwKKyAgICAiQGZvbnQtc3R5bGUvaXRhbGljIjogIi8lJVNU UklORyUlLyIsCisgICAgIkBmb250LXN0eWxlL29ibGlxdWUiOiAiLyUlU1RSSU5HJSUvIiwKKyAg ICAiQGZvbnQtc3R5bGUvbm9ybWFsIjogIiUlU1RSSU5HJSUiLAorICAgICJAZm9udC12YXJpYW50 L3NtYWxsLWNhcHMiOiAiPHNwYW4gc3R5bGU9XCJmb250LXZhcmlhbnQ6c21hbGwtY2FwcztcIj4l JVNUUklORyUlPC9zcGFuPiIsCisgICAgIkBwYXNzdGhyb3VnaC90cnVlIjogQ1NMLk91dHB1dC5G b3JtYXR0ZXJzLnBhc3N0aHJvdWdoLAorICAgICJAZm9udC12YXJpYW50L25vcm1hbCI6IGZhbHNl LAorICAgICJAZm9udC13ZWlnaHQvYm9sZCI6ICIqJSVTVFJJTkclJSoiLAorICAgICJAZm9udC13 ZWlnaHQvbm9ybWFsIjogZmFsc2UsCisgICAgIkBmb250LXdlaWdodC9saWdodCI6IGZhbHNlLAor ICAgICJAdGV4dC1kZWNvcmF0aW9uL25vbmUiOiBmYWxzZSwKKyAgICAiQHRleHQtZGVjb3JhdGlv bi91bmRlcmxpbmUiOi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HJldHVybiAiPGRpdiBjbGFzcz1cImNzbC1pbmRlbnRcIj4iICsgc3RyICsgIjwvZGl2Plxu ICAiOworICAgIH0sCisgICAgIkBzaG93aWQvdHJ1ZSI6IGZ1bmN0aW9uIChzdGF0ZSwgc3RyLCBj c2xpZCkgeworICAgICAgICBpZiAoIXN0YXRlLnRtcC5qdXN0X2xvb2tpbmcgJiYgISBzdGF0ZS50 bXAuc3VwcHJlc3NfZGVjb3JhdGlvbnMpIHsKKyAgICAgICAgICAgIGlmIChjc2xpZCkgeworICAg ICAgICAgICAgICAgIHJldHVybiAiPHNwYW4gY2xhc3M9XCIiICsgc3RhdGUub3B0Lm5vZGVuYW1l c1tjc2xpZF0gKyAiXCIgY3NsaWQ9XCIiICsgY3NsaWQgKyAiXCI+IiArIHN0ciArICI8L3NwYW4+ IjsKKyAgICAgICAgICAgIH0gZWxzZSBpZiAoInN0cmluZyIgPT09IHR5cGVvZiBzdHIpIHsKKyAg ICAgICAgICAgICAgICB2YXIgcHJlUHVuY3QgPSAiIjsKKyAgICAgICAgICAgICAgICBpZiAoc3Ry KSB7CisgICAgICAgICAgICAgICAgICAgIHZhciBtID0gc3RyLm1hdGNoKENTTC5WQVJJQUJMRV9X UkFQUEVSX1BSRVBVTkNUX1JFWCk7CisgICAgICAgICAgICAgICAgICAgIHByZVB1bmN0ID0gbVsx XTsKKyAgICAgICAgICAgICAgICAgICAgc3RyID0gbVsyXTsKKyAgICAgICAgICAgICAgICB9Cisg ICAgICAgICAgICAgICAgdmFyIHBvc3RQdW5jdCA9ICIiOworICAgICAgICAgICAgICAgIGlmIChz dHIgJiYgQ1NMLlNXQVBQSU5HX1BVTkNUVUFUSU9OLmluZGV4T2Yoc3RyLnNsaWNlKC0xKSkgPiAt MSkgeworICAgICAgICAgICAgICAgICAgICBwb3N0UHVuY3QgPSBzdHIuc2xpY2UoLTEpOworICAg ICAgICAgICAgICAgICAgICBzdHIgPSBzdHIuc2xpY2UoMCwtMSk7CisgICAgICAgICAgICAgICAg fQorICAgICAgICAgICAgICAgIHJldHVybiBzdGF0ZS5zeXMudmFyaWFibGVXcmFwcGVyKHRoaXMu cGFyYW1zLCBwcmVQdW5jdCwgc3RyLCBwb3N0UHVuY3QpOworICAgICAgICAgICAgfSBlbHNlIHsK KyAgICAgICAgICAgICAgICByZXR1cm4gc3RyOworICAgICAgICAgICAgfQorICAgICAgICB9IGVs c2UgeworICAgICAgICAgICAgcmV0dXJuIHN0cjsKKyAgICAgICAgfQorICAgIH0sCisgICAgIkBV UkwvdHJ1ZSI6IGZ1bmN0aW9uIChzdGF0ZSwgc3RyKSB7CisgICAgICAgIHJldHVybiAiPGEgaHJl Zj1cIiIgKyBzdHIgKyAiXCI+IiArIHN0ciArICI8L2E+IjsKKyAgICB9LAorICAgICJARE9JL3Ry dWUiOiBmdW5jdGlvbiAoc3RhdGUsIHN0cikgeworICAgICAgICByZXR1cm4gIjxhIGhyZWY9XCJo dHRwOi8vZHguZG9pLm9yZy8iICsgc3RyICsgIlwiPiIgKyBzdHIgKyAiPC9hPiI7CisgICAgfQor fTsKKwogQ1NMLk91dHB1dC5Gb3JtYXRzLnByb3RvdHlwZS50ZXh0ID0gewogICAgICJ0ZXh0X2Vz Y2FwZSI6IGZ1bmN0aW9uICh0ZXh0KSB7CiAgICAgICAgIGlmICghdGV4dCkgewo= --001a113f9ae0e23c4005232be28f--