org-theme/latex.org
2020-12-10 23:36:33 +01:00

161 lines
4.9 KiB
Org Mode

#+TITLE: LaTeX preamble for Org-Theme
:DRAWER:
#+STARTUP: overview
#+OPTIONS: num:t toc:t |:t p:t f:t todo:t tasks:t pri:t tags:t <:t *:t
#+LANGUAGE: en
#+EMAIL: dehaeze.thomas@gmail.com
#+AUTHOR: Dehaeze Thomas
#+HTML_LINK_HOME: ../index.html
#+HTML_LINK_UP: ../index.html
#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="dist/style.css"/>
#+HTML_HEAD: <script type="text/javascript" src="dist/script.js"></script>
#+LaTeX_CLASS: scrreprt
#+LaTeX_CLASS_OPTIONS: [a4paper, 10pt]
#+LaTeX_HEADER: \input{preamble.tex}
#+PROPERTY: header-args:latex :tangle preamble.tex
:END:
#+begin_src latex
\usepackage{float}
#+end_src
#+begin_src latex
\usepackage{caption,tabularx,booktabs}
#+end_src
#+begin_src latex
\usepackage{biblatex}
#+end_src
#+begin_src latex
\usepackage{fontawesome}
#+end_src
#+begin_src latex
\usepackage{caption}
\usepackage{subcaption}
\captionsetup[figure]{labelfont=bf}
\captionsetup[subfigure]{labelfont=bf}
\captionsetup[listing]{labelfont=bf}
\captionsetup[table]{labelfont=bf}
#+end_src
#+begin_src latex
\usepackage{xcolor}
\definecolor{my-blue}{HTML}{6b7adb}
\definecolor{my-pale-blue}{HTML}{e6e9f9}
\definecolor{my-red}{HTML}{db6b6b}
\definecolor{my-pale-red}{HTML}{f9e6e6}
\definecolor{my-green}{HTML}{6bdbb6}
\definecolor{my-pale-green}{HTML}{e6f9f3}
\definecolor{my-yellow}{HTML}{dbd26b}
\definecolor{my-pale-yellow}{HTML}{f9f7e6}
\definecolor{my-orange}{HTML}{dba76b}
\definecolor{my-pale-orange}{HTML}{f9f0e6}
\definecolor{my-grey}{HTML}{a3a3a3}
\definecolor{my-pale-grey}{HTML}{f0f0f0}
\definecolor{my-turq}{HTML}{6bc7db}
\definecolor{my-pale-turq}{HTML}{e6f6f9}
#+end_src
#+begin_src latex
\usepackage{inconsolata}
#+end_src
#+begin_src latex
\usepackage[newfloat=true, chapter]{minted}
\usemintedstyle{autumn}
\setminted{frame=lines,breaklines=true,tabsize=4,fontsize=\scriptsize,autogobble=true,labelposition=topline,bgcolor=my-pale-grey}
\setminted[matlab]{label=Matlab}
\setminted[latex]{label=LaTeX}
\setminted[bash]{label=Bash}
\setminted[python]{label=Python}
\setminted[text]{label=Results}
\setmintedinline{fontsize=\normalsize,bgcolor=my-pale-grey}
#+end_src
#+begin_src latex
\usepackage[most]{tcolorbox}
\tcbuselibrary{minted}
\newtcolorbox{seealso}{ enhanced,breakable,colback=my-pale-grey,colframe=my-grey,fonttitle=\bfseries,title=See Also}
\newtcolorbox{hint}{ enhanced,breakable,colback=my-pale-grey,colframe=my-grey,fonttitle=\bfseries,title=Hint}
\newtcolorbox{definition}{enhanced,breakable,colback=my-pale-red, colframe=my-red, fonttitle=\bfseries,title=Definition}
\newtcolorbox{important}{ enhanced,breakable,colback=my-pale-red, colframe=my-red, fonttitle=\bfseries,title=Important}
\newtcolorbox{exampl}[1][]{ enhanced,breakable,colback=my-pale-green,colframe=my-green,fonttitle=\bfseries,title=Example,#1}
\newtcolorbox{exercice}{ enhanced,breakable,colback=my-pale-yellow,colframe=my-yellow,fonttitle=\bfseries,title=Exercice}
\newtcolorbox{question}{ enhanced,breakable,colback=my-pale-yellow,colframe=my-yellow,fonttitle=\bfseries,title=Question}
\newtcolorbox{answer}{ enhanced,breakable,colback=my-pale-turq,colframe=my-turq,fonttitle=\bfseries,title=Answer}
\newtcolorbox{summary}{ enhanced,breakable,colback=my-pale-blue,colframe=my-blue,fonttitle=\bfseries,title=Summary}
\newtcolorbox{note}{ enhanced,breakable,colback=my-pale-blue,colframe=my-blue,fonttitle=\bfseries,title=Note}
\newtcolorbox{caution}{ enhanced,breakable,colback=my-pale-orange,colframe=my-orange,fonttitle=\bfseries,title=Caution}
\newtcolorbox{warning}{ enhanced,breakable,colback=my-pale-orange,colframe=my-orange,fonttitle=\bfseries,title=Warning}
\newtcolorbox{my-quote}[1]{%
colback=my-pale-grey,
grow to right by=-10mm,
grow to left by=-10mm,
boxrule=0pt,
boxsep=0pt,
breakable,
enhanced jigsaw,
borderline west={4pt}{0pt}{my-grey}}
\renewenvironment{quote}{\begin{my-quote}}{\end{my-quote}}
\newtcolorbox{my-verse}[1]{%
colback=my-pale-grey,
grow to right by=-10mm,
grow to left by=-10mm,
boxrule=0pt,
boxsep=0pt,
breakable,
enhanced jigsaw,
borderline west={4pt}{0pt}{my-grey}}
\renewenvironment{verse}{\begin{my-verse}}{\end{my-verse}}
\usepackage{environ}% http://ctan.org/pkg/environ
\NewEnviron{aside}{%
\marginpar{\BODY}
}
\renewenvironment{verbatim}{\VerbatimEnvironment\begin{minted}[]{text}}{\end{minted}}
#+end_src
#+begin_src latex
\usepackage{soul}
\sethlcolor{my-pale-grey}
\let\OldTexttt\texttt
\renewcommand{\texttt}[1]{{\ttfamily\hl{\mbox{\,#1\,}}}}
#+end_src
#+begin_src latex
\makeatletter
\preto\Gin@extensions{png,}
\DeclareGraphicsRule{.png}{pdf}{.pdf}{\noexpand\Gin@base.pdf}
\makeatother
#+end_src
#+begin_src latex
\usepackage{hyperref}
\hypersetup{
colorlinks = true,
allcolors = my-blue
}
\usepackage{hypcap}
#+end_src