project_report/pylatex_ext.py
def add_text(doc, t):
    """
    Generic function to add text to a pylatex document.
    Split the provided text to escape latex commands and then add to the container.
    """
    current_pos = 0
    for m in re.finditer(r'latex::(.+?)::', t):
        doc.append(t[current_pos: m.start()])
        doc.append(NoEscape(' ' + m.group(1) + ' '))
        current_pos = m.end()
    doc.append(t[current_pos:])
    return doc

    Generic function to add text to a pylatex document.
    Split the provided text to escape latex commands and then add to the container.
    
Generic function to add text to a pylatex document.
Split the provided text to escape latex commands and then add to the container.
Generic function to add text to a pylatex document . Split the provided text to escape latex commands and then add to the container .
def add_text(doc, t):
    current_pos = 0
    for m in re.finditer(r'latex::(.+?)::', t):
        doc.append(t[current_pos: m.start()])
        doc.append(NoEscape(' ' + m.group(1) + ' '))
        current_pos = m.end()
    doc.append(t[current_pos:])
    return doc
def add_text ( doc , t ) : current_pos = 0 for m in re . finditer ( r'latex::(.+?)::' , t ) : doc . append ( t [ current_pos : m . start ( ) ] ) doc . append ( NoEscape ( ' ' + m . group ( 1 ) + ' ' ) ) current_pos = m . end ( ) doc . append ( t [ current_pos : ] ) return doc
Generic function to add text to a pylatex document.
Generic function to add text to a pylatex document .
"""
    Generic function to add text to a pylatex document.
    Split the provided text to escape latex commands and then add to the container.
    """
doc
t