Note
This has not been properly tested yet so is to be assumed experimental for the time being...!
| Modifier and Type | Class and Description |
|---|---|
| private static enum | LaTeXIndenter.
Encapsulates the different states our parser can be in |
| Modifier and Type | Field and Description |
|---|---|
| private static final String | |
| private static final Pattern | |
| private int | blankLineCount
Number of consecutive blank lines encountered |
| private boolean | compactingBlankLines
Whether to compact >1 blank lines up as a single blank line |
| public static final int | DEFAULT_INDENT_WIDTH
Default indent width |
| public static final int | DEFAULT_MAX_INDENT_LEVEL
Default maximum indent level |
| private static final String | |
| private static final Pattern | |
| private int | indentLevel
Current indent level |
| private int | indentWidth
Current indent width |
| private static final String | |
| private int | maxIndentLevel
Current maximum indent level |
| private final Writer | outputWriter
Writer that we are outputting to |
| private LaTeXIndenter. | parsingState
Current parsing state |
| private boolean | verbatimMode
Set when we are in verbatim mode |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| public int | |
| public int | |
| private void | |
| private void | |
| private void | |
| public boolean | |
| public void | |
| public void | run(Reader inputReader)
Indents the TeX read from the given inputReader, sending the results to
|
| public void | |
| public void | |
| public void |
| BEGIN | back to summary |
|---|---|
| private static final String BEGIN | |
| BEGIN_PATTERN | back to summary |
|---|---|
| private static final Pattern BEGIN_PATTERN | |
| blankLineCount | back to summary |
|---|---|
| private int blankLineCount Number of consecutive blank lines encountered | |
| compactingBlankLines | back to summary |
|---|---|
| private boolean compactingBlankLines Whether to compact >1 blank lines up as a single blank line | |
| DEFAULT_INDENT_WIDTH | back to summary |
|---|---|
| public static final int DEFAULT_INDENT_WIDTH Default indent width | |
| DEFAULT_MAX_INDENT_LEVEL | back to summary |
|---|---|
| public static final int DEFAULT_MAX_INDENT_LEVEL Default maximum indent level | |
| END | back to summary |
|---|---|
| private static final String END | |
| END_PATTERN | back to summary |
|---|---|
| private static final Pattern END_PATTERN | |
| indentLevel | back to summary |
|---|---|
| private int indentLevel Current indent level | |
| indentWidth | back to summary |
|---|---|
| private int indentWidth Current indent width | |
| LINE_SEPARATOR | back to summary |
|---|---|
| private static final String LINE_SEPARATOR | |
| maxIndentLevel | back to summary |
|---|---|
| private int maxIndentLevel Current maximum indent level | |
| outputWriter | back to summary |
|---|---|
| private final Writer outputWriter Writer that we are outputting to | |
| parsingState | back to summary |
|---|---|
| private LaTeXIndenter. Current parsing state | |
| verbatimMode | back to summary |
|---|---|
| private boolean verbatimMode Set when we are in verbatim mode | |
| LaTeXIndenter | back to summary |
|---|---|
| public LaTeXIndenter(final Writer outputWriter) Creates a new indenter that will output to | |
| createIndent | back to summary |
|---|---|
| private void createIndent(int level) throws IOException | |
| getIndentWidth | back to summary |
|---|---|
| public int getIndentWidth() | |
| getMaxIndentLevel | back to summary |
|---|---|
| public int getMaxIndentLevel() | |
| handleLine | back to summary |
|---|---|
| private void handleLine(String line) throws IOException Handles a single line, which may or may not end in a newline character | |
| handleLineFragmentInDefaultState | back to summary |
|---|---|
| private void handleLineFragmentInDefaultState(String line) throws IOException | |
| handleLineInDefaultState | back to summary |
|---|---|
| private void handleLineInDefaultState(String line) throws IOException | |
| isCompactingBlankLines | back to summary |
|---|---|
| public boolean isCompactingBlankLines() | |
| reset | back to summary |
|---|---|
| public void reset() | |
| run | back to summary |
|---|---|
| public void run(Reader inputReader) throws IOException Indents the TeX read from the given inputReader, sending the results to
| |
| setCompactingBlankLines | back to summary |
|---|---|
| public void setCompactingBlankLines(boolean condenseBlankLines) | |
| setIndentWidth | back to summary |
|---|---|
| public void setIndentWidth(int indentWidth) | |
| setMaxIndentLevel | back to summary |
|---|---|
| public void setMaxIndentLevel(int maxIndentLevel) | |
| Modifier and Type | Field and Description |
|---|---|
| public static final LaTeXIndenter. | BEGIN_DECLARATION
Waiting to resolve a \\begin that started on the previous line |
| public static final LaTeXIndenter. | DEFAULT
Normal TeX |
| public static final LaTeXIndenter. | EMPTY_LINES
Handling a run of empty lines |
| public static final LaTeXIndenter. | END_DECLARATION
Waiting to resolve a \\end that started on the previous line |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static LaTeXIndenter. | |
| public static LaTeXIndenter. |
| BEGIN_DECLARATION | back to summary |
|---|---|
| public static final LaTeXIndenter. Waiting to resolve a \\begin that started on the previous line | |
| DEFAULT | back to summary |
|---|---|
| public static final LaTeXIndenter. Normal TeX | |
| EMPTY_LINES | back to summary |
|---|---|
| public static final LaTeXIndenter. Handling a run of empty lines | |
| END_DECLARATION | back to summary |
|---|---|
| public static final LaTeXIndenter. Waiting to resolve a \\end that started on the previous line | |
| ParsingState | back to summary |
|---|---|
| private ParsingState() | |
| valueOf | back to summary |
|---|---|
| public static LaTeXIndenter. | |
| values | back to summary |
|---|---|
| public static LaTeXIndenter. | |