1 29 30 package com.caucho.xtpdoc; 31 32 import java.io.IOException ; 33 import java.io.PrintWriter ; 34 import java.util.ArrayList ; 35 36 public class EnclosingChapterSection extends ChapterSection { 37 private String _title; 38 private ArrayList <LinkedChapterSection> _subsections 39 = new ArrayList <LinkedChapterSection>(); 40 41 public void setTitle(String title) 42 { 43 _title = title; 44 } 45 46 public void addLinkedSection(LinkedChapterSection section) 47 { 48 _subsections.add(section); 49 } 50 51 public void writeLaTeX(PrintWriter out) 52 throws IOException 53 { 54 out.println("\\section{" + _title + "}"); 55 56 for (LinkedChapterSection section : _subsections) 57 section.writeLaTeXEnclosed(out); 58 } 59 } 60 | Popular Tags |