|
Rakesh API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.rakeshv.tex.TransformDocumentParts
public class TransformDocumentParts
This class provides static methods that do very
common transformations to generate part,
chapter and section commands for a
given ASCII text file.
| Field Summary | |
|---|---|
static boolean |
HAS_TITLE
Specify that a part, chapter, or section has an associated title. |
static boolean |
NO_RESET_COUNTER
Specify that a part, chapter, or section does not need re-numbering. |
static boolean |
NO_TITLE
Specify that a part, chapter, or section does not have a title. |
static boolean |
RESET_COUNTER
Specify that a part, chapter, or section needs to be re-numbered when they start with either 1 ,
I, or i. |
| Constructor Summary | |
|---|---|
private |
TransformDocumentParts()
Default constructor. |
| Method Summary | |
|---|---|
static java.lang.String |
generateChapterTags(java.lang.String contents,
java.lang.String pattern)
Generate chapter tags, by replacing all occurances
of the identifier (pattern) specified in the document (contents)
with LATEX
part commands. |
static java.lang.String |
generateChapterTags(java.lang.String contents,
java.lang.String pattern,
boolean titleFlag)
Generate chapter tags, by replacing all occurances
of the identifier (pattern) specified in the document (contents)
with LATEX
part commands. |
static java.lang.String |
generateChapterTags(java.lang.String contents,
java.lang.String pattern,
boolean titleFlag,
boolean counterFlag)
Generate chapter tags, by replacing all occurances
of the identifier (pattern) specified in the document (contents)
with LATEX
part commands. |
static java.lang.String |
generatePartTags(java.lang.String contents,
java.lang.String pattern)
Generate part tags, by replace all occurances
of the identifier (pattern) specified in the document (contents)
with LATEX
part commands. |
static java.lang.String |
generatePartTags(java.lang.String contents,
java.lang.String pattern,
boolean titleFlag)
Generate part tags, by replace all occurances
of the identifier (pattern) specified in the document (contents)
with LATEX
part commands. |
static java.lang.String |
generatePartTags(java.lang.String contents,
java.lang.String pattern,
boolean titleFlag,
boolean counterFlag)
Generate part tags, by replace all occurances
of the identifier (pattern) specified in the document (contents)
with LATEX
part commands. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final boolean HAS_TITLE
public static final boolean NO_TITLE
public static final boolean RESET_COUNTER
1 ,
I, or i.
public static final boolean NO_RESET_COUNTER
| Constructor Detail |
|---|
private TransformDocumentParts()
private to
prevent instantiation.
| Method Detail |
|---|
public static java.lang.String generatePartTags(java.lang.String contents,
java.lang.String pattern)
Generate part tags, by replace all occurances
of the identifier (pattern) specified in the document (contents)
with LATEX
part commands.
This method just invokes
generatePartTags with HAS_TITLE and
NO_RESET_COUNTER.
contents - - The document that is being processed.pattern - - The text that identifies parts in the
document.
public static java.lang.String generatePartTags(java.lang.String contents,
java.lang.String pattern,
boolean titleFlag)
Generate part tags, by replace all occurances
of the identifier (pattern) specified in the document (contents)
with LATEX
part commands.
This method just invokes
generatePartTags with
NO_RESET_COUNTER.
contents - - The document that is being processed.pattern - - The text that identifies parts in the
document.titleFlag - - Specify whether the part has a
title associated with it or not. Specify preference using
HAS_TITLE or NO_TITLE.
public static java.lang.String generatePartTags(java.lang.String contents,
java.lang.String pattern,
boolean titleFlag,
boolean counterFlag)
Generate part tags, by replace all occurances
of the identifier (pattern) specified in the document (contents)
with LATEX
part commands.
contents - - The document that is being processed.pattern - - The text that identifies parts in the
document.titleFlag - - Specify whether the part has a
title associated with it or not. Specify preference using
HAS_TITLE or NO_TITLE.counterFlag - - Specify whether part counter needs
to be reset when part number is 1,
I or i. Specify preference using
RESET_COUNTER or
NO_RESET_COUNTER.
public static java.lang.String generateChapterTags(java.lang.String contents,
java.lang.String pattern)
Generate chapter tags, by replacing all occurances
of the identifier (pattern) specified in the document (contents)
with LATEX
part commands.
For the case where chapters have titles, since the titles may span multiple lines, I assume that there is a blank line separating the chapter from the first paragraph.
This method just invokes
generateChapterTags with HAS_TITLE and
NO_RESET_COUNTER.
contents - - The document that is being processed.pattern - - The text that identifies chapters in the
document.
public static java.lang.String generateChapterTags(java.lang.String contents,
java.lang.String pattern,
boolean titleFlag)
Generate chapter tags, by replacing all occurances
of the identifier (pattern) specified in the document (contents)
with LATEX
part commands.
For the case where chapters have titles, since the titles may span multiple lines, I assume that there is a blank line separating the chapter from the first paragraph.
This method just invokes
generateChapterTags with
NO_RESET_COUNTER.
contents - - The document that is being processed.pattern - - The text that identifies chapters in the
document.titleFlag - - Specify whether the part has a
title associated with it or not. Specify preference using
HAS_TITLE or NO_TITLE.
public static java.lang.String generateChapterTags(java.lang.String contents,
java.lang.String pattern,
boolean titleFlag,
boolean counterFlag)
Generate chapter tags, by replacing all occurances
of the identifier (pattern) specified in the document (contents)
with LATEX
part commands.
For the case where chapters have titles, since the titles may span multiple lines, I assume that there is a blank line separating the chapter from the first paragraph.
contents - - The document that is being processed.pattern - - The text that identifies chapters in the
document.titleFlag - - Specify whether the part has a
title associated with it or not. Specify preference using
HAS_TITLE or NO_TITLE.counterFlag - - Specify whether chapter counter needs
to be reset when chapter number is 1,
I or i. Specify preference using
RESET_COUNTER or
NO_RESET_COUNTER.
|
Rakesh API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||