biogeme.latent_variables.tex_utils module¶
- biogeme.latent_variables.tex_utils.tex_escape(text)[source]¶
Escape characters that have special meaning in TeX.
This function is intended for variable names, parameter names, or other identifiers that may contain characters such as underscores. It ensures the string can safely appear inside TeX math mode.
- Parameters:
text (
str) – Raw text to escape.- Return type:
str- Returns:
TeX-safe string.
- biogeme.latent_variables.tex_utils.tex_identifier(text)[source]¶
Format an identifier so it renders nicely in math mode.
Identifiers such as parameter names or variable names are rendered using
\mathrm{}to avoid them being interpreted as mathematical symbols.- Parameters:
text (
str) – Identifier to render.- Return type:
str- Returns:
TeX expression representing the identifier.