Skip to content

Commit

Permalink
#1 add forgotten files
Browse files Browse the repository at this point in the history
  • Loading branch information
martinjrobins committed Aug 22, 2019
1 parent 00451c7 commit 7b7584f
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 0 deletions.
1 change: 1 addition & 0 deletions 03_optimisation_and_inverse_problems/exercises/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.pdf
16 changes: 16 additions & 0 deletions 03_optimisation_and_inverse_problems/exercises/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
all: exercises-01-python.pdf exercises-02-python-cont.pdf exercises-03-classes.pdf exercises-04-numpy.pdf junk

include = include.tex

%.pdf: %.tex
xelatex $<
xelatex $<


junk:
rm *.aux *.log *.dvi *.ps -f

clean:
rm *.aux *.log *.dvi *.ps -f
rm exercises-*.pdf -f

60 changes: 60 additions & 0 deletions 03_optimisation_and_inverse_problems/exercises/common.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
\usepackage{xltxtra}
\usepackage{polyglossia}
\usepackage{fancyhdr}
\usepackage{geometry}
\usepackage{enumitem}
\usepackage{versions}
\usepackage{hyperref}

%\includeversion{solution}
\excludeversion{solution}

\geometry{a4paper,left=15mm,right=15mm,top=20mm,bottom=20mm}
\pagestyle{fancy}
\chead{UNIQ+ Summer School - Scientific Python}
\rhead{\today}
\cfoot{\thepage}

\setlength{\headheight}{23pt}
\setlength{\parindent}{0.0in}
\setlength{\parskip}{0.0in}


\usepackage{listings} %iclude code in your document
\usepackage{color}
\definecolor{deepblue}{rgb}{0,0,0.5}
\definecolor{deepred}{rgb}{0.6,0,0}
\definecolor{deepgreen}{rgb}{0,0.5,0}

\lstloadlanguages{Matlab} %use listings with Matlab for Pseudocode
\lstnewenvironment{pseudocode}[1][]
{\lstset{
language=Matlab,
basicstyle=\scriptsize,
keywordstyle=\color{blue},
xleftmargin=.04\textwidth,#1}}
{}
\lstnewenvironment{python}[1][]
{\lstset{
language=Python,
basicstyle=\scriptsize,
keywordstyle=\color{deepblue},
otherkeywords={self}, % Add keywords here
keywordstyle=\color{deepblue},
emph={MyClass,__init__,__str__}, % Custom highlighting
emphstyle=\color{deepred}, % Custom highlighting style
stringstyle=\color{deepgreen},
xleftmargin=.04\textwidth,#1}}
{}
\newcommand{\cf}[1]{\lstinline
[
language=Python,
keywordstyle=\color{deepblue},
otherkeywords={self}, % Add keywords here
keywordstyle=\color{deepblue},
emph={MyClass,__init__,__str__}, % Custom highlighting
emphstyle=\color{deepred}, % Custom highlighting style
stringstyle=\color{deepgreen}
]
{#1}}

0 comments on commit 7b7584f

Please sign in to comment.