From 0e980ec6a5cde88c8d704cf397e8072e483654d6 Mon Sep 17 00:00:00 2001 From: valentin <valentinb@fsmpi.rwth-aachen.de> Date: Mon, 20 May 2019 19:01:05 +0200 Subject: [PATCH] latex makro: margin box --- .../latex/examples/minimal_standalone.tex | 4 ---- workshops/latex/latex.tex | 20 ++++++++++++++++--- 2 files changed, 17 insertions(+), 7 deletions(-) delete mode 100644 workshops/latex/examples/minimal_standalone.tex diff --git a/workshops/latex/examples/minimal_standalone.tex b/workshops/latex/examples/minimal_standalone.tex deleted file mode 100644 index c22b717..0000000 --- a/workshops/latex/examples/minimal_standalone.tex +++ /dev/null @@ -1,4 +0,0 @@ -\documentclass[ngerman]{standalone} -\begin{document} - Hallo Welt! -\end{document} diff --git a/workshops/latex/latex.tex b/workshops/latex/latex.tex index 3f18308..17db0c3 100644 --- a/workshops/latex/latex.tex +++ b/workshops/latex/latex.tex @@ -8,6 +8,7 @@ \usepackage{dtk-logos} \usepackage{hyperref} \usepackage{tikz} +\usetikzlibrary{backgrounds, fit, matrix, calc} \usepackage{listings} \usepackage{calc} \graphicspath{{figures/}{examples/}} @@ -25,6 +26,20 @@ und der Aachener Linux User Group } + +\newcommand\marginbox[3][2pt]{ + \begin{tikzpicture}[even odd rule, scale=1] + \node[anchor=north west] (text) {% + \begin{minipage}{#1}% + #2% + \end{minipage}% + }; + \begin{pgfonlayer}{background} + \node[draw opacity=.5, draw=blue, line width=#1, inner sep=2pt, fit = (text)] {}; + \end{pgfonlayer} + \end{tikzpicture} +} + \begin{document} \begin{frame}{OSAK \LaTeX-Workshop}{Installation einer \TeX-Distribution} @@ -48,7 +63,7 @@ \begin{frame}{Aufbau eines \LaTeX-Dokuments} \begin{columns}[T] \begin{column}{.35\textwidth} - \LaTeX übersetzt\\ + {\LaTeX} übersetzt\\ Text in ein PDF \begin{itemize} \item Formatierung durch\\Befehle im Text @@ -76,8 +91,7 @@ (2pt,-15pt) rectangle (\textwidth-2pt, -.4\textwidth+2pt); \node[anchor=north west] at (0pt, 0pt) {PDF viewer: HelloWorld.pdf}; \node[anchor=north west] at (2pt, -15pt) {\parbox[t][.4\textwidth-27pt][c]{\textwidth-12pt}{% - \centering - \includegraphics{examples/minimal_standalone.pdf} + \hspace{.1\textwidth}Hallo Welt! }}; \end{tikzpicture} \end{column} -- GitLab