![](http://content.invisioncic.com/r229491/set_resources_12/84c1e40ea0e759e3f1505eb1788ddf3c_pattern.png)
andrewning
Member-
Posts
38 -
Joined
-
Last visited
-
Days Won
1
andrewning last won the day on January 22 2014
andrewning had the most liked content!
andrewning's Achievements
![Rank: Member (4/5) Member](http://content.invisioncic.com/r229491/set_resources_12/84c1e40ea0e759e3f1505eb1788ddf3c_default_rank.png)
Member (4/5)
8
Reputation
-
andrewning reacted to a post in a topic: Reference Importer
-
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.
-
fredcallaway reacted to a post in a topic: Reference Importer
-
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.
-
OK. I've not seen this happen yet, but I'll keep an out for it.
-
walton, if you could provide me an error log for when this happens that would be helpful. It's never happened to me so it's hard for me to catch the error (I guess I don't use it often enough).
-
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.
-
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".
-
Katie, Glad to hear it works well for you. I've thought about adding integration to Papers and/or Mendeley down the road. For now though, my suggestion was just that you could use BibTeX to handle to conversion to APA format, regardless of where you end up storing (or not storing) your database. I'm referring to converting to APA for the other methods that aren't using crossref which already does that. Even still, I will plan to fix your issue with en- and em-dashes, and look into adding rich text copying.
-
Hi Katie, I'm glad to hear that you like the workflow! The en-dash between the page numbers looks like something I may need to fix. I'll look into that. Regarding the rich text formatting, I could probably add that also---thanks for the tip on that Stephen. For your second question, my suggestion would be to use BibDesk (http://bibdesk.sourceforge.net/). It's free and open-source, and this workflow is designed to work well with BibDesk. If you use BibDesk, you won't have to keep re-downloading references for ones you already used, and if you fix up a reference (sometimes data is not exactly correct) your corrections will be retained for future papers. But the benefit for your question, is that in BibDesk's preferences you can set the output to "apalike" and then you can select the publications you want and copy them as rich text. This is maybe not the most ideal usage for your setup because it requires an extra step, but it would be the easiest and most reliable way forward. The formatted reference feature was something I just added on at the end, because crossref happened to have an API for it. It's not something I ever use, but glad to hear its useful to you. I could probably add the ability to convert the BibTeX to a formatted reference for any of the methods, but for now I'd suggest using BibDesk. - Andrew
-
katie reacted to a post in a topic: Reference Importer
-
Thanks for the report, I've fixed the issue. Grab the latest from GitHub.
-
A couple of minor updates and fixes - fix for crossref extra spaces (thanks @axidio) - remove crossref unnecessary italitics tags - check aiaa server status - more reliable unicode handling
-
cands reacted to a post in a topic: Reference Importer
-
twinpeaks reacted to a post in a topic: Go To Current File (in Terminal or Finder)
-
Go To Current File (in Terminal or Finder)
andrewning replied to andrewning's topic in Share your Workflows
Interesting. I didn't even know about that hidden "Trigger behavior" for the modifier keys in Alfred. I just use the default "Simulate modifier keys released", but I tried all three options and all three triggers (right arrow, function, or control) worked fine for me for any of the trigger behaviors. In any case, I'll leave the default as is, but your comment will be helpful for those who run into the same issue. Also thanks again for the suggestion of adding the file action option. I've actually started using that quite a bit lately to quickly email someone the file I'm currently working on. -
Go To Current File (in Terminal or Finder)
andrewning replied to andrewning's topic in Share your Workflows
For the function key this worked for me tell application "System Events" to key code 63 for the control key this worked tell application "System Events" key down control key up control end tell However, I had to increase the delay time a little for these alternatives to work. The reason I used the ASCII character for the right arrow is that it is universal. Key codes can change from keyboard to keyboard. The control one though should be universal as well. -
Go To Current File (in Terminal or Finder)
andrewning replied to andrewning's topic in Share your Workflows
I added a capability to open the file in Alfred's File Action Window, which I think is you're after. It's just the one line you noted, but I added a couple more lines to trigger the "right arrow" keystroke so that the file action window was opened automatically. I also needed to introduce a slight delay before the keystroke. The delay I chose seemed to be the right length for my computer, but may need to be longer for some. New version pushed to GitHub. -
Go To Current File (in Terminal or Finder)
andrewning replied to andrewning's topic in Share your Workflows
I hadn't thought about this. I like the suggestion and would be happy to add it, but could you clarify a bit for me what behavior you are expecting. I'm not familiar with the "Get and Browse document in Alfred" workflow, and couldn't seem to find it from a quick search. Do you want to pull up the exact file in Alfred's file browser, or the containing directory? I'm assuming your goal is to right arrow over on the document to be able so you can select one of the file actions? -
twinpeaks reacted to a post in a topic: Go To Current File (in Terminal or Finder)
-
Go To Current File (in Terminal or Finder)
andrewning replied to andrewning's topic in Share your Workflows
Made an improvement to the Finder portion of the workflow so that it highlights the actual file instead of only opening the containing directory. Also made an fix for MS Office files to correctly handle the case where multiple documents are open at the same time.