Description Usage Arguments Details Value See Also
These internal functions provide functionality to find environment names and their use
The functionFindEnd
is function returns the position of the vector string x in which it finds a match to the ending of an latex environment with name cmdName
1 2 3 4 5 | FindBegin(x, cmdName)
FindEnd(x, cmdName)
FindCommand(x, cmdName)
|
x |
string vector, each line should represent one line of a text file or a section fo a text file. |
cmdName |
Command to search for in |
In FindBegin
and FindEnd
, cmdName
refers to the name of the command that would start an environment. Following the 'LaTeX' convention of "\begin{cmdName
}" or "\end{cmdName
}" respectively. However, it is not a full throrough check.
They will only be found by this class if they are only preceded by alphanumeric characters and spaces, this is to force the user to use begin and end environments at the start of a new line. TODO: CONSIDER AYBE CHANGING THIS THIS, IT IS EASY.
On the other hand, in the function FindCommand
. It finds the command "\cmdName
". And in this case it is less rescrittive, as long as the line is not commented, it will find it.
Make sure to not write slashes before the "\cmdName
", since you might bug the program if it thinks you wrote the command but you just wrote some slashes and then the command name afterwards.
All functions don't search for commands if the commands have been commented with the latex comment command in the same line... don't try to use multiple line comments on latex please...
IMPORTANT, instead of just writing something alphanumeric, these function actually use the cmdName
as a regular expression, which might be useful in many cases, but be careful with this.
TODO: Implement options for regular expressions
Returns a numeric vector, indicating each occurrance of a start of a environment that looks like \begin{cmdName
}
Returns a numeric vector, indicating each occurrence of a start of a environment that looks like \end{cmdName
}
Returns a numeric vector, indicating each occurrence of the command \cmdName
found in the document.
Other Structuring Document: CompileDocument
,
DivideFile
, IsWellSectioned
,
StructureDocument
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.