home *** CD-ROM | disk | FTP | other *** search
/ PC Plus SuperCD (UK) 1999 October / pcp156b.iso / alphawrk / TEXML / TEXML.ZIP / com / ibm / texml / sample.texml < prev    next >
Encoding:
Extensible Markup Language  |  1999-06-23  |  1.3 KB  |  38 lines

  1. <?xml version="1.0" encoding="UTF-8"?><TeXML><cmd name="documentclass"><parm>article</parm></cmd><cmd name="title"><parm>Test TeXML</parm></cmd><env name="document"><cmd name="maketitle"/>
  2. <cmd name="section*"><parm>This is a section</parm></cmd>
  3.  
  4.  This is a paragraph in the section.
  5.  <cmd name="par"/>
  6.  <cmd name="subsection*"><parm>This is a subsection</parm></cmd>
  7.   
  8.   This is a paragraph in the subsection.
  9.   <cmd name="par"/>
  10.   <cmd name="subsubsection*"><parm>This is a subsubsection</parm></cmd>
  11.    
  12.    This is a paragraph in the subsubsection.
  13.    <cmd name="par"/>
  14.   
  15.  
  16.  
  17. <cmd name="section*"><parm>Test descriptive list</parm></cmd>
  18.  <env name="description">
  19.   <cmd name="item"><opt>mango</opt></cmd>a tropical fruit
  20.   <cmd name="item"><opt>honeydew</opt></cmd>a kind of melon
  21.  </env>
  22.  
  23. <cmd name="section*"><parm>Test the escapes</parm></cmd>
  24.  
  25.  Now we test all of the specials.
  26.  The percent character, '%' is a comment character in TeX.
  27.  The caret, '^' is a superscript.
  28.  The amphersand, '&' is special for both XML and TeX.
  29.  So are the angle braces, '<' and '>'.
  30.  The underscore, '_' is a subscript.
  31.  Dollar sign '$' puts TeX in math mode.
  32.  Pound '#' signals a macro parameter.
  33.  TeX interprets these as grouping characters, '{', '}'.
  34.  Finally, here's good old active space, '~'
  35.  and the escape character, '\'.
  36.  <cmd name="par"/>
  37.  
  38. </env></TeXML>