NISUS Archives

January 2011

NISUS@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Reply To:
Date:
Thu, 13 Jan 2011 20:00:23 +0900
Content-Type:
text/plain
Parts/Attachments:
text/plain (38 lines)
On 2011-01-13 +0900 (JST), at 6:04 AM, Ed Wall wrote:

> I would like, somewhat as in Microsoft Word, to link a pdf to a particular word in a text. Thus, when asked for the link address in Nisus I put in the usual file:// business. However, when I click on the link it opens the directory in which the file is located, highlights the file, but doesn't launch it.

OS X used to work like MS Word but Apple changed the behaviour in Leopard or in Snow Leopard (I don't remember well) presumably for a security reason. Similarlily 'open -a Terminal script.sh' does not run the script anymore.

> This is better than nothing I suppose, but is this all there is for files or do I need to do something additional?

It is a bit tedious, but you can let the default application for the file type open a linked file by running the macro below with the insertion point somewhere in a link.
<http://www2.odn.ne.jp/alt-quinon/files/NWPro/link/OpenLinkedFile_20110113_nwm.zip>

### OpenLinkedFile ###

# This macro misbehaves for urls containing escaped chars (e.g. %20 instead of a space).

$sel = TextSelection.active
$attr = $sel.text.displayAttributesAtIndex $sel.location
if Defined $attr.link
	Open URL $attr.link
	# open file with a default app for the file type
	# this comand works in a way similar to /usr/bin/open
else
	exit 'No url link in the selection, exiting...'
end

### end of macro ###


I uploaded two other macros related to hyperlink.
<http://www2.odn.ne.jp/alt-quinon/files/NWPro/link/ApplyHyperlinkStyle_20110113_nwm.zip>
which adds 'Hyperlink' character style defined in the macro file to the frontmost document and applies it on all links in it.

<http://www2.odn.ne.jp/alt-quinon/files/NWPro/link/Link2LocalFile_20110113_nwm.zip>
which makes it easy to insert a link to a local file.


Kino

ATOM RSS1 RSS2