|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectrvl.swv.LaTeXFile
public class LaTeXFile
This class defines the FileInterface for a LaTeX file.
The following format-specific options are implemented:
Field Summary | |
---|---|
protected java.io.BufferedReader |
iStream
|
protected StatWeave |
parent
|
protected java.lang.StringBuilder |
storage
|
protected SyntaxInterface |
syni
|
Constructor Summary | |
---|---|
LaTeXFile()
Default constructor |
Method Summary | |
---|---|
void |
embedPlots(java.lang.String sig,
FigFile ff,
int[] pages)
Replace bookmark with specified figure(s) in ff |
java.util.Vector<java.lang.String> |
getArgs()
Return the arguments specified in a coderef tag. |
java.lang.String |
getCodeLine()
Return one line from a code chunk. |
java.lang.String |
getExpr()
Return the expression given in the current expr tag |
int[] |
getFigFormats()
Return acceptable graphics formats -- null if no graphics supported. |
java.lang.String |
getLabel()
Return the label specified in the latest tag. |
java.lang.String |
getLang()
Return the language associated with latest tag |
java.lang.String |
getLine()
Read one line from source file |
java.lang.String |
getOptions()
Return the options list for latest tag. |
StatWeave |
getParent()
Access the StatWeave instance that we are serving |
java.lang.String |
getPosition()
Return the current line number in the form "line #". |
Tag |
nextTag()
Return the next tag type found in the file |
void |
readSourceFile(java.lang.String fileName)
Read the specified source file. |
void |
replaceBookmark(java.lang.String sig,
java.lang.String text,
Tag context)
Find the given bookmark previously saved with signature sig, and replace it with text. |
void |
saveBookmark(java.lang.String sig)
Replace the current tagged region of the source file with the specified sig. |
void |
setParent(StatWeave parent)
Save the StatWeave instance that we are serving |
void |
writeResults(int mopUp)
Write the results to the output file derived from sys.basename. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected StatWeave parent
protected SyntaxInterface syni
protected java.io.BufferedReader iStream
protected java.lang.StringBuilder storage
Constructor Detail |
---|
public LaTeXFile()
Method Detail |
---|
public void setParent(StatWeave parent)
setParent
in interface FileInterface
public StatWeave getParent()
getParent
in interface FileInterface
public int[] getFigFormats()
Note: most required integer constants are defined in FigFile
getFigFormats
in interface FileInterface
public void readSourceFile(java.lang.String fileName)
readSourceFile
in interface FileInterface
public void writeResults(int mopUp)
Finally, clean up intermediate files as directed by the mopUp argument, which should have a value of 0, 1, or 2. 0 means leave all intermediate files; 2 means erase all intermediate files and leave only essential ones; and 1 is somewhere in between (e.g. keep graphics files)
writeResults
in interface FileInterface
public Tag nextTag()
nextTag
in interface FileInterface
public java.lang.String getLine()
getLine
in interface FileInterface
public java.lang.String getPosition()
getPosition
in interface FileInterface
public java.lang.String getCodeLine()
If it is actually a code reference, return the string !coderef label or !coderef *label, where label is the label provided. (Use the * form to force the code reference to be displayed regardless of the value of the option showref.)
Return null when the end of the code chunk is reached.
getCodeLine
in interface FileInterface
public java.lang.String getLang()
Needed when tag is chunk, langOpts, or expr
getLang
in interface FileInterface
public java.lang.String getExpr()
getExpr
in interface FileInterface
public java.lang.String getOptions()
Needed when tag is chunk, globalOpts, langOpts, recallFig, recallCode, or recallOutput.
getOptions
in interface FileInterface
public java.lang.String getLabel()
Needed when the tag is coderef, recallFig, recallCode, recallOutput. (When the tag is chunk, the label, if any, should be included in the list returned by getOptions().)
getLabel
in interface FileInterface
public java.util.Vector<java.lang.String> getArgs()
getArgs
in interface FileInterface
public void saveBookmark(java.lang.String sig)
saveBookmark
in interface FileInterface
public void replaceBookmark(java.lang.String sig, java.lang.String text, Tag context)
replaceBookmark
in interface FileInterface
public void embedPlots(java.lang.String sig, FigFile ff, int[] pages)
embedPlots
in interface FileInterface
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |