Wiki
Home

LaTeX

- <http://www-astro.physik.tu-berlin.de/files/Uebung/Dokumentationen/mathe_in_latex2e.pdf>
- <https://www.tug.org/pracjourn/2006-4/madsen/madsen.pdf>
- <http://texdoc.net/texmf-dist/doc/latex/koma-script/scrguide.pdf>
- <ftp://ftp.funet.fi/pub/TeX/CTAN/macros/latex/contrib/xcolor/xcolor.pdf>
- <http://detexify.kirelabs.org/classify.html>
- <https://tex.stackexchange.com/questions/136130/programmatically-generating-latex-with-python>

Figures

- <http://ftp.twaren.net/Unix/TeX/CTAN/obsolete/macros/latex/contrib/subfigure/subfigure.pdf>
- <https://tug.org/TUGboat/tb34-1/tb106thurnherr.pdf>
- <http://tex.stackexchange.com/questions/2099/how-to-include-svg-diagrams-in-latex>
  
  ```
  \begin{figure}[htbp]
    \centering
    \includegraphics[width=0.5\textwidth]{picture.jpg}
    \caption[Short]{Long text}
    \label{fig:label}
  \end{figure}
  ```

Beamer

- <http://texdoc.net/texmf-dist/doc/latex/beamer/doc/beameruserguide.pdf>
- <http://www.cpt.univ-mrs.fr/~masson/latex/Beamer-appearance-cheat-sheet.pdf>
- ### Columns
- ### Block

Bibliography

- Jabref
- <https://scholar.google.de/> for bibtex
- <https://en.wikibooks.org/wiki/LaTeX/Bibliography_Management>
- <https://tex.stackexchange.com/questions/35977/how-to-add-a-url-to-a-latex-bibtex-file#35981>
- ### 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
- <http://www.maths.tcd.ie/~dwilkins/LaTeXPrimer/QuotDash.html>
- <http://tex.stackexchange.com/questions/64371/direct-quotations-and-entire-paragraph-quotations>
  
  ```
    ``You \emph{were} a little grave,'' said Alice.
  ```

Makefile

- <https://github.com/shiblon/latex-makefile>
  
  Eigene Targets kommen in Targets.ini
- ### R
- ```makefile
  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:
-
- ```make
  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

- <http://get-software.net/macros/latex/contrib/glossaries/glossariesbegin.pdf>
- <https://en.wikibooks.org/wiki/LaTeX/Glossary>
  
  ```html
    \newacronym{key}{key}{}
    \newacronym[\glslongpluralkey={},\glsshortpluralkey={}]{}{}{}
    \gls{key}
    \glspl{key}
    \glsreset{key}
  ```

Tables

- <ftp://ftp.funet.fi/pub/TeX/CTAN/macros/latex/contrib/multirow/doc/multirow.pdf>
- <https://ftp.fau.de/ctan/macros/latex/contrib/spreadtab/spreadtab_doc_en.pdf>
  
  ```latex
    \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

- <http://www.texdoc.net/texmf-dist/doc/latex/listings/listings.pdf>
- <https://tex.stackexchange.com/questions/205362/should-i-use-lstinline-for-the-language-keywords-embedded-in-text>
- ```latex
  \begin{lstlisting}[caption={}, label={lst:}]
    Put your code here.
    \end{lstlisting}
  ```
- Code aus einer Datei laden:
  
  ```latex
  \lstinputlisting[firstline=98, lastline=116, breaklines=true, caption={}, label={}]{code/FSBL/src/fsbl_handoff.S}
  ```
- Inline Latex:
  
  ```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}
  ```

Rechnungen

- <https://meinnoteblog.wordpress.com/2010/11/12/latex-vorlagen-fur-briefe-und-rechnung/>
- <https://www.unix-ag.uni-kl.de/_media/briefe_rechnungen2011.pdf>
- <http://www.uweziegenhagen.de/latex/documents/rechnung/rechnungen.pdf>

Latexmk

- <ftp://ftp.tu-chemnitz.de/pub/tex/support/latexmk/latexmk.pdf>
- <https://tex.stackexchange.com/questions/123183/how-do-i-set-up-my-config-file-to-have-latexmk-default-to-making-a-pdf>
- <https://drewsilcock.co.uk/using-make-and-latexmk/>
- <https://mg.readthedocs.org/latexmk.html>
  
  ```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)
  ```
- `latexmk -pdflatex='pdflatex -file-line-error -synctex=1' -pdf filename.tex`
- ### Clean
  
  latexmk -C
- ### XeLatex
  
  latexmk -xelatex -interaction=batchmode --shell-escape demo

Koma

- scrartcl
- scrbook
- scrreprt

Macros

- <https://en.wikibooks.org/wiki/LaTeX/Macros>
  
  ```latex
  \newcommand{name}[num]{definition}
  \newcommand{\texthex}[1]{\texttt{#1}}
  ```