[OS X TeX] Customize brackets/braces/parens/delimiters TexShop matching

Herbert Schulz herbs at wideopenwest.com
Mon Feb 12 03:01:24 EST 2018


> On Feb 11, 2018, at 9:01 PM, Richard Koch <koch at uoregon.edu> wrote:
> 
> Juan Avevedo.
> 
> You'll pardon my somewhat grumpy response. Last night I saw Parsifal at the Met in New York City.
> The (glorious) opera started at 7:00 pm and ended at 1:00 am. I got back to my hotel at 1:30 am,
> got up at 6:00 to go to the airport, and just flew completely across the United States.
> 
> I'm looking at the sentence suggesting that TeXShop pair quotation marks, saying "I reckon that in this
> case there shouldn't be a problem with the pairing. It's just a matter of telling TeXShop to recognize them as 
> additional delimiters."

Howdy,

Sorry for that glib comment.

> 
> Have you thought this through? I could just add " to the list for <. Then you could only click on the left
> quotation. If I did that, lots of people would file a bug report. Maybe I should search both left and right. 
> Then I couldn't add to existing code; I'd have to write all new code. 
> 

I actually misinterpreted the quotes. They were real left (“) and right (”) double quotes rather than the old " ASCII double quote so there is no confusion.

I don't think they should be added to the matching pair list only because they (and the «, » pair) may depend upon the particular encoding: in this case it was UTF-8. I think the best thing is to avoid the problem with a Key Binding which anyone can do for the way they do things. Then if they need a single opening « or “ they can also create a simple Macro that inserts the single delimiter. PS: I have a Key Binding " -> ``#SEL##INS#'' (that's the ASCII ") and Key Bindings are smart enough that \" will NOT expand the ".

> Maybe TeXShop  should search backward, making sure that there are an odd number of 
> quotation marks earlier (the match and then lots of pairs). If that
> failed, maybe it should search forward, with the same logic. Suddenly you are telling me that to find a simple
> match, I should search backward and forward through what could be a 1000 pages of source code for a book.
> Then people would complain that TeXShop is no longer responsive..

I think it gets really complicated since you could also have things like \" or \verb|"| which creates a mess just like with $.

> 
> You don't have to be a programmer think about such issues. Just tell me what to do in English, but make sure
> you have considered every possible case and worried about performance issues.
> 
> 
> Dick
> 
> 
> 
>> On Feb 11, 2018, at 1:32 PM, Juan Acevedo <juan.acevedo at gmx.net> wrote:
>> 
>> Thanks Herb. 
>> 
>> I’m using XeLaTeX, inputing directly «guillemets» and double “quotation marks”. I reckon that in this case there shouldn’t be a problem with the pairing as with $$ and others. It’s just a matter of telling TeXShop to recognize them as additional delimiters, to make them “active” for the editor, so to say. Any one here knows how to do that? I’ve been looking at the TeXSop package content folders… but no luck so far.
>> 
>> Cheers,
>> J


Good Luck,

Herb Schulz
(herbs at wideopenwest dot com)





More information about the MacOSX-TeX mailing list