latex_util
AdjustBox
¶
Bases: Environment
A class to adjust the size of boxes.
This class is intentionally not @traceable.
Source code in fastestimator/fastestimator/util/latex_util.py
Center
¶
ContainerList
¶
Bases: Container
A class to expedite combining pieces of latex together.
This class is intentionally not @traceable.
Source code in fastestimator/fastestimator/util/latex_util.py
dumps
¶
Get a string representation of this container.
Returns:
Type | Description |
---|---|
str
|
A string representation of itself. |
Form
¶
Bases: Environment
A class to allow Form elements.
This class is intentionally not @traceable. Only one Form is allowed per document.
Source code in fastestimator/fastestimator/util/latex_util.py
HrefFEID
¶
Bases: ContainerList
A class to represent a colored and underlined hyperref based on a given fe_id.
This class is intentionally not @traceable.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
fe_id |
FEID
|
The id used to link this hyperref. |
required |
name |
str
|
A string suffix to be printed as part of the link text. |
required |
link_prefix |
str
|
The prefix for the hyperlink. |
'tbl'
|
id_in_name |
bool
|
Whether to include the id in front of the name text. |
True
|
bold_name |
bool
|
Whether to bold the name. |
False
|
Source code in fastestimator/fastestimator/util/latex_util.py
IterJoin
¶
Bases: Container
A class to convert an iterable to a latex representation.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
Iterable
|
Data of the cell. |
required |
token |
str
|
String to serve as separator among items of |
required |
Source code in fastestimator/fastestimator/util/latex_util.py
dumps
¶
Get a string representation of this cell.
Returns:
Type | Description |
---|---|
str
|
A string representation of itself. |
PyContainer
¶
Bases: ContainerList
A class to convert python containers to a LaTeX representation.
This class is intentionally not @traceable.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
Union[list, tuple, set, dict]
|
The python object to be converted to LaTeX. |
required |
truncate |
Optional[int]
|
How many values to display before truncating with an ellipsis. This should be a positive integer or None to disable truncation. |
None
|
Source code in fastestimator/fastestimator/util/latex_util.py
TextField
¶
Bases: ContainerCommand
A class to create editable text fields.
This class is intentionally not @traceable. It can only be used inside of a Form.
Source code in fastestimator/fastestimator/util/latex_util.py
TextFieldBox
¶
Bases: ContainerList
A class to wrap TextFields into padded boxes for use in nesting within tables.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name |
str
|
The name to assign to this TextField. It should be unique within the document since changes to one box will impact all boxes with the same name. |
required |
height |
str
|
How tall should the TextField box be? Note that it will be wrapped by 10pt space on the top and bottom. |
'2.5cm'
|
Source code in fastestimator/fastestimator/util/latex_util.py
Verbatim
¶
Bases: Environment
A class to put a string inside the latex verbatim environment.
This class is intentionally not @traceable.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
str
|
The string to be wrapped. |
required |
Source code in fastestimator/fastestimator/util/latex_util.py
WrapText
¶
Bases: LatexObject
A class to convert strings or numbers to wrappable latex representation.
This class will first convert the data to string, and then to a wrappable latex representation if its length is too long. This fixes an issue which prevents the first element placed into a latex X column from wrapping correctly.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
Union[str, int, float]
|
Input data to be converted. |
required |
threshold |
int
|
When the length of |
required |
Raises:
Type | Description |
---|---|
AssertionError
|
If |
Source code in fastestimator/fastestimator/util/latex_util.py
dumps
¶
Get a string representation of this cell.
Returns:
Type | Description |
---|---|
str
|
A string representation of itself. |