Friday, November 25, 2011

Applescript and iWork09 - Next Project

I plan to write a script that grabs headers and applies formatting to them. This will also be useful for exporting Pages documents to TeX files for use with xelatex (or some other derivative of TeX).

Saturday, November 12, 2011

Using BibDesk and iWork Pages

Step 1: First you need to unzip the CiteInPages (I am using version 1.04) and follow the instructions in the resulting folder 'CiteInPages104' called 'CiteInPages ReadMe v104.txt'.  Install hint: use key combination shift+command+g to jump to the folder where the files need to be installed.

Step 2: Create a BibDesk database and add some entries. It is quite self-explanatory. Don't forget to setup the citation dragging capability. Just follow the instruction in the 'CiteInPages ReadMe v104.txt' starting at the line: "If you wish to be able to drag formatted in text citations from BibDesk and drop them into Pages documents, you will need to set up a the citation template in BibDesk. This
capability is optional but convenient to have."

Step 3: Open Pages and save a new document (for example, test.pages).

Step 4: Have your Pages window and BibDesk window aligned on the desktop so that you can see both programs. Simply drag your citations over from BibDesk to the Pages document as seen in the picture below. When you release the mouse button, what is called a "cite-key" will be entered into your document. These will be replaced later by a script.
Step 5: When you are ready to process your document, you can open the folder 'CiteInPages104' where the scripts are located. I work in linguistics, therefore I mostly use the author-date formatted citations. Select the script 'CiteInPages author-date.scpt' and run it. Applescript will open. Simply run the script, ensuring that the last pages window touched was the one with the citations. Assuming your original file was called 'test.pages', the result will be a new pages document called 'test-bib.pages'.

Why is this great and better than using TeXShop? That is naturally debatable, but I find that having the bibliography in a word processor allows for flexible editing of the bibliographies' appearance. It also relies on Applescript, which is robust and customizable.

First Post - iWork Pages vs TexShop vs Microsoft Word

I plan to write this blog as I go and hopefully organize my thoughts and as a side benefit I can hopefully help someone else who happens to have the same ideas/questions/problems.

I will not dwell on the details about my choice, but here is a summary:
Summary
In the coming months I will begin my Master's Thesis using the program Pages from the iWork Suite. A year ago, I began experimenting with TexShop and latex. I have found that this is a great way to write long documents if you are comfortable writing computer code. It is also frustrating, as a linguist, when I want to simply drag and drop characters from the Mac OS X character palette to TexShop and it does not work (despite using UTF-8 as the format).
Microsoft Word is a pig. Its great and terrible simultaneously. It can do everything, but that also gets in the way. It can be quite difficult to solve problems. It can be slow.
iWork Pages, on the other hand, is lighter and faster. I have heard that it is slow when writing large documents (+3000 pages), but I have also read of people writing books (happily) with Pages. My experience with Pages is good (except for Table of Contents formatting--academic style). I particularly like have an absolute point of origin on the top-left corner of the page (0,0) for the ruler, unlike Microsoft Office's relative ruler. Its better for page layout. The quickly accessible style selector is great and the ability to have the program window slim and sleek is great.

Startup Setup
There are three things I am starting out with. iWork is not free, but the BibDesk and CiteInPages are free.

iWork Pages 09' <www.apple.com>
BibDesk <http://bibdesk.sourceforge.net/>
CiteInPages <http://jhh.med.virginia.edu/main/CiteInPages>

Step 1: Start BibDesk and save a new bibliography database. Mine is called 'bibliography_master.bib'. Keep everything in there. Make sure so keep this file safe and remember where you save it.