Jump to content

Recommended Posts

Katie I looked at implementing your requests, and unfortunately it is not an easy change.  I'm using an existing API to grab formatted references, and it actually doesn't return HTML tags for italicizing.  The searching part of the script does, but that data is not in APA format.  Once you request the data in APA format it just returns plain text.  The en-dash issue is an encoding issue, and it seems to also be a problem with the API.  

 

To do what you are hoping for in this request (and in the second request) would require incorporating a reference converter within the Alfred workflow.  That's something I might think about down the road.  But for now, I verified that if you first import into BibTeX it will properly italicize the journal name, display the en-dash correctly, and will work with any of the methods and not just "ref".

Link to post

Thanks for checking, Andrew!

 

It sounds like a lot of work and, given that the benefits are so minimal, I can see that it's not worthwhile. But I appreciate you looking into it!

 

I tried importing a reference into BibDesk with your workflow and it was incredibly easy. Haven't been able to set up the APA export though. I've installed tex, set the preview to apalike, tried setting it to copy as RTF. To get the reference to copy in the way you describe, did you have to use a custom template? For those out there who are new to BibDesk and want to take advantage of this workflow, this is how to get APA styled ref's from BibDesk:

 

1. Create an rtf file from one of the styles templates found at http://sourceforge.net/apps/mediawiki/bibdesk/index.php?title=Templates

2. To get the italicized text, etc. You have to italicize the corresponding fields in the rtf file you just made. 

3. Add it as a template, then choose to "copy" as your template in the pref's. 

 

It took me a while to figure it out but it's really not that bad. I think I'm going to love BibDesk.

 

Katie

 

Edit: Maybe it's no so straightforward as I thought. I'm trying to import this ref (http://bit.ly/1i4syOB) to BibDesk using the book keyword. But nothing is copied to the clipboard or added to BibDesk.

Edited by katie
Link to post

First, the problem you had with the specific book you were looking for---you uncovered a bug.  These encoding issues are a pain sometimes.  Anyway, it's fixed and on GitHub.

 

For the rich text copying, I'm glad you found something that worked for you.  I realized after your comment, that it wasn't working for me either.  I was only looking at the TeX preview, which renders correctly, and calling it done.  Because I write all my documents in LaTeX, I've never actually tried doing a rich text copy and paste.  I tested some things out, and came across the template solution you mentioned.  However, I found that didn't work very well for some references, for example if the reference contained non-ascii characters, or escaped an ampersand LaTeX style, etc.  Instead, I came across this thread and noticed others were having the same problem, and found an alternative solution.  You first need to into Preferences > TeX Preview > TeX Template and add these two lines:

 

\usepackage{lmodern}  
\usepackage[T1]{fontenc}
 
The first changes the font so that the rich text will be preserved on copy paste (you also need to install the Latin Modern fonts if you don't already have them on your system.  Go into the opentype folder after downloading and drag them all into Font Book).  The second line allows you to properly copy/paste accented characters.  After all that, copy rich text now works.  Of course the font will be in Latin Modern, but you can now change it to whatever font, and the formatting will be preserved.
Link to post

After your comment, I checked the template I had set up and you're absolutely right - all accented characters (and perhaps other characters) are not rendered properly. Thanks to your clear instructions, I set up your alternative method, and I can now copy and paste from the preview. The idea that the rtf template method doesn't work as expected, however, is just the kind of thing that will niggle at me until I figure out how to fix it  :) This type of issue is why I've avoided latex - the "brief" start I made had me spending hours trying to work out the smallest of details. This is my method of procrastination. 

 

Thanks for your help setting up BibDesk!!

Link to post
  • 1 month later...

Wow. This is fucking incredible. Words cannot express how thankful I am to you for making this workflow.

 

There's just one thing though… is there any way I can set the import reference file action to use scholar (gsref) rather than crossref? This might have to do with my field of study (computational linguistics), but scholar is much faster and more reliable for me.

 

Thanks again!

Link to post

Two options:

1) the file action doesn't actually execute the crossref command, so you can always hit the HOME button and add a 'gs' before hitting enter.  It purposely doesn't try to automatically execute the command so that you can change the search type, and because the file action uses some heuristics and may not necessarily grab all the right keywords that you want.

2) Open up pdf2doi.py in the workflow and in line 54 replace 'ref' with 'gsref'.  Of course this will get overwritten with app updates.  If this becomes an issue I could add an option where the default search for the file action would be loaded from a config file or something.

Link to post

Yeah, I know what you mean.  The extra keystrokes would drive me crazy also.  

 

Changing keywords is another good option.  If this is something folks are interested in, perhaps I'll just add a config file so you can set your preference.

Link to post
  • 2 years later...
  • 2 weeks later...
  • 1 year later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...