TWiki's
verbatim element tells TWiki to ignore markup in the element contents. It is output as an HTML
pre element. However, TWiki doesn't recognize attributes in this element, so it's not possible to apply a CSS class to a
verbatim element.
One way to get around this is to wrap a
verbatim element in a
div.
When this is done within a plugin, like
SyntaxHighlightingPlugin, it seems to have the effect of making the
verbatim unnecessary, i.e.
pre is sufficient. Not yet sure why. May have to do with order of expansion of markup within TWiki.
Here's a verbatim in a div:
Tex2page
| foo | bar |
| boo | baz |
Here's a pre in a div:
Tex2page
| foo | bar |
| boo | baz |
Here's a pre on its own. This doesn't have the same effect as a pre on its own supplied by a plugin, though, so doesn't demonstrate the effect in question.
Tex2page
| foo | bar |
| boo | baz |
(test
(scheme code))
(test
(more scheme))
Here's a div on its own:
Tex2page
(test
(scheme code))
(test
(more scheme))
Verbatim HTML
HTML markup is interpreted when it appears in a
pre element. A
verbatim element gets around this.
<html>
<body>
<span class="scheme">Hi There!</span>
</body>
</html>
This still raises a problem for displaying HTML with syntax highlighting. Spans can't be used. It means that the highlighting program will have to perform proper quoting of elements. Why doesn't enscript seem to do that?
Another issue might arise if HTML tags are embedded in some other kind of source. Wrapping source in CDATA doesn't seem to help. Not sure what solution to this is.
--
AntonVanStraaten - 16 May 2004
© 2004 by the contributing authors. / You are Main.guest