# Difference between revisions of "User:Timothee Flutre/Notebook/Postdoc/2012/05/16"

Project name <html><img src="/images/9/94/Report.png" border="0" /></html> Main project page
<html><img src="/images/c/c3/Resultset_previous.png" border="0" /></html>Previous entry<html>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</html>Next entry<html><img src="/images/5/5c/Resultset_next.png" border="0" /></html>

• Resources: most of the time, it's not necessary to buy a book, search online instead!
• Program templates: it is always rewarding on the long term to start any piece of computer software with a minimum amount of generic code (command-line options, help message, license, usage of gzipped files, running time, etc). But it's a pain to write all this every time, right? And often we know how to do something in one language but not in another. So below are my typical templates for any C++/Python/R/Bash program, as well as Beamer presentation.
• Language-independent user documentation: I'm a firm believer that it is necessary to add some user documentation, even minimal, to any program. An easy way to do this is to simply generate such documentation from the "help" message, as long as it is "properly" formatted (see help2man). The following commands work for any programming language:
help2man -o myprogram.man ./myprogram
man ./myprogram.man
groff -mandoc myprogram.man > myprogram.ps
ps2pdf myprogram.ps myprogram.pdf


• Latex-Beamer: it is assumed that the code below is copied into a file named "mypresentation.tex" and that several packages are already installed. The current directory is also assumed to contain a sub-directory named "figures" in which are saved all picture files included in the presentation. In the future, I should also look a longer look at Karl Broman's post.
% Copyright (C) 2012 Timothee Flutre.

\documentclass{beamer}
\usepackage{amsmath}
\usepackage{bm} % to have mathematical symbols in bold
\usepackage{hyperref}
\usepackage{multirow}
\usepackage{tikz}
\usepackage[francais]{babel}
\usepackage[utf8]{inputenc}

\graphicspath{{./figures/}}

%-----------------------------------------------------------------------------

\setbeamertemplate{caption}[numbered]
\setbeamerfont{caption}{size=\scriptsize}

\setbeamertemplate{footline}
{
\leavevmode
\hbox{
\hspace*{-0.06cm}
\usebeamerfont{author in head/foot}\insertshortauthor \hspace*{1em} \insertshortinstitute
\end{beamercolorbox}
\end{beamercolorbox}
\end{beamercolorbox}
}
\vskip0pt
}

\AtBeginSection[]
{
\begin{frame}
\frametitle{Outline}
\tableofcontents[currentsection]
\end{frame}
}

%-----------------------------------------------------------------------------

\title[Short title]{Long title}
\author[T. Flutre]{Timoth\'{e}e Flutre}
\institute[Short affiliation]{Long affiliation}
\date{\today}

begin{document}

\begin{frame}
\titlepage
\end{frame}

\begin{frame}
\frametitle{Outline}
\tableofcontents
\end{frame}

\section{First section}
\begin{frame}
\frametitle{I.1.}
\begin{itemize}
\item
\end{itemize}
\end{frame}

\section{Second section}

\begin{frame}
\frametitle{II.1.}
\begin{center}
%\includegraphics[width=0.95\textwidth,height=0.90\textheight,keepaspectratio=true]{myplot}%
\end{center}
\end{frame}

end{document}