Recommendation for <xmp> or <listing>
Mike Waychison
mike-DlQxw/23Tq2aMJb+Lgu22Q at public.gmane.org
Wed Mar 24 21:16:12 UTC 2004
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
William Park wrote:
| On Wed, Mar 24, 2004 at 03:30:24PM -0500, Stephen Allen wrote:
|
|>>Clarification... I want reader to cut/paste code fragments both from
|>>rendered screen output and from the source file.
|>> - If I use & < > escape sequences, then the source code is
|>> mighty ugly.
|>> - If I don't use the escape sequences, then it doesn't display
|>> properly.
|>>
|>>Unfortunately, <xmp> and <listing> longer exist in HTML specs. I was
|>>hoping if someone had come across a solution. :-)
|>
|>The 'pre' tag should do this. (Preformatted)
|
|
| No, markup tags are still interpreted inside <pre>...</pre>. But, no
| choice, since <pre> is the only option here.
|
Why not have a pretty HTML version for display, and include a commented
copy in plain text for source-code copying?
Alternatively, if you can do it in xhtml, you can use XML's <![CDATA[
]]> tags:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head><title>test</title></head>
<body>
<pre><![CDATA[
Hello < WORLD >
]]></pre>
</body></html>
HTH,
Mike Waychison
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFAYfqbdQs4kOxk3/MRAv9mAJ9DapYfSNcj/8G2Gwc6Poz7JlKzbwCfcrYl
xj6iRS+y58cnFMmcRu/dKSQ=
=zTPk
-----END PGP SIGNATURE-----
--
The Toronto Linux Users Group. Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml
More information about the Legacy
mailing list