commit eb49f329f11209917e457d128ae0fcecdf393de7 Author: Dustin Frisch Date: Tue Oct 19 00:41:05 2021 +0200 Oh my git diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9567322 --- /dev/null +++ b/.gitignore @@ -0,0 +1,262 @@ +presi.pdf +.envrc + +## 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 + +# 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 + +# makeidx +*.idx +*.ilg +*.ind +*.ist + +# 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 +*.xyc + +# endfloat +*.ttt +*.fff + +# Latexian +TSWLatexianTemp* + +## Editors: +# WinEdt +*.bak +*.sav + +# Texpad +.texpadtmp + +# LyX +*.lyx~ + +# Kile +*.backup + +# KBibTeX +*~[0-9]* + +# auto folder when using emacs and auctex +./auto/* +*.el + +# expex forward references with \gathertags +*-tags.tex + +# standalone packages +*.sta diff --git a/Makefile b/Makefile new file mode 100755 index 0000000..f9724bd --- /dev/null +++ b/Makefile @@ -0,0 +1,33 @@ +.PHONY: all watch check clean + +src = \ + presi.tex \ + presi.bib \ + $(wildcard *.tex) \ + $(wildcard figures/*) \ + $(wildcard listings/*) + +latexmkopts = \ + -pdflua \ + -shell-escape \ + -use-make \ + -synctex=1 \ + -interaction=nonstopmode \ + -file-line-error + +all: presi.pdf + +presi.pdf: $(src) + latexmk $(latexmkopts) \ + -Werror \ + presi.tex + +watch: $(src) + latexmk $(latexmkopts) \ + -pvc \ + -view=none \ + presi.tex + +clean: + latexmk -c presi.tex + rm -fR presi.pdf diff --git a/figures/logos/Bitbucket.png b/figures/logos/Bitbucket.png new file mode 100644 index 0000000..94530ff Binary files /dev/null and b/figures/logos/Bitbucket.png differ diff --git a/figures/logos/Codeberg.png b/figures/logos/Codeberg.png new file mode 100644 index 0000000..bc2c799 Binary files /dev/null and b/figures/logos/Codeberg.png differ diff --git a/figures/logos/GitHub.png b/figures/logos/GitHub.png new file mode 100644 index 0000000..80f50cd Binary files /dev/null and b/figures/logos/GitHub.png differ diff --git a/figures/logos/GitLab.png b/figures/logos/GitLab.png new file mode 100644 index 0000000..d89fb9d Binary files /dev/null and b/figures/logos/GitLab.png differ diff --git a/figures/logos/Gitea.png b/figures/logos/Gitea.png new file mode 100644 index 0000000..7b9a8ad Binary files /dev/null and b/figures/logos/Gitea.png differ diff --git a/figures/logos/SourceHut.png b/figures/logos/SourceHut.png new file mode 100644 index 0000000..08ea362 Binary files /dev/null and b/figures/logos/SourceHut.png differ diff --git a/presi.bib b/presi.bib new file mode 100644 index 0000000..e69de29 diff --git a/presi.tex b/presi.tex new file mode 100644 index 0000000..d136d2a --- /dev/null +++ b/presi.tex @@ -0,0 +1,609 @@ +\year=2021 +\month=9 +\day=14 + +\documentclass[aspectratio=1610,xcolor=dvipsnames]{beamer} + +\usepackage{pgfplots} +\pgfplotsset{compat=1.17} + +\usepackage{fontspec} +\usepackage{polyglossia} +\setdefaultlanguage{german} + +\usepackage[font=scriptsize]{caption} + +\usepackage{fontawesome} + +\usepackage{graphicx} +\usepackage{tikzfig} +\usetikzlibrary{positioning} +\graphicspath{{./figures/}} + +\usepackage{csquotes} +\usepackage{fancyvrb} + +\usepackage[ + backend=biber, + style=verbose-ibid, + block=ragged, +]{biblatex} +\addbibresource{presi.bib} + +\usecolortheme{seahorse} +\setbeamerfont{footnote}{size=\tiny} + +\usepackage{minted} +\usemintedstyle{friendly} +\setminted{ + baselinestretch=1, + breaklines=true, + autogobble=true, + bgcolor=lightgray!50, +} + +\newmintinline[x]{console}{} + +\colorlet{bgl}{cyan!50!lightgray!50} +\colorlet{bgr}{orange!50!lightgray!50} + +\title{Git SCM} +\subtitle{Crash-Course in Versionsverwaltung and kolaborativem bearbeiten von Textdateien} + +\author{Dustin Frisch\\ + Fachbereich Angewandte Informatik\\ + Hochschule Fulda\\ + Fulda, Deutschland\\ + E-Mail: {\tt dustin.frisch@ai.hs-fulda.de}} + +\begin{document} + +\frame{\titlepage} + +\begin{frame}{Agenda} +\tableofcontents +\end{frame} + +\section{Was soll das alles?} + +\begin{frame}{Was ist Versionverwaltung?} + \begin{columns}[t] + \begin{column}{0.5\textwidth} + \centering + \large{Ohne Versionverwaltung} + + \begin{figure}[H] + \begin{tikzpicture}[] + \tikzstyle{state}+=[circle, draw=cyan!60, fill=cyan!5, very thick, minimum size=2.5em] + \tikzstyle{file}+=[rectangle, draw=green!60, fill=green!5, very thick, minimum size=2.5em] + \tikzstyle{update}+=[->, thick, dotted] + \tikzstyle{save}+=[->, thick] + + \node[state](s1){+A}; + \node[state](s2)[right=1em of s1]{+B}; + \node[state](s3)[right=1em of s2]{-A}; + \node[state](s4)[right=1em of s3]{+C}; + + \node[file](f) at (2,-3) {$doc$}; + + \draw[update] (s1.east) -- (s2.west); + \draw[update] (s2.east) -- (s3.west); + \draw[update] (s3.east) -- (s4.west); + + \draw[save] (s1.south) -- ([xshift=-0.9em] f.north); + \draw[save] (s2.south) -- ([xshift=-0.3em] f.north); + \draw[save] (s3.south) -- ([xshift=0.3em] f.north); + \draw[save] (s4.south) -- ([xshift=0.9em] f.north); + \end{tikzpicture} + \end{figure} + \end{column} + \begin{column}{0.5\textwidth} + \centering + \large{Mit Versionverwaltung} + + \begin{figure}[H] + \begin{tikzpicture}[] + \tikzstyle{state}+=[circle, draw=cyan!60, fill=cyan!5, very thick, minimum size=2.5em] + \tikzstyle{file}+=[rectangle, draw=green!60, fill=green!5, very thick, minimum size=2.5em] + \tikzstyle{update}+=[->, thick, dotted] + \tikzstyle{save}+=[->, thick] + + \node[state](s1){+A}; + \node[state](s2)[right=1em of s1]{+B}; + \node[state](s3)[right=1em of s2]{-A}; + \node[state](s4)[right=1em of s3]{+C}; + + \node[file](f1)[below=2 of s1]{$doc_1$}; + \node[file](f2)[below=2 of s2]{$doc_2$}; + \node[file](f3)[below=2 of s3]{$doc_3$}; + \node[file](f4)[below=2 of s4]{$doc_4$}; + + \draw[update] (s1.east) -- (s2.west); + \draw[update] (s2.east) -- (s3.west); + \draw[update] (s3.east) -- (s4.west); + + \draw[save] (s1.south) -- (f1.north); + \draw[save] (s2.south) -- (f2.north); + \draw[save] (s3.south) -- (f3.north); + \draw[save] (s4.south) -- (f4.north); + \end{tikzpicture} + \end{figure} + \end{column} + \end{columns} +\end{frame} + +\begin{frame}{Wo kann ich das einsetzen?} + \begin{itemize} + \item Source-Code + \item Konfiguration + \item Dokumente + \item Daten + \end{itemize} + + \vspace{1em} + + Also alles, was \emph{Text} ist. +\end{frame} + +\begin{frame}{Was bringt mir das?} + \centering + + { + \fontsize{40}{48}\selectfont + Zeitmaschinen + }\\ + \vspace{1em} + \small{und}\\ + \vspace{1em} + { + \fontsize{40}{48}\selectfont + Paralleluniversen + } +\end{frame} + +\section{Warum jetzt genau Git?} + +\begin{frame}{Kurze Histore} + \begin{figure}[H] + \begin{tikzpicture}[] + \tikzstyle{kind}+=[rectangle, very thick, minimum size=3.5em] + \tikzstyle{prod}+=[] + + \node[kind, draw=red!90!yellow!60, fill=red!90!yellow!5] (l) at(0,6) {Lokale Versionsverwaltung}; + \node[kind, draw=red!60!yellow!60, fill=red!60!yellow!5] (c) at(0,3) {Zentrale Versionsverwaltung}; + \node[kind, draw=red!30!yellow!60, fill=red!30!yellow!5] (d) at(0,0) {Verteilte Versionsverwaltung}; + + \draw[->,thick] (l.south) -- (c.north); + \draw[->,thick] (c.south) -- (d.north); + + \node[prod] (l1) [right=of l, yshift=+1em] {SCCS}; + \node[prod] (l2) [right=of l, yshift=-1em] {RCS}; + + \node[prod] (c1) [right=of c, yshift=+1em] {CSV}; + \node[prod] (c2) [right=of c, yshift=-1em] {SVN}; + + \node[prod] (d1) [right=of d, yshift=+1em] {Git}; + \node[prod] (d2) [right=of d, yshift= 0em] {Bazaar}; + \node[prod] (d3) [right=of d, yshift=-1em] {Mercurial}; + + \draw[->] (l.east) -- (l1.west); + \draw[->] (l.east) -- (l2.west); + + \draw[->] (c.east) -- (c1.west); + \draw[->] (c.east) -- (c2.west); + + \draw[->] (d.east) -- (d1.west); + \draw[->] (d.east) -- (d2.west); + \draw[->] (d.east) -- (d3.west); + + \end{tikzpicture} + \end{figure} +\end{frame} + +\begin{frame}{Git is everywhere} + \begin{columns}[c] + \begin{column}{0.5\textwidth} + \centering + \includegraphics[width=0.9\textwidth]{logos/GitHub.png} + \end{column} + \begin{column}{0.5\textwidth} + \centering + \includegraphics[width=0.9\textwidth]{logos/Codeberg.png} + \end{column} + \end{columns} + \vspace{1em} + \begin{columns}[c] + \begin{column}{0.5\textwidth} + \centering + \includegraphics[width=0.9\textwidth]{logos/GitLab.png} + \end{column} + \begin{column}{0.5\textwidth} + \centering + \includegraphics[width=0.9\textwidth]{logos/SourceHut.png} + \end{column} + \end{columns} + \vspace{1em} + \begin{columns}[c] + \begin{column}{0.5\textwidth} + \centering + \includegraphics[width=0.9\textwidth]{logos/Gitea.png} + \end{column} + \begin{column}{0.5\textwidth} + \centering + \includegraphics[width=0.9\textwidth]{logos/Bitbucket.png} + \end{column} + \end{columns} +\end{frame} + +\section{Einrichtung und Installation} + +\begin{frame}[fragile]{Installation} + \begin{description} + \item[Windows] https://gitforwindows.org/ oder \\ + \x^# choco install git^ + + \item[Linux] \x^# sudo dnf install git-all^ oder \\ + \x^# sudo apt install git-all^ oder ... + + \item[macOS] \x^# git --version^ + \end{description} +\end{frame} + +\begin{frame}[fragile]{Einrichtung} + \begin{minted}{console} + # git config --global user.name "Dustin Frisch" + # git config --global user.email "dustin.frisch@ai.hs-fulda.de" + \end{minted} +\end{frame} + +\begin{frame} + \centering + \LARGE + Pause +\end{frame} + +\section{Aller Anfang ist schwer} + +\begin{frame}[fragile]{Neues Projekt} + Neuen Ordner anlegen und in diesen wechseln. + + \begin{minted}{console} + # git init + Initialized empty Git repository in /home/fooker/tmp/myproject/.git/ + \end{minted} +\end{frame} + +\begin{frame}[fragile]{Den überblick behalten} + Eine Datei in dem Ordner anlegen. + + \begin{minted}{console} + # git status + On branch main + + No commits yet + + Untracked files: + (use "git add ..." to include in what will be committed) + test.c + + nothing added to commit but untracked files present (use "git add" to track) + \end{minted} +\end{frame} + +\begin{frame}[fragile]{Der Staging-Bereich} + \begin{minted}{console} + # git add test.c + + # git status + On branch main + + No commits yet + + Changes to be committed: + (use "git rm --cached ..." to unstage) + new file: test.c + \end{minted} +\end{frame} + +\begin{frame}[fragile]{Mein erstes mal} + \begin{minted}{console} + # git commit + main (root-commit) 27cda20] A wonderful commit message + 1 file changed, 6 insertions(+) + create mode 100644 test.c + + # git status + On branch main + nothing to commit, working tree clean + \end{minted} +\end{frame} + +\begin{frame}[fragile]{Oh, ein wie konnte das nur passieren} + Die Datei in dem Ordner wird geändert. + + \begin{minted}{console} + # git add test.c + + # git commit + \end{minted} +\end{frame} + +\begin{frame}[fragile]{Was bisher geschah...} + \begin{minted}{console} + # git log + commit 7163f25b8e477a43accc28c30f3bd4351a2d72a2 + Author: Dustin Frisch + Date: Mon Oct 18 22:12:28 2021 +0200 + + Fixed dumb mistake + + commit 27cda204ad4caae123b44f1fc8d3ac6645e66d3f + Author: Dustin Frisch + Date: Mon Oct 18 22:07:31 2021 +0200 + + A wonderful commit message + \end{minted} +\end{frame} + +\begin{frame}[fragile]{So langsam wird es} + Eine weitere Datei anlegen. + + \begin{minted}{console} + # git add example.c + + # git commit -m "Added example" + \end{minted} +\end{frame} + +\begin{frame}[fragile]{Namesgebung ist schwierig} + Eine Datei umbenennen. + + \begin{minted}{console} + # git status + On branch main + Changes not staged for commit: + (use "git add/rm ..." to update what will be committed) + (use "git restore ..." to discard changes in working directory) + deleted: test.c + + Untracked files: + (use "git add ..." to include in what will be committed) + main.c + + no changes added to commit (use "git add" and/or "git commit -a") + \end{minted} +\end{frame} + +\begin{frame}[fragile]{Namensgebung ist schwierig} + \begin{minted}{console} + # git add test.c main.c + + # git status + On branch main + Changes to be committed: + (use "git restore --staged ..." to unstage) + renamed: test.c -> main.c + + # git commit -m "Naming fixed" + \end{minted} +\end{frame} + +\begin{frame}[fragile]{Und weg damit} + Eine Datei löschen. + \begin{minted}{console} + # git rm example.c + + # git commit -m "This was a mistake" + \end{minted} +\end{frame} + +\begin{frame}[fragile]{Was hab ich nur getan} + Eine Datei ändern. + \begin{minted}{console} + # git diff + \end{minted} +\end{frame} + +\begin{frame}[fragile]{Keine Fehler} + \begin{minted}{console} + # git restore main.c + \end{minted} +\end{frame} + +\begin{frame}[fragile]{Was werde ich nur getan haben} + Eine Datei ändern. + \begin{minted}{console} + # git add main.c + + # git diff --staged + \end{minted} +\end{frame} + +\begin{frame}[fragile]{Nee, doch nicht} + Datei nochmal ändern + \begin{minted}{console} + # git restore --staged main.c + \end{minted} +\end{frame} + +\section{Ein Baum ist ein Baum ist ein Baum} + +\begin{frame}[fragile]{Alles hat ein Ende} + \begin{minted}{console} + # git branch + * main + \end{minted} +\end{frame} + +\begin{frame}[fragile]{Nur der Baum hat viele} + \begin{minted}{console} + # git branch feature-x + + # git branch + feature-x + * main + \end{minted} +\end{frame} + +\begin{frame}[fragile]{Wer die Wahl hat} + \begin{minted}{console} + # git checkout feature-x + Switched to branch 'feature-x' + + # git branch + * feature-x + main + \end{minted} +\end{frame} + +\begin{frame}[fragile]{Als währe nichts gewesen} + Ein paar Commits erzeugen. + \begin{minted}{console} + # git checkout main + Switched to branch 'main' + + # git log + ... + \end{minted} +\end{frame} + +\begin{frame}[fragile]{Realität ist subjektiv} + Eine paar Commits erzeugen. + \begin{minted}{console} + # git checkout feature-x + Switched to branch 'feature-x' + + # git log + ... + \end{minted} +\end{frame} + +\begin{frame}[fragile]{Zusammen was zusammen gehört} + \begin{minted}{console} + # git merge main + Merge made by the 'recursive' strategy. + ... + + # git log + ... + \end{minted} +\end{frame} + +\begin{frame} + \centering + \LARGE + Pause +\end{frame} + +\section{Mein, dein. Das sind doch bürgerliche Kategorien} + +\begin{frame}[fragile]{So klein und schon bei den Sturmtruppen?} + \begin{minted}[bgcolor=bgr]{console} + # git clone http://git.open-desk.net/git/_.git project + \end{minted} + + \begin{minted}[bgcolor=bgr]{console} + # git remote -v + origin http://git.open-desk.net/git/_.git (fetch) + origin http://git.open-desk.net/git/_.git (push) + \end{minted} +\end{frame} + +\begin{frame}[fragile]{Jeder fängt mal klein an} + + \begin{minted}[bgcolor=bgl]{console} + # git remote add origin http://git.open-desk.net/git/_.git + # git push origin main + ... + To http://git.open-desk.net/git/_.git + * [new branch] main -> main + \end{minted} +\end{frame} + +\begin{frame}[fragile]{Zieh, zeih, zieh!} + \begin{minted}[bgcolor=bgr]{console} + # git pull + ... + From http://git.open-desk.net/git/_ + * [new branch] main -> origin/main + \end{minted} +\end{frame} + +\begin{frame}[fragile]{Und jetzt alle zusammen} + In beiden Ordnern einen Commit erzeugen + + \begin{minted}[bgcolor=bgl]{console} + # git push origin main + ... + To http://git.open-desk.net/git/a.git + ba998dd..a5069cc main -> main + \end{minted} + + \begin{minted}[bgcolor=bgr]{console} + # git push origin main + To http://git.open-desk.net/git/_.git + ! [rejected] main -> main (fetch first) + error: failed to push some refs to 'http://git.open-desk.net/git/_.git' + \end{minted} +\end{frame} + +\begin{frame}[fragile]{Ständiges Hin und Her} + \begin{minted}[bgcolor=bgr]{console} + # git pull + ... + From http://git.open-desk.net/git/a + + 07493c7...a5069cc main -> origin/main (forced update) + Successfully rebased and updated refs/heads/main. + + # git push + ... + To http://git.open-desk.net/git/a.git + a5069cc..baf125b main -> main + \end{minted} +\end{frame} + +\section{Alles immer bitte gleich richtig machen} + +\begin{frame}[fragile]{Ich meine es nur gut} + \begin{itemize} + \item Nutzt SSH-Schlüssel mit einem SSH-Agent. \\ + Tutorials gibt es von GitHub. + \item Signiert eure Commits. \\ + Auch hier hilft GitHub weiter. + \end{itemize} +\end{frame} + +\begin{frame}[fragile]{Ja, wirklich} + \begin{itemize} + \item Konfiguriert euch einen Shell-Prompt für Git. + \item Macht kleine und strukturierte Commits. \\ + \x{# git add -p -i .} + \end{itemize} +\end{frame} + +\begin{frame}[fragile]{Falls noch Zeit bleibt} + \begin{itemize} + \item \x{# git commit --amend} + \item \x{# git stash} + \item \x{# git blame} + \item \x{# git rebase -i} + \item \x{# git rebase --onto} + \end{itemize} +\end{frame} + +\begin{frame} + \centering + + \vspace{3em} + + { + \LARGE + Danke + } + + \vspace{3em} + + https://ohmygit.org +\end{frame} + +\end{document} diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..ee3c49b --- /dev/null +++ b/shell.nix @@ -0,0 +1,32 @@ +{ pkgs ? import {} }: + +let + pkgs = import (builtins.fetchTarball { + name = "nixos-21.05"; + url = "https://github.com/nixos/nixpkgs/archive/21b696caf392ad6fa513caf3327d0aa0430ffb72.tar.gz"; + sha256 = "1056r3383aaf5zhf7rbvka76gqxb8b7rwqxnmar29vxhs9h56m5k"; + }) {}; + +in pkgs.mkShell { + buildInputs = with pkgs; [ + (hunspellWithDicts [ + hunspellDicts.en-us + hunspellDicts.de-de + ]) + + (texlive.combine { + inherit (texlive) scheme-full; + }) + + python38Packages.pygments + + (pkgs.vscode-with-extensions.override { + vscode = pkgs.vscodium; + vscodeExtensions = with pkgs.vscode-extensions; [ + james-yu.latex-workshop + ]; + }) + + qtikz + ]; +} diff --git a/tikzfig.sty b/tikzfig.sty new file mode 100644 index 0000000..46e9bb0 --- /dev/null +++ b/tikzfig.sty @@ -0,0 +1,50 @@ +\usepackage{tikz} +\usepackage{pgfplots} +\usetikzlibrary{trees} +\usetikzlibrary{topaths} +\usetikzlibrary{decorations.pathmorphing} +\usetikzlibrary{fadings} +\usetikzlibrary{decorations.pathreplacing} +\usetikzlibrary{decorations.markings} +\usetikzlibrary{matrix,backgrounds,folding} +\usetikzlibrary{chains,scopes,positioning,fit} +\usetikzlibrary{arrows,shadows} +\usetikzlibrary{calc} +\usetikzlibrary{chains} +\usetikzlibrary{shapes,shapes.geometric,shapes.misc} +\usetikzlibrary{circuits.ee.IEC} + +\newcommand{\tikzfigg}[1]{\tikz[baseline=-0.5em]{\node[draw=red,font=\color{red},fill=red!10!white] {\textit{#1}};}} + +\newcommand{\ctikzfigg}[1]{\begin{center} +\tikz[baseline=-0.5em]{\node[draw=red,font=\color{red},fill=red!10!white] {\textit{#1}};} +\end{center}} + +\newcommand{\tikzfigTODO}[1]{\textbf{\color{red}(figure: #1)}} +\newcommand{\ctikzfigTODO}[1]{\begin{center} +\textbf{\color{red}(figure: #1)} +\end{center}} + + +\newcommand{\tikzfig}[1]{% +\IfFileExists{#1.tikz} + {\input{#1.tikz}} + {% + \IfFileExists{./figures/#1.tikz} + {\input{./figures/#1.tikz}} + {\tikz[baseline=-0.5em]{\node[draw=red,font=\color{red},fill=red!10!white] {\textit{#1}};}}% + }% +} +\newcommand{\ctikzfig}[1]{% +\begin{center}\rm + \tikzfig{#1} +\end{center}} + +%\newcommand{\inlinetikzfig}[1]{\InputIfFileExists{#1.tikz}{}{\input{./figures/#1.tikz}}} + +\pgfdeclarelayer{edgelayer} +\pgfdeclarelayer{nodelayer} +\pgfsetlayers{background,edgelayer,nodelayer,main} +\tikzstyle{none}=[inner sep=0mm] +\tikzstyle{every loop}=[] +\tikzstyle{mark coordinate}=[inner sep=0pt,outer sep=0pt,minimum size=3pt,fill=black,circle] \ No newline at end of file