@lyx developers,

i'd look at doing this fix myself, but i'm on a dialup line, paying for 
each minute online, and the lyx tarball is 5M+.

For the Qt interface, it seems it would be trivial to fix the Index Item 
entry dialog to automatically escape any illegal characters, like "_". 

QString::replace("_","\\_") should do the trick, and would be trivial to 
add to the slot which handles the OK button (though i don't know if 
that slot has access to the string itself).

Alternately, instead of automatic escaping, a warning dialog explaining 
that the entry contains some illegal char(s) would be acceptable, and 
could be done using Qt::QRegExp with little effort.

For non-Qt interfaces, std::string's replace() could be used, though it 
requires more work than Qt::String. (But i have no idea if lyx uses the 
STL.)

The fact that the dialog allows one to enter invalid data has caused me 
NO END of grief. Adding a single underscore to one index entry causes 
errors in completely unrelated parts of the doc when exporting, and 
tracking down the problem is really difficult (as is shown by my 
frustrated posts on the topic), especially since Idx entries aren't 
visible until clicked on (maybe an Expand/View Index Entries option, 
like the one for Footnotes, is feasible?). IMO a dialog box should not 
allow you to enter data which is itself illegal for the program the 
dialog is serving, especially when it *silently* does so.



-- 
----- [EMAIL PROTECTED]   http://s11n.net
"...pleasure is a grace and is not obedient to the commands
of the will." -- Alan W. Watts

Reply via email to