Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
Collection of 257 TikZ graphics with R, knitr, and Hugo to automatically build a gallery website and README.
TikZ Favorites is a GitHub repository by Alfonso R. Reyes that collects 257 TikZ graphics and uses R, knitr, and Hugo to automatically generate a gallery README and deployable website from LaTeX source files.
TikZ Favorites is a curated repository of 257 TikZ graphics collected from the web, papers, slides, tutorials, and books, organized by Alfonso R. Reyes. It takes TikZ source files written in LaTeX, compiles them into PNG and PDF outputs stored in an out folder, and uses R packages knitr and rmarkdown to auto-generate a README that pairs each graphic with its code. The repository also includes a Hugo-based website that can be deployed to GitHub Pages from a docs folder. This lets you browse the visual result and click to see the underlying TikZ code.
The workflow starts when you place a TikZ source file with a .tex extension into the src folder. The included knitr chunks in template.Rmd read the sources, compile each one with pdflatex or lualatex, and write the resulting PNG or PDF to the out folder. The README.Rmd document then assembles the README with each figure and its code, and the optional _build_site.R script builds the Hugo website for deployment.
There are 257 TikZ figures saved as .tex files, plus one additional file that requires lualatex. The collection also includes 19 data files under src/data and 2 LaTeX style/library files under src/texmf.
The project relies on knitr and rmarkdown to integrate R code with LaTeX and TikZ. Hugo serves as the static site generator for building the web gallery.
Yes. You can add new .tex files to the src folder and the automated scripts will include them in the README as long as they compile successfully. The template.Rmd file includes identifiers that allow custom settings to be applied.
The recommended method is to publish the docs folder to GitHub Pages. The repository includes a _build_site.R script that customizes the Hugo site before deployment.
The repository credits Walmes Zeviani for the original combination of LaTeX, TikZ, R, and Hugo, available at his GitHub repository. Alfonso R. Reyes built TikZ Favorites on top of that concept.
