Skip to content

Instantly share code, notes, and snippets.

@filemon-mateus
filemon-mateus / paper.py
Created April 28, 2025 20:24
A paper-inspired Pygments style and lexer for Python.
from pygments.style import Style
from pygments.token import Comment, Generic, Keyword, Name, Number, Operator, Punctuation, String, Token
__all__ = ['PaperStyle']
class PaperStyle(Style):
'''A paper-inspired Pygments style for Python.'''
class Dict:
@filemon-mateus
filemon-mateus / python.sty
Created April 14, 2025 17:43
Python syntax highlighting and language definitions for LaTeX listings.
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{python}[
2021/11/21
Python Syntax Highlighting and Language Definitions for LaTeX Listings.
Provided by Filemon Mateus <mateus@utah.edu>.
]
\RequirePackage[procnames]{listings}
\RequirePackage{xcolor}
\definecolor{BLACK}{HTML}{111111}
@filemon-mateus
filemon-mateus / plot.tex
Last active April 14, 2025 17:45
A minimal LaTeX blueprint for creating standalone plots with PGF.
\documentclass{standalone}
\usepackage{pgfplots}
\pgfplotsset{
compat={newest},
grid={both},
tick pos={left},
tick align={outside},
grid style={dotted},
title style={font=\bfseries},