1 29 30 package com.caucho.xtpdoc; 31 32 import javax.xml.stream.XMLStreamException; 33 import javax.xml.stream.XMLStreamWriter; 34 import java.io.IOException ; 35 import java.io.PrintWriter ; 36 37 public class ItalicizedText extends FormattedTextWithAnchors { 38 public ItalicizedText(Document document) 39 { 40 super(document); 41 } 42 43 public void writeHtml(XMLStreamWriter out) 44 throws XMLStreamException 45 { 46 out.writeStartElement("i"); 47 48 super.writeHtml(out); 49 50 out.writeEndElement(); } 52 53 public void writeLaTeX(PrintWriter out) 54 throws IOException 55 { 56 out.print("\\textit{"); 57 58 super.writeLaTeX(out); 59 60 out.print("}"); 61 } 62 } 63 | Popular Tags |