On Sun, Jun 11, 2017 at 07:23:45PM +0200, Jürgen Spitzmüller wrote: > Am Sonntag, den 11.06.2017, 18:32 +0200 schrieb Enrico Forestieri: > > I don't think that listings is less advanced in code highlighting. > > The advantage of minted is that it is less sensitive to the encoding. > > All workarounds adopted for listings are not necessary for minted. > > I also like better the way a listing is typeset, but this is a > > personal preference. So, I would not qualify listings as less > > advanced > > than minted. However, a label saying "Different code highlighting" > > is not any more informative than "Use minted". > > In that case I think I'd prefer a combo box "Code highlighting package: > Listings|Minted" or somesuch.
I tried to be minimalist in the changes, but if Scott agrees I could also do that. This could delay trasnslations, though, as my spare time is running out. > "Use minted" is one of these LaTeXisms we want to avoid in the UI. Maybe that is why pure LaTeX users don't love LyX? ;-) > What happens if you check "Use minted" outside LaTeX BTW? I don't understand the question. But if you mean what changes in the UI other than the LaTeX output, the answer is that in some dialogs (listings and child documents) some options are disabled and in the advanced settings tab the recognized options change. > > > And LyX should add the -shell-escape flag for > > > minted documents (but warn the user before issuing it). > > > > Hmm... I think you are opening a pandora's box. Maybe we could add > > a toolbar button for doing that, so that the user has to > > intentionally > > do something for getting the -shell-escape flag. > > As I said, I propose that the user has to explicitly acknowledge a > warning message (with "Do not show again for this document" checkbox) > before the document is processed. Remember that we now have the needsauth (or whatever it is called) option now, so that we could also exploit it. > I find it much more dangerous to encourage the user to set the flag > generally, since this might bite him with other documents quite > horribly. It could be a one-shot use. The flag is reset after each latex run. > The problem of both these things is that users get an error message > they might not understand if they try minted. I think that minted does a good job here. This is the error you get: ! Package minted Error: You must invoke LaTeX with the -shell-escape flag. See the minted package documentation for explanation. Type H <return> for immediate help. -- Enrico