Template talk:tt/doc
From cppreference.com
Formatting of example output
I'm normally a big proponent of <var></var> to wrap placeholder strings in examples, but IMHO it can be overdone. One time I feel it's harmful rather than helpful is when illustrating formatting output, which shouldn't be italicized unless the output is in italics.
So, unless someone objects, I'd like to change the examples in the documentation here to read:
| Usage | Description | Resulting HTML elements | Preview |
|---|---|---|---|
| {{tt|text}} | text in monospace font | <code>
|
text
|
| {{ttb|text}} | text in bold monospace font | <code><b>
|
text
|
| {{small|text}} | small text | <small>
|
text |
| {{smalltt|text}} | small text in monospace font | <small><code>
|
text
|
My personal feeling is that the italics in the current documentation "Preview" column just confuse things, and I contend that readers will be able to work out that the template output isn't always literally "text" despite the lack of italics. -- FeRDNYC (talk) 01:48, 30 May 2021 (PDT)
- Quite so, italics in the "Preview" column looks a bit misleading. The internals of this table suggest that the sequence
''text''was just copy-pasted multiple times. Anyway, let's update the table. In case of any qualified objection, there is always a possibility to unroll.) --Space Mission (talk) 10:30, 30 May 2021 (PDT)