Module pyreport.symbols

Provides the Symbol and SymbolCollection classes.

Sub-modules

pyreport.symbols.greek

A module providing the Greek alphabet as symbols.

pyreport.symbols.hebrew

A module providing the Hebrew alphabet as symbols.

pyreport.symbols.latin

A module providing the Latin alphabet as symbols in various styles.

Classes

class Symbol (plaintext, default_latex, default_unicode, alternate_latex=None, alternate_unicode=None, switch=<function Symbol.<lambda>>)

A class that represents a symbol in plaintext, TeX and Unicode.

Constructor for the Symbol class.

Parameters

plaintext : str
The plaintext representation of the symbol.
default_latex : str
The default TeX representation of the symbol.
default_unicode : str
The default Unicode representation of the symbol.
alternate_latex : str, optional
The alternate TeX representation of the symbol, by default None.
alternate_unicode : str, optional
The alternate Unicode representation of the symbol, by default None.
switch : function, optional
A function that returns a boolean value that determines whether to use the alternate representation, by default lambda: False.

Methods

def to_plain(self)

Get the plaintext representation of the symbol.

def to_tex(self)

Get the TeX representation of the symbol.

def to_unicode(self)

Get the Unicode representation of the symbol.

class SymbolCollection

A class that represents a collection of symbols.

Ancestors

  • abc.ABC

Subclasses

Static methods

def get_symbols()

Get all symbols in the class.

def list_symbols()

List all symbols in the class.