[OS X TeX] Tabular/array macros
Jérôme Laurens
jerome.laurens at u-bourgogne.fr
Sat Nov 6 10:56:56 CET 2004
Le 6 nov. 04, à 06:18, Will Robertson a écrit :
> Hi Jérôme,
>
> I've come back to my applescript project briefly, but I've run into
> trouble again. You kindly fixed the following applescript behaviour:
>
>> tell application "iTeXMac" to edit "the/full/path" at line nnn
>
> But as it turns out, this is not what I wanted, because it doesn't
> select the line, it only highlights it. The selection remains where it
> was. (In this case, perhaps "edit" is not a very good name for the
> command.)
This is the only one I could find, this was opposed to view.
This is intentional non preemptive behaviour
>
> So looking back in the dictionary, I find iTeXMac has a "select"
> command, but it too is broken, as far as I can tell:
>
> tell application "iTeXMac"
> tell the text of the front document
> --select character 7
> --select word 7
> select paragraph 7
> end tell
> end tell
>
> The three select commands do the exact same thing: select the 7th
> -character- of the document text. Not very useful for my purposes.
>
> Is there anything that can be done to fix this before iTM 2?
>
>
There are applescript examples in the iTM distribution, it is told that
iTM does not support word nor paragraph selection. AFAIR, this is
intentional because those objects do refer to pure attributed text and
not source code. Something different must be elaborated in order to be
consistent.
Unfortunately, the select example given was targeted to iTM1.2 and is
broken in iTM 1.3 because newly created document are no longer writable
unless they are saved once. BTW, the correct syntax might be
select the text of the front document at location (before character NN)
(or after...)
tell the text of the front document to select (characters 1 through
1000)
This implementation is not entirely satisfying because it mixes
attributed text and source code.
It is the price to pay when using cocoa as is.
--------------------- Info ---------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
& FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>
More information about the macostex-archives
mailing list