Bookends and Pages 2

A place for users to ask each other questions, make suggestions, and discuss Bookends.
RichTheOne
Posts: 4
Joined: Wed Mar 15, 2006 9:49 am

Post by RichTheOne »

When Pages 2.0 exports RTF it doesn't only skip the images, but also washes away all style definitions (while MS Word preserves all styles and images). Many scientific manuscripts are preformated with styles supplied and defined by the journals. This is why it's a pain to apply formating after the writing - it's normally in the style sheet already from the beginning. So in my opinion, the export-to-RTF solution doesn't work at all with Bookends (or EndNotes for that matter). :(
mihnat
Posts: 8
Joined: Fri Mar 03, 2006 4:46 pm

Post by mihnat »

I noticed that as well. I had a Public Health Service grant form and it lost some of the fomatting of the forms. YIKES! I sent another love letter to Pages.
:O)
Mike
RichTheOne
Posts: 4
Joined: Wed Mar 15, 2006 9:49 am

Post by RichTheOne »

Actually, I don't see why Jon has problems integrating Bookends with Pages 2. It's got the full AppleScript support these days.

Just to show you how easily it can be done, I wrote a few lines that scan through any Pages document (without RTF conversion or such) looking for typical reference tags. The script then replaces each occurance with a dummy number, formats it slightly, and dumps the ref tags on a separate page after the body text (to simulate the biography). I'm sure it's an easy task to finish up the rest in order to make it an integrated feature of Bookends, especially if you have access to the source code. Here's the sample AS code for free (requires the Satimage OSAX):

Code: Select all

tell application "Pages"
	set T to body text of document 1 as text
	set vRefs1 to find text "{" in T with all occurrences
	set vRefs2 to find text "}" in T with all occurrences
	
	set vRefs to {}
	set N to (count items of vRefs1)
	repeat with i from 1 to N
		set s1 to (matchPos of item i of vRefs1) + 1
		set s2 to (matchPos of item i of vRefs2) + 1
		set vRefs to vRefs & {characters s1 thru s2 of T as text}
	end repeat
	
	set vIx to 1
	repeat with vR in vRefs
		set vOff to offset of vR in (body text of document 1 as text)
		set vLen to (count characters of vR as text)
		select characters vOff thru (vOff + vLen - 1) of body text of document 1
		set superscript of (character vOff of body text of document 1) to true
		set color of (character vOff of body text of document 1) to {65535, 0, 0}
		set selection of document 1 to (vIx as text)
		set vIx to vIx + 1
	end repeat
	
	select last character of body text of document 1
	insert page break of body text of document 1
	set selection of document 1 to vRefs as text
end tell
Richard Bunk, Sweden, 2006
Jon
Site Admin
Posts: 10291
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Post by Jon »

Doing it via AppleScript is an interesting idea, but I don't know how well that would really work. There is a lot more to scanning a document than just collecting the citations. And simply setting text to a uniform style is hardly adequate for formatted citations or bibliography entries. Certainly, I'm not enough of an AS jockey to do all that would need to be done (if it can be done).

FWIW, in the next Bookends release Copy Citation will automatically paste into Pages 2 documents, which isn't a big deal to be sure, but it's something.

Jon
Sonny Software
RichTheOne
Posts: 4
Joined: Wed Mar 15, 2006 9:49 am

Post by RichTheOne »

Hi Jon,
My example AS code was only ment to show one possible pathway for simple and robust communication with Pages. The nice thing about using Apple Events is that it's transparent to most future changes in the internal architecture and formats of Pages. Also, I'm quite sure you will find AppleScript as least as easy as I did a few hours ago when I started to use it.

Just don't misunderstand me regarding my respect for your wonderful work with Bookends. I know you make a h*ll lot more of a good job than I just displayed in my example above, and we all know that Bookends is much more than just collecting a few citations. I only wanted to show you how the problem you were stuck with could (in principle) be circumvented. Good luck Jon, and thanks for your comments on my message.
/Richard
Jon
Site Admin
Posts: 10291
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Post by Jon »

