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

Matthew Hills hills_tex at tina.stanford.edu
Mon Aug 23 13:43:07 EDT 2004

On Aug 23, 2004, at 9:51 AM, Josep M.Font wrote:
> Then I tried other files. To my surprise, in some of them it only 
> found the *last* of the many \label commands. The only peculiarity I 
> cazn think of in these files is that they are old Textures files, 
> saved with Mac line endings and MacRoman text code (I suppose). In 
> still other files, it works correctly. Sorry for giving troubles to 
> you.

Try converting:

> set find_label_lines to ("grep -h '\\\\label' " & searchtexfiles) as 
> string


> set find_label_lines to ("cat " & searchtextfiles & " | tr '\\r' '\\n' 
>  | grep '\\\\label' " & searchtexfiles) as string

This will take care of both Mac and PC-encoded files, without harming 
the unix-encoded


--------------------- 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