When I read a question and want to take a stab at answering it, the first thing I do is create a *TeX file. I copy the original post's snippets into the file, as well as some information about the question -- the URL and sometimes the poster's question itself -- commented out. That way I can keep it on file. I don't know if I'll ever use it again, but saving it makes it more worthwhile (to me) than just creating a temp file and throwing it away.

It seems like this would be a worthwhile feature for the site. Users could download a question as a tex file, with the snippets included and some metadata (e.g., question URL, author username, etc) commented out. The cleaned-up question as it appears in the URL makes a good filename. The question itself could go either in the comments or formatted as TeX code in the example file. The latter would be prettier, but it might actually get in the way of solving the problem.

Obviously not every file produced like this is going to be immediately processable. If the question is about latex and the OP didn't put a \documentclass in their example, it would have to be added to make sure the example file is a latex file. Similarly for questions about pgf/tikz: they would need to ensure those packages are loaded. The exporter could glean some clues from the tags, and leave it up to the prospective answerer to correct the file.

This could be an incentive for people who'd like to poke at the issue to see if their impulses are reasonable. It might result in more answers, more working answers and fewer "You could try something like this (untested)..." answers.

  • I think this would be a great idea for the Stack Exchange API!
    – Kit
    Commented Oct 22, 2010 at 13:12
  • I'm actually working on something very similar, if you're a hopeless nerd: github.com/vermiculus/stack-mode Commented Apr 10, 2013 at 16:04
  • @SeanAllred: very interesting. I'm not using emacs anymore so I wouldn't benefit from that, but it might help those who do. Commented Apr 10, 2013 at 16:40

1 Answer 1


Not a bad idea. I imagine it working by having a separate text field labelled "minimal working example" (or whatever) that, if entered, would be used to populate the actual TeX document to be created. Then users could continue to ask questions as they currently do with simple snippets in the question itself, but for questions with a complete example you could have a link to download/open the file.

  • I would love to see a distinct MWE field (seriously), but this would prompt a site-specific change to the API, which SE devs may or may not be keen on doing. As such, I'm not entirely hopeful that we can find a on-site solution to this, but perhaps we can take advantage of a third party. Commented Apr 10, 2013 at 16:07

You must log in to answer this question.

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