Thanks Richard. It's certainly an interesting idea and food for thought. You didn't happen to set a "set selection" option with styled text, did you? :-)

Jon
Sonny Software
RichTheOne
Posts: 4
Joined: Wed Mar 15, 2006 9:49 am

Post by RichTheOne »

Hi Jon!
No, I don't know how to declare a variable as styled text in AppleScript. Do you have a clue?

Also, it seems like the only property of the selection-object that's implemented so far is the contents, which is of plain text type. But I'm really not an AppleScript-jock myself, and don't know enough about its class-definitions and -type casting (yet). I did find out however that you can list all properties of the selection with a command like properties of selection of document 1, which should mean that Apple is planning to implement them (or maybe I just don't get how it's done). This shouldn't stop anyone from scripting styled text in Pages though, since all the necessary props are available for the Pages text suite.
/Richard
hombre
Posts: 5
Joined: Tue Mar 29, 2005 11:47 am

Post by hombre »

Jon wrote:Thanks Richard. It's certainly an interesting idea and food for thought. You didn't happen to set a "set selection" option with styled text, did you? :-)
The only thing I can say is, that Pages 2 is extremely srciptable. As I can see it, the "Pages Text Suite" lets you set every styling you desire to any given text.
san
Posts: 9
Joined: Thu Jun 16, 2005 7:37 pm
Location: New Mexico

NIH grants

Post by san »

The new electronic grant submission system from NIH does away with the old forms (which were in Word format), and REQUIRES that text be saved without headers, footers, etc.

It seems to me that this is a perfect time for all of us grant writers to finally dump Word and switch to Pages - which has better support for graphics.

The only hold up is the lack of a bibliography tool like Bookends.[/i]
mihnat
Posts: 8
Joined: Fri Mar 03, 2006 4:46 pm

Post by mihnat »

Agreed! JON- if there is anything we do (other than what we have already done) to help get a patch for Pages please let us know.
:O)
Mike
Jon
Site Admin
Posts: 10291
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Post by Jon »

Hi Mike,

The "quick fix" for everyone would be if Pages had decent RTF output (then both Bookends and EndNote would work with it).

Jon
Sonny Software
mihnat
Posts: 8
Joined: Fri Mar 03, 2006 4:46 pm

Post by mihnat »

I think that Apple has at least 4 requests for that from me. The RTF it produces is CRAZY!
:O)
Mike
dspedersen
Posts: 60
Joined: Sun Jun 25, 2006 12:25 pm

Post by dspedersen »

My not-so-elegant solution to this is to live with Word, and after I have finalized my manuscripts and scanned them with BE, I copy all text into Pages 2 to handle the layout. However, you need to be sure you don't need to do any other changes to the text, or handle the citations manually.

But I will keep on dreaming about a smooth BE integration with Pages. :)
mgiddings
Posts: 2
Joined: Thu Jun 23, 2005 1:54 pm
Contact:

Post by mgiddings »

I will chime in too: I would buy Bookends immediately (and for several people in my lab, too), if there was seamless Pages integration. However, since I'm stuck right now having to go back to MS Word in order to do my citations, there is no big impetus for me to switch from Endnote (my lab has 5 Endnote licenses).

FYI - my typical procedure is:
1. Write the grant/manuscript in Pages
2. Export to Word, to insert bibliography using Endnote
3. Import back to Pages, fix all the stuff Word screwed up

Sometimes I skip #3, and just fix directly in Word. However, for grant applications with a lot of figures, Word can be a nightmare.

BTW - Who is the contact at Apple that I can email about better RTF support for Pages?
Jon
Site Admin
Posts: 10291
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Post by Jon »

mgiddings wrote:BTW - Who is the contact at Apple that I can email about better RTF support for Pages?
You can try

http://www.apple.com/feedback/

Jon
Sonny Software
Post Reply