drag refs from BibDesk with mmd ref style

205 views
Skip to first unread message

James Howison

unread,
Oct 13, 2007, 3:00:23 AM10/13/07
to MultiMarkdown Discussion List
I use BibDesk with MultiMarkdown to drag in references. BibDesk has
a fairly new and increasingly flexible template feature so that you
can specific the output you want when dragging from BibDesk (not
limited to the latex commands). Thought some others might like to
know, apologies if irrelevant.

eg dragging these two articles from BibDesk
Bennett, P. N. and Carbonell, J. (2005). Detecting action-items in e-
mail. In SIGIR ’05: Proceedings of the 28th annual international ACM
SIGIR conference on Research and development in information
retrieval, pages 585–586. bennett2005detecting-actio

Crossan, M., Cunha, M. P. E., Vera, D., and Cunha, J. (2005). Time
and organizational improvisation. Academy of Management Review, 30(1):
129–145. crossan2005time-and-organi

into TextMate (or any editor) gives you:

[Bennett and Carbonell (2005), Crossan et al. (2005)]
[#bennett2005detecting-actio, crossan2005time-and-organi]

which converts nicely to ~\citet{bennett2005detecting-actio} in
latex, and should use the text in the left [] as the link text in xhtml.

Here's the template (this should be copied into a file in ~/
Application Support/BibDesk/Templates and selected as the drag
Template in the citation pref pane) does the trick:

[<$publications>
<
$authors.lastName.stringByRemovingTeX.@componentsJoinedByAndWithEtAlAfte
rOne/> (<$fields.Year/>)<?$publications>, </$publications>][#<
$publications.citeKey.@componentsJoinedByComma/>]

It's not smart enough to combine refs from the same author, or do the
2005a, 2005b thing though.

If you prefer parens (and this works to convert to ~\citep
{bennett2005detecting-actio} when using the patch I sent a while ago,
btw, did that get integrated?):

[(<$publications>
<
$authors.lastName.stringByRemovingTeX.@componentsJoinedByAndWithEtAlAfte
rOne/> <$fields.Year/><?$publications>, </$publications>)][#<
$publications.citeKey.@componentsJoinedByComma/>]

Looks like:

[(Bennett and Carbonell 2005, Crossan et al. 2005)]
[#bennett2005detecting-actio, crossan2005time-and-organi]

With syntax highlighting these actually look pretty readable :)

hth,
James


Silvan Kaiser

unread,
Oct 14, 2007, 10:00:59 AM10/14/07
to MultiMarkdown Discussion List
Hi James!
This looks very interesting. I just tried to test it but Bibdesk does
not show the new file as an option for the template, only default
templates are listed.
Which name did you choose to the save the new file under and did you
edit anything else to make this new file known to bibdesk?
Cheers
Silvan

PS: MacOS 10.4.10 & Bibdesk Version 1.3.10 (v865) over here

James Howison

unread,
Oct 14, 2007, 3:58:17 PM10/14/07
to MultiMarkdown Discussion List

Hi Simon,

You need to click the + at the bottom of the File Templates listing
in the System Preferences and fill out the details, pointing to that
file when it asks for it. I don't think it matters what the files are
named but here's what I have:

[james@MinistryOfInformation2]$ls -la Library/Application\ Support/
BibDesk/Templates/
total 68k
drwxr-xr-x 16 james james 544 Oct 12 11:21 .
drwxr-xr-x 21 james james 714 Mar 23 2007 ..
-rw-r--r-- 1 james james 202 Oct 12 11:21 MMDcite-P-
ExportTemplate.txt
-rw-r--r-- 1 james james 202 Oct 12 11:20
MMDciteExportTemplate.txt
-rw-r--r-- 1 james james 56 Aug 6 2006
citeServiceTemplate.txt
-rw-r--r-- 1 james james 19k Aug 6 2006
docExportTemplate.doc
-rw-r--r-- 1 james james 936 Aug 6 2006
htmlExportStyleSheet.css
-rw-r--r-- 1 james james 492 Aug 6 2006
htmlExportTemplate.html
-rw-r--r-- 1 james james 521 Aug 6 2006
htmlItemExportTemplate.html
-rw-r--r-- 1 james james 593 Aug 6 2006
rssExportTemplate.rss
-rw-r--r-- 1 james james 1.2k Aug 6 2006
rtfExportTemplate.rtf
-rw-r--r-- 1 james james 685 Aug 6 2006
rtfServiceTemplate book.rtf
-rw-r--r-- 1 james james 910 Aug 6 2006
rtfServiceTemplate default item.rtf
-rw-r--r-- 1 james james 368 Aug 6 2006
rtfServiceTemplate.rtf
drwxr-xr-x 4 james james 136 Aug 6 2006
rtfdExportTemplate.rtfd
-rw-r--r-- 1 james james 275 Aug 6 2006
textServiceTemplate.txt


Ie they are named MMDciteExportTemplate.txt and MMDcite-P-
ExportTemplate.txt.

Now I think about it, these templates use features added in the last
few days. I'm using 1.3.10 (v902) which I is a 'nightly' rather than
a released build, so one might want to wait a few days for the next
release, or grab the latest nightly from

<http://bibdesk.demokratia.org/beta/>

(Remember to back up when using a Nightly and probably best to
subscribe the the bibdesk-develop list if you are going to regularly
use nightlies).

(and we should move this discussion to a bibdesk list if there's more
to say ;)

Cheers,
James

Silvan Kaiser

unread,
Oct 15, 2007, 5:39:38 AM10/15/07
to MultiMarkdown Discussion List
Thanks for the reply, i'll check out the next bibdesk release. :)
Cheers
Silvan


On Oct 14, 9:58 pm, James Howison <ja...@freelancepropaganda.com>
wrote:

Fletcher T. Penney

unread,
Jan 12, 2008, 8:43:28 PM1/12/08
to MultiMarkdown Discussion List
I finally had a chance to play around with BibDesk again, and looked
at what James Howison had submitted a while back. His file wasn't
working for me with a newer version of BibDesk, but I was able to play
with the Template Editor to recreate what he did (I think) as well as
to create some other templates....


I created three templates, that generate the following:

[#Gibson:1984][]

[p. ][#Gibson:1984]

[Yost, Sentner, and Forlenza-bailey (2000)][#Yost:2000]

The first version is used when there is no specific reference or
string to use (e.g. `p. 15`). The second version allows you to
include such a string.

The third is more like James' version, and I suppose is useful when
you will not be using BibTeX and want a more human-readable citation.


I would love to get feedback from anyone who uses this, and come up
with something to put on the website for others to use.

F-


--
Fletcher T. Penney
flet...@fletcherpenney.net

Never interrupt your enemy when he is making a mistake.
- Napoleon Bonaparte (1769-1821)

MMDExportTemplate.txt
MMDwithPagesExportTemplate.txt
MMDCompleteExportTemplate.txt

Fletcher T. Penney

unread,
Jan 12, 2008, 9:19:53 PM1/12/08
to MultiMarkdown Discussion List
Sorry - one of the files needs to be updated - it has been attached.

F-

> MMDExportTemplate
> .txt><MMDwithPagesExportTemplate.txt><MMDCompleteExportTemplate.txt>

MMDCompleteExportTemplate.txt
Reply all
Reply to author
Forward
0 new messages