88 lines
2.3 KiB
TeX
88 lines
2.3 KiB
TeX
\NeedsTeXFormat{LaTeX2e}
|
|
\ProvidesPackage{ntnu-math}[Personal styles for NTNU math exercises]
|
|
|
|
\RequirePackage{cancel}
|
|
\RequirePackage{tikz}
|
|
\RequirePackage{pgfplots}
|
|
\RequirePackage{amssymb}
|
|
\RequirePackage{amsthm}
|
|
|
|
|
|
% ░█▀▀░▄▀▄░█░█░█▀█░▀█▀░▀█▀░█▀█░█▀█░█▀▀
|
|
% ░█▀▀░█\█░█░█░█▀█░░█░░░█░░█░█░█░█░▀▀█
|
|
% ░▀▀▀░░▀\░▀▀▀░▀░▀░░▀░░▀▀▀░▀▀▀░▀░▀░▀▀▀
|
|
|
|
|
|
\newcommand{\mcom}[1]{&& \text{#1}}
|
|
|
|
\newcommand{\R}{\mathbb{R}}
|
|
\newcommand{\Q}{\mathbb{Q}}
|
|
\newcommand{\N}{\mathbb{N}}
|
|
\newcommand{\Z}{\mathbb{Z}}
|
|
|
|
\newcommand{\nCr}[2]{\,_{#1}C_{#2}}
|
|
\newcommand{\nPr}[2]{\,_{#1}P_{#2}}
|
|
|
|
% ░█▀▀░█▀▄░█▀█░█▀█░█░█░█▀▀
|
|
% ░█░█░█▀▄░█▀█░█▀▀░█▀█░▀▀█
|
|
% ░▀▀▀░▀░▀░▀░▀░▀░░░▀░▀░▀▀▀
|
|
|
|
|
|
\RequirePackage{tcolorbox}
|
|
|
|
\newtcolorbox{coloredgraphbox}[1][]{
|
|
colframe=ntnublue,
|
|
arc=0pt,
|
|
outer arc=0pt
|
|
colback=white,
|
|
boxrule=3pt,
|
|
#1
|
|
}
|
|
|
|
%TODO: Make resizable and float
|
|
\newenvironment{mgraphbox}[1][]{
|
|
\begin{center}
|
|
\begin{coloredgraphbox}[#1]
|
|
}{
|
|
\end{coloredgraphbox}
|
|
\end{center}
|
|
}
|
|
|
|
%TODO: Directed graphs, trees
|
|
|
|
% ░▀█▀░█▀█░█▀▄░█░░░█▀▀░█▀▀
|
|
% ░░█░░█▀█░█▀▄░█░░░█▀▀░▀▀█
|
|
% ░░▀░░▀░▀░▀▀░░▀▀▀░▀▀▀░▀▀▀
|
|
|
|
\RequirePackage{colortbl}
|
|
|
|
\newlength{\oldarrayrulewidth}
|
|
\newcommand{\thickline}[1]{%
|
|
\noalign{\global\setlength{\oldarrayrulewidth}{\arrayrulewidth}}%
|
|
\noalign{\global\setlength{\arrayrulewidth}{#1}}%
|
|
\arrayrulecolor{ntnublue}\hline%
|
|
\arrayrulecolor{black}%
|
|
\noalign{\global\setlength{\arrayrulewidth}{\oldarrayrulewidth}}}
|
|
|
|
\newcolumntype{e}{>{\columncolor{ntnublue!10}}c}
|
|
\newcommand{\erow}{\rowcolor{ntnublue!10}}
|
|
|
|
%TODO: Fix First bit which is placed a little off
|
|
|
|
\newcommand{\T}{{\color{ForestGreen}T}}
|
|
\newcommand{\F}{{\color{red}F}}
|
|
\newenvironment{truthtable}[2]
|
|
{
|
|
\begin{figure}[H]
|
|
\centering
|
|
\begin{tabular}{#1}
|
|
\renewcommand{\arraystretch}{1.5}
|
|
#2 \\
|
|
\thickline{1pt}
|
|
\renewcommand{\arraystretch}{1}
|
|
}
|
|
{
|
|
\end{tabular}
|
|
\end{figure}
|
|
}
|