5

In this question on the parent site there's the following blockquote

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

Now, while I'm typing, it's correctly shown in the preview. After posting, however, it seems that the "!" marks the blockquote as class "spoiler", so it's only visible on mouseover (and the "!" doesn't show up anymore, of course). I'm curious if the same will happen here.

As I didn't ask a question so far, I think I don't break the "one question per post" rule if I ask this related question :-): What is the "correct" formatting here, blockquote or code block?

updated EDIT:

Thanks, Caramdir, so it's a feature (something similar has also been discussed on math.stackexchange). Even though it is, do want it here on tex.sx? At least I can't think of any situation where we'd care about spoilers. So I do ask two more questions, sorry: Is it possible to turn this feature off on tex.sx, and if so, do want it turned off?

  • As it seems that I can't edit the question anymore (is this "status-bydesign"?), I'll try it with a comment: When I tagged this "bug" and "design", I had in mind Andrew's answer: If the global behavious won't be changed on this site only, then personally I'd be happy if just the CSS is changed. – Hendrik Vogt Dec 19 '10 at 8:03
4

This is a feature, see meta.SO. For your question: I'd use code formatting.

  • I don't really see this: verbatim means exactly that. How is one supposed to post something which starts !? After all, from the LaTeX point of view a message line starting ! is pretty standard. – Joseph Wright Dec 18 '10 at 15:23
  • @Caramdir: Thanks. I did use code formatting so far, but I was never sure about it. Nevertheless, other people will probably use blockquotes, and error messages tend to start with a "!", so I'd be happy if we could get rid of this feature on tex.sx. – Hendrik Vogt Dec 18 '10 at 15:24
  • @Joseph: This is about blockquotes (starting with >), not verbatim (starting with 4 spaces). – Caramdir Dec 18 '10 at 15:35
  • 1
    @Caramdir. I see, but surely that's an abuse of quotes. They are for showing what someone else said, not output from programs? – Joseph Wright Dec 18 '10 at 17:05
  • @Joseph: That's what Caramdir says in his answer to my question, as far as I understand. However, the post I linked to in my question shows that people do abuse quotes. – Hendrik Vogt Dec 18 '10 at 19:38
  • I think that the question of which environment to use deserves its own question: meta.tex.stackexchange.com/questions/788 – Joseph Wright Dec 19 '10 at 9:53
4

The "feature" is a CSS feature: the text changes colour on hover. In the CSS, I see the lines:

.spoiler, .spoiler a {
    color: #F0F0F0;
}
.spoiler:hover {
    color: #333333;
}

