Zotero

From Bjoern Hassler's website
Jump to: navigation, search

1 Zotero

A few things about my zotero setup!

If you are completely new to Zotero: You might like to have a look at our Faculty Zotero Self-Paced Study Guide if you are new to Zotero, which explains installation and basic use in some detail.

1.1 Installation

The most convenient way of running Zotero is as a FF browser extension. I would say to try that first. Go here, https://www.zotero.org/download/ (in Firefox), and install. If you do that, then the zotero link at the bottom right of FF opens up the Zotero pane. You can do this by using cmd-shift-Z as well [OS-X], see here for more shortcuts (and for Windows): shortcut keys. If you need help getting started, see above Zotero Self-Paced Study Guide.

(If you have Zotero standalone open, the Zotero button does make Zotero stand-alone the active application, and cmd-shift-Z also does this. So if you have Zotero stand-alone, and you want the FF pane, close it first.)

1.1.1 Plugins

I am using these plugins:

1.1.2 Preferences

Make sure that in the preferences you have ticked these two:

  • Automatically take snapshots
  • Automatically attache associated PDFs

Depending on your personal preference for copying between libraries:

  • "When copying files between libraries" -> "copy snapshots and imported files"

1.2 General tips

Saving items to Zotero. To save the current item: cmd-shift-S saves the current item (same as the blue "document (+)" button in the Zotero pane). Now, here's the important bit: This ONLY works if you are on a page that is "recognised" by Zotero, e.g. an amazon book page. You can also watch this: [1].

View collections containing an item. https://www.zotero.org/support/kb/collections_containing_an_item

Coloured tags. It's a shame that you cannot display tags in the columns, but you can do this: http://zotero-manual.github.io/zotero-manual/tags#colored_tags

Phrase search from quick search. You can surround your search by "..." in the quick search box, to search for that exact phrase.

1.2.1 Tab-tab to edit titles / better navigation (Mac OS X)

It's possible to navigate between different panes (particularly centre pane and right pane) using tab (see question here). In particular, this means that you can navigate from the middle pane to edit fields of a particular entry by pressing tab twice.

Instructions by Dan Stillman, for OS X:

  • First, go to System Preferences -> Keyboard -> Shortcuts and set "Full Keyboard Access" to "All controls".
  • That will let you get to the right-hand pane and Tab/Shift-Tab through the fields.
  • To switch panes on OS X, Tab into the right pane and then use Fn+PgDn/PgUp (Fn+Ctrl+up/down-arrow) to cycle between the tabs. That's the same shortcut as for Firefox/Chrome tabs (though Safari uses something different). (As a dev idea: However, we should possibly make the tab cycle include the active tab and then allow left/right-arrow to navigate between them, which is the case in the Advanced pane of the Firefox preferences.)

1.3 working with pdf

Adding a pdf as a new item. If you are browsing a pdf file, the short cut DOES NOT work, which is strange. However, the blue "document (+)" button in the zotero pane DOES work. That's the best way I have found to add pdf files directly. If you have Zotero stand alone open, this convenient way of importing pdf files isn't possible. You'd have to save and then import, or alternatively drag the url into Zotero stand-alone.

Note: Sometimes the pdf file you see might sit inside a browser frame, and when you do the save in Zotero, you only get the surrounding html, but not the pdf. Solution: in FF, you can right click, and select "view only this frame". Then save to Zotero.

Getting metadata. You can automatically "retrieve metadata for pdf" - just right click. Note that the pdf item cannot have a parent item already.

Adding a pdf to an existing citation. When you somehow have imported a link to a pdf without the pdf itself, there doesn't seem to be a button/option for "retrieve the pdf now". You can follow the link to the file online. Or if there is no link, you can use the "locator" button, and find the file online. Once you have the file, then say "Attach snapshot of current page", which adds the pdf file (but see above about frames). (Zotfile also has an option for attaching the last downloaded file.) Still, it's a little unintuitive.

As I am fairly new to Zotero, it's possible that I haven't fully understood how to do this, so forum question here. Outcome: [2].

1.4 Group libraries

Group libraries are completely independent libraries, that have their own collections. If you have e.g. a group library selected, the pdf will be automatically added to the library, which is convenient.

