As I noted in an earlier question on meta, blockquotes starting with a "!" are rendered as spoilers. It happened in this question on the parent site before I edited the post and changed the blockquote to a code block. Here I don't want to talk about when to use which of these two; that's the topic of another question on meta. For those who wonder why I ask a very similar question as in my previous post: The question in that one is effectively locked by the "status-bydesign" tag.

For completeness I repeat the "spoiler" effect here:

! LaTeX Error: File `hypernat.sty' not found.

You see that the text only shows up when the mouse hovers over it, and that the "!" has gone: This is a new feature that "!" introduces a "spoiler". In the above example, the "spoiler" effect clearly is not desired. So I'd like to know if others agree that we want the feature turned off on tex.sx. Personally, I see no reason why we would want this feature.

In the comments to his answer to my earlier question, Kevin Montrose wrote that I

will need a corpus of posts demonstrating that this feature is an actual problem, and not a theoretical one.

He noted himself that I won't find many posts where this is an issue. My point is: I think that the one example I gave is quite sufficient; it took me some time to find out what happened, and is was a "naturally occurring" thing as TeX error messages always start with a "!". And I'm sure it will happen again that users post error messages in blockquotes. I think we don't want our users to learn all the features of the software before they can format and post a decent question, so even if a blockquote isn't optimal for error messages, it's OK for an inexperienced user to use it.

There are two possibilities of turning the feature off:

  1. Turn it off completely, so using >! won't cause the paragraph to be marked as "spoiler" class at all.

  2. Change only the CSS of our site, so the html still shows that the paragraph is "spoiler" class, but let it be rendered like a usual blockquote. This has the drawback that the "!" gets eaten, but I think that's not a big deal. One will still immediately see that the blockquote is an error message.

What do others think about this?

  • 2
    I can't think of any cases where we want to hide spoilers. An example would be worth posting. Dec 19, 2010 at 16:51
  • @Charles: So you agree with me? Then please consider upvoting my question :-). Dec 19, 2010 at 17:46
  • Like Charles, I don't see where 'spoilers' fit into {TeX}, or indeed the Q&A structure of SO in general. So I do agree with Hendrik, would welcome the feature being turned off and have upvoted :-)
    – Joseph Wright Mod
    Dec 19, 2010 at 19:45
  • I agree, I don't see a reason for this site to hide information while reserving space. Instead, collapsing would be great, because we tend to like complete code examples. Like a spoiler without wasted space: instead of focusing on just hiding, it would support emphasizing the non-code explanation.
    – Stefan Kottwitz Mod
    Dec 19, 2010 at 22:57
  • 1
    +1 for option 1, turn off the spoiler option. Dec 19, 2010 at 23:09
  • @Hendrik: Yes, I agree. A belated +1. Dec 20, 2010 at 7:33
  • @Stefan: It seems that you are proposing a completely different new feature; I'm not sure about that one yet, but it might be interesting. However, I don't see that it's relavant for the question at hand. Am I missing something? (The question at hand is already difficult enough; see my discussion with Kevin.) Dec 20, 2010 at 7:49
  • 9
    I agree with turning this off; I'd be happy with the CSS solution as missing the leading ! is unlikely to cause excess confusion. I think that the argument that we should have site-wide consistency is weak: I'm much more concerned about new users. If we're just a convenient backwater of SO to put those annoying TeX questions so that they don't clutter up the main page, then there's no reason for us to exist. If our mandate is to attract new users and build a new site, then we should make things easy for them and minor mistakes in formatting shouldn't have such dire consequences. Dec 20, 2010 at 8:09

3 Answers 3


Apparently the spoiler effect doesn't affect blockquotes that were baked in before the feature came into effect. So, e.g., Sharpie's question, Can MikTeX texmf trees contain the equivalent of a "symbolic link"? has a !-begun blockquote, which renders as a spoiler if you look at the source, but as intended if you don't. Presumably if the question were edited without touching the block quote, the spoiler effect would be activated.

This is the second of 27 search results for "LaTeX Error"; I expect there are a fair few more examples. I think this shows there is a significant reoccurring problem here.

I'm not sure how Kevin balances local convenience against sitewide consistency, but there already is markup variation with respect to rendering maths. We could have a list of markup properties that vary, and put the local settings in the FAQ.

  • Your observation about the posts before the feature introduction is interesting. OK, I found two more among those 27; and three more where for some reason there was no "!". Dec 20, 2010 at 13:44
  • The vast majority of those questions either a) use <code> b) omit ! or c) are multiline <blockquote>. None of which would trigger the spoiler style. I found only 1 question (by hand, its possible I missed some) that would be affected if it were edited and saved. Dec 20, 2010 at 20:10
  • @Kevin: I did follow your suggestion and started a new meta thread. (You knew from the very beginning that there are only very few instances where this thing happened.) As you can see in the present thread, there is consensus that we neither need nor want the feature; noone can think of any use of it for tex.sx. I also have made my point why on tex.sx the feature can do harm. Andrew in his comment to my question has written it up very concisely and got 4 upvotes. I just don't see any reason for not turning the feature off, so please let me stop wasting my time and turn it off. Dec 21, 2010 at 8:04
  • @Kevin: Multiline blockquote? Is there anywhere where the syntax for this feature is properly documented? I've asked at meta.so: meta.stackexchange.com/questions/72877/… Dec 21, 2010 at 8:29
  • 1
    @Kevin: I'm sorry if my tone is becoming more exasperated. But honestly, if you knew from the very beginning that our arguments wouldn't convince you anyway, then I really feel that you intentionally wasted my time (with emphasis on if and feel). Moreover, I'm still waiting for a reason why neither of the 2 possibilities I proposed are acceptable. Dec 21, 2010 at 10:43

This has been discussed, and is being declined. Let me explain why, exactly.

After doing an exhaustive search (looking at all posts that match >\s*! † anywhere in their entire history) I found that the following posts contain the spoiler syntax.

  1. Can MikTeX texmf trees contain the equivalent of a “symbolic link”? (*)
  2. An answer to How can I change the legend's location in a pgfplot? (*)
  3. “inputenc Error: Unicode char \u8” error while trying to write a degree symbol (invisible character) (*)
  4. “TeX capacity exceeded” because of a couple of raiseboxes in a \section…? (*)
  5. A revision of MiKTeX 2.9 Does NOT Support `hypernat`

Depending on how you want to count (affected, or potentially affected) this is either 0.01% or 0.07% of all posts to date.

I hope it's clear (and not contentious) that this is a very rare problem.

*Posted prior to the spoiler feature being added, so not actually affected, but could potentially be if a non-trivial edit is made (and the editor ignores the preview).

†This would grab everything that even might trigger the spoiler code. The results were then checked by hand to find the true matches.

However, it is still a problem which should be addressed. I'll touch on why the solutions proposed here are unacceptable, and then go into what has actually been done to alleviate it.

Simply turn spoilers off - this would make Tex.SE's markdown syntax (negatively) distinct from every other SE's. Assuming non-trivial cross pollination of users (that is, new users who are familiar with some other SE) this is potentially confusing. Given how rare the "accidental spoiler" problem is, I call this a wash** at best.

Tweak the spoiler CSS - most obviously, posts would still lose ! when they tripped over the spoiler syntax which would just lead to more bug reports. Less obviously, this would be an irreversible change; if spoilers were to become a desired feature (something that can't be discounted, given its popularity as a [feature-request]), we couldn't re-enable it because doing so would retroactively hide text in old posts. Its worth noting that (in supporting browsers) a user can use User CSS to do this client-side.

**The only markdown feature not on everywhere is LaTeX rendering (which is on for CSTheory, Math, and Physics). This is because the MathJax library is so large (and cpu intesive) that it has a deleterious effect on page load. It is also "additive" with regards to our baseline markdown, making it less dangerous in my opinion.

Ok, now for what has actually been done to mitigate this (already, vanishingly rare) issue.

At the time of the only truly affected post's creation, the preview pane wasn't rendering spoilers. This could definitely hit TeX harder than other sites, and upon discovering that it (already being [status-planned]) was kicked up on the schedule. You can go take a look at the renderer to see why this took a bit, but its out there now.

It should be more or less impossible to accidentally post a spoiler now, as the preview pane will show it.

This would still leave the problem of generating a spoiler unintentionally (even though it probably wouldn't go so far as to actually be posted). So, to mitigate that, the "quote" button on the post editor will no longer generate spoilers***. This was already pretty tricky to do accidentally, as only very short messages would be placed on a single line in a quote.

The quote button will no longer produce spoilers, regardless of the length of the selected text.

On a less technical note, there was some confusion as to how the spoiler syntax actually worked. I blame me. I thought my initial post was clear, but then again of course I knew how it worked. Props to Charles Stewart for drawing my attention to it with his meta.SO post.

The explanation of the spoiler feature has been improved.

***This is true for all sane input (where sane ~= contains some whitespace).

TL;DR version

This is a vanishingly rare problem, the proposed solutions have downsides out of proportion with what they're trying to solve (especially in light of its rarity), and steps have been taken to mitigate the issue.

  • This is very clear and shows how much thought you've put into this. Just to be clear, the patch you link to is complete, but hasn't yet been deployed in the wild? Dec 22, 2010 at 23:30
  • @Charles - all changes have already been deployed (if you find any issues, please let me know). The OSS project linked is what you would call "baseline," and has not had the tweaks mentioned pushed to it yet. I've found its useful to link to code artifacts to demonstrate the complexity of our post editor & renderer. Dec 22, 2010 at 23:42
  • 1
    Thanks a lot indeed for your detailed answer. Your points about rarity and popularity of the feature still don't actually convince me (but now I know that some "sister sites" do need the feature). However, I highly appreciate the effort you took to alleviate the problem for tex.sx. Having proper rendering in the preview together with the change to the "blockquote" button really made this a lot better, and I'm happy with this. (But don't think this makes it impossible to post spoilers accidentally; it seems to me that some users haven't discovered the preview pane so far :-).) Dec 23, 2010 at 8:48
  • 3
    I think you're looking at the wrong metric, though. What we really want to see is the ratio of mistaken spoiler to intended spoiler. Sure, 0.07%/0.01% of all posts to date is tiny, but it's also irrelevant. If there were five times as many questions with accidental spoilers as with intentional spoilers, but the total were still 0.01%, that would nevertheless be a compelling argument against spoilers. Admittedly, this is a harder number to generate, since spoilers haven't been around long, but I don't think anything else is really useful. (Full disclosure: I support removing spoilers here.) Dec 23, 2010 at 8:57
  • @Antal: Thanks a lot for spelling out was has been in my head before. In my head, it wasn't clear enough, so I forgot to mention this point. I'd also still prefer spoilers to be turned off, but the situation is quite OK now due to Kevin's two improvements, I think. Dec 23, 2010 at 11:42

I have another suggestion that could solve the problem:

Change the syntax of the spoiler block across the board.

I understand the desire to use >!, but in light of the clash with TeX error would it be really difficult to change this to a >!! ? For old spoilers this could be done retroactively, (not on TeX.SE...) and the feature is relatively new, so that it should not be a difficult learning experience, For the people who actually use it.

  • 1
    Hmmm. a -1 vote! great! could you please elaborate what is bad with this suggestion? Dec 27, 2010 at 14:10

You must log in to answer this question.

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