Re: Quoting in InsetCommands
On Thu, Dec 06, 2001 at 10:34:48AM +0100, Jean-Marc Lasgouttes wrote: > > "John" == John Levon <[EMAIL PROTECTED]> writes: > > John> An unanswered question: is it OK to add code to quote '_' etc. > John> in InsetCommand::asLyXCommand() so the user doesn't have to ? > > Yes, but we should also make sure the reLyX unquotes it. To know which > characters have to be changed. Look at the code in paragraph.C which > does the output. Probably the same routine should be used in both > places, or insetindex should use an insettext internally. Automatic quoting has a tendency to fire back at some time... Andre' -- André Pönitz .. [EMAIL PROTECTED]
Re: Quoting in InsetCommands
> "John" == John Levon <[EMAIL PROTECTED]> writes: John> An unanswered question: is it OK to add code to quote '_' etc. John> in InsetCommand::asLyXCommand() so the user doesn't have to ? Yes, but we should also make sure the reLyX unquotes it. To know which characters have to be changed. Look at the code in paragraph.C which does the output. Probably the same routine should be used in both places, or insetindex should use an insettext internally. JMarc
Quoting in InsetCommands
An unanswered question: is it OK to add code to quote '_' etc. in InsetCommand::asLyXCommand() so the user doesn't have to ? I would like (for this purpose) to add LRegExp::replace(pattern, replacement) : regexp.replace("[^\\]_", "\\_"); What other chars need to be escaped ? thanks john -- "Faced with the prospect of rereading this book, I would rather have my brains ripped out by a plastic fork." - Charles Cooper on "Business at the Speed of Thought"