Andrew Parsloe wrote: > I reported a problem about importing underlined text on the users' list a > week or so ago without getting a bite. In LyX 2.0 in the View Source > window, underline is shown as \uline{text}, whereas \underbar{text} was > used in LyX 1.6. If the document is exported as Latex (from LyX 2.0) > \uline{text} is how it appears in the Latex document. If this Latex > document is now imported into LyX, the underline is treated as ERT and not > interpreted as underlined text.
this is kind of regression, indeed. the \underbar -> \uline was fileformat change. i'm not sure tex2lyx is finally able to cope with newer fileformat changes with last help from Georg. add this problem to bugzilla please. pavel > I poked around in the source code and found in text.cpp in the tex2lyx > folder this code: > > else if (t.cs() == "underbar") { > // Do NOT handle \underline. > // \underbar cuts through y, g, q, p etc., > // \underline does not. > context.check_layout(os); > os << "\n\\bar under\n"; > parse_text_snippet(p, os, FLAG_ITEM, outer, context); > context.check_layout(os); > os << "\n\\bar default\n"; > > Because of the "underbar" here, I wondered if the Latex document would > import correctly to LyX 2.0 if \uline{text} were replaced by > \underbar{text}. I changed the document in a text editor and it does import > correctly. > > Either LyX 2.0 should export \underbar{text} or, what I imagine may have > happened, "underbar" in this piece of code has been overlooked and should > be "uline". However, I haven't the means to check this. > > Andrew