10

Often users are asked to show a MWE showing what has been attempted to solve the problem.

I've received a good answer to a question. But the answer alone doesn't work completely for my real code.

By adding a bunch of nasty hacks I've been able to make things behave fairly well, but I'm unhappy with the result … well … because of the number of nasty hacks.

I could ask a follow-up question with more precision as to my actual document and incorporate the answer given (which is definitely a step in the right direction), showing where it fails.

Or I could ask a follow-up question including my nasty hacks to show what I've attempted. But this makes the MWE less minimal and harder to see what is essential in my code and what is hack.

What is best?

6
  • 2
    If you post a new question saying "the previous solution does not work in the following extended MWE" then there is a risk that the solution that people come up with is the same as your own 'nasty hacks'. So in that case it would be better to actually post the code and specify which part you want to improve and why (although this has a risk of being too broad and/or opinion based as mentioned in the linked question above). However, given that 1. LaTeX is full of nasty hacks and 2. the answer that you have gotten for the 'simple' MWE could already be considered a 'hack' with the catcodes and – Marijn Jul 14 '20 at 13:06
  • the gobbling and 3. you probably know more about LaTeX than most other people here, I would be surprised if you would get an answer that is in line with what you are looking for. – Marijn Jul 14 '20 at 13:06
  • Thanks for your comments! Although, @Marijn, think you oversell my LaTeX skills with point 3… There is no way I could have come up with the Henri Menke's solution. – David Purton Jul 14 '20 at 14:18
  • @DavidPurton I also didn't come up with this solution, I just stole it from ConTeXt. Looks like I just read more code than you. – Henri Menke Jul 15 '20 at 5:12
  • This is a very interesting and tricky question. When I immediately know the answer to a question, I prefer a simple MWE that only 'sets the scene' and does not include attempts at a solution, since I then first have to go through the complete code to separate the code of the attempted solution from the rest and to understand what exactly is going on (and what is going wrong, not having to explain what goes wrong also saves time). If I have less ideas about a good solution an attempt may help me figure something out that works, so then it would be useful to see the attempt. – moewe Jul 17 '20 at 15:01

You must log in to answer this question.

Browse other questions tagged .