Martin Vermeer wrote:
On Mon, 22 Oct 2007 23:33:32 +0200
Dov Feldstern <[EMAIL PROTECTED]> wrote:

This thread is about a separate problem, which is due to Martin's change in r21121. I have described above what the problem is, and provided a sample file with both the incorrect output, and correct output (after reverting the change).

This problem still exists as of latest trunk (r21127) --- it's a totally separate issue from Abdel's changes.

Dov


Thanks Dov... attached a patch that produces the proper LaTeX code for
your test file (though I cannot compile it, not having Hebrew fonts
installed). Please test it with this and other docs.


Martin, this (together with the encoding, as done in r21153) fixes the problems I was having, thanks!

However, I'm still not sure this is really what we want to be doing: should verbatim really mean that we want the contents to be output to *LaTeX* verbatim? Or should it mean that we want the contents to be output in a \verbatim (or \verbatim-like) environment, to allow multiple spaces or special characters, for example? These are two different things, and I think that what we really want as a generalized environment is the latter behavior, not the former. r21153 goes a little more in the direction of the former. However, is there any other place besides CERT where that kind of verbatim is really needed?

I see that it's used in the URL custom inset. However, there are some problems with this inset, I find: for example, you can't type two consecutive spaces in this inset (in true verbatim I think you should be able to, in ERT you are); secondly, try to mark some of the text of the url as emph (using plain ctrl-e, not a charstyle), or insert a footnote within the url (or change the language, which is how I discovered this problem in the first place). Is the result what the user expects? I don't think so. And it's certainly not what he sees on the screen... One possible solution might be to disable most LFUNs inside a "verbatim" inset, similarly to how it's done in ERT --- but how do you know exactly which LFUNs to disable? For example, in the Listings inset (which has many of its own problems), we *do* want to allow the insertion of a caption, but not other kinds of insets. Maybe "verbatim" is just not the kind of thing which should be happening at the layout level, but rather in the actual code...? Maybe there should be a InsetVerbatim class which gives the basic verbatim behavior, and then insets can override it at will.

But anyhow, IMO both r21153 and r21121 should be reverted. I think it's best that we leave ERT out of this, at least for now. I don't really see what we gain by making it use the "verbatim" layout --- the code being replaced in r21121 is well encapsulated, I don't think that making it use a more general mechanism gives us anything. And besides, ERT is a very special case, and I think that involving it in something more generalized is just asking for trouble...

Beyond that, it seems like the "verbatim" layout itself --- or its use in custom insets --- requires more thought and/or work. Perhaps collecting a few examples of where it would be useful (URL, Listings, ...) can help figuring out how it should work...

I _hope_ the encoding problem was the only one remaining... can you say
'spaghetti'?
It wasn't so bad in the end, was it? ;)

Dov

- Martin


Reply via email to