so changing the CSS so that the #F0F0F0 was #333333 and removing the hover line would fix this. As this is CSS, it should be site-specific and I agree that there's no reason to have "spoilers" on this site.

  • Great answer. I would add that it's a two-fold feature: It's a feature of the software that typing ">!" in my post is converted to the "spoiler" class, and it's a feature of the CSS what it makes out of that. So I think you're right, it should be easy to get a site specific fix by changing the CSS. Thanks! (I'll change the tags accordingly.) – Hendrik Vogt Dec 18 '10 at 19:42
  • 2
    @Hendrik: Yes, you're right, it is two-fold. But turning off the CSS would mitigate the effect except that the initial ! would disappear. – Loop Space Dec 18 '10 at 20:05
  • Right, I forgot the disappering "!", but this is not a real problem, I think. – Hendrik Vogt Dec 18 '10 at 20:50
0

As Caramdir pointed out, this is a relatively new feature of the entire network.

While it is technically possible to disable it explicitly for TeX, its a question of whether its such a hassle to deal with that new users coming from other StackExchange sites should have to deal with the hassle of its absence (as it would remain on every other site).

An alternative to using code for things that start with ! that you would otherwise blockquote, you can use the raw HTML <blockquote>.

As in:

<blockquote>!This would normally be a spoiler, but....</blockquote>

yields

!This would normally be a spoiler, but....

Another workaround I had forgotten about:

>! This would be a spoiler
> but I broke it into multiple,
> subsequently collapsed, lines.

yields

! This would be a spoiler but I broke it into multiple, subsequently collapsed, lines.

  • 2
    Of course, now we have the question "will anyone know about this feature who actually wants to use it"? – SamB Dec 19 '10 at 3:37
  • 1
    @Kevin: Thanks for your answer, but did you read Andrew's answer (and the comments to it)? The CSS obviously is specific to our site, so I'm quite happy if just the CSS is changed as Andrew proposed. (The disappearance of the ! does hardly any harm.) – Hendrik Vogt Dec 19 '10 at 7:46
  • @Hendrik - the CSS is not specific to TeX. Every site in the network has the two spoiler classes, although the exact color values do differ. This makes it possible to reveal a spoiler by both hovering over, and selecting it (a major accessibility win, and a minor usability one). Again, this feature will only be disabled if its such a hindrance on TeX that its worth forcing new (StackExchange-familiar) users to acquaint themselves with its absence. I see no evidence that this is the case. – Kevin Montrose Dec 19 '10 at 8:08
  • 3
    @Kevin: So the CSS is specific to TeX. But is it a problem if the two "spoiler" classes stay, and both get the same color? Let me add some evidence: Users do use ">"-blockquotes, even for error messages, and TeX error messages do start with a "!". I'm not thinking of the ideal user who knows all the rules, but of the average user who is happy if he managed to format his question somehow. – Hendrik Vogt Dec 19 '10 at 8:16
  • 1
    @Kevin: I forgot one important point: I just don't think that anyone would use spoilers here; I believe many users here wouldn't like it if spoilers are used. – Hendrik Vogt Dec 19 '10 at 8:21
  • @Hendrik - you're welcome to start a meta thread on turning the feature off (without the bug tag, and phrased as such). You will need a corpus of posts demonstrating that this feature is an actual problem, and not a theoretical one. A quick glance at the database shows that 1 other post has even contained the string >! (or functionally equivalent) since spoilers were added, so... yeah. I have added another workaround to my answer (which I had forgotten) as well. – Kevin Montrose Dec 19 '10 at 8:43
  • 2
    @Kevin: I've made my point why I'm not interested in workarounds. I know how to avoid the spoiler thing. Moreover, I had a good reason for tagging this with "bug" and "design": I wanted to attract Jin, who designed the page, and he requested to tag design issues with these two tags. So I'd prefer if you could remove the "status-bydesign" tag, and I'll change my question accordingly. – Hendrik Vogt Dec 19 '10 at 8:53
  • @Hendrik - no, it really should be a new question. The answers already here won't make sense if you try and re-use this one. I will remove [design] though, as its not actually a design issue. Hadn't noticed it before. – Kevin Montrose Dec 19 '10 at 8:58
  • 1
    @Kevin: OK, I'll make it a new question. But can you please explain why this is not a design issue? For me, it's still a bug in the design, which can be fixed in the CSS. Just to say this bit already here: For me just this one occurrence was an actual problem; it took me quite some time to understand what was happening in that post. – Hendrik Vogt Dec 19 '10 at 9:08
  • @Hendrik - its not a bug, its a feature (really). If we were to turn the feature off, there would be no CSS change (the details are a bit complicated, but in essence the generated HTML would change) so its not really a design thing either. I will say that it is [status-planned] for the preview pane to start reflecting spoiler, it always lags behind a bit especially on rarely used syntax. – Kevin Montrose Dec 19 '10 at 9:14
  • @Kevin: I do appreciate your prompt reactions to all my comments. I'm slightly disappointed, however, that you didn't really address my specific arguments. In particular I just don't see what the problem with changing the CSS is. I'll try and address this again in a new question. – Hendrik Vogt Dec 19 '10 at 14:36

You must log in to answer this question.

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