Skip to content

Latest commit

 

History

History
106 lines (76 loc) · 1.88 KB

latex.md

File metadata and controls

106 lines (76 loc) · 1.88 KB

Latex tricks

Beamer

Beamer subsection toc

\AtBeginSubsection[]
{
  \mode<beamer>{
  \addtocounter{framenumber}{-1}
  \begin{frame}
    \frametitle{Section}
    \tableofcontents[currentsection,currentsubsection,subsubsectionstyle=show/show/shaded/shaded]
  \end{frame}  }
}

Beamer use classic math font

\renewcommand\mathfamilydefault{\rmdefault} 

For those who don't like the beamer math font.

Beamer references

To change from icons to text:

\setbeamertemplate{bibliography item}[text]

To change the color of the references:

\setbeamercolor{bibliography item}{fg=black,bg=blanc}
\setbeamercolor{bibliography entry title}{fg=black,bg=blanc}
\setbeamercolor{bibliography entry author}{fg=black,bg=blanc}

Beamer 4x4 slides

$ pdfnup --nup 2x2 --frame false --noautoscale false --landscape --delta "0.2cm 0.3cm" --scale 1 SOURCE.pdf --outfile TARGET.pdf

Graphics

Graphics Path

To tell LaTeX where to find image:

\graphicspath{ {images_folder/}{/path/to/other/folder/}{/path/to/other/folder2/} }

Misc

Context sensitive quotation

Idea: automatically get quotation according to the language.

First import the package:

\usepackage[babel=true]{csquotes}

Then, instead of standard quotation use:

A  superb quote:  \enquote{This  superb  quote subquotes:  \enquote{nice
isn't it ?}}

Emacs and flyspell

Force latex mode and flyspell:

%%% Local Variables: 
%%% mode: latex
%%% TeX-master: t
%%% flyspell-mode: 't'
%%% End: 

Force flyspell language:

%%% Local Variables: 
%%% ispell-local-dictionary: "french"
%%% End: 

Margins for the itemize/enumerate

To set the margin:

\addtolength{\leftmargini}{2.5em} 

Remove Type 3 fonts from figure pdf

inkscape -f crappy.pdf -T --export-pdf=awesome.pdf