Browse Source

added Latex Doc Tamplate

lukas
Lukas Reichwein 5 years ago
parent
commit
94d2a9c0ce
  1. 276
      Latex/.gitignore
  2. BIN
      Latex/images/fish.png
  3. BIN
      Latex/main.pdf
  4. 139
      Latex/main.tex
  5. 19
      Latex/references.bib
  6. 233
      Latex/structure.tex

276
Latex/.gitignore

@ -0,0 +1,276 @@
## Core latex/pdflatex auxiliary files:
*.aux
*.lof
*.log
*.lot
*.fls
*.out
*.toc
*.fmt
*.fot
*.cb
*.cb2
.*.lb
## Intermediate documents:
*.dvi
*.xdv
*-converted-to.*
# these rules might exclude image files for figures etc.
# *.ps
# *.eps
# *.pdf
## Generated if empty string is given at "Please type another file name for output:"
.pdf
## Bibliography auxiliary files (bibtex/biblatex/biber):
*.bbl
*.bcf
*.blg
*-blx.aux
*-blx.bib
*.run.xml
## Build tool auxiliary files:
*.fdb_latexmk
*.synctex
*.synctex(busy)
*.synctex.gz
*.synctex.gz(busy)
*.pdfsync
## Build tool directories for auxiliary files
# latexrun
latex.out/
## Auxiliary and intermediate files from other packages:
# algorithms
*.alg
*.loa
# achemso
acs-*.bib
# amsthm
*.thm
# beamer
*.nav
*.pre
*.snm
*.vrb
# changes
*.soc
# comment
*.cut
# cprotect
*.cpt
# elsarticle (documentclass of Elsevier journals)
*.spl
# endnotes
*.ent
# fixme
*.lox
# feynmf/feynmp
*.mf
*.mp
*.t[1-9]
*.t[1-9][0-9]
*.tfm
#(r)(e)ledmac/(r)(e)ledpar
*.end
*.?end
*.[1-9]
*.[1-9][0-9]
*.[1-9][0-9][0-9]
*.[1-9]R
*.[1-9][0-9]R
*.[1-9][0-9][0-9]R
*.eledsec[1-9]
*.eledsec[1-9]R
*.eledsec[1-9][0-9]
*.eledsec[1-9][0-9]R
*.eledsec[1-9][0-9][0-9]
*.eledsec[1-9][0-9][0-9]R
# glossaries
*.acn
*.acr
*.glg
*.glo
*.gls
*.glsdefs
*.lzo
*.lzs
# uncomment this for glossaries-extra (will ignore makeindex's style files!)
# *.ist
# gnuplottex
*-gnuplottex-*
# gregoriotex
*.gaux
*.gtex
# htlatex
*.4ct
*.4tc
*.idv
*.lg
*.trc
*.xref
# hyperref
*.brf
# knitr
*-concordance.tex
# TODO Comment the next line if you want to keep your tikz graphics files
*.tikz
*-tikzDictionary
# listings
*.lol
# luatexja-ruby
*.ltjruby
# makeidx
*.idx
*.ilg
*.ind
# minitoc
*.maf
*.mlf
*.mlt
*.mtc[0-9]*
*.slf[0-9]*
*.slt[0-9]*
*.stc[0-9]*
# minted
_minted*
*.pyg
# morewrites
*.mw
# nomencl
*.nlg
*.nlo
*.nls
# pax
*.pax
# pdfpcnotes
*.pdfpc
# sagetex
*.sagetex.sage
*.sagetex.py
*.sagetex.scmd
# scrwfile
*.wrt
# sympy
*.sout
*.sympy
sympy-plots-for-*.tex/
# pdfcomment
*.upa
*.upb
# pythontex
*.pytxcode
pythontex-files-*/
# tcolorbox
*.listing
# thmtools
*.loe
# TikZ & PGF
*.dpth
*.md5
*.auxlock
# todonotes
*.tdo
# vhistory
*.hst
*.ver
# easy-todo
*.lod
# xcolor
*.xcp
# xmpincl
*.xmpi
# xindy
*.xdy
# xypic precompiled matrices and outlines
*.xyc
*.xyd
# endfloat
*.ttt
*.fff
# Latexian
TSWLatexianTemp*
## Editors:
# WinEdt
*.bak
*.sav
# Texpad
.texpadtmp
# LyX
*.lyx~
# Kile
*.backup
# gummi
.*.swp
# KBibTeX
*~[0-9]*
# TeXnicCenter
*.tps
# auto folder when using emacs and auctex
./auto/*
*.el
# expex forward references with \gathertags
*-tags.tex
# standalone packages
*.sta
# Makeindex log files
*.lpz

BIN
Latex/images/fish.png

After

Width: 211  |  Height: 158  |  Size: 15 KiB

BIN
Latex/main.pdf

139
Latex/main.tex

@ -0,0 +1,139 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Lachaise Assignment
% LaTeX Template
% Version 1.0 (26/6/2018)
%
% This template originates from:
% http://www.LaTeXTemplates.com
%
% Authors:
% Marion Lachaise & François Févotte
% Vel (vel@LaTeXTemplates.com)
%
% License:
% CC BY-NC-SA 3.0 (http://creativecommons.org/licenses/by-nc-sa/3.0/)
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%----------------------------------------------------------------------------------------
% PACKAGES AND OTHER DOCUMENT CONFIGURATIONS
%----------------------------------------------------------------------------------------
\documentclass{article}
\input{structure.tex} % Include the file specifying the document structure and custom commands
%----------------------------------------------------------------------------------------
% INFORMATION
%----------------------------------------------------------------------------------------
\title{Open Source Roboter Plattform} % Title
\author{Lukas Reichwein\\ Yves Ehrlich\\ Nick Gnoevoj}
\date{University of Applied Science Fulda --- \today} % University, school and/or department name(s) and a date
%----------------------------------------------------------------------------------------
\begin{document}
\maketitle % Print the title
\tableofcontents % Inhaltsverzeichniss, Achtung zweimal Compilerien!
\newpage
%----------------------------------------------------------------------------------------
% INTRODUCTION
%----------------------------------------------------------------------------------------
\section*{Vorwort} % Unnumbered section
Motivation, Basis, Ziel des Projektes.
\newpage
%----------------------------------------------------------------------------------------
% Latex Beispeiele
%----------------------------------------------------------------------------------------
\section{Beispiele für Spezielle LaTeX Strukturen}
\begin{info} % Information block
benutze den Info block um wichtige informationen hervorzuheben.
\end{info}
%----------------------------------------------------------------------------------------
% Beispiel für Pseudo Code.
%----------------------------------------------------------------------------------------
\begin{center}
\begin{minipage}{0.5\linewidth} % Adjust the minipage width to accomodate for the length of algorithm lines
\begin{algorithm}[H]
\KwIn{$(a, b)$, two floating-point numbers} % Algorithm inputs
\KwResult{$(c, d)$, such that $a+b = c + d$} % Algorithm outputs/results
\medskip
\If{$\vert b\vert > \vert a\vert$}{
exchange $a$ and $b$ \;
}
$c \leftarrow a + b$ \;
$z \leftarrow c - a$ \;
$d \leftarrow b - z$ \;
{\bf return} $(c,d)$ \;
\caption{\texttt{FastTwoSum}} % Algorithm name
\label{alg:fastTwoSum} % optional label to refer to
\end{algorithm}
\end{minipage}
\end{center}
%----------------------------------------------------------------------------------------
% Beispiel für Code Snippets.
%----------------------------------------------------------------------------------------
% File contents
\begin{file}[hello.py]
\begin{lstlisting}[language=Python]
#! /usr/bin/python
import sys
sys.stdout.write("Hello World!\n")
\end{lstlisting}
\end{file}
%----------------------------------------------------------------------------------------
% Example for Console Prints (can also be usefull for displaying Serial monitor)
%----------------------------------------------------------------------------------------
% Command-line "screenshot"
\begin{commandline}
\begin{verbatim}
$ chmod +x hello.py
$ ./hello.py
Hello World!S
\end{verbatim}
\end{commandline}
% Warning text, with a custom title
\begin{warn}[Notice:]
Warungen könnten auch nützlich sein, immerhin braucht der RF24 3.3V und nicht 5V
\end{warn}
%----------------------------------------------------------------------------------------
% Beispiel für ein Bild.
%----------------------------------------------------------------------------------------
\begin{figure}[h]
\includegraphics[width=8cm]{fish.png}
\centering
\end{figure}
%----------------------------------------------------------------------------------------
% BIBLIOGRAPHY
%----------------------------------------------------------------------------------------
\bibliographystyle{unsrt}
\bibliography{sample.bib}
%----------------------------------------------------------------------------------------
\end{document}

19
Latex/references.bib

@ -0,0 +1,19 @@
@BOOK{Smith:2012qr,
title = {{B}ook {T}itle},
publisher = {Publisher},
author = {Smith, J.~M. and Jones, A.~B.},
year = {2012},
edition = {7th},
}
@ARTICLE{Smith:2013jd,
author = {Jones, A.~B. and Smith, J.~M.},
title = {{A}rticle {T}itle},
journal = {Journal title},
year = {2013},
volume = {13},
pages = {123-456},
number = {52},
month = {March},
publisher = {Publisher}
}

233
Latex/structure.tex

@ -0,0 +1,233 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Lachaise Assignment
% Structure Specification File
% Version 1.0 (26/6/2018)
%
% This template originates from:
% http://www.LaTeXTemplates.com
%
% Authors:
% Marion Lachaise & François Févotte
% Vel (vel@LaTeXTemplates.com)
%
% License:
% CC BY-NC-SA 3.0 (http://creativecommons.org/licenses/by-nc-sa/3.0/)
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%----------------------------------------------------------------------------------------
% PACKAGES AND OTHER DOCUMENT CONFIGURATIONS
%----------------------------------------------------------------------------------------
\usepackage[ngerman]{babel} %UMLAUTE
\usepackage{amsmath,amsfonts,stmaryrd,amssymb} % Math packages
\usepackage{enumerate} % Custom item numbers for enumerations
\usepackage[ruled]{algorithm2e} % Algorithms
\usepackage[framemethod=tikz]{mdframed} % Allows defining custom boxed/framed environments
\usepackage{listings} % File listings, with syntax highlighting
\lstset{
basicstyle=\ttfamily, % Typeset listings in monospace font
}
\usepackage{graphicx}
%Path relative to the main .tex file
\graphicspath{ {images/} }
%----------------------------------------------------------------------------------------
% DOCUMENT MARGINS
%----------------------------------------------------------------------------------------
\usepackage{geometry} % Required for adjusting page dimensions and margins
\geometry{
paper=a4paper, % Paper size, change to letterpaper for US letter size
top=2.5cm, % Top margin
bottom=3cm, % Bottom margin
left=2.5cm, % Left margin
right=2.5cm, % Right margin
headheight=14pt, % Header height
footskip=1.5cm, % Space from the bottom margin to the baseline of the footer
headsep=1.2cm, % Space from the top margin to the baseline of the header
%showframe, % Uncomment to show how the type block is set on the page
}
%----------------------------------------------------------------------------------------
% FONTS
%----------------------------------------------------------------------------------------
\usepackage[utf8]{inputenc} % Required for inputting international characters
\usepackage[T1]{fontenc} % Output font encoding for international characters
\usepackage{XCharter} % Use the XCharter fonts
%----------------------------------------------------------------------------------------
% COMMAND LINE ENVIRONMENT
%----------------------------------------------------------------------------------------
% Usage:
% \begin{commandline}
% \begin{verbatim}
% $ ls
%
% Applications Desktop ...
% \end{verbatim}
% \end{commandline}
\mdfdefinestyle{commandline}{
leftmargin=10pt,
rightmargin=10pt,
innerleftmargin=15pt,
middlelinecolor=black!50!white,
middlelinewidth=2pt,
frametitlerule=false,
backgroundcolor=black!5!white,
frametitle={Command Line},
frametitlefont={\normalfont\sffamily\color{white}\hspace{-1em}},
frametitlebackgroundcolor=black!50!white,
nobreak,
}
% Define a custom environment for command-line snapshots
\newenvironment{commandline}{
\medskip
\begin{mdframed}[style=commandline]
}{
\end{mdframed}
\medskip
}
%----------------------------------------------------------------------------------------
% FILE CONTENTS ENVIRONMENT
%----------------------------------------------------------------------------------------
% Usage:
% \begin{file}[optional filename, defaults to "File"]
% File contents, for example, with a listings environment
% \end{file}
\mdfdefinestyle{file}{
innertopmargin=1.6\baselineskip,
innerbottommargin=0.8\baselineskip,
topline=false, bottomline=false,
leftline=false, rightline=false,
leftmargin=2cm,
rightmargin=2cm,
singleextra={%
\draw[fill=black!10!white](P)++(0,-1.2em)rectangle(P-|O);
\node[anchor=north west]
at(P-|O){\ttfamily\mdfilename};
%
\def\l{3em}
\draw(O-|P)++(-\l,0)--++(\l,\l)--(P)--(P-|O)--(O)--cycle;
\draw(O-|P)++(-\l,0)--++(0,\l)--++(\l,0);
},
nobreak,
}
% Define a custom environment for file contents
\newenvironment{file}[1][File]{ % Set the default filename to "File"
\medskip
\newcommand{\mdfilename}{#1}
\begin{mdframed}[style=file]
}{
\end{mdframed}
\medskip
}
%----------------------------------------------------------------------------------------
% NUMBERED QUESTIONS ENVIRONMENT
%----------------------------------------------------------------------------------------
% Usage:
% \begin{question}[optional title]
% Question contents
% \end{question}
\mdfdefinestyle{question}{
innertopmargin=1.2\baselineskip,
innerbottommargin=0.8\baselineskip,
roundcorner=5pt,
nobreak,
singleextra={%
\draw(P-|O)node[xshift=1em,anchor=west,fill=white,draw,rounded corners=5pt]{%
Question \theQuestion\questionTitle};
},
}
\newcounter{Question} % Stores the current question number that gets iterated with each new question
% Define a custom environment for numbered questions
\newenvironment{question}[1][\unskip]{
\bigskip
\stepcounter{Question}
\newcommand{\questionTitle}{~#1}
\begin{mdframed}[style=question]
}{
\end{mdframed}
\medskip
}
%----------------------------------------------------------------------------------------
% WARNING TEXT ENVIRONMENT
%----------------------------------------------------------------------------------------
% Usage:
% \begin{warn}[optional title, defaults to "Warning:"]
% Contents
% \end{warn}
\mdfdefinestyle{warning}{
topline=false, bottomline=false,
leftline=false, rightline=false,
nobreak,
singleextra={%
\draw(P-|O)++(-0.5em,0)node(tmp1){};
\draw(P-|O)++(0.5em,0)node(tmp2){};
\fill[black,rotate around={45:(P-|O)}](tmp1)rectangle(tmp2);
\node at(P-|O){\color{white}\scriptsize\bf !};
\draw[very thick](P-|O)++(0,-1em)--(O);%--(O-|P);
}
}
% Define a custom environment for warning text
\newenvironment{warn}[1][Warning:]{ % Set the default warning to "Warning:"
\medskip
\begin{mdframed}[style=warning]
\noindent{\textbf{#1}}
}{
\end{mdframed}
}
%----------------------------------------------------------------------------------------
% INFORMATION ENVIRONMENT
%----------------------------------------------------------------------------------------
% Usage:
% \begin{info}[optional title, defaults to "Info:"]
% contents
% \end{info}
\mdfdefinestyle{info}{%
topline=false, bottomline=false,
leftline=false, rightline=false,
nobreak,
singleextra={%
\fill[black](P-|O)circle[radius=0.4em];
\node at(P-|O){\color{white}\scriptsize\bf i};
\draw[very thick](P-|O)++(0,-0.8em)--(O);%--(O-|P);
}
}
% Define a custom environment for information
\newenvironment{info}[1][Info:]{ % Set the default title to "Info:"
\medskip
\begin{mdframed}[style=info]
\noindent{\textbf{#1}}
}{
\end{mdframed}
}
Loading…
Cancel
Save