LaTex

%toc

Figures

\begin{figure}[htbp]
    \centering
    \includegraphics[width=0.5\textwidth]{picture.jpg}
    \caption[Short]{Long text}
    \label{fig:label}
\end{figure}

Beamer

Columns

Block

Bibliography

URL Referenz

@misc{bworld,
  author = {Ingo L├╝tkebohle},
  title = {{BWorld Robot Control Software}},
  howpublished = "\url{http://aiweb.techfak.uni-bielefeld.de/content/bworld-robot-control-software/}",
  year = {2008},
  note = "[Online; accessed 19-July-2008]"
}

Quotation

``You \emph{were} a little grave,'' said Alice.

Makefile

Eigene Targets kommen in Targets.ini

R

RDIR := $(wildcard plots/*)
RFILES := $(wildcard plots/*/*.R)
ROUT := $(RFILES:.R=.Rout)
PDFFILES := $(wildcard plots/*/*.pdf)

#$(RDIR)/%.Rout: $(RDIR)/%.R
$(ROUT): $(RFILES)
	# Change directory to prevent a messy workspace
	cd $(RDIR); R CMD BATCH *.R

R: $(ROUT)

Rtest:
	echo $(RDIR)
	echo $(RDIR)/*.R

.PHONY: Rclean

Rclean:
	rm -fv $(ROUT)
	rm $(PDFFILES)

Deploy

Zum Beispiel ein deploy hook:

deploy:
	rsync -av ./document.pdf user@server:websites/static/

Makefile.ini:

onlysources.tex := yourfile.tex
VIEW_PDF := zathura > /dev/null 2>&1

Damit spamt zathura die Konsole nicht so voll.

Glossaries Package

\newacronym{key}{key}{}
\newacronym[\glslongpluralkey={},\glsshortpluralkey={}]{}{}{}
\gls{key}
\glspl{key}
\glsreset{key}

SIUnitx Package

http://mirror.physik-pool.tu-berlin.de/tex-archive/macros/latex/contrib/siunitx/siunitx.pdf

Bit und Byte aktivieren: binary-units = true

Beispiele:

78 \si{\pico\second}

Tables

\begin{table}[h]
    \centering
    \caption{Comparison of the \gls{FPGA} boards, the information is gathered from the user manuals, see \cite{marsmx2} and \cite{marszx3}.}
    \label{tab:fpgacomparison}
    \begin{tabular}{@{}lcccc@{}}
        \toprule
	Boot Mode Pins/Boot Device&	MIO[5]&	MIO[4]&	MIO[3]&	MIO[2]\\
        \midrule
	Cascaded JTAG&			0&	0&	0&	0\\
	Independent JTAG&		0&	0&	0&	1\\
	NOR Flash&			0&	0&	\multicolumn{2}{c}{\cellcolor{blue!25}}\\
	NAND Flash&			0&	0&	\multicolumn{2}{c}{\cellcolor{blue!25}}\\
	QSPI Flash&			0&	0&	\multicolumn{2}{c}{\cellcolor{blue!25}}\\
	SD Card&			0&	0&	\multicolumn{2}{c}{\multirow{-4}{*}{\cellcolor{blue!25}NA}}\\
        \bottomrule
    \end{tabular}
\end{table}

Listings

\begin{lstlisting}[caption={}, label={lst:}]
Put your code here.
\end{lstlisting}

Code aus einer Datei laden:

\lstinputlisting[firstline=98, lastline=116, breaklines=true, caption={}, label={}]{code/FSBL/src/fsbl_handoff.S}

Inline Latex:

\begin{lstlisting}[caption={Start the debugger and choose the executable with the command in line 1.
        After that the debugger shell is opened, signalled by the \textbf{(gdb)}.
        In line 2 the remote target is set and the binary is loaded onto the target.
        To start the process type \emph{continue}.
}, label={lst:start-gdb}, escapechar=\%]
arm-none-eabi-gdb Spansion_test_rom.elf
%\textbf{(gdb)}% target remote localhost:2331
%\textbf{(gdb)}% continue
\end{lstlisting}

Lebenslauf/CV

http://www.dante.de/events/Archiv/dante2011/programm/vortraege/lebenslauf.pdf

Cooles Map Pin Symbol: https://tex.stackexchange.com/questions/214678/code-for-pin-icon-on-a-map

Rechnungen

Latexmk

latexmk -pdflatex='pdflatex -file-line-error -synctex=1' -pdf filename.tex

Makefile:

TEX = $(wildcard *.tex)
PDF = $(TEX:.tex=.pdf)
TEMPFILES = *.fls *.aux *.log *.fdb_latexmk

LATEXMK = latexmk
LATEXMKFLAGS = -pdf -interaction=batchmode --shell-escape

all: $(PDF)
.PHONY: all

test:
	echo $(TEX)
	echo $(PDF)

%.pdf: %.tex
	$(LATEXMK) $(LATEXMKFLAGS) $<

show:
	zathura $(PDF) > /dev/null 2>&1 &

clean:
	rm -f $(TEMPFILES) $(PDF)

Clean

latexmk -C

XeLatex

latexmk -xelatex -interaction=batchmode --shell-escape demo

Listen

Es gibt folgende Listen Typen: itemize, enumerate und description.

\begin{itemize}
    \item Ein Item
\end{itemize}
\begin{enumerate}
    \item Ein Item
\end{enumerate}
\begin{description}
    \item[Keyword] Ein Item
\end{description}

Koma

Macros

\newcommand{name}[num]{definition}
\newcommand{\texthex}[1]{\texttt{#1}}