19

Question

Is there a class of *TeX problem where we can readily recognize that MWEs are not really helpful or necessary — so that we can avoid putting people off by asking them for one?

  • If so, how can we recognize them?

  • Or: are we generally convinced that essentially any problem involving not getting the desired output should be accompanied by an MWE, regardless of how simple the problem or clear the description?

Context

I was just looking at the question Text mode commands/symbols in math mode, which seemed reasonably clear to me:

I am fairly new to LaTeX, and have run into a problem with commands apparently only available in text mode, where I would like to use them in math mode as well (e.g. integrated in equations).

One of the commands/symbols in question is the upside down exclamation sign used to represent the subfactorial function. In running text, I can use the command \textexclamdown, but this does not work in math mode (as far as I can tell).

Is there a way to seamlessly integrate text mode commands in the middle of rather hairy equations?

Soon afterwards, a boilerplate comment was added: "Welcome to TeX.SE! Could you provide a minimal example that allows us to reproduce the problem?"

It's not really clear to me how a MWE would have illustrated the situation. Often, people ask us very poorly worded questions, or present us with complicated problems. But in certain instances such as this, the problem is very simple and quite clearly written. Asking them to make a mock-up document — augmenting their already fairly clear question with the string of characters $\textexclamdown$ — doesn't really seem very helpful to anyone. (Maybe if we convinced them to post a graphic of what they got as output, this would be an interesting bit of trivia for people who look in on the question, but it still wouldn't give any further information as to what the problem or the solution is.)

A similar case would be someone who was only taught the old font switches \bf and \it, and who would come to ask why combining the two doesn't produce a result which is both bold and italic. If I were a novice, someone who asked me to "clarify" by providing an example along the lines of {\bf\it not actually bold italic}, or (god forbid)

\documentclass{article}
\begin{document}
{\bf\it not actually bold italic}
\end{document}

would make me feel as though bureaucracy were more important than clarity to the people I was asking, and that would put me off participating very much. What's more, anyone who could provide an answer wouldn't really need such a MWE, because the real issue (that they're using deprecated syntax) is clear just from the fact that they're using \bf and \it.

I think that there is going to be a class of question which will get asked here routinely, which is of this sort. If we want people to participate in this forum, recognizing when a question doesn't need any clarification or elaboration would be a good step in maintaining good participation, by avoiding small mis-steps which might alienate new users (either of *TeX or of this site).

  • 12
    Certainly a MWE is not always needed: the text for asking for one is meant to be a building block to start from, and can be adjusted to suit. I'd guess 'use your judgement' is the only answer here. – Joseph Wright Mar 20 '13 at 15:18
  • 1
    @Jake: indeed. That would be what would make it a minimum working example. My point is that while {\bf\it not actually bold italic} is not an MWE, anyone who is actually capable of answering the question could (i) turn that code segment into a MWE with the most trivial amount of effort, and (ii) also answer the question without having an MWE or even that code snippet in the first place. Precisely this focus on always having a code snippet, if not a MWE, is what strikes me as counterproductive, because this focus is for some questions quite beside the point. – Niel de Beaudrap Mar 20 '13 at 16:07
  • @NieldeBeaudrap: > to be a class of question... I agree that there's such a class of question, & that some of us (me included!) sometimes fail to put a given question into that class, even though it belongs there. But consider the example above: the OP not only asks for the math version of a symbol, but wants to know how to put »text mode commands in the middle of rather hairy equations?« -- which IMHO can serve as an indicator that an MWE might be useful if we want to provide more than a mere $\textexclamdown$. After all, a hairy equation can mean a variety of things to different people. – Nils L Mar 20 '13 at 17:52
  • 5
    "bureaucracy were more important than clarity to the people" I can't imagine a situation where the inclusion of a MWE would provide less clarity. I believe that in all situations, a MWE either provides additional clarity, and/or makes the lives of those answering the question that much easier. What if, in your second example, the user were actually doing this: \[\bf x\], \[\it x\] and \[\bf\it x\]? – Scott H. Mar 20 '13 at 22:11
  • 1
    @ScottH: I never meant that there are situations where a MWE would decrease clarity, but only that there are situations where it is difficult for me to imagine how it could increase clarity, to the point that waiting for the user to provide a MWE would be perverse. As you demonstrate, however, perhaps it is only a lack of imagination on my part; perhaps someone can be apparently excellent at communicating a problem, and even a basic understanding of its cause, while in fact they are doing something quite bizarre and are also ignoring other problems they have as a result of that bizarre usage. – Niel de Beaudrap Mar 21 '13 at 0:02
  • I do know what you mean and it was a bit of a straw man on my part to suggest otherwise. I don't dispute your point, but since inclusion of a MWE can't hurt while exclusion can, I would personally default to asking for one. The example was obviously contrived, but not entirely out of the realm of possibility. Anyway, just providing a counterpoint. – Scott H. Mar 21 '13 at 0:32
  • 5
    I'd have to totally disagree with the linked question that you provided -- it should have a MWE. I have never seen that symbol and would have needed to complete it to see the problem. It should not take that much time for the OP to construct. If it saves those trying to help even 30 seconds, I don't see why it is considered so onerous.. MWE also helps to minimize any possible confusion in a question, especially from new users, plus sets the stage for future questions. – Peter Grill Mar 21 '13 at 0:55
  • @PeterGrill: if you had a MWE to hand, I'm still unsure that you would have seen the symbol, that being the problem. I'd never heard of the macro before either, but the basic principle I thought was immediately clear: some macros are written to be used only in textmode, so you can only use them in the context of math by using \text or similar. The solution provided by egreg went a step further, to eliminate using the original macro entirely. I'm not sure how an MWE would have helped significantly in formulating either solution. – Niel de Beaudrap Mar 21 '13 at 1:01
  • @PeterGrill: I'm not really sure that a savings of 30 seconds is really significant, nor the advantage of drilling into people on their very first question the usefulness of MWEs, rather than just pushing for them in those cases (and there are many) where they are useful. The effort expended in the campaign to do so negates any imagined advantage against a sea of newcomers. More important is to encourage clear communication, in whatever form it may come. MWEs are one form, and a good one. But spending effort to get everyone to always provide MWEs for its own sake is not a good use of energy. – Niel de Beaudrap Mar 21 '13 at 1:08
  • 1
    @NieldeBeaudrap: I have done QA in a past life and know that without a test case there is really no way to know for sure that you understood the question. Only after you provide an answer and no objection is raised can you know that you got it correct. There have been several cases here where I was sure I totally understood the question, only after posting the solution, do I find out that I misunderstood. Now, part of that is my own problem of not reading carefully enough, but there are other cases where a MWE would have eliminated any confusion.... to be continued... – Peter Grill Mar 21 '13 at 1:35
  • ...continued: I certainly don't want to alienate new users, so if you see me (or others) doing that, please do let me/them know. And I agree that I definitely would not have been able to come up with a solution as nice as egreg's but could have learned form it. – Peter Grill Mar 21 '13 at 1:35
  • 2
    @NieldeBeaudrap Introducing newcomers to writing MWE's, is imho, always a good idea. Perhaps the text building block can be modified to suit the situation. I have seen several users who have already accumulated more than 400 reputation points but failed to provide an MWE in a question that badly requires one. Looking at their user profiles, I've seen in many instances that no comment was posted regarding MWE's because the OP's previous posts are clear even without a MWE. – hpesoj626 Mar 21 '13 at 10:22
  • @hpesoj626: the simple solution to that, of course, is to ask at that point for a MWE. Why need we fuss about preventing this, when we can simply wait to ask for one in a situation when it is needed? – Niel de Beaudrap Mar 21 '13 at 12:28
  • Please add an MWE to this question so we can answer it better... :) There are situations where the OP does not know how to produce an MWE even close to what he wants. In such cases where the fundamentals of the question is clear enough, there is no reason for an MWE. – McGafter Mar 21 '13 at 13:35
  • @McGafter: ironically enough, I actually have presented a MWE for this meta-post, together with the output that it produced. :-p – Niel de Beaudrap Mar 21 '13 at 13:55
14

My selfish reason why I require a MWE and why I tend not to answer questions wihout a MWE: I'm lazy.

When the question contains a MWE, I can simply copy-paste it, do what is necessary, test it quickly and post an answer. Without a MWE, I have to create one, which is something I'm not willing to do for the original poster. It is their questions and my amount of effort while answering depends on their amount of effort when asking.


Of course, MWE increases the clarity of the question (including the used packages, document class, and other options) and allows us to correct some other mistakes the OP might be doing.


And last but not least: There are types of questions that do not require a MWE. Those are:

  • Questions asking for "drawing" of any kind: these require a screenshot/sketch of the desired output. Even here, the OP should tell us what they have tried, we are a support site, not a do-it-for-me site.

  • Questions asking about some concept of the *TeX systems, like "grandma", \fontdimen, "how long does it take" and others (I apology for plugging in some of my posts, it's just that I remember them).

  • What we can see then is that without a MWE, fewer people would consider answering. But this does not necessarily mean that we should prompt the user for a MWE immediately after posting. I was in the midst of posting an answer myself when the comment popped up, and as I had felt that I had grasped the issue and was in the midst of answering it, my reaction was to feel that the comment had been completely unneeded. If after some reasonable time we find that nobody lies in the intersection of "interested in answering" and "able to answer", perhaps prodding for a MWE may be appropriate. – Niel de Beaudrap Mar 21 '13 at 14:20
  • 1
    @NieldeBeaudrap It is completely up to you whether you answer a question that does not have a MWE, I sometimes do that too. However, I will continue asking for MWE whenever I feel it appropriate. – yo' Mar 21 '13 at 22:20
  • 1
    I would add in your answer that often in a given MWE one can recognize used packages or options the asker didn't mention in her/his post, but were relevant for the problem ... – Kurt Mar 22 '13 at 0:35
13

The answer to the title of the question is yes and I think there is no discussion about it. But...

I would add a non-selfish reason too. Writing a MWE from scratch sucks. Big time. We enjoy fixing the problems here but not creating the problem AND solving it. We are doing it for the fun of it (at least myself), and the OP benefits from it, meeting a deadline or fixing the thesis etc. Otherwise they have to dig into FAQs, read thousands of PDF pages, try out conflicting recommendations on the net etc. just to reach to a two liner fix. Imagine the absence of our wizards here including some who are or have been in the process of creating the whole thing.

Additionally, it makes a huge difference just to write up

\documentclass{article}
\usepackage{the packages that I think they are relevant but not sure though}
\begin{document}
% As many users do -----
% A magic command that would spit out bla bla here
% etc. 

\end{document}

So compared to what you have to do and read, writing 5-6 lines of code is not that much. And resistance to posting anything is simply beyond me. How can explaining yourself better can be something of a burden? It's the OP's problem anyway. Otherwise we simply wait 2 months and close it. W in MWE is for me people can Work on it. Maybe we should change the name to Minimal Initial Example or something like that.

Lastly there are always exceptions. We might have behaved unjustly to some users too. An emerging pattern is downvoting proper,valid but wrong questions or closing them in literally 5 minutes. So absence of knowledge is punished which is why OP asks the question. That's sheer nonsense too. But just because of that, we should not step back from the general handling of the questions. Because it's not a TeX-support site for individuals.

5

I feel like adding my answer to this question, even though I am not very active in the community, and (more importantly) even though my own MWEs were perhaps not the best ones could have hope for.

The latter is, indeed, partly my fault, and partly because the problems I was dealing with were far beyond my own understanding of TeX, and despite trying, I could either not reproduce them, or not isolate the problem adequately enough. But while reading books and learning about how TeX works does help, I truly believe (and I have learnt from my clumsy questions) that a lot of the "knowledge" comes from facing our code and finding where something went wrong. Writing an MWE is work (sometimes even hard work), but you will sometimes find the answer while trying to reproduce the error (and thus avoid unnecessary questions), and at least you can look up the obvious problems in the manuals.

If you do, I don't think there is anything wrong to asking a question saying "I solved this problem with that hack but I'd like to properly understand why it worked" (there are a few of these questions). Which also requires a minimal working example.

Oftentimes, it turns out that, as in the question you point to, the canonical answer is miles away from where the OP would even have looked for it. Then a posteriori it may appear that a Minimal non-Working Example was not really needed, because the OP was not looking in the right place. But the MWE (working or not) may have helped the ones who answered figuring out what the question was about. If you can show where it fails, then there is a chance others can understand why it fails and help.

So, an MWE is perhaps not needed for all questions; sometimes even an incomplete MWE will do. Some questions about TeX history or lists of things (packages, commands, etc.) don't really need them either. But it saves time for those who answer, and it very often teaches something to the OP… which is also part of the game. It also shows some effort into finding a solution, which is a positive thing (at least, it makes the answerer feel more useful… you know, teach a man how to fish instead of dumping a fish down his throat). There may be excessive requests for MWEs, but generally speaking, they are often useful and appreciated.

  • Well said. "...but you will sometimes find the answer while trying to reproduce the error" hits the point. – hpesoj626 Mar 30 '13 at 11:07

You must log in to answer this question.

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