texmacs-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Texmacs-dev] Improved algorithm for automatic quotes?


From: Norbert Nemec
Subject: [Texmacs-dev] Improved algorithm for automatic quotes?
Date: Sun, 5 Dec 2004 20:25:43 +0100
User-agent: KMail/1.7.1

Hi there,

after using the feature of automatic quotation marks (opening vs. closing) for 
some time now, I find, that it does not work perfectly yet:

* at the beginning of a line or right after an opening parenthesis, I would 
expect an opening quote, but get a closing quote instead

* entering a quote in the middle of a line, autoquote don't seem to work at 
all. To enter closing quotes, you have to do something like inserting a line 
break and then remove it again.

My suggestion for a more powerful algorithm would be
* only check one character preceding the entered quote
* if you are at the beginning of a paragraph: opening quotes
* if you find space, tab, '(', '[', '{' -> opening quotes
* otherwise -> closing quotes
(the handling of markup will have to considered as well. Probably "reading 
back one character" should just step over certain markup elements but 
consider others similar to paragraph breaks.)

This should cover more than 99% of the cases, and in other cases, you can 
simply work around it by typing one letter or one space and deleting it 
afterwards. (Currently, workarounds are rather unhandy...)

Thanks,
Norbert


-- 
_________________________________________Norbert Nemec
         Bernhardstr. 2 ... D-93053 Regensburg
     Tel: 0941 - 2009638 ... Mobil: 0179 - 7475199
           eMail: <address@hidden>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]