Skip to content

Instantly share code, notes, and snippets.

@th0rex
Created March 11, 2018 17:23
Show Gist options
  • Save th0rex/944c8c4ceb657881b8b8c52c6a2386ef to your computer and use it in GitHub Desktop.
Save th0rex/944c8c4ceb657881b8b8c52c6a2386ef to your computer and use it in GitHub Desktop.
Some latex styles
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{minted}
\usepackage{xcolor}
\definecolor{background}{HTML}{1d1f21}
\definecolor{foreground}{HTML}{c5c8c6}
\definecolor{comment}{HTML}{969896}
\definecolor{keyword}{HTML}{b294bb}
\definecolor{variable}{HTML}{cc6666}
\definecolor{function}{HTML}{81a2be}
\definecolor{class}{HTML}{f0c674}
\definecolor{string}{HTML}{b5bd68}
\definecolor{int}{HTML}{de935f}
\pagecolor{background}
\color{foreground}
\usemintedstyle{tomorrownight}
\newcommand{\register}[1]{{
\color{variable}{#1}
}}
\newcommand{\imm}[1]{{
\color{int}{#1}
}}
\newcommand{\mnemonic}[1]{{
\color{function}{#1}
}}
\newcommand{\name}[1]{{
\color{class}{#1}
}}
\newcommand{\operand}[1]{{
\color{keyword}{#1}
}}
# save to /usr/lib/python2.7/site-packages/pygments/styles
from pygments.style import Style
from pygments.token import Keyword, Name, Comment, String, Error, \
Number, Operator, Generic, Whitespace
class TomorrownightStyle(Style):
default_style = ''
background_color = '#1d1f21'
styles = {
Comment: 'italic #969896',
String: '#b5bd68',
Number: '#De935f',
Keyword: 'bold #b294bb',
Name: '#cc6666',
Name.Variable: '#cc6666',
Name.Class: '#f0c674',
Name.Function: '#81a2be',
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment