-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathquintana.sty
More file actions
138 lines (108 loc) · 3.16 KB
/
Copy pathquintana.sty
File metadata and controls
138 lines (108 loc) · 3.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
\ProvidesPackage{quintana}
\usepackage{hyperref}
\usepackage[table,dvipnames]{xcolor}
\usepackage{collcell}
\usepackage{hhline}
\usepackage{pgf}
\usepackage{xspace}
\usepackage[shortlabels]{enumitem}
\usepackage{mathtools}
\DeclarePairedDelimiter\ceil{\lceil}{\rceil}
\DeclarePairedDelimiter\floor{\lfloor}{\rfloor}
\newcommand\gray{gray}
\newcommand\ColCell[1]{%
\pgfmathparse{#1/255>0.7?1:0}%
\ifnum\pgfmathresult=0\relax\color{white}\fi
\pgfmathparse{#1/255}%
\expandafter\cellcolor\expandafter[%
\expandafter\gray\expandafter]\expandafter{\pgfmathresult}#1}
\newcolumntype{E}{>{\collectcell\ColCell}b{2em}<{\endcollectcell}}
\usepackage{fancyvrb}
\usepackage{tcolorbox}
\definecolor{backgrey}{RGB}{248,249,250}
\definecolor{bordergrey}{RGB}{234,236,240}
\usepackage[langlinenos=true]{minted}
\usepackage[utf8]{inputenc}
\usepackage{tabularx}
\newcolumntype{Y}{>{\centering\arraybackslash}X}
\definecolor{mintedbackground}{rgb}{0.95,0.95,0.95}
\usepackage{fontspec}
\setmainfont{Futura}
\setlength{\parskip}{.8em}
\usepackage{tikz}
\usetikzlibrary{matrix}
\usetikzlibrary{positioning}
\usetikzlibrary{calc}
\usemintedstyle{lovelace}
\usepackage[low-sup]{subdepth}
\usepackage[english]{babel}
\usepackage[letterpaper]{geometry}
\usepackage{titlesec}
\usepackage{fancyhdr}
\renewcommand{\theFancyVerbLine}{\sffamily \textcolor{gray}{\normalsize \oldstylenums{\arabic{FancyVerbLine}}}}
\geometry{top=1.0in, bottom=0.7in, left=1.0in, right=1.0in}
\BeforeBeginEnvironment{pyreport}{\begin{tcolorbox}\normalsize}
\AfterEndEnvironment{pyreport}{\end{tcolorbox}\large}
\pagestyle{fancy}
\lhead{}
\chead{}
\rhead{\LARGE Quintana \thepage}
\lfoot{}
\cfoot{}
\rfoot{}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\titleformat{\section}
{\normalfont\fontsize{12}{19}\bfseries}{Problem \thesection:}{1em}{}
\titleformat{\subsection}[runin]
{\normalfont\fontsize{12}{19}\bfseries}{\thesubsection}{1em}{}
\linespread{1.1}
\newcommand{\question}{\begin{tcolorbox}[boxrule=0.5pt, colback=backgrey, colframe=bordergrey, sharpish corners]\subsection{}}
\newcommand{\closequestion}{\end{tcolorbox}}
\newcommand{\tikzmark}[3][]{\tikz[remember picture,baseline] \node [anchor=base,#1](#2) {$#3$};}
\newmintedfile{python}{breaklines=true,
bgcolor=mintedbackground,
fontfamily=tt,
fontsize=\normalsize,
linenos=true,
numberblanklines=true,
numbersep=5pt,
%gobble=0,
frame=leftline,
framerule=0.4pt,
framesep=2mm,
funcnamehighlighting=true,
obeytabs=true,
tabsize=4,
mathescape=false
samepage=false,
showspaces=false,
showtabs =false,
texcl=false,
}
\newmintedfile{cpp}{breaklines=true,
bgcolor=mintedbackground,
fontfamily=tt,
fontsize=\normalsize,
linenos=true,
numberblanklines=true,
numbersep=5pt,
%gobble=0,
frame=leftline,
framerule=0.4pt,
framesep=2mm,
funcnamehighlighting=true,
obeytabs=true,
tabsize=3,
mathescape=false
samepage=false,
showspaces=false,
showtabs=false,
texcl=false,
}
\linespread{1.1}
\newcommand{\mintcpp}{\begin{minted}[xleftmargin=12pt,breaklines,linenos]{cpp}}
\newcommand{\mintpy}{\begin{minted}[xleftmargin=12pt,breaklines,linenos]{python}}
\def\tabularxcolumn#1{m{#1}}% vertical centering
\newcolumntype{Y}{>{\centering\arraybackslash}X}
\endinput