Package writer2latex.latex
Class LaTeXDocumentPortion
java.lang.Object
writer2latex.latex.LaTeXDocumentPortion
This class represents a portion of a LaTeX document. A portion is any
number of lines, and may include subportions.
-
Constructor Summary
ConstructorsConstructorDescriptionLaTeXDocumentPortion
(boolean bWrap) Construct a new emptyLaTeXDocumentPortion
-
Method Summary
Modifier and TypeMethodDescriptionappend
(int n) Add an integer to the end of this portionAdd a string to the end of this portionAdd another portion to the end of this portionnl()
Add a newline to the end of this portiontoString()
Return the content of this LaTeXDocumentPortion as a stringvoid
write
(OutputStreamWriter osw, int nLineLen, String sNewline) Write this portion to the output
-
Constructor Details
-
LaTeXDocumentPortion
public LaTeXDocumentPortion(boolean bWrap) Construct a new emptyLaTeXDocumentPortion
- Parameters:
bWrap
- set to true if lines may be wrapped on writing
-
-
Method Details
-
append
Add another portion to the end of this portion- Parameters:
ldp
- TheLaTeXDocuemtPortion
to add- Returns:
- a reference to this
LaTeXDocumentPortion
(not the appended one)
-
append
Add a string to the end of this portion- Parameters:
s
- the string to add- Returns:
- a reference to this
LaTeXDocumentPortion
-
append
Add an integer to the end of this portion- Parameters:
n
- the integer to add- Returns:
- a reference to this
LaTeXDocumentPortion
-
nl
Add a newline to the end of this portion- Returns:
- a reference to this
LaTeXDocumentPortion
-
write
Write this portion to the output- Parameters:
osw
- anOutputStreamWriter
to write tonLineLen
- the line length after which automatic line breaks should occur if allowed (nLineLen=0 means no wrap)sNewline
- the newline character(s) to use- Throws:
IOException
- if an exception occurs writing to to osw
-
toString
Return the content of this LaTeXDocumentPortion as a string
-