Depending on your personal preference for copying between libraries:

  • "When copying files between libraries" -> "copy snapshots and imported files"

With this preference set, "attachments will follow between libraries". If you shift-drag, the attachments are not copied. (Sadly the reverse doesn't seem to be true.)

2 Zutilo

2.1 Extra keyboard shortcuts

The Zutilo add-on https://addons.mozilla.org/en-us/firefox/addon/zutilo-utility-for-zotero/ is really cool. It's also really easily hacked (https://github.com/willsALMANJ, and my fork here http://github.com/bjohas/Zutilo; which has now been merged back into Zutilo.

Zutilo implements several functions that are useful for navigating between and within the three main panes. These functions can not be called from any graphical element but can be assigned to a keyboard shortcut, via the Zutilo preferences (Tools > Add-ons; Zutilo preferences > Shortcuts).

Here's what I implemented: The following two functions allow you to easily show or hide the collections pane (left pane) and the item pane (right pane).

  • Item pane: Show / hide: Show or hide the item pane.
  • Collections pane: Show / hide: Show or hide the collections pane.

The following two functions achieve the same, i.e. they allow you to easily show or hide the collections pane (left pane) and the item pane (right pane). However, when the pane is shown, the thicker vertical divider ("splitter", "grippy", first appears when the pane is hidden) remains visible until the width of the pane is adjusted.

  • Item pane: Show / hide (sticky): Show or hide the item pane. When the pane is show, the vertical divider renmains visible until the width of the pane is adjusted.
  • Collections pane: Show / hide (sticky): Show or hide the collections pane. When the pane is show, the vertical divider renmains visible until the width of the pane is adjusted.

Those are really useful to create more space for the panes that you are using. Zotero doesn't have different "views", but if you bind the above functions to shortcut keys, then it's easy to switch between different configurations.

Here are some functions to move between panes:

  • Focus collections pane: Set the focus to the collections pane (left pane, Libraries pane). Added for completeness to Zutilo, but Zotero already has a keyboard shortcut that does this.
  • Focus items pane: Set the focus to the items pane (middle pane).

The following four functions are similar to the four item editing functions also implemented in Zutilo (listed below in "Better navigation between panes"), except that they just set focus on the respective tab in the item pane.

  • Focus item pane: Info tab: Select the "Info" tab in the item pane.
  • Focus item pane: Notes tab: Select the "Notes" tab of the item pane.
  • Focus item pane: Tags tab: Select the "Tags" tab of the item pane.
  • Focus item pane: Related tab: Select the "Related" tab of the item pane.

The following two functions allow you to cycle through the same four tags in the item pane.

  • Focus item pane: next tab: Select next tab in item pane.
  • Focus item pane: previous tab: Select previous tab in item pane.

I've found the latter two more useful than the individual ones. Note that some of this switching between panes can also be achieved with the tab key, but it does give focus to other elements en route, so it's not as quick (c.f. also "Better navigation between panes" below).

With these changes below, keyconfig is no longer necessary (see below).

2.1.1 Zutilo: Alternative quickcopy formats

Instructions from https://github.com/willsALMANJ/Zutilo/issues/75. Go to

Preferences -> Advanced -> Config Editor.

You'll need to locate the ID string for the settings you want (see "Style editor" on this page, and locate the style id). It may be simpler to set your current export setting (in Prefs) to the setting that you want to have as an alt setting, and then look at

export.quickCopy.setting 

to get your current setting, e.g.

bibliography=http://www.zotero.org/styles/apa

Then search for

extensions.zutilo.quickcopy_alt1
extensions.zutilo.quickcopy_alt2

and paste your current setting.

3 Zotero experiments

3.1 Quickcopy with zotero:// link

This was motivated by interoperability between Zotero and google docs. We are keeping an annotated bibliography in google docs - how do we interact with the zotero pane? We can use bookmarks in Google docs to link from the Zotero pane to an item in Google docs, but how do we get back?

Here's a bit of discussion (you also need this link) that allows you to use quick copy to create references to Zotero items (both to Zotero pane / stand alone, as well as to Zotero.org). Very useful for linking back from a Google document to Zotero. My very basic attempt at a translator looks like this:

function doExport() {
       var item;
       while(item = Zotero.nextItem()) {
           for(var i=0, n=item.creators.length; i<n; i++) {
               Zotero.write(item.creators[i].lastName + ", "+ item.creators[i].firstName + ", " );
           }
           Zotero.write(item.date + ". " );
           Zotero.write(item.title+"\n");
           var library_id = item.libraryID ? item.libraryID : 0;
           Zotero.write(item.uri + "\n");
           Zotero.write("zotero://select/items/");
           Zotero.write(library_id+"_"+item.key+"");
           Zotero.write("\n");
       }
}

and you'd need to put it into Zotero/Profiles/......default/zotero/translators/ (see other translators there on how to add basic translator info, and https://www.zotero.org/support/dev/translators).

Note: Google docs will convert the http link (to the item on zotero.org) into a link (if you go to the end of the link and press space, as usual). However, with the zotero:// link, it's not possible to create a hyperlink (in Google docs). So to use the zotero:// link, you'll have to copy it, and paste it into your browser address bar, to open the citation.

3.1.1 Formatting the zotero:// link

[3] It's not possible to get Zotero to copy html to the clipboard, so the links are copied in plain text. As just said, Google docs will convert the http link (to the item on zotero.org) into a link. However, with the zotero:// link, it's not possible to create a hyperlink (in Google docs). So to use the zotero:// link, you'll have to copy it, and paste it into your browser address bar, to open the citation.

The zotero:// style link will work e.g. in Open Office, so you could weave some shell magic to create pastable items:

echo '<a href="zotero://select/items/1700609_RKPTKRPC">zotero</a>' | textutil -stdin -stdout -format html -convert rtf | pbcopy

but it's not ideal.

Looking at the export preferences, for all the bib styles you can select "copy as html", while for the export formats "copy as html" is greyed out.


3.2 Adding a search engine

Sometimes a Google scholar search works better when just searching for the title, rather than title/authors. You can add a title-only search by locating your

Zotero/Profiles/......default/zotero/locate/engines.json

file, and amending the existing Google Scholar search:

       {
               "name": "Google Scholar Search - title only",
               "alias": "Google Scholar title",
               "icon": "file:///Users/bjoern/Library/Application%20Support/Zotero/Profiles/915a7coe.default/zotero/locate/Google%20Scholar%20Search.ico",
               "_urlTemplate": "http://scholar.google.com/scholar?as_q=&as_epq={z:title}&as_occt=title",
               "description": "Google Scholar Search - title only",
               "hidden": false,
               "_urlParams": [],
               "_urlNamespaces": {
                       "rft": "info:ofi/fmt:kev:mtx:journal",
                       "z": "http://www.zotero.org/namespaces/openSearch#",
                       "": "http://a9.com/-/spec/opensearch/1.1/"
               },
               "_iconSourceURI": "http://scholar.google.com/favicon.ico"
       }

See also Category:Zotero for more Zotero related stuff.

3.3 key config

See note on Zutilo above, which makes the specific bits in this section unnecessary!

Key config (for FF, search forums) allows you to have additional keyboard shortcuts. It's a bit of a pain to use, but can be made to work. I found this helpful in terms of working out what functions I can use: https://github.com/zotero/zotero/blob/master/chrome/content/zotero/zoteroPane.xul (raw)

In addition to the keyboard shortcuts for Zotero/Zutilo, I currently have the following functions assigned to keys:

  • Zotero_RecognizePDF.recognizeSelected() ("Retrieve metadata", once I've added, a pdf I use this to check for metadata)
  • ZoteroPane_Local.createParentItemsFromSelected(); ("Add parent item', if there is no metadata available, then create parent item like this.)
  • ZoteroPane_Local.renameSelectedAttachmentsFromParents() (Rename a pdf from the parent metadata)

The Zutilo page (at Firefox extensions), also gives these functions defined by Zutilo:

  • Edit item info: Select the "Info" tab in the item pane. Set the focus to the first editable field of the item's info. (Function name: ZutiloChrome.zoteroOverlay.editItemInfoGUI()).
  • Add note: Select the "Notes" tab of the item pane. Create a new note. Added for completeness, but Zotero already has a keyboard shortcut that does this. It can be set in Zotero's preferences. (Function name: ZutiloChrome.zoteroOverlay.addNoteGUI()).
  • Add tag: Select the "Tags" tab of the item pane. Open a textbox for creating a new tag. (Function name: ZutiloChrome.zoteroOverlay.addTagGUI()).
  • Add related item: Select the "Related" tab of the item pane. Open the dialog for adding related items. (Function name: ZutiloChrome.zoteroOverlay.addRelatedGUI()).

which is another possible answer to the my query of switching between right-side panes (c.f. above). Note: All of these functions are available through the Zutilo preferences menu already! So no need to use keyconfig for these four.

3.4 Better navigation between panes

Also see note on Zutilo above, which enhances this.

How do you move between panes?

  • cmd-shift-L sets focus to left pane
  • tab moves you through the panes (and also allows you to access the right pane, see Zotero).

The following require Zutilo, which allows extra key bindings (under Zutilo preferences, shortcuts):

  • Edit item info: Select the "Info" tab in the item pane.
  • Note: Not possible to navigate to note tab, without adding a note. That's not so bad, because "right arrow" in the middle pane opens the notes
  • Add tag: Select the "Tags" tab of the item pane. Open a textbox for creating a new tag.
  • Add related item: Select the "Related" tab of the item pane. Open the dialog for adding related items. - This opens the dialogue - but you can press escape to close it, and thus just see that tab.

I haven't tested this, but it may also possible to use this, suggested by aurimas here:

you can assign a keyboard shortcut to
      document.getElementById('zotero-view-tabbox').tabs.advanceSelectedTab(1,true);
to cycle through tabs (-1 if you want to cycle backwards)
and if you want to assign a shortcut to a specific tab use
    .selectedIndex = 0
instead of .advanceSelectedTab... where the number is the index of the tab (0 based)

There appears to be no command to switch to middle pane, but:

  • tab gets you there from the left pane
  • and esc gets you there from the right pane (also long as an item is selected for editing) (you can also shift-tab)

It would obviously be really nice if these were all built into the Zotero preferences, so that one could assign keyboard shortcuts very straight forwardly.

3.5 My Zotero forum posts

Many of my questions have been answered through the Zotero forum. In particular many many thanks to Dan Stillman and adamsmith, who have been very helpful, and make the forum very active and useful.

...There's many more now... :)

Also see /wishlist.

3.6 Google documents integration

Some initial attempts here: https://github.com/bjohas/google-docs-helper-menu

3.7 Switching between different quick copies

3.7.1 Zotero-native idea

Via Dan Stillman [4]:

var pref = 'export.quickCopy.setting';
var origSetting = Zotero.Prefs.get(pref);
var newSetting = 'bibliography=http://www.zotero.org/styles/chicago-author-date';
Zotero.Prefs.set(pref, newSetting);
ZoteroPane.copySelectedItemsToClipboard();
Zotero.Prefs.set(pref, origSetting);

To get other formats, change the value of newSetting. For example, for RIS it would be 'export=32d59d2d-b65a-4da4-b0a3-bdd3cfb979e7'. You can go to about:config via the Firefox address bar or the Advanced pane of the Zotero preferences and copy the value of extensions.zotero.export.quickCopy.setting after you change the setting in the prefs to get the appropriate value.

3.7.2 Zutilo: Alternative quickcopy formats

See above!

3.8 Zotero-styles

It's possible to develop new export styles (you'll need to know some XML). A simple way to experiment is to go to

Preferences > Cite > Styles > Style editor

You can select the style you want to build on in a dropdown at the top left.

3.9 Bulk edits

https://www.zotero.org/support/dev/client_coding/javascript_api#examplebatch_editing

4 Systematic reviews

https://forums.zotero.org/discussion/42245/zotero-and-systematic-reviews#latest

5 Zotero elsewhere

6 Thank you

Thank you Roy Rosenzweig Center for History and New Media at George Mason University for developing Zotero: "[The center] has used digital media and computer technology to democratize history—to incorporate multiple voices, reach diverse audiences, and encourage popular participation in presenting and preserving the past. The center itself is a democratic, collaborative space where over fifty scholars, developers, designers, and researchers work together to advance the state of the art."