Last active
December 14, 2015 13:49
-
-
Save affo/91b12842c7975f7956dd to your computer and use it in GitHub Desktop.
Latex project scaffold
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*.log | |
*.aux | |
*.fdb_latexmk | |
*.fls | |
*.toc | |
*.out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let NERDTreeIgnore = ['\.log$', '\.aux$', '\.toc$', '\.fls$', '\.out$'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MASTER=master | |
all: build | |
build: | |
latex --output-format=pdf $(MASTER) | |
clean: | |
rm -f *.log | |
rm -f *.toc | |
rm -f *.aux | |
rm -f *.fls | |
rm -f *.out | |
rm -f *.fdb_latexmk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass[12pt,a4paper]{report} % ,twoside,openright | |
\usepackage[utf8]{inputenc} | |
\usepackage{graphicx} | |
\usepackage{hyperref} | |
\usepackage{listings} | |
\usepackage{color} | |
\usepackage{url} | |
\makeatletter | |
\g@addto@macro{\UrlBreaks}{\UrlOrds} | |
\makeatother | |
\usepackage{etoc} | |
% change date format | |
\usepackage[ddmmyyyy]{datetime} | |
% for correct names | |
%\usepackage[italian]{babel} | |
\linespread{1.5} | |
\definecolor{dkgreen}{rgb}{0,0.6,0} | |
\definecolor{gray}{rgb}{0.5,0.5,0.5} | |
\definecolor{mauve}{rgb}{0.58,0,0.82} | |
\definecolor{light-gray}{gray}{0.95} | |
\definecolor{yellow}{RGB}{255, 251, 140} | |
% defining single line code blocks with monospace font and light-gray backgound (StackOverflow style) | |
\newcommand{\code}[1]{\nolinkurl{#1}} | |
% note command | |
\newcommand{\todo}[1]{\colorbox{yellow}{\textbf{\#TODO} #1}} | |
% For Images | |
\graphicspath{ {images/} } | |
\newcommand{\img}[2]{ | |
\begin{figure}[h!] | |
\centering{ | |
\includegraphics[width=\textwidth]{#1.png} | |
} | |
\caption{#2} | |
\label{fig:#1} | |
\end{figure} | |
} | |
% footer and header | |
\usepackage{titleps} | |
\newpagestyle{main}[\normalsize]{ | |
\setheadrule{0.4pt} | |
\sethead{\chaptertitle}{}{\sectiontitle} | |
\setfootrule{0.4pt} | |
\setfoot{ | |
% set your footer | |
} | |
{}{\thepage} | |
} | |
\pagestyle{main} | |
% BEGIN DOCUMENT | |
\begin{document} | |
\input{title} | |
\tableofcontents | |
%\setcounter{tocdepth}{2} | |
\pagenumbering{arabic} | |
\setcounter{page}{1} | |
% Include chapters | |
%\chapter{Awesome chapter} | |
%\input{chapters/awesome} | |
\end{document} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\begin{titlepage} | |
\begin{center} | |
%\includegraphics[width=\textwidth]{some_logo.jpg} | |
\Huge | |
\textbf{Title} | |
Subtitle | |
\vspace{3cm} | |
\normalsize | |
\Large \textit{Document by Lorenzo Affetti}\\ | |
\large (\texttt{lorenzo.affetti@polimi.it})\\ | |
\textit{Last update: \today} | |
\end{center} | |
\end{titlepage} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment