Skip to content

Typesetting HTML

codechembook.symbols.typesettingHTML

textbf(text)

Return a piece of text that has added HTML bold face tags.

Required Args: text (string): text that should be bold faced

Returns: (string): bold face text with HTML tags

Source code in src/codechembook/symbols/typesettingHTML.py
50
51
52
53
54
55
56
57
58
59
60
def textbf(text):
    """
    Return a piece of text that has added HTML bold face tags.

    Required Args:
    text (string): text that should be bold faced

    Returns:
    (string): bold face text with HTML tags
    """
    return _enclose(text, 'b')

textit(text)

Return a piece of text that has added HTML italics tags.

Required Args: text (string): text that should be italicized

Returns: (string): italicized text with HTML tags

Source code in src/codechembook/symbols/typesettingHTML.py
38
39
40
41
42
43
44
45
46
47
48
def textit(text):
    """
    Return a piece of text that has added HTML italics tags.

    Required Args:
    text (string): text that should be italicized

    Returns:
    (string): italicized text with HTML tags
    """
    return _enclose(text, 'i')

textsub(text)

Return a piece of text that has added HTML subscript tags.

Required Args

text (string): text that should be subscripted

Returns:

Type Description
string

subscripted text with HTML tags

Source code in src/codechembook/symbols/typesettingHTML.py
14
15
16
17
18
19
20
21
22
23
24
def textsub(text):
    """
    Return a piece of text that has added HTML subscript tags.

    Required Args:
        text (string): text that should be subscripted

    Returns:
        (string): subscripted text with HTML tags
    """
    return _enclose(text, 'sub')

textsup(text)

Return a piece of text that has added HTML superscript tags.

Required Args: text (string): text that should be superscripted

Returns: (string): superscripted text with HTML tags

Source code in src/codechembook/symbols/typesettingHTML.py
26
27
28
29
30
31
32
33
34
35
36
def textsup(text):
    """
    Return a piece of text that has added HTML superscript tags.

    Required Args:
    text (string): text that should be superscripted

    Returns:
    (string): superscripted text with HTML tags
    """
    return _enclose(text, 'sup')