[OS X TeX] grep with TexShop

Bob Kerstetter bkerstetter at mac.com
Fri Aug 26 08:30:08 CEST 2005


Hello,

On Aug 25, 2005, at 4:49 PM, Jean-Pierre Gattuso wrote:

> Hi:
>
> I do not understand how grep works in the TexShop find window.
>
> For example, I want to remove all carriage returns in a paragraph.  
> The search string is "\t" the replace string is " ". I check the  
> box "regular expression", search syntax is "grep", escape character  
> is "\" and scope is "selection".
>
> This is more or less what I do with BBEdit. With TexShop, the  
> sequence above finds "r". How do I use the grep capabilities to  
> find invisible characters such as carriage return, tab etc..?

There are several varieties of regular expressions in the TeXShop  
find and replace. It actually uses the OgreKit framework. I use the  
Perl variety because that's what I more or less know. To find line  
ends use  \r or \n. To find tabs, use \t. Make sure you check the  
"Regular Expression" box. You may also need to use the "More Options"  
button to set default ways you want to search. Is this what you needed?


Bob Kerstetter
http://homepage.mac.com/bkerstetter/



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