Talk:Typographical Guidelines

From KDE UserBase Wiki
Revision as of 10:06, 19 December 2021 by FeRDNYC (talk | contribs) (→‎Typographic conventions inside code tags: Left out a close-quote)

Typographic conventions inside code tags

To denote replaceable portions of sample commands / literal code snippets, HTML5 provides the VAR tag which combines nicely with CODE (e.g. can be used between <code> </code> tags.) Typically that's a preferable way to add placeholders to sections of a command string that would otherwise be <code>-enclosed, since it avoids breaking up the <code> formatting.

So, take the example from "Combined Bold and Italic Text":

I have no idea why [email protected] is both bolded and italicized, since as far as I can tell the rules in previous sections don't call for bolding. Typically the placeholder (or "variable", hence VAR) elements would only be italicized, in which case <var> becomes ideal. Changing the source of that line to:

* To connect to your remote server, type <code>ssh <var>username</var>@<var>domain.name</var></code> in '''Konsole'''.

would lead to it formatting as:

  • To connect to your remote server, type ssh username@domain.name in Konsole.

Which seems much clearer and more readable. -- FeRDNYC (talk) 10:03, 19 December 2021 (UTC)