Difference between revisions of "Talk:Verbatim text"

From Wiki
Jump to navigation Jump to search
(What text should go with the general syntax highlighting section?)
(answer brooks)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
* A question for Taco: why is utf-8 in the example (charset=utf8) highlighted in that way?
 
* 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 ... [[User:Taco|Taco]]
 +
 
* A question for Patrick: how can I write XML inside <code><nowiki><texcode></nowiki></code>, 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, <code><nowiki><pre></nowiki></code> can still be used)
 
* A question for Patrick: how can I write XML inside <code><nowiki><texcode></nowiki></code>, 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, <code><nowiki><pre></nowiki></code> can still be used)
 
:''Example'':
 
:''Example'':
Line 38: Line 40:
  
 
--[[User:Brooks|Brooks]] 06:21, 28 Aug 2005 (UTC)
 
--[[User:Brooks|Brooks]] 06:21, 28 Aug 2005 (UTC)
 +
 +
** both <code>\setuptyping[option=color]</code> and <code>\setuptyping[option=XML]</code> turn on colorization (the latter one is implicit in \startXML). Use <code>\setuptyping[XML][option=none]</code> to turn it off [[User:Taco|Taco]] 09:00, 28 Aug 2005 (UTC)

Latest revision as of 09:02, 28 August 2005

  • 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)