>I don't understand why the minus sign "-" isn't properly converted by latex. >Is there a way to correct this without escaping to latex, as you suggested?
This does not happen with program listings when I try. The "--" construct becomes a long dash only in plain text, not in listings. There are several ways of writing program code in LyX: * Listings inset: "Insert->Program Listing" You get a box where you can write program code, where minus signs will be left alone. Even when there are several in a row. Right-click the box to get settings where you can change the font and even turn on advanced features like syntax highlighting for the programming language you use. * Using the program source files directly: "Insert->File->Child document" Set "include type" to "program listing" Basically the same setup as the above mentioned inset, but it refers directly to the source file. So docs and source never get out of sync, because they are the same! You can specify from/to lines, if you don't want to print the entire source file. * Using the paragraph type "LyX code". This is more limited, you get the typewriter font and no options for syntax highlightling. * Using the text style "code", provided by the "logical markup" module This one seems to merge minus signs, so try the listings inset instead. May be useful for code in languages that doesn't have "--". Helge Hafting Helge Hafting
