Talk:Verbatim text

From ConTeXt wiki
  • A question for Taco: why is utf-8 in the example (charset=utf8) highlighted in that way?
    • There is not enough state information (it responds to the equals sign). I can fix verb-xml.tex and see if Hans accepts a patch ... Taco
  • A question for Patrick: how can I write XML inside <texcode>, so that TeX highlighting is prevented? (don't worry too much about it, it's no harm if an example or two don't work perfectly, <pre> can still be used)
Example:
\startXML
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>XML Code Highlighting in ConTeXt</title>

  <style type="text/css">
    h1 {
      text-align: center;
      color: blue;
      font-family: verdana,sans-serif;
    }
  </style>
</head>

<body>
  <h1>XML Code Highlighting in ConTeXt</h1>

  <!-- To be written ... -->
</body>
</html>
\stopXML
\stoptext

Mojca 21:38, 27 Aug 2005 (UTC)


On the "Syntax Highlighting in Color" section: This needs some introductory text, but I'm not quite sure what to put. Is the syntax highlighting tied to \setuptyping[option=color], or to using \startXML rather than \starttyping? (Actually, the \setuptyping seems to be redundant; when I comment it out, I still get colored highlighting. Is that how it's supposed to work, or is it just a Wiki weirdness?)

--Brooks 06:21, 28 Aug 2005 (UTC)

    • both \setuptyping[option=color] and \setuptyping[option=XML] turn on colorization (the latter one is implicit in \startXML). Use \setuptyping[XML][option=none] to turn it off Taco 09:00, 28 Aug 2005 (UTC)