/roblox-library

Competitive programming notebook from programadores roblox.

Primary LanguageTeX

Competitive Programming

Repository with algorithms for cp.

Table of Contents

Getting Started

Cloning this template

Click the "Use this template" button in the top right corner, then select "Create a new repository", and then fill in the required information.

Use this template button

Now clone your repository to your machine (or use the github online editor).

Team information

Add information about your team in template_notebook.tex and template_theoretical.tex (like the name, members, affiliation and so on). You can search for % CONFIG: in the files to find where to make changes.

Generating PDF

Requirements: Python 3, pdflatex.

Ubuntu

sudo apt install python3
sudo apt install texlive texinfo texlive-fonts-recommended texlive-latex-extra

Arch

yay -S python3
yay -S texlive texinfo texlive-fonts-recommended texlive-latex-extra

Generating

After installing the above dependencies, run the following commands to generate the pdfs:

python3 generate_latex/generate_notebook.py
python3 generate_latex/generate_theoretical.py

After that, the pdf files will be in the project root folder (notebook.pdf and notebook.pdf).

Automatic generation

When a push is made to the main branch, updated PDFs will be generated automatically and will appear on github after a few minutes. There is no need to perform any additional configuration.

To avoid conflicts, you can delete the notebook.pdf and theoretical.pdf files and then do a pull before performing a push.

How to Use

Notebook

Categories

These are the default categories. When adding a folder within the code folder, a new category will be created.

Adding a code

To add code, add a .cpp file to a category folder.

When adding code, it's a good practice to add more information about it, such as:

// name of algorithm/structure
//
// description and more information
// 
// links of problems solved with it (to make sure it works)
// 
// complexity (of each funcion, if applicable)

struct Example {
    // code
};

Ommiting files from PDF

You can omit certain files from appearing in the final PDF by adding their name in block_from_notebook.txt.

Examples of notebook

Theoretical

Categories

These are the default categories. When adding a folder within the code folder, a new category will be created.

Adding a theoretical information

To add theoretical information, add a .tex file to a category folder.

When adding new information, use \subsection at the beginning of the file.

\subsection{Title}

% ...

To add text immediately below the category name, add the content to a file named general.tex. There's an example here.

There's an example of adding an image here.

Ommiting files from PDF

You can omit certain files from appearing in the final PDF by adding their name in block_from_theoretical.txt.

Examples of theoretical

Modifying LaTeX

These are the latex templates for the notebook and theoretical, if you want to modify them.

Contributors

Inspired by Tiagosf00 notebook and brunomaletta notebook.