This project consists of a template for competitive programming teams, containing automatic PDF generation with code and theory.
Click the "Use this template" button in the top right corner, then select "Create a new repository", and then fill in the required information.
Now clone your repository to your machine (or use the github online editor).
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.
Requirements: Python 3, pdflatex.
sudo apt install python3
sudo apt install texlive texinfo texlive-fonts-recommended texlive-latex-extra
yay -S python3
yay -S texlive texinfo texlive-fonts-recommended texlive-latex-extra
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).
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.
These are the default categories. When adding a folder within the code folder, a new category will be created.
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
};
You can omit certain files from appearing in the final PDF by adding their name in block_from_notebook.txt.
These are the default categories. When adding a folder within the code folder, a new category will be created.
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.
You can omit certain files from appearing in the final PDF by adding their name in block_from_theoretical.txt.
These are the latex templates for the notebook and theoretical, if you want to modify them.
Inspired by Tiagosf00 notebook and brunomaletta notebook.