Skip to content

Instantly share code, notes, and snippets.

@freetonik
Forked from sam217pa/tufte-book.tex
Created October 15, 2019 17:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save freetonik/3aa9207756e9c9296f59d95f0c5509c1 to your computer and use it in GitHub Desktop.
Save freetonik/3aa9207756e9c9296f59d95f0c5509c1 to your computer and use it in GitHub Desktop.
a template to export from org-mode to latex
\usepackage[scaled=0.95]{roboto}
\usepackage{mathpazo}
\linespread{1.05}
\usepackage{eulervm}
\usepackage[usenames]{xcolor}
%% footnote color
\renewcommand{\thefootnote}{\textcolor{Gray}{\arabic{footnote}}}
\makeatletter
%%
%% chapter number style
%%
\usepackage{titlesec}
\definecolor{gray75}{gray}{0.75}
\newcommand{\hsp}{\hspace{0pt}}
\titleformat{\chapter}[hang]{\flushright
\fontseries{b}\fontsize{60}{80}\selectfont}{\fontseries{b}\fontsize{80}{110}\selectfont
\textcolor{gray75}\thechapter\hsp}{0pt}{\\
\Huge\bfseries}[]
% \renewcommand{\chapterNumber}{%
% \fontsize{70}{70}\usefont{\encodingdefault}{\sfdefault}{b}{n}}
\renewcommand\@footnotetext[2][0pt]{%
\marginpar{%
\hbox{}\vspace*{#1}%
\def\baselinestretch {\setspace@singlespace}%
\reset@font\footnotesize%
\@tufte@margin@par% use parindent and parskip settings for marginal text
\vspace*{-1\baselineskip}\noindent%
\protected@edef\@currentlabel{%
\csname p@footnote\endcsname\@thefnmark%
}%
\color{Gray}
% \sffamily
\color@begingroup%
\@makefntext{%
\ignorespaces#2%
}%
\color@endgroup%
}%
}%
\makeatother
%%==============================================================================
%% SECTIONS
%%==============================================================================
%% section numbering to subsection
\setcounter{secnumdepth}{3}
\renewcommand{\thesection}{\Roman{section}}
\renewcommand{\thesubsection}{\thesection.\Alph{subsection}}
\renewcommand{\thesubsubsection}{\thesubsection\arabic{subsubsection})}
\renewcommand{\theparagraph}{\roman{paragraph}}
%%==============================================================================
%% COLORS
%%==============================================================================
%% section format
\titleformat{\section}%
{\normalfont\Large\itshape\color{Cerulean}}% format applied to label+text
{\llap{\colorbox{Cerulean}{\parbox{1.5cm}{\hfill\color{white}\thesection}}}}% label
{1em}% horizontal separation between label and title body
{}% before the title body
[]% after the title body
% subsection format
\titleformat{\subsection}%
{\normalfont\large\itshape\color{TealBlue}}% format applied to label+text
{\llap{\colorbox{TealBlue}{\parbox{1.5cm}{\hfill\color{white}\thesubsection}}}}% label
{1em}% horizontal separation between label and title body
{}% before the title body
[]% after the title body
\renewcommand{\footnotesize}{\scriptsize}
\setcaptionfont{\color{SeaGreen}\footnotesize}
\setsidenotefont{\color{Gray}\sffamily\footnotesize}
\setmarginnotefont{\color{SeaGreen}\itshape\footnotesize}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment