22

When providing an MWE for questions, I usually use \documentclass{article}. Might there be a more "minimal" class or template which would be better to use?

| |
22

Generally, no. The minimal document class is simply too minimal, and shouldn't be used. Of course if your question involves chapters you would need to use a class like report or book that support chapters. So article is an excellent choice for almost all minimal examples.

| |
23

The best one to use, in my opinion, is the one that the person asking the question is actually using. For example, if you are using memoir, it may interact with some other packages in a different way than book or article and the answer provided using article may not be working for memoir. A MWE should be obtained by removing as much content from the actual work-in-progress file as possible while demonstrating the problem to be solved.

| |
  • 1
    Actually, this is exactly a reason why one should use article in the MWE, to pinpoint the problems arising by using another class. If the problem vanishes by using article, ask a question that highlights that the bug especially appears with the other class. – Turion Mar 28 '14 at 14:27
6

In my opinion, standalone is a good choice if the example consists of a separate formula or picture to be typeset. This simplifies including the result into the answer, because then the PDF contains only the relevant parts and does not need to be cropped anymore.

| |
  • 7
    I think that standalone should be avoided for this purpose, especially for answers, since it introduces a class that is not likely to be helpful to the questioner and may in fact confuse them, depending on their knowledge. – Alan Munn Mar 29 '12 at 12:22
  • 3
    @AlanMunn: I didn't know how to typeset material tightly until I learned about the standalone package by accident. So I'd rather question that it is "not likely to be helpful". I agree about the confusion, but the most natural thing in this forum would be to ask a question and/or to link to this question if confusion arises. – krlmlr Mar 29 '12 at 19:01
  • 2
    At least on Windows, I use Irfanview for tightly cropping from the TeXworks viewer. Alt-PrintScreen to capture the viewer window, switch to Irfanview, Ctrl-V to paste the image, drag a box around the content, Ctrl-Y to crop to the box, Ctrl-Shift-Y to autocrop the new image, save, and post. – Mike Renfro Apr 5 '12 at 15:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .