Skip to content

Instantly share code, notes, and snippets.

@pirpyn
Last active May 19, 2016 06:23
Show Gist options
  • Save pirpyn/efab13acb9d06da02c21c92cddfbc5c2 to your computer and use it in GitHub Desktop.
Save pirpyn/efab13acb9d06da02c21c92cddfbc5c2 to your computer and use it in GitHub Desktop.
LaTeX bases files
\documentclass[a4paper,11pt,twoside,english,final]{article}
\usepackage[english]{babel}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[pdftex]{graphicx}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{setspace}
\usepackage{hyperref}
\usepackage{cleveref}
\usepackage{wrapfig}
\crefname{table}{table}{tables}
\Crefname{table}{Table}{Tables}
\crefname{figure}{figure}{figures}
\Crefname{figure}{Figure}{Figures}
\crefname{lstlisting}{code listing}{code listings}
\Crefname{lstlisting}{Code listing}{Code listings}
\usepackage{vmargin}
\usepackage{url}
%% IMPORTANT FOR TITLEPAGE
\newcommand{\reporttitle}{TITLE} %
\newcommand{\reportauthor}{AUTHOR} %
\newcommand{\reportsubject}{SUBJECT} %
\newcommand{\reporttutor}{TUTOR}
\newcommand{\reportdate}{DATE}
%%
\newcommand{\hyl}[2]{\hyperlink{#1}{#2}}
\newcommand{\htg}[1]{\hypertarget{#1}}
\newcommand{\F}{\textbf{F}}
\newcommand{\U}{\textbf{P}}
\newcommand{\ULR}{\textbf{P}_{L,R}}
\newcommand{\n}{\textbf{n}}
\newcommand{\psibf}{\textbf{\psi}}
\newcommand{\p}{\textbf{p}}
\newcommand{\HRule}{\rule{\linewidth}{.1pt}}
\newcommand{\V}{\textbf{V}}
\newcommand{\up}[1]{\textsuperscript{#1}}
\newcommand{\tc}[1]{{\fontfamily{lmtt}\selectfont{#1}}}
\newtheorem{lema}{Lemme}[section]
\newtheorem{lem}[lema]{Lemme}
\newtheorem{coro}[lema]{Corollaire}
\newtheorem{defi}[lema]{D\'efinition}
\newtheorem{thm}[lema]{Th\'eor\`eme}
\newtheorem{prop}[lema]{Proposition}
\newtheorem{propde}[lema]{D\'efinition et Proposition}
\setlength{\parskip}{1ex} % Espace entre les paragraphes
\def\al{\alpha}
\def\be{\beta}
\def\B{{\cal B}}
\def\CCC{{\cal C}}
\def\D{{\cal D}}
\def\dO{\partial \Omega}
\def\de{\delta}
\def\De{\Delta}
\def\dsp{\displaystyle}
\def\dt{\mathrm{d}t}
\def\dx{\mathrm{d}x}
\def\E{{\cal E}}
\def\ep{\varepsilon}
\def\eps{\varepsilon}
\def\Eqv{\Longleftrightarrow}
\def\f{\rm f}
\def\fbar{\overline{F}}
\def\ga{\gamma}
\def \hh{\hskip -1cm}
\def\K{{\cal K}}
\def\le{\leq}
\def\L{{\cal L}}
\def\La{{\Lambda}}
\def\l{\lambda}
\def\M{{\cal M}}
\def\m{\mu}
\def\nnn{n \in \N}
\def\n{{\bf n}}
\def\NNN{{\cal N}}
\def\O{\Omega}
\def\om{\omega}
\def\Om{\Omega}
\def\OOO{{\cal O}}
\def\pa{\partial}
\def\P{{\cal P}}
\def\ph{\varphi}
\def\Rel{\Re}
\def\S{\cal S}
\def\s{\sigma}
\def\sign{{\rm sign}}
\def\th{\theta}
\def\X{{\cal X}}
\def\x{{\bf x}}
%%%%% differentials operators
\def\div{\rm div}
\def\grad{{\nabla}}
%%%%% arrows
\def\rar{\rightarrow}
\def\imp{\Rightarrow}
\def\ssi{\Leftrightarrow}
\def\implies{\Rightarrow}
%%%%
\def\R{{\mathbb R}}
\def\Z{{\mathbb Z}}
\def\N{{\mathbb N}}
\def\C{{\mathbb C}}
\def\Q{{\mathbb Q}}
\hypersetup{
% colorlinks=true,
% linkcolor=black,
% citecolor=black,
% urlcolor=black,
pdftitle={\reporttitle},%
pdfauthor={\reportauthor},%
pdfsubject={\reportsubject},%
pdfkeywords={K1} {K2} %IMPORTANT
}
\pagenumbering{roman} % set to arabic for normal behavior
\pagestyle{headings}
\setpapersize{A4}
\usepackage{color}
\definecolor{mygreen}{rgb}{0,0.6,0}
\definecolor{myred}{rgb}{0.45,0.0,0}
\definecolor{mygray}{rgb}{0.2,0.2,0.2}
\definecolor{mywhite}{rgb}{0.9,0.9,0.9}
\definecolor{mymauve}{rgb}{0.58,0,0.82}
\definecolor{myblue}{rgb}{0.0,0.0,0.48}
\definecolor{myorange}{rgb}{1.0,0.93,0.87}
%% What follows is for source code inclusion
\usepackage{listings}
\lstdefinestyle{terminal} {
backgroundcolor=\color{mywhite},
commentstyle=\color{black},
frame=none,
language=sh, % the language of the code
numbers = none,
morekeywords={Passed},
keywords=[2]{},
keywords=[3]{Failed},
deletekeywords={test,case}
}
\lstset{
backgroundcolor=\color{myorange},
basicstyle=\scriptsize\ttfamily,
breakatwhitespace=false,
breaklines=true,
captionpos=b, % sets the caption-position to bottom
commentstyle=\color{myblue}, % comment style
deletekeywords={this}, % if you want to delete keywords from the given language
escapeinside={\%*}{*)}, % if you want to add LaTeX within your code
extendedchars=true,
frame=double, % adds a frame around the code
keepspaces=true,
keywordstyle=\color{mygreen}, % keyword style
keywordstyle=[2]\color{orange},
keywordstyle=[3]\color{red},
language=C++, % the language of the code
morekeywords={},
keywords=[2]{},
keywords=[3]{},
numbers=left,
numbersep=5pt, % how far the line-numbers are from the code
numberstyle=\tiny\color{mygray}, % the style that is used for the line-numbers
rulecolor=\color{black},
showspaces=false,
showstringspaces=false, % underline spaces within strings only
showtabs=false, % show tabs within strings adding particular underscores
stepnumber=2,
stringstyle=\color{myred}, % string literal style
tabsize=2, % sets default tabsize to 2 spaces
title=\lstname
}
\begin{titlepage}
\begin{center}
\large
\begin{minipage}{0.49\textwidth}
\begin{flushleft}
INSTITUTE ONE
%%\includegraphics[scale=0.5]{logo1.png}
\end{flushleft}
\end{minipage}
\begin{minipage}{0.5\textwidth}
\begin{flushright}
INSTITUTE TWO
%%\includegraphics[scale=0.4]{logo2.jpg}
\end{flushright}
\end{minipage}\\
\vfill
\textsc{\LARGE \reportsubject}
\vspace{0.3cm}
\HRule\\
\vspace{-0.3cm}
\LARGE {\bfseries \reporttitle}\\ %see header.tex
%\vspace{-0.2cm}%\\[0.1cm]
\vspace{-0.5cm}
\HRule
\vfill
\small
\begin{minipage}{0.49\textwidth}
\begin{flushleft}
\reportauthor\\ %see header.tex
\end{flushleft}
\end{minipage}
\begin{minipage}{0.5\textwidth}
\begin{flushright}
\reporttutor\\ %see header.tex
\end{flushright}
\end{minipage}\\
\reportdate
\end{center}
\end{titlepage}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment