Texcaller
|
The texcaller.h
header does not only provide the C functions, but also the corresponding C++ wrappers.
More...
Functions | |
void | texcaller::convert (std::string &result, std::string &info, const std::string &source, const std::string &source_format, const std::string &result_format, int max_runs) throw (std::domain_error, std::runtime_error) |
Convert a TeX or LaTeX source to DVI or PDF. More... | |
std::string | texcaller::escape_latex (const std::string &s) throw (std::runtime_error) |
Escape a string for direct use in LaTeX. More... | |
The texcaller.h
header does not only provide the C functions, but also the corresponding C++ wrappers.
The following example program demonstrates how these are meant to be used:
Since the C++ wrappers are defined completely inline, there is no need for an extra C++ library. The compiler and linker options of the Texcaller C interface also work perfectly for C++:
|
inline |
Convert a TeX or LaTeX source to DVI or PDF.
This is a simple wrapper around texcaller_convert.
result | will contain the generated document. |
info | will contain additional information such as TeX warnings. |
source | the source to convert |
source_format | must be one of:
|
result_format | must be one of:
|
max_runs | maximum number of TeX runs, must be ≥ 2. |
std::domain_error | the TeX source was invalid. That is, the TeX interpreter exited with an error, or the output didn't stabilize after max_runs runs. |
|
inline |
Escape a string for direct use in LaTeX.
This is a simple wrapper around texcaller_escape_latex.
s | the string to escape |