Talk:Typographical Guidelines: Difference between revisions

From KDE Wiki Sandbox
No edit summary
Line 2: Line 2:
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.  
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:
So, take the example from "Combined Bold and Italic Text":
* To connect to your remote server, type <code>ssh</code> '''''username@domain.name''''' in '''Konsole'''.
* To connect to your remote server, type <code>ssh</code> '''''username@domain.name''''' in '''Konsole'''.



Revision as of 10:06, 19 December 2021

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":

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

I have no idea why username@domain.name 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)