On Fri, May 15, 2009 at 4:22 PM, Jürgen Spitzmüller <sp...@lyx.org> wrote: >> not have all these lang changes. Or the paste could cause some >> question to the user about "intentionally changing the language." >> These things are killing me because they show up in ERT and NoWeb >> documents fail. > > You are mixing two things. Of course, there should be no language markup > within ERT and Listings. If there is, this is a bug, and we will try to fix > it.
Pressing Ctrl-L to convert text to ERT preserves markup n LyX 16.3svn, this is easy to test: 1) enter ABC 2) Select B and press Cntl-b (bold) 3) select ABC and press Cntl -L 4) Note that B is still bold. I also consider it strange that the language can change within a word. In my case \selectlanguage{american} etc. has popped up up a number of times, and in all cases the LaTeX I want is exactly the LaTeX that results when I remove \selectlanguage{[^}]*}. > However, if I copy a French sentence into an English document, I see no reason > whatsoever to make the sentence English. French is French and not English, > after all. Resetting the language would be a bug, IMHO. In my case my documents are pure English, but I might: 1) Copy an acronym (or character) from a French document (unlikely) 2) Copy text from English US to English UK -- IMHO An English UK word in an English US document is actually just a poorly spelt US English word. Actually it is likely to even be a correctly spelt English US word. In principle I may be submitting a document to an organization that requires that all text be in Language X (and only language X), in which case any LyX document I submit that contains language markup is wrong, just as if I had included a Chapter in an article. More likely, the receiving institution really wouldn't care whether I use British or American English, so long as I am consistent. So in this case hard-coding either British or American English would be fine, but allowing both is again in some sense incorrect. I note that LyX automatically removes \Chapter when pasting to an article. IMHO it also makes perfect sense to also remove "\selectlanguage{british}" "\selectlanguage{american}" etc. when pasting to a monolingual document. Perhaps all documents could start in a "defacto monolingual" state, and when the first \selectlanguage would be inserted the user could be asked whether they want a "monolingual" document or "multilingual" document. If we were to get fancy we could have documents where german/british are allowed but not american. -- John C. McCabe-Dansted PhD Student University of Western Australia