mirror of
https://github.com/MartinThoma/LaTeX-examples.git
synced 2025-04-19 11:38:05 +02:00
added 5 LaTeX examples
This commit is contained in:
parent
f829badf9a
commit
e150068faf
12 changed files with 420 additions and 0 deletions
86
cheat-sheets/analysis/Analysis_Wichtige_Formeln.tex
Normal file
86
cheat-sheets/analysis/Analysis_Wichtige_Formeln.tex
Normal file
|
@ -0,0 +1,86 @@
|
||||||
|
\documentclass[a4paper,10pt]{article}
|
||||||
|
\usepackage{amssymb}
|
||||||
|
\usepackage{amsmath}
|
||||||
|
\usepackage[utf8]{inputenc} % this is needed for umlauts
|
||||||
|
\usepackage[ngerman]{babel} % this is needed for umlauts
|
||||||
|
\usepackage[T1]{fontenc} % this is needed for correct output of umlauts in pdf
|
||||||
|
%layout
|
||||||
|
\usepackage[margin=2.5cm]{geometry}
|
||||||
|
\usepackage{parskip}
|
||||||
|
|
||||||
|
\pdfinfo{
|
||||||
|
/Author (Peter Merkert, Martin Thoma)
|
||||||
|
/Title (Wichtige Formeln der Analysis I)
|
||||||
|
/CreationDate (D:20120221095400)
|
||||||
|
/Subject (Analysis I)
|
||||||
|
/Keywords (Analysis I; Formeln)
|
||||||
|
}
|
||||||
|
|
||||||
|
\everymath={\displaystyle}
|
||||||
|
|
||||||
|
\begin{document}
|
||||||
|
|
||||||
|
\title{Analysis Formelsammlung}
|
||||||
|
\author{Peter Merkert, Martin Thoma}
|
||||||
|
\date{21. Februar 2012}
|
||||||
|
|
||||||
|
\section{Grenzwerte}
|
||||||
|
\begin{table}[ht]
|
||||||
|
\begin{minipage}[b]{0.5\linewidth}\centering
|
||||||
|
|
||||||
|
\begin{align*}
|
||||||
|
\lim_{x \to 0} \frac {\sin x}{x} &= 1 \\
|
||||||
|
\lim_{x \to 0} \frac {e^x - 1}{x} &= 1 \\
|
||||||
|
\lim_{h \to 0} \frac {e^{{x_0} + h} - e^{x_0}}{h} &= e^{x_0} \\
|
||||||
|
\sum_{n = 0}^{\infty} (-1)^n \frac {(-1)^{n + 1}}{n} &= \log 2 \\
|
||||||
|
\cos x &= \sum_{n = 0}^{\infty} (-1)^n \frac {x^{2n}}{(2n)!} \\
|
||||||
|
\sin x &= \sum_{n = 0}^{\infty} (-1)^n \frac {x^{2n + 1}}{(2n + 1)!}
|
||||||
|
\end{align*}
|
||||||
|
|
||||||
|
\end{minipage}
|
||||||
|
\hspace{0.5cm}
|
||||||
|
\begin{minipage}[b]{0.5\linewidth}
|
||||||
|
\centering
|
||||||
|
|
||||||
|
\begin{align*}
|
||||||
|
\cosh x = \frac {1}{2} (e^x + e^{-x}) &= \scriptstyle \sum_{n = 0}^{\infty} \frac {x^{2n}}{(2n)!} \\
|
||||||
|
\sinh x = \frac {1}{2} (e^x - e^{-x}) &= \sum_{n = 0}^{\infty} \frac {x^{2n + 1}}{(2n + 1)!} \\
|
||||||
|
e^x &= \sum_{n = 0}^{\infty} \frac {x^n}{n!} \\
|
||||||
|
\sum_{n = 0}^{\infty} (-1)^n \frac {x^{n + 1}}{n + 1} &= \log (1+x) (x \in (-1,1)) \\
|
||||||
|
\sum_{n = 0}^{\infty} x^n &= \frac {1}{1 - x} (x \in (-1,1)) \\
|
||||||
|
0,\bar{3} &= \sum_{n = 1}^{\infty} \frac {3}{(10)^n}
|
||||||
|
\end{align*}
|
||||||
|
|
||||||
|
\end{minipage}
|
||||||
|
\end{table}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
\section{Zusammenhänge}
|
||||||
|
\begin{align*}
|
||||||
|
(\cos x)^2 + (\sin x)^2 &= 1 \\
|
||||||
|
(\cosh x)^2 - (\sinh x)^2 &= 1 \\
|
||||||
|
\tan x &= \frac {\sin x}{\cos x} \\
|
||||||
|
\tanh x &= \frac {\sinh x}{\cosh x} \\
|
||||||
|
(x + y)^n &= \sum_{k=0}^{n} \binom{n}{k} x^{n-k} y^k
|
||||||
|
\end{align*}
|
||||||
|
|
||||||
|
\section{Ableitungen}
|
||||||
|
\begin{align*}
|
||||||
|
(\arctan x)' &= \frac {1}{1 + x^2} \\
|
||||||
|
(\sin x)' &= \cos x \\
|
||||||
|
(\cos x)' &= -\sin x \\
|
||||||
|
(\text{arctanh} x)' &= \frac {1}{\sqrt {1 + x^2}}
|
||||||
|
\end{align*}
|
||||||
|
|
||||||
|
|
||||||
|
\section{Potenzreihen}
|
||||||
|
Zuerst den Potenzradius r berechnen:
|
||||||
|
\(
|
||||||
|
r = \frac {1}{\lim \text{sup} \sqrt[n]{|a_n|}}
|
||||||
|
\)
|
||||||
|
|
||||||
|
\end{document}
|
16
cheat-sheets/analysis/Makefile
Normal file
16
cheat-sheets/analysis/Makefile
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
# CHANGELOG
|
||||||
|
# Version 1.0: Erstellung des Makefile
|
||||||
|
|
||||||
|
# Version des Makefile
|
||||||
|
fileinfo := LaTeX Makefile
|
||||||
|
author := Martin Thoma
|
||||||
|
version := 1.0
|
||||||
|
|
||||||
|
DATE=$(shell date +%Y-%m-%d)
|
||||||
|
|
||||||
|
make:
|
||||||
|
pdflatex Analysis_Wichtige_Formeln.tex -output-format=pdf
|
||||||
|
make clean
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -rf $(TARGET) *.class *.html *.log *.aux
|
16
documents/semesterplan/Makefile
Normal file
16
documents/semesterplan/Makefile
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
# CHANGELOG
|
||||||
|
# Version 1.0: Erstellung des Makefile
|
||||||
|
|
||||||
|
# Version des Makefile
|
||||||
|
fileinfo := LaTeX Makefile
|
||||||
|
author := Martin Thoma
|
||||||
|
version := 1.0
|
||||||
|
|
||||||
|
DATE=$(shell date +%Y-%m-%d)
|
||||||
|
|
||||||
|
make:
|
||||||
|
pdflatex semesterplan.tex -output-format=pdf
|
||||||
|
make clean
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -rf $(TARGET) *.class *.html *.log *.aux
|
50
documents/semesterplan/semesterplan.tex
Normal file
50
documents/semesterplan/semesterplan.tex
Normal file
|
@ -0,0 +1,50 @@
|
||||||
|
\documentclass[a4paper,10pt]{article}
|
||||||
|
\usepackage{amssymb} % needed for math
|
||||||
|
\usepackage{amsmath} % needed for math
|
||||||
|
\usepackage{amsthm} % needed for proof environment
|
||||||
|
\usepackage[utf8]{inputenc} % this is needed for umlauts
|
||||||
|
\usepackage[ngerman]{babel} % this is needed for umlauts
|
||||||
|
\usepackage[T1]{fontenc} % this is needed for correct output of umlauts in pdf
|
||||||
|
\usepackage{wasysym} % checkbox
|
||||||
|
\usepackage{array} % row height
|
||||||
|
\usepackage[landscape]{geometry}
|
||||||
|
\geometry{top=1.5cm,left=1cm,right=1cm,bottom=2cm}
|
||||||
|
|
||||||
|
\pdfinfo{
|
||||||
|
/Author (Martin Thoma)
|
||||||
|
/Title (Semesterplan)
|
||||||
|
/Subject (Semesterplan)
|
||||||
|
/Keywords (Semesterplan)
|
||||||
|
}
|
||||||
|
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
% Variables %
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
\newcommand{\semester}{Wintersemester}
|
||||||
|
\newcommand{\jahr}{2012}
|
||||||
|
\newcommand{\student}{Martin Thoma}
|
||||||
|
|
||||||
|
\begin{document}
|
||||||
|
\section*{Semesterplan für das \semester~\jahr~von~\student}
|
||||||
|
|
||||||
|
\begin{table}[h]
|
||||||
|
\setlength{\extrarowheight}{4.5pt}
|
||||||
|
\begin{tabular}{ |l|p {1.9 cm}|p {1.9 cm}|p {1.9 cm}|p {1.9 cm}|p {1.9 cm}|p {1.9 cm}|p {1.9 cm}|p {1.9 cm}|p {1.9 cm}|p {1.9 cm}|p {1.9 cm}|}
|
||||||
|
\hline
|
||||||
|
~ & \textbf{Ü1} & \textbf{Ü2} & \textbf{Ü3} & \textbf{Ü4} & \textbf{Ü5} & \textbf{Ü6} & \textbf{Ü7} & \textbf{Ü8} & \textbf{Ü9} & \textbf{Ü10} & $\sum$ \\
|
||||||
|
\hline
|
||||||
|
\hline
|
||||||
|
LA II & 144 & ~ & ~ & ~ & ~ & ~ & ~ & ~ & ~ & ~ & ~ \\
|
||||||
|
\hline
|
||||||
|
Analysis II & ~ & ~ & ~ & ~ & ~ & ~ & ~ & ~ & ~ & ~ & ~ \\
|
||||||
|
\hline
|
||||||
|
Algo & ~ & ~ & ~ & ~ & ~ & ~ & ~ & ~ & ~ & ~ & ~ \\
|
||||||
|
\hline
|
||||||
|
SWT & ~ & ~ & ~ & ~ & ~ & ~ & ~ & ~ & ~ & ~ & ~ \\
|
||||||
|
\hline
|
||||||
|
Rechner & ~ & ~ & ~ & ~ & ~ & ~ & ~ & ~ & ~ & ~ & ~ \\
|
||||||
|
\hline
|
||||||
|
\end{tabular}
|
||||||
|
\end{table}
|
||||||
|
|
||||||
|
\end{document}
|
13
source-code/AbstractClass.java
Normal file
13
source-code/AbstractClass.java
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
public class AbstractClass {
|
||||||
|
int templateMethod() {
|
||||||
|
return simpleOperation1() * simpleOperation2();
|
||||||
|
}
|
||||||
|
|
||||||
|
int simpleOperation1() {
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
int simpleOperation2() {
|
||||||
|
return 3;
|
||||||
|
}
|
||||||
|
}
|
17
source-code/ConcreteClass.java
Normal file
17
source-code/ConcreteClass.java
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
import java.util.LinkedList;
|
||||||
|
|
||||||
|
public class ConcreteClass extends AbstractClass {
|
||||||
|
@Override
|
||||||
|
int simpleOperation1() {
|
||||||
|
return 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
int simpleOperation2() {
|
||||||
|
return 7;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void testMe(int aVariable, double bT, LinkedList<Integer> c) {
|
||||||
|
System.out.println("Test!" + aVariable + bT + c);
|
||||||
|
}
|
||||||
|
}
|
29
source-code/Documentation.tex
Normal file
29
source-code/Documentation.tex
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
\documentclass[a4paper,12pt]{article}
|
||||||
|
\usepackage{amssymb} % needed for math
|
||||||
|
\usepackage{amsmath} % needed for math
|
||||||
|
\usepackage[utf8]{inputenc} % this is needed for german umlauts
|
||||||
|
\usepackage[ngerman]{babel} % this is needed for german umlauts
|
||||||
|
\usepackage[T1]{fontenc} % this is needed for correct output of umlauts in pdf
|
||||||
|
\usepackage[margin=2cm]{geometry} %layout
|
||||||
|
\usepackage{minted} % needed for the inclusion of source code
|
||||||
|
|
||||||
|
\begin{document}
|
||||||
|
\renewcommand{\theFancyVerbLine}{
|
||||||
|
\sffamily\textcolor[rgb]{0.5,0.5,0.5}{\scriptsize\arabic{FancyVerbLine}}}
|
||||||
|
\inputminted[linenos,
|
||||||
|
numbersep=7pt,
|
||||||
|
gobble=0,
|
||||||
|
frame=lines,
|
||||||
|
framesep=2mm,
|
||||||
|
label=AbstractClass.java,
|
||||||
|
fontsize=\footnotesize, tabsize=4]{java}{AbstractClass.java}
|
||||||
|
\clearpage
|
||||||
|
\inputminted[linenos,
|
||||||
|
numbersep=7pt,
|
||||||
|
gobble=0,
|
||||||
|
frame=lines,
|
||||||
|
framesep=2mm,
|
||||||
|
label=ConcreteClass.java,
|
||||||
|
fontsize=\footnotesize, tabsize=4]{java}{ConcreteClass.java}
|
||||||
|
|
||||||
|
\end{document}
|
6
source-code/Makefile
Normal file
6
source-code/Makefile
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
make:
|
||||||
|
pdflatex -shell-escape Documentation.tex -output-format=pdf
|
||||||
|
make clean
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -rf $(TARGET) *.class *.html *.log *.aux *.out *.glo *.glg *.gls *.ist *.xdy *.1 *.pyg
|
31
tikz/countable-sets/Makefile
Normal file
31
tikz/countable-sets/Makefile
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
SOURCE = countable-sets
|
||||||
|
DELAY = 80
|
||||||
|
DENSITY = 300
|
||||||
|
WIDTH = 500
|
||||||
|
|
||||||
|
make:
|
||||||
|
pdflatex $(SOURCE).tex -output-format=pdf
|
||||||
|
make clean
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -rf $(TARGET) *.class *.html *.log *.aux *.data
|
||||||
|
|
||||||
|
gif:
|
||||||
|
pdfcrop $(SOURCE).pdf
|
||||||
|
convert -verbose -delay $(DELAY) -loop 0 -density $(DENSITY) $(SOURCE)-crop.pdf $(SOURCE).gif
|
||||||
|
make clean
|
||||||
|
|
||||||
|
png:
|
||||||
|
make
|
||||||
|
make svg
|
||||||
|
inkscape $(SOURCE).svg -w $(WIDTH) --export-png=$(SOURCE).png
|
||||||
|
|
||||||
|
transparentGif:
|
||||||
|
convert $(SOURCE).pdf -transparent white result.gif
|
||||||
|
make clean
|
||||||
|
|
||||||
|
svg:
|
||||||
|
#inkscape $(SOURCE).pdf --export-plain-svg=$(SOURCE).svg
|
||||||
|
pdf2svg $(SOURCE).pdf $(SOURCE).svg
|
||||||
|
# Necessary, as pdf2svg does not always create valid svgs:
|
||||||
|
inkscape $(SOURCE).svg --export-plain-svg=$(SOURCE).svg
|
62
tikz/countable-sets/countable-sets.tex
Normal file
62
tikz/countable-sets/countable-sets.tex
Normal file
|
@ -0,0 +1,62 @@
|
||||||
|
\documentclass{standalone}
|
||||||
|
\usepackage{pgfplots}
|
||||||
|
\usepackage{sansmath} % for sans serif math
|
||||||
|
|
||||||
|
%%%<
|
||||||
|
% The data files, written on the first run.
|
||||||
|
\begin{filecontents}{function.data}
|
||||||
|
# n m
|
||||||
|
1 1
|
||||||
|
1 2
|
||||||
|
2 1
|
||||||
|
1 3
|
||||||
|
2 2
|
||||||
|
3 1
|
||||||
|
1 4
|
||||||
|
2 3
|
||||||
|
3 2
|
||||||
|
4 1
|
||||||
|
1 5
|
||||||
|
2 4
|
||||||
|
3 3
|
||||||
|
4 2
|
||||||
|
5 1
|
||||||
|
\end{filecontents}
|
||||||
|
|
||||||
|
\begin{document}
|
||||||
|
|
||||||
|
\begin{tikzpicture}
|
||||||
|
\begin{axis}[
|
||||||
|
compat=newest, % for better label placement
|
||||||
|
font=\sansmath\sffamily, % math and normal text in sans serif
|
||||||
|
xlabel=n, ylabel=m, % the label texts
|
||||||
|
xmin=0, ymin=0, % axis origin
|
||||||
|
enlarge y limits=false, % don't enlarge the y axis beyond the data range
|
||||||
|
enlarge x limits={upper,abs=0.02}, % enlarge x axis slightly to make sure the last tick mark is drawn completely
|
||||||
|
axis lines*=left, % only draw the left axis lines, not a box
|
||||||
|
unit vector ratio*={1 1 1}, % equal axis scaling. "*" to make sure the axes can only be reduced in size, not enlarged
|
||||||
|
width=6cm, % set the overall width of the plot
|
||||||
|
try min ticks=5, % adjusts how many ticks are printed
|
||||||
|
tick align=center, % tick marks centered on the axes
|
||||||
|
legend style={
|
||||||
|
draw=none, % no frame around axes
|
||||||
|
at={(1,1)}, % place at upper right of plot
|
||||||
|
anchor=north % use upper middle edge of legend for alignment
|
||||||
|
},
|
||||||
|
]
|
||||||
|
\addplot [
|
||||||
|
mark=square*, mark size=0.5em, % square, filled ("*"), radius of 0.5em
|
||||||
|
nodes near coords={
|
||||||
|
\pgfmathparse{int(\coordindex+1)}
|
||||||
|
\pgfmathresult
|
||||||
|
}, % print labels on each data point, using `\coordindex` (the data point counter) increased by 1
|
||||||
|
every node near coord/.style={
|
||||||
|
font=\scriptsize\sffamily\bfseries, % smaller text size, bold for the data point labels
|
||||||
|
text=white,
|
||||||
|
anchor=center % center the labels on the plot marks
|
||||||
|
}
|
||||||
|
] table {function.data};
|
||||||
|
\addlegendentry{f(m,n)}
|
||||||
|
\end{axis}
|
||||||
|
\end{tikzpicture}
|
||||||
|
\end{document}
|
31
tikz/pairing-function/Makefile
Normal file
31
tikz/pairing-function/Makefile
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
SOURCE = pairing-function
|
||||||
|
DELAY = 80
|
||||||
|
DENSITY = 300
|
||||||
|
WIDTH = 500
|
||||||
|
|
||||||
|
make:
|
||||||
|
pdflatex $(SOURCE).tex -output-format=pdf
|
||||||
|
make clean
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -rf $(TARGET) *.class *.html *.log *.aux *.data
|
||||||
|
|
||||||
|
gif:
|
||||||
|
pdfcrop $(SOURCE).pdf
|
||||||
|
convert -verbose -delay $(DELAY) -loop 0 -density $(DENSITY) $(SOURCE)-crop.pdf $(SOURCE).gif
|
||||||
|
make clean
|
||||||
|
|
||||||
|
png:
|
||||||
|
make
|
||||||
|
make svg
|
||||||
|
inkscape $(SOURCE).svg -w $(WIDTH) --export-png=$(SOURCE).png
|
||||||
|
|
||||||
|
transparentGif:
|
||||||
|
convert $(SOURCE).pdf -transparent white result.gif
|
||||||
|
make clean
|
||||||
|
|
||||||
|
svg:
|
||||||
|
#inkscape $(SOURCE).pdf --export-plain-svg=$(SOURCE).svg
|
||||||
|
pdf2svg $(SOURCE).pdf $(SOURCE).svg
|
||||||
|
# Necessary, as pdf2svg does not always create valid svgs:
|
||||||
|
inkscape $(SOURCE).svg --export-plain-svg=$(SOURCE).svg
|
63
tikz/pairing-function/pairing-function.tex
Normal file
63
tikz/pairing-function/pairing-function.tex
Normal file
|
@ -0,0 +1,63 @@
|
||||||
|
\documentclass{standalone}
|
||||||
|
\usepackage{pgfplots}
|
||||||
|
\usepackage{sansmath} % for sans serif math
|
||||||
|
|
||||||
|
%%%<
|
||||||
|
% The data files, written on the first run.
|
||||||
|
\begin{filecontents}{function.data}
|
||||||
|
# x y
|
||||||
|
0 0
|
||||||
|
0 1
|
||||||
|
1 0
|
||||||
|
0 2
|
||||||
|
1 1
|
||||||
|
2 0
|
||||||
|
0 3
|
||||||
|
1 2
|
||||||
|
2 1
|
||||||
|
3 0
|
||||||
|
0 4
|
||||||
|
1 3
|
||||||
|
2 2
|
||||||
|
3 1
|
||||||
|
4 0
|
||||||
|
\end{filecontents}
|
||||||
|
|
||||||
|
\begin{document}
|
||||||
|
|
||||||
|
\begin{tikzpicture}
|
||||||
|
\begin{axis}[
|
||||||
|
compat=newest, % for better label placement
|
||||||
|
font=\sansmath\sffamily, % math and normal text in sans serif
|
||||||
|
xlabel=$y$, ylabel=$x$, % the label texts
|
||||||
|
xmin=0, ymin=0, % axis origin
|
||||||
|
enlarge y limits=false, % don't enlarge the y axis beyond the data range
|
||||||
|
enlarge x limits={upper,abs=0.02}, % enlarge x axis slightly to make sure the last tick mark is drawn completely
|
||||||
|
axis lines*=left, % only draw the left axis lines, not a box
|
||||||
|
unit vector ratio*={1 1 1}, % equal axis scaling. "*" to make sure the axes can only be reduced in size, not enlarged
|
||||||
|
width=6cm, % set the overall width of the plot
|
||||||
|
try min ticks=5, % adjusts how many ticks are printed
|
||||||
|
tick align=center, % tick marks centered on the axes
|
||||||
|
legend style={
|
||||||
|
draw=none, % no frame around axes
|
||||||
|
at={(1,1)}, % place at upper right of plot
|
||||||
|
anchor=north, % use upper middle edge of legend for alignment
|
||||||
|
fill=none
|
||||||
|
},
|
||||||
|
]
|
||||||
|
\addplot [
|
||||||
|
mark=square*, mark size=0.5em, % square, filled ("*"), radius of 0.5em
|
||||||
|
nodes near coords={
|
||||||
|
\pgfmathparse{int(\coordindex)}
|
||||||
|
\pgfmathresult
|
||||||
|
}, % print labels on each data point, using `\coordindex` (the data point counter) increased by 1
|
||||||
|
every node near coord/.style={
|
||||||
|
font=\scriptsize\sffamily\bfseries, % smaller text size, bold for the data point labels
|
||||||
|
text=white,
|
||||||
|
anchor=center % center the labels on the plot marks
|
||||||
|
}
|
||||||
|
] table {function.data};
|
||||||
|
\addlegendentry{$\displaystyle\pi(x, y) = y + \sum_{i=0}^{x+y} i$}
|
||||||
|
\end{axis}
|
||||||
|
\end{tikzpicture}
|
||||||
|
\end{document}
|
Loading…
Add table
Add a link
Reference in a new issue