0

I accidentally clicked on the preformatted text option just now.

This is a sample

Now, I understand on other computer sites where programming is involved that this is commonly used for code.

My question is though, when is it appropriate to use preformatted text formatting on the main site?

6
  • 3
    Whenever the OP feels like it suits their post. Previously though, I've seen it used to format quotes, or when you're quoting the OP's question in your answer, etc. I also sometimes use it to format "quotes in comments". Historically, this has come about from SO, where programmers and the like would need such formatting. – Möoz Aug 26 '15 at 1:07
  • It's probably not likely to be useful on this site, but it's part of the Stack Exchange markdown language, so we get it. – KutuluMike Aug 26 '15 at 1:24
  • @MikeEdenfield I agree; just wondering what other people use it for, like what Mooz suggested above. Perhaps we could get some guidelines surrounding it i.e. 'suggested use'? – Often Right Aug 26 '15 at 1:25
  • 2
    Suggested use: use it whenever you feel it's appropriate or it makes your life easier trying to format something. – phantom42 Aug 26 '15 at 2:12
  • @phantom42 Agreed, if we start creating guidelines for these types of things, we will have guidelines coming out of our ears. – Möoz Aug 26 '15 at 2:29
  • @phantom42 TBH I guess that is fair enough - we have enough disputes when it comes to spoiler quotes let alone something which doesn't lend itself to an obvious use! – Often Right Aug 26 '15 at 2:36
4

A common usage of preformatted text outside of code discussions is for movie script excerpts. Movie scripts are often formatted with a centered, narrow column that's hard to emulate in text without disabling regular HTML flowing.

I've used it in at least one case on Movies.SE, here.

I don't particularly like using it for emphasis, because I'm a fan of semantic markup and having specific forms of emphasis have meanings - bold and underline and quotes are different markups with different meanings, but I don't really care that much either way.

3

Another potential option, since pre-formatted text is monospaced, is ASCII art for when hand-drawn circles just don't cut it. For example:

The following is a crude ASCII diagram of the room showing why Xavier had to curve the bullet

X - Xavier Killminion    C - Clueless Mook    H - Helpless Hostage
    X
       C
 C  H 
    C

As you can see, Xavier doesn't have a clear shot at the third clueless mook, so his only choice was to use his bullet-bending prowess to curve the bullet around the room to hit all three.

2

The beauty of formatting is that it allows for emphasis.

As @Mooz says in the comments above, formatting is suitable;

Whenever the OP feels like it suits their post

So if I wanted to quote a specific part of a script including action lines or descriptive elements, rather than just diaglouge;

CAPTAIN AMERICA throws his shield, hitting IRON MAN in the chest and winning the civil war

I might use it then in order to differentiate important text from the rest of the body of the answer and other types of emphasised text.

It's really up to you.

1
  • 1
    Whoa, whoa, whoa. Spoiler alert! – Jack B Nimble Aug 28 '15 at 15:38

You must log in to answer this question.

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