[pmwiki-users] <code> or <kbd>

Nathan Jones pmwiki at optimo.com.au
Wed Feb 2 21:50:49 CST 2005


John Rankin wrote:
>[@ ... @] often seems to be used when describing what to type 
>to get a particular markup effect.
>
>So maybe it should use the <kbd> tag instead of the <code> tag.

Maybe, but if PmWiki is only going to use one or the other, then there is
no way to specify one style for code and another for kbd entry. Hence,
there isn't much point in changing from one to the other: no matter which
one is in use, it will either be styled the same as the other (browser's
default style sheet), or the WikiAdmin will need to create a style for
the one element that PmWiki uses.

Related Question:

What is the recommended way to display a block of code in a PmWiki page?
(Sorry if this is a common question.) Here's why I ask:

The only option I can see is PmWiki.MarkupMasterIndex's recommendation to
put space before preformatted text. BUT:

1. When I paste in a code example, I have to add a space to the beginning
   of each line, or else PmWiki will stop the <pre> and treat un-indented
   text as a paragraph instead.

2. When I want to copy a code example while viewing a page, I get an
   extra space at the beginning of each line.

3. Space-before-code grievance aside, there is a style issue: I may not
   want my preformatted text to be further from the side than other text.

How do I avoid this?

([@code formatting@] sounded hopeful, but <code> doesn't preserve
linebreaks, even if surrounded by <pre> as a result of indenting the
first line.)

-- 
Nathan Jones



More information about the pmwiki-users mailing list