-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate.tex
executable file
·128 lines (111 loc) · 4.5 KB
/
template.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
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
% [FILENAME]
% Author: [AUTHOR]
% Created: [DATE]
% Updated: [DATE]
% Description: [DESCRIPTION]
% This part is used for https://github.com/hussein-esmail7/template-maker
% templateDescription: 1 - Default LaTeX Template
% This file can be found at https://github.com/hussein-esmail7/templates
% =========================== Variables ===========================
\def\myAuthor {[AUTHOR]} % Author of this file
\def\mySubject {PDF Subject Here} % Used for Metadata
\def\myKeywords {PDF Keywords Here} % Separated by comma
\def\myDateUpdated {\today}
\def\myTitle {[FILE FRONT]}
% =========================== Variables ===========================
% =========================== Shortcuts ===========================
\def\bg{backgroundcolor}
\def\ra{\rightarrow}
\def\len{\setlength}
\newenvironment{itemize*}{\begin{itemize}[wide, nosep, topsep=5px, leftmargin=30pt, labelsep=5pt, parskip=0pt, itemsep=0pt]}{\end{itemize}}
\newenvironment{enumerate*}{\begin{enumerate}[itemsep=0pt, parskip=0pt]}{\end{enumerate}}
\newenvironment{enumalph*}{\begin{enumerate}[itemsep=0pt, parskip=0pt, label=\alph*.]}{\end{enumerate}}
\newenvironment{enumq*}{\begin{enumerate}[itemsep=0pt, parskip=0pt, label=Q{{\arabic*}}.]}{\end{enumerate}}
\newcommand{\TODO}[1]{\todo[inline, \bg=lightgray, linecolor=red]{#1}}
% =========================== Shortcuts ===========================
\documentclass{article}
\title{\myTitle}
\author{\myAuthor}
\date{\myDateUpdated}
\usepackage[colorinlistoftodos]{todonotes} % Used for "to do" notes
\usepackage[many]{tcolorbox} % Used for Notebook page boxes
\usepackage[margin=1in]{geometry} % 1-inch margins
\usepackage{amssymb} % Used for math symbols
\usepackage{comment} % Used for the 'comment' environment (multi-line)
\usepackage{enumitem} % Used for enumalpha environment
\usepackage{float} % Used for ``H'' flag in figure environment
\usepackage{graphicx} % Used for adding images
\usepackage{listings} % Used for blocks of code
\usepackage{longtable} % Used to format longtables properly
\usepackage{multirow}
\usepackage{xcolor}
% N BOX START ----------------
\definecolor{main}{HTML}{5989cf} % setting main color to be used
\definecolor{sub}{HTML}{cde4ff} % setting sub color to be used
\tcbset{
sharp corners,
colback = white,
before skip = 0cm, % add extra space before the box
after skip = 0cm % add extra space after the box
} % setting global options for tcolorbox
\newtcolorbox{nbox}{
hbox, % If this line is here, box only spans for the text
% that's inside the box if it's smaller than
% \textwidth
colback = sub, % Set main background colour
colframe = main, % Set background colour
top = 1pt, % Top margin
bottom = 1pt, % Bottom margin
left = 3pt, % Left margin
right = 3pt, % Right margin
boxrule = 0pt, % Overall border weight (set to none)
leftrule = 3pt % left rule weight
}
\newcommand{\npage}[1]{\begin{nbox}#1\end{nbox}}
% N BOX END ----------------
\usepackage{hyperref} % Used for adding PDF metadata
\graphicspath{{./}} % Import images in the same folder as this .tex file
\hypersetup{
colorlinks=true,
urlcolor=black, % URL colors (\href{}{}). Changed to blue later
linkcolor=black, % Table of Contents text color. Used for TOC body only
pdfborder={0 0 0},
pdftitle={\myTitle},
pdfauthor={\myAuthor},
pdfsubject={\mySubject},
pdfkeywords={\myKeywords}
}
\lstset{ % Coding block configuration
basicstyle=\ttfamily,
frame=single,
breaklines=true
}
% Prevent word hyphenation
\tolerance=1
\emergencystretch=\maxdimen
\hyphenpenalty=10000
\hbadness=10000
\begin{document} % Official beginning of the document.
\pagenumbering{roman} % Use roman numerals for table of contents section
\maketitle % Make title page
\tableofcontents % Makes TOC
% todonotes part (Start) ------------------------------------------------------
\todototoc % Add "Todo list" to main TOC
\listoftodos % Show all todo notes as a list to see what's remaining
% todonotes part (End) --------------------------------------------------------
\hypersetup{linkcolor=blue} % Any links to other sections are now blue
\newpage % Page break
\pagenumbering{arabic}
\flushleft
\section{Introduction}
\TODO{Purpose of document}
% Notebook page example:
% \npage{N10-P001}
\section{Next section...}
\TODO{Rest of document}
\begin{comment}
TODO commands (using the todonotes package):
\todo{} -> todonotes default
\TODO{} -> Gray inline box
\end{comment}
\end{document}