[OS X TeX] New TeXShop macro: "Insert reference"

Will Robertson will at guerilla.net.au
Sat Aug 21 02:03:42 EDT 2004


On 21 Aug 2004, at 7:13 AM, Josep M.Font wrote:

> It worked as expected except for two things, where it "failed" 
> consistently:

This is what I was scared of :)
I don't know the UNIX commands that I'm using especially well, so what 
I did was clearly not robust enough.

> - Before the list of real labels the script also presented as such 
> some lines of code from my preamble, like "\usepackage{pdfsync" and 
> "\def\quotedfrom ... [long]". ???

Hmmm. That's strange. I split my preambles out into .sty files, 
usually, so my (brief) tests wouldn't have picked up anything like 
this. Let's see.

The first thing the script does is find every line with the text 
"\label" in it. Do you have this anywhere in your preamble?

Can you go to the Terminal and tell me the output of:
    grep -h '\\label' document.tex
(Changing document.tex to the appropriate file path)

That puzzles me a little.

> - When you highlight some text and then select the script (great 
> idea!), if it does not find any label containing the highlighted text, 
> then all what one gets is an "AppleScript Runner" error telling you 
> that TeXShop encountered a type 1 error. I hope there is a way of 
> poping up the proper message.

I didn't check that, oops!
I see what you mean - I've put some error catching code in, but it 
isn't very efficient coz Applescript seems to be a bit weird today (?). 
I don't think its too slow, though.

Thanks for the feedback!

Will

--------------------- 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 MacOSX-TeX mailing list