<jupyter_start><jupyter_text>PytexUsage examples of pytex package.<jupyter_code>import pytex<jupyter_output><empty_output><jupyter_text>Create a document object and specify the configuration.<jupyter_code>doc = pytex.Document(
    filename="example",
    institution="Institution Name",
    mayor_heading="Mayor Heading",
    minor_heading="Minor Heading",
    title="Probably a very long title",
    author="<NAME>",
    supervisor="Supervisor's name"
)<jupyter_output><empty_output><jupyter_text>Add a table of contents.<jupyter_code>doc.add_table_of_contents()<jupyter_output><empty_output><jupyter_text>You can add multiple elements secuentially.<jupyter_code>doc.add_section("First Section's Title")

doc.add_paragraph("""
First test paragraph. Lorem ipsum dolor sit amet, consectetur adipiscing elit, 
sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. 
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. 
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. 
Excepteur sint occaecat cupidatat non proident, 
sunt in culpa qui officia deserunt mollit anim id est laborum consectetur adipiscing elit, 
sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. 
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
""")


doc.add_paragraph("""
Second test paragraph. Lorem ipsum dolor sit amet, consectetur adipiscing elit, 
sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. 
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. 
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. 
Excepteur sint occaecat cupidatat non proident, 
sunt in culpa qui officia deserunt mollit anim id est laborum consectetur adipiscing elit, 
sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. 
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
""")

doc.add_paragraph(r"""
This is the black-scholes equation:
""")

doc.add_equation(
    eq=r"\frac{\partial V}{\partial t} + \sigma^2 S^2 \frac{1}{2} \frac{\partial^2V}{\partial S^2} + rS\frac{\partial V}{\partial S} - rV = 0",
    label="bs")

doc.add_paragraph(r"""References work! See equation \ref{bs}.""")


doc.add_paragraph("""
These are some items:
""")

doc.add_items([
        "item1",
        "item2",
        "item3"
    ])


doc.add_paragraph("""
Now let's code some stuff.
""")

doc.add_code(
    code_string="""
    import pytex
    import math
    doc = pytex.Document(filename="file")
    doc.add_section("pytex is great")
    doc.add_paragraph("The number pi is: {}".format(math.pi))
    for i in range(10):
        doc.add_section("Section: " + str(i+2))
    """)

doc.add_paragraph("""
Great!
""")<jupyter_output><empty_output><jupyter_text>Take a look to the tex file.<jupyter_code>print(doc.to_tex())<jupyter_output>\documentclass[11pt]{article}
            \usepackage[utf8]{inputenc}
            \usepackage[T1]{fontenc}
            \usepackage{amsmath}
            \usepackage{fancyhdr}
            \usepackage{listings}
            \usepackage{color}


            \definecolor{codegreen}{rgb}{0,0.6,0}
            \definecolor{codegray}{rgb}{0.5,0.5,0.5}
            \definecolor{codepurple}{rgb}{0.58,0,0.82}
            \definecolor{backcolour}{rgb}{0.95,0.95,0.92}


            \lstdefinestyle{mystyle}{
                backgroundcolor=\color{backcolour},   
                commentstyle=\color{codegreen},
                keywordstyle=\color{magenta},
                numberstyle=\tiny\color{codegray},
                stringstyle=\color{codepurple},
                basicstyle=\footnotesize,
                breakatwhitespace=false,         
                breaklines=true,                 
                captionpos=b,                    
                keepspaces=true,                 
[...]<jupyter_text>Compile to pdf file.<jupyter_code>doc.compile()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.10289855072463767, 'fraction_numerical': 0.01038647342995169, 'mean_word_length': 3.40531914893617, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '6', 'dir': 'jupyter-structured-clean-dedup', 'id': '91839', 'license': 'Apache-2.0', 'n_tokens_mistral': 1424, 'n_tokens_neox': 1355, 'n_words': 346, 'path': 'examples.ipynb', 'repo_name': 'RHDZMOTA/pytex', 'size': '4147'}