2
0
Fork 0
mirror of https://github.com/MartinThoma/LaTeX-examples.git synced 2025-04-19 11:38:05 +02:00
This commit is contained in:
Martin Thoma 2014-05-25 16:01:47 +02:00
parent e0cb089f23
commit 304f63f016
10 changed files with 150 additions and 1 deletions

View file

@ -2,7 +2,12 @@
"folders":
[
{
"path": "/home/moose/Downloads/LaTeX-examples/documents/Programmierparadigmen"
"follow_symlinks": true,
"path": "."
},
{
"follow_symlinks": true,
"path": "/var/www/write-math/website/gallery"
}
]
}

View file

@ -0,0 +1,11 @@
I think I may not add this to my repository. So please have a look at
* [www.math.kit.edu/...](http://www.math.kit.edu/lehre/seite/bachmastarbeiten/de#Latexvorlage%20f%C3%BCr%20Bachelorarbeit)
## Problems
There seems to be a problem that `\section` does not compile.
This seems to be a problem of the latest version of koma scripts.
It happens with `\pagestyle{headings}`.
You can eventually get rid of it by adding `\usepackage{scrpage2}` to
your preamble and set `\pagestyle{scrheadings}`.

View file

@ -0,0 +1,35 @@
SOURCE = hidden-markov-model-three-state-symbol
DELAY = 80
DENSITY = 300
WIDTH = 512
make:
pdflatex $(SOURCE).tex -output-format=pdf
make clean
clean:
rm -rf $(TARGET) *.class *.html *.log *.aux *.data *.gnuplot
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:
make
#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
rsvg-convert -a -w $(WIDTH) -f svg $(SOURCE).svg -o $(SOURCE)2.svg
inkscape $(SOURCE)2.svg --export-plain-svg=$(SOURCE).svg
rm $(SOURCE)2.svg

View file

@ -0,0 +1,3 @@
Compiled example
----------------
![Example](hidden-markov-model-abc.png)

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

View file

@ -0,0 +1,29 @@
\documentclass[varwidth=true, border=2pt]{standalone}
\usepackage{units}
\usepackage{ifthen}
\usepackage{tikz}
\usetikzlibrary{calc}
\begin{document}
\tikzstyle{vertex}=[draw,black,fill=blue,circle,minimum size=10pt,inner sep=0pt]
\tikzstyle{edge}=[very thick]
\begin{tikzpicture}[scale=2.5]
\node (a)[vertex,fill=gray!10,align=left] at (0,0) {first};
\node (b)[vertex,fill=gray!10,align=left] at (1,0) {middle};
\node (c)[vertex,fill=gray!10,align=left] at (2,0) {last};
\node (a1) at (0,-1) {$(x(t), y(t))$};
\node (b1) at (1,-1) {$(x(t), y(t))$};
\node (c1) at (2,-1) {$(x(t), y(t))$};
\path[thick,->] (a) edge node [anchor=center,above,sloped] {$p_{1,2}$} (b);
\path[thick,->] (b) edge node [anchor=center,above,sloped] {$p_{2,3}$} (c);
\path[thick,->] (a) edge[loop above, looseness=5] node [anchor=center,above,sloped] {$p_1$} (a);
\path[thick,->] (b) edge[loop above, looseness=5] node [anchor=center,above,sloped] {$p_2$} (b);
\path[thick,->] (c) edge[loop above, looseness=5] node [anchor=center,above,sloped] {$p_3$} (c);
\path[thick,->] (a) edge node [anchor=center,above,sloped] {} (a1);
\path[thick,->] (b) edge node [anchor=center,above,sloped] {} (b1);
\path[thick,->] (c) edge node [anchor=center,above,sloped] {} (c1);
\end{tikzpicture}
\end{document}

View file

@ -0,0 +1,32 @@
SOURCE = sigmoid-function-2
DELAY = 80
DENSITY = 300
WIDTH = 500
make:
pdflatex $(SOURCE).tex -output-format=pdf
pdflatex $(SOURCE).tex -output-format=pdf
make clean
clean:
rm -rf $(TARGET) *.class *.html *.log *.aux *.data *.gnuplot
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

View file

@ -0,0 +1,3 @@
Compiled example
----------------
![Example](sigmoid-function-2.png)

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View file

@ -0,0 +1,31 @@
\documentclass[varwidth=false, border=2pt]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.10}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
legend pos=north west,
axis x line=middle,
axis y line=middle,
grid = major,
width=16cm,
height=8cm,
grid style={dashed, gray!30},
xmin=-8, % start the diagram at this x-coordinate
xmax= 8, % end the diagram at this x-coordinate
ymin= 0, % start the diagram at this y-coordinate
ymax= 1, % end the diagram at this y-coordinate
%axis background/.style={fill=white},
xlabel=$t$,
ylabel=sig$(t)$,
tick align=outside,
enlargelimits=true]
% plot the stirling-formulae
\addplot[domain=-8:8, red, ultra thick,samples=500] {1/(1+exp(-1*x))};
\addlegendentry{sig$(t)=\frac{1}{1+e^{-t}}$}
\end{axis}
\end{tikzpicture}
\end{document}