8

How to format reserved words within:

  • question title,
  • question body,
  • comments?

By 'reserved words' I mean words which aren't code and which don't require to be emphasised but to be identified clearly as non common names. Here are a few examples of such words:

  • application names:

    Grab, Keynote, Numbers, Pages, Preview, Terminal…

  • reserved directory:

    Applications, Library, System…

  • menu entries:

    File > Save…

  • OS names:

    Lion, Mavericks, Ubuntu…


My personnal choice I tested for many months is to use backticks which are reserved for code.

Is this an acceptable practice?

Is it worth pursuing a feature request to introduce another mark to markup these reserved words?

  • 1
    I've removed the feature request tag and wording to get some discussion going first. The best practice for a feature request is to make a concrete request rather than open discussion. What do you think of waiting on that until something concrete is ready to hit up the developers? – bmike Aug 29 '14 at 15:01
  • Agreed, thank you. – dan Aug 29 '14 at 15:40
  • 2
    Can you give a reason why they need to highlighted - they are already emphasised by using a capital letter. – user151019 Aug 29 '14 at 22:26
  • 1
    Relevant to discussion: List of Supported HTML Tags – njboot Aug 29 '14 at 23:03
  • → Mark: I would like to disambiguate the use of the word for as used in C from the same word "for" used in usual english and from the name of a colleague "For". – dan Aug 30 '14 at 18:16
  • 1
    It is still not a readable use - in the for case see programming books They just use English plain text – user151019 Aug 31 '14 at 12:45
  • No they don't. Most of the time scientific books use cmr or Courier. – dan Oct 20 '15 at 17:47
7

Code formatting for things that are not code is incorrect use of formatting and I edit posts to remove it regularly. Code formatting is never a form of emphasis. Using code formatting for things that are not code…

Inline code formatting should be used for short snippets of actual code, including but not limited to AppleScript and shell scripting. Short shell commands such as ls ~ should also be formatted as code, but referring to shell commands such as 'defaults' doesn't need formatting (although some may disagree with this and I'm unlikely to edit to the contrary).

Inline code formatting should not be used in any of the cases listed in your question:

  • Application names are not code and should be read normally, so they should not be formatted as code.

  • Directory names, regardless of whether they are system directories, also should not be formatted as code.

    However paths may use code formatting; I usually don't for simple paths such as /Applications, but do for longer paths, especially those containing globbing such as /Sy*/L*/Priv*/Apple8*/V*/C*/R*/airport, although I may even use block code formatting in cases like this (prepending with four spaces):

    /Sy*/L*/Priv*/Apple8*/V*/C*/R*/airport
    
  • Menu entries are not code, although in some cases extra formatting may help here. I sometimes write longer menu entry paths with bold formatting such as FileImport FromBookmarks HTML File… as the path then stands out more from the actual text, usually just write it normally as File → Save.

  • OS names are like application names—never code. The OS build may be formatted as code depending on its context as these are longer and read character by character.

Also, I've seen code formatting used in other cases, and would like to address that here too:

  • Web URLs that shouldn't be clicked can use code formatting, but it's not really code and I prefer simply rendering the URL as un-clickable either using a zero width joiner http://​example.com or HTML comment http://example.com (check the source of this post to see how the aforementioned examples are done).

All of this applies to question bodies and comments. Titles do not have code formatting and therefore any Markdown is superfluous.

  • THE thing THAT makes TEXT hard TO read IS not CODE formatting PER se BUT rapidly ALTERNATING between ONE format AND another. UNFORTUNATELY pedants OF the WORLD appear TO be TAKING the ABOVE answer TO be DEFINITIVE and NEEDLESSLY removing MORE careful FORMATTING thereby RFENDERING the TEXT in QUESTION l-E-s-S r-E-a-D-a-B-l-E. – tkp Dec 19 '18 at 20:34
1

I think using back ticks for every thing makes things less readable they are for code. (There are several meta.stackoverflow/exchange threads. e.g. this)

In your list OS names are definitely not code so Lion Mavericks are OK, similarly application names are plain text.

I prefer menu entries as text.

The only ones I might use back ticks for are a directory and only if it is text to be entered into Terminal or a dialog box.

This is one of I know what seems correct when I see it issues but I think the rule I use is if you can say it in speech it is not in back ticks but only if you need to get the exact text to get it into a computer system.

Due to the version of markup here XML/HTML even if partial e.g. an element name has to be in backticks. Also URLs which should not be clicked on e.g. one reputing for spam etc in meta or if it is an example http://www.example.com or something else you should not click on.

You must log in to answer this question.

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