I have some difficulty in writing a MWE. Could someone explain please how to write and format a MWE on here?

Many thanks

  • 4
    Basically, I need to be able to copy and paste your code in an editor, compile it (with f.e. pdflatex) and reproduce the problem. No need to fetch more files, to add packages, to do strange things in my configuration. And the code must be the smallest you can manage to show the error.
    – Rmano
    Apr 4, 2016 at 20:00
  • 10
  • To echo and add some clarity to @Rmano's comment: don't pull your hair out trying to make it as small as humanly possible – you could spend hours doing this. As long as you've removed the majority of your document and unrelated packages, I would personally be happy :-) The basic idea is to spend 5–15 minutes asking your question so each of us don't have to spend the same 5–15 minutes preparing to try and answer it. If five people try to answer your question, your five minutes could mean an hour's worth of saved time. Apr 4, 2016 at 20:46
  • 1
    @SeanAllred I think in some cases it would take more than 5-15 minutes either because the code is complex or because the user hasn't done this much before. I'd be very lucky to construct a usable MWE in 15 minutes, let alone 5. What I mean is: somebody shouldn't think they are doing it wrong or missing some expert shortcut or whatever if it takes longer. Or maybe they are and you would be so kind as to share the secret with me?!
    – cfr
    Apr 5, 2016 at 2:11
  • @cfr I guess my documents simply haven't been as complex as yours :) 5–15 minutes is my general experience for my earlier questions on this site, but I can see it taking longer if the document is particularly spaghettified. Apr 5, 2016 at 2:45
  • 1
    Thank you very much indeed - I have been pulling my hair out over this trivial (...) problem. It makes sense at last. As an author migrating from Adobe Indesign to Latex it's good to know there's a lifejacket around! I write and, haven't much of a clue of the inner workings of computers or programming. So, it's good to know there's humans around willing to give their time to bung the lifejacket to me from time to time. Cheers!
    – Mike
    Apr 5, 2016 at 9:56


Browse other questions tagged .