Routines for writing TeX for tables.
Class Error Base class for errors.
Class WrongInputSizeError Error if an array has the wrong size for the following operation.
Function color_to_latex Undocumented
Function marker_to_latex Undocumented
Function marker_to_html Undocumented
Function numtotext Returns a text from a positive integer.
Function writeLabels Format text to be output by LaTeX.
Function writeFEvals Returns string representation of a number of function evaluations.
Function writeFEvals2 Returns string representation of a number of function evaluations.
Function writeFEvalsMaxSymbols Return the smallest string representation of a number.
Function writeFEvalsMaxPrec Return a string representation of a number.
Function tableLaTeX Generates a tabular from a sequence of sequence of strings.
Function tableXLaTeX Generates a tabular from a sequence of sequence of strings.
Function tableLaTeXStar Generates a tabular* from a sequence of sequence of strings
Class DataTable Undocumented
def color_to_latex(color):
Undocumented
def marker_to_latex(marker):
Undocumented
def marker_to_html(marker):
Undocumented
def numtotext(n):

Returns a text from a positive integer.

Is to be used for generating command names: they cannot include number characters.

WARNING: n should not be larger than (53*52)-1 = 2755 for the moment

def writeLabels(label):
Format text to be output by LaTeX.
def writeFEvals(fevals, precision='.2'):
Returns string representation of a number of function evaluations.
def writeFEvals2(fevals, precision=2, maxdigits=None, isscientific=False):

Returns string representation of a number of function evaluations.

This method is supposed to be used for filling up a LaTeX tabular.

To address the eventual need to keep their string representation short, the method here proposes the shortest representation between the full representation and a modified scientific representation.

Examples:

Number Precision Output Representation
102345 2 digits 1.0e5
Parametersfloat fevals
int precisionnumber of significant digits
int maxdigits
bool isscientific
def writeFEvalsMaxSymbols(fevals, maxsymbols, isscientific=False):

Return the smallest string representation of a number.

This method is only concerned with the maximum number of significant digits.

Two alternatives:

  1. modified scientific notation (without the trailing + and zero in the exponent)
  2. float notation
Returnsstring representation of a number of function evaluations or aRT.
def writeFEvalsMaxPrec(entry, SIG, maxfloatrepr=100000.0):

Return a string representation of a number.

Two alternatives:

  1. float notation with a precision smaller or equal to SIG (if the entry is one, then the result is 1).
  2. if the number is larger or equal to maxfloatrepr, a modified scientific notation (without the trailing + and zero in the exponent)
Returnsstring representation of a number of function evaluations or aRT.
def tableLaTeX(table, spec, extra_eol=(), add_begin_tabular=True, add_end_tabular=True):
Generates a tabular from a sequence of sequence of strings.
Parametersseq tablesequence of sequence of strings
string specstring for table specification, see http://en.wikibooks.org/wiki/LaTeX/Tables#The_tabular_environment
seq extra_eolsequence of string the same length as the table (same number of lines) which are added at the end of each line.
bool add_begin_tabularbool value that specifies if begin tabular is added.
bool add_end_tabularbool value that specifies if end tabular is added.
Returnssequence of strings of a LaTeX tabular.
def tableXLaTeX(table, spec, extra_eol=(), add_begin_tabular=True, add_end_tabular=True):
Generates a tabular from a sequence of sequence of strings.
Parametersseq tablesequence of sequence of strings
string specstring for table specification, see http://en.wikibooks.org/wiki/LaTeX/Tables#The_tabular_environment
seq extra_eolsequence of string the same length as the table (same number of lines) which are added at the end of each line.
bool add_begin_tabularbool value that specifies if begin tabular is added.
bool add_end_tabularbool value that specifies if end tabular is added.
Returnssequence of strings of a LaTeX tabular.
def tableLaTeXStar(table, width, spec, extraeol=()):
Generates a tabular* from a sequence of sequence of strings
Parametersseq tablesequence of sequence of strings
string widthstring for the width of the table
strin specstring for table specification, see http://en.wikibooks.org/wiki/LaTeX/Tables#The_tabular_environment
seq extraeolsequence of string the same length as the table (same number of lines) which are added at the end of each line.
API Documentation for cocopp, generated by pydoctor at 2020-01-21 16:27:37.