[OS X TeX] line breaks \n vs. \r ???
Steffen Wolfrum
mactex_aa at st.estfiles.de
Mon Dec 17 20:51:02 CET 2007
Am 17.12.2007 um 19:52 schrieb Maarten Sneep:
>
> On 17 dec 2007, at 18:36, Aaron Jackson wrote:
>
>> On Dec 17, 2007, at 12:05 PM, Steffen Wolfrum wrote:
>>
>>> Hi,
>>>
>>> when editing in TextWrangler a line break is found when using
>>> Grep and search for \r.
>>> In TeXShop a line break is found when using Regular Expressions
>>> and searching for \n: \r gives no result!
>>>
>>> Now, I thought there are "More Options" ... "Serach syntax" can
>>> be changed.
>>> But when I change here also to "Grep" then \r doesn't find line-
>>> breaks but the letter r !!
>>>
>>> Is this a bug in TeXShop 2.14 ?
>>
>> Not a bug. In Mac text files lines end in \r. In Unix text files
>> lines end in \n. In windows text files lines end in \r\n.
>> TextWrangler must save files in mac format while TeXShop saves
>> them in Unix format. You can do a search for (\r(\n)?|\n) and
>> that will find end of lines in all of the text file types.
>
> Not quite: TextWrangler (and BBedit) will use \r for a linebreak,
> no matter what the file is set to use when saving.
Right, that's exactly the problem! As I need to perform the same
regex search/replace actions sometimes with TextWrangler, sometimes
with TeXShop I need to have the same syntax, i.e. line- ending syntax.
Just, how do I gap the distance between TS's UNIX and TW's Mac format ?
Steffen
More information about the macostex-archives
mailing list