-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommands.tex
40 lines (34 loc) · 933 Bytes
/
commands.tex
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
% a new command which severs arbitrary section number
\newcommand{\asection}[2]{
\setcounter{section}{#1}
\addtocounter{section}{-1}
\section{#2}
}
\definecolor{code}{HTML}{dddddd}
\definecolor{codered}{HTML}{cc0200}
\definecolor{codepurple}{HTML}{cc33cc}
\definecolor{codegreen}{HTML}{519179}
\newcommand{\acode}[1]{
\colorbox{code}{\lstinline[basicstyle=\ttfamily]{#1}}
}
\newcommand{\acodered}[1]{
\colorbox{codered}{\lstinline[basicstyle=\ttfamily\color{white}]{#1}}
}
\newcommand{\acodeppl}[1]{
\colorbox{codepurple}{\lstinline[basicstyle=\ttfamily\color{white}]{#1}}
}
\newcommand{\acodegrn}[1]{
\colorbox{codegreen}{\lstinline[basicstyle=\ttfamily\color{white}]{#1}}
}
\newenvironment{anote}{
\colorlet{shadecolor}{yellow!30}
\begin{shaded}
\textbf{Tip}\par}
{\end{shaded}
}
\newenvironment{awarn}{
\colorlet{shadecolor}{red!20}
\begin{shaded}
\textbf{Warning}\par}
{\end{shaded}
}