Skip to content

Commit

Permalink
+ Added a minted source code example.
Browse files Browse the repository at this point in the history
  • Loading branch information
luismartingil committed Nov 5, 2014
1 parent adaa74a commit e365d76
Show file tree
Hide file tree
Showing 12 changed files with 34 additions and 10 deletions.
2 changes: 2 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ Cookiecutter template for a LaTeX Beamer presentation.
Installation
------------

Install latex dependencies and Pygments for source code highlight.

- Debian:

# Installing some dependencies
Expand Down
Binary file modified bin/main.pdf
Binary file not shown.
Binary file modified bin/main000.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified bin/main001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified bin/main002.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified bin/main003.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified bin/main004.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified bin/main005.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified bin/main006.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified bin/main007.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified bin/main008.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
42 changes: 32 additions & 10 deletions {{cookiecutter.repo_name}}/section2.tex
Original file line number Diff line number Diff line change
@@ -1,28 +1,50 @@
\section{Section2}
%
\subsection{Subsection c}
\begin{frame}[label=sectionc]
\begin{frame}[label=sectionc, t, fragile]
\frametitle{subsection c title}

{{cookiecutter.project_short_description}}
Highlighted source code using minted.

\usemintedstyle{perldoc}

\begin{minted}[linenos,
numbersep=12pt,
firstnumber=1,
firstline=1,
frame=lines,
framerule=0.1pt,
rulecolor=\definecolor{bg}{rgb}{0.95,0.95,0.95},
fontsize=\tiny,
framesep=2mm]{python}
import numpy as np

def incmatrix(genl1,genl2):
m = len(genl1)
n = len(genl2)
M = None #to become the incidence matrix
VT = np.zeros((n*m,1), int) #dummy variable

#compute the bitwise xor matrix
M1 = bitxormatrix(genl1)
M2 = np.triu(bitxormatrix(genl2),1)

# Removed lines

return M
\end{minted}

\begin{enumerate}
\item Bla bla bla.\\
\item Bla bla bla.\\
\item Bla bla bla.\\
\item Bla bla bla.\\
\end{enumerate}
\end{frame}


%
\subsection{Subsection d}
\begin{frame}[label=sectiond]
\frametitle{subsection d title}
\begin{enumerate}
\begin{itemize}
\item Bla bla bla.\\
\item Bla bla bla.\\
\item Bla bla bla.\\
\item Bla bla bla.\\
\end{enumerate}
\end{itemize}
\end{frame}

0 comments on commit e365d76

Please sign in to comment.