Re: Spoiler space?

In this question here the OP asks for hints for a problem rather than a full proof.

Proof of subfactorial formula $!n = n!- \sum_{i=1}^{n} {{n} \choose {i}} \quad!(n-i)$

Now, while I would like to respect that request, I also feel that questions on this site are not intended just for the OP's benefit. This leads me to the question...

Question: Is there any way to use some form of spoiler space, so that it's possible to post the answer for the other readers' benefit, but at the same time hiding it from those who do not want it?

My attempted "look at the previous version of this post" turned out a disaster. I've seen people use rot13, but that seems like a lot of fuss (and clashes with the mathematics).

On some sites they use white text on white background for spoily material, which, when you select with the mouse, reveals the text. Is that possible?

Testing:

! Spoiler Space

! More spoiler space

Spoiler Space More spoiler space

What happens if I write a really long sentence. Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test

Maybe it'll involve some maths like $$E=mc^2$$ or exclamation marks $$n!=n \times (n-1)!$$.

• Excellent question, Douglas! Dec 16, 2010 at 5:42
• This is interesting, it might make a good compromise for answers to homework questions that are a bit spoily. Dec 16, 2010 at 5:42
• Man, now if only we could preview spoiler blocks, we'd be all set... Dec 16, 2010 at 6:36
• Hmm... since I don't have enough reputation to edit I don't know what are you guys doing for this? Any help? Dec 16, 2010 at 13:42
• @Deb: See this... Dec 16, 2010 at 13:48
• @J.M:That helped thanks :-) Dec 16, 2010 at 13:51

Good idea. I searched meta.stackoverflow.com to see if this had already come up, and I found this, showing that it was recently implemented. I'm going to try it:

$$!n = n!- \sum_{i=1}^{n} {{n} \choose {i}} \quad!(n-i)$$

• Hmmm... it works here, but I didn't manage to get it working over at the parent site (it just highlights the text and puts an ! at the start of the sentence). Dec 16, 2010 at 5:31
• Okay, worked it out... it doesn't like two >!'s separated by an empty line. Dec 16, 2010 at 5:36
• And thank you for finding this out, Jonas. I will probably be trying it out myself. Dec 16, 2010 at 5:44
• This is awesome. Maybe we should be putting something about this in the FAQ. This certainly should help towards the problem of how to handle homework! Dec 16, 2010 at 6:03
• I hope we don't bump up too many old questions from our editing previous answers to have spoilers... ;P Dec 16, 2010 at 6:15
• What an odd implementation of the idea... With so much 2.0ishness couldn't they just put a button or something? Text appearing and disappearing because I'm moving the pointer from one side of my screen to another and the thing happens to be in the middle... Great! Dec 16, 2010 at 6:18
• @J.M.: I bumped one, mainly because I had already been tempted to post a spoiler after waiting a while to let the OP figure out the details. This just gave me an excuse :) Dec 16, 2010 at 6:18
• I was itching to edit in a complete solution to one of my previous answers, but I didn't want to easily give the whole thing away to the OP. Now I'd better have a look at that answer again... XD Dec 16, 2010 at 6:23

Here is a sample bit of LaTeX contained in a spoiler block:

$\sum_{n=1}^\infty\frac{1}{n^2}=\frac{\pi^2}{6}$
$$\sum_{n=1}^\infty\frac{1}{n^2}=\frac{\pi^2}{6}$$

This is the code I used to produce it:

  >! $\sum_{n=1}^\infty\frac{1}{n^2}=\frac{\pi^2}{6}$
>! $$\sum_{n=1}^\infty\frac{1}{n^2}=\frac{\pi^2}{6}$$


However, when I moused over the spoiler block in the preview area while composing this post:

So, displayed equations don't appear displayed in the preview area, although they come out just fine in the final product.

Some more testing:

1.

italicized text goes here

2.

bold text goes here

3.

Let's try $\LaTeX$ italicized text bold text and hyperlinks.

4.

$$\color{red}{\text{Does}}\;\color{green}{\text{colored}}\;\color{blue}\LaTeX\;\color{yellow}{\text{work?}}$$ But black text and $\LaTeX$ should still be obscured.

I'll edit this when I think of more stress tests.

• >! But it doesn't work in comments. Dec 16, 2010 at 6:20
• @JM: $\color{white}{\text{spoiler}}$ Dec 16, 2010 at 18:30
• @Kenny: Yeah, I know about that; I'm just demonstrating that the functionality doesn't work in comments. ;) Dec 17, 2010 at 0:10

What may be needed is a means by which an answer is visible to everyone except the OP.

• Since OPs can trivially log out and view the question and its answers as a visitor, and since they can trivially have two accounts, going to such extremes is pretty pointless. We should never underestimate the amount of work people will do to avoid work... Dec 16, 2010 at 22:30
• Perhaps the answer would only be visible to users (other than the OP) who also have a certain minimal reputation level?
– JDH
Dec 17, 2010 at 1:07
• Meanwhile, my actual view is that full solutions to homework questions are no problem and actually good for the site, as long as the quesions and answers are interesting. The only problematic issue I see with homework is that the problems might be boring for most users. I would enjoy seeing some very good homework problems!
– JDH
Dec 17, 2010 at 1:09
• The OP can always view the source (e.g. meta.math.stackexchange.com/revisions/…) Dec 17, 2010 at 10:16

I would very much prefer that we did not use this feature. It is simply too distracting.

I am really surprised that this has been deemed accetable UI!

• I wasn't a fan of it either, but people love their spoilers... it came up on multiple sites with wildly different backgrounds, and got upvoted a lot. Dec 17, 2010 at 5:32
• @Jeff: while I can understand why some people would like having some kind of UI for this, did the actual implemenation get many votes? If so, well, this is just another example of the universal truth that design is best not be done by polling... Dec 20, 2010 at 0:04