From 96ca6105b6adad8a6b3c5a1af426df9f8c4024c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=BCller?= Date: Mon, 15 Aug 2022 06:54:23 +0200 Subject: fix physics dependency --- buch/papers/kra/anwendung.tex | 5 ++++- buch/papers/kra/images/Makefile | 9 +++++++++ buch/papers/kra/images/simple.pdf | Bin 0 -> 23130 bytes buch/papers/kra/images/simple.tex | 24 ++++++++++++++++++++++++ buch/papers/kra/images/simple_mass_spring.tex | 12 ++++++------ buch/papers/kra/packages.tex | 6 +----- 6 files changed, 44 insertions(+), 12 deletions(-) create mode 100644 buch/papers/kra/images/Makefile create mode 100644 buch/papers/kra/images/simple.pdf create mode 100644 buch/papers/kra/images/simple.tex diff --git a/buch/papers/kra/anwendung.tex b/buch/papers/kra/anwendung.tex index 0deaf3c..6383984 100644 --- a/buch/papers/kra/anwendung.tex +++ b/buch/papers/kra/anwendung.tex @@ -19,7 +19,10 @@ Die Funktion die diese Differentialgleichung löst, ist die harmonische Schwingu x(t) = A \cos(\omega_0 t + \Phi), \quad \omega_0 = \sqrt{\frac{k}{m}} \end{equation} \begin{figure} - \input{papers/kra/images/simple_mass_spring.tex} + % move image to standalone because the physics package is + % incompatible with underbrace + \includegraphics{papers/kra/images/simple.pdf} + %\input{papers/kra/images/simple_mass_spring.tex} \caption{Einfaches Feder-Masse-System.} \label{kra:fig:simple_mass_spring} \end{figure} diff --git a/buch/papers/kra/images/Makefile b/buch/papers/kra/images/Makefile new file mode 100644 index 0000000..ef226a9 --- /dev/null +++ b/buch/papers/kra/images/Makefile @@ -0,0 +1,9 @@ +# +# Makefile -- build standalone images +# +# (c) 2022 Prof Dr Andreas Müller +# +all: simple.pdf + +simple.pdf: simple.tex simple_mass_spring.tex + pdflatex simple.tex diff --git a/buch/papers/kra/images/simple.pdf b/buch/papers/kra/images/simple.pdf new file mode 100644 index 0000000..4351518 Binary files /dev/null and b/buch/papers/kra/images/simple.pdf differ diff --git a/buch/papers/kra/images/simple.tex b/buch/papers/kra/images/simple.tex new file mode 100644 index 0000000..3bdde27 --- /dev/null +++ b/buch/papers/kra/images/simple.tex @@ -0,0 +1,24 @@ +% +% tikztemplate.tex -- template for standalon tikz images +% +% (c) 2021 Prof Dr Andreas Müller, OST Ostschweizer Fachhochschule +% +\documentclass[tikz]{standalone} +\usepackage{amsmath} +\usepackage{times} +\usepackage{txfonts} +\usepackage{pgfplots} +\pgfplotsset{compat=1.16} +\usepackage[outline]{contour} +\usepackage{csvsimple} +\usepackage{physics} +\usetikzlibrary{arrows,intersections,math} +\usetikzlibrary{patterns} +\usetikzlibrary{snakes} +\usetikzlibrary{arrows.meta} +\usetikzlibrary{decorations} +\usetikzlibrary{decorations.markings} +\begin{document} +\input{simple_mass_spring.tex} +\end{document} + diff --git a/buch/papers/kra/images/simple_mass_spring.tex b/buch/papers/kra/images/simple_mass_spring.tex index e0e869a..868362d 100644 --- a/buch/papers/kra/images/simple_mass_spring.tex +++ b/buch/papers/kra/images/simple_mass_spring.tex @@ -6,7 +6,7 @@ \tikzstyle{mass}=[line width=0.6,red!30!black,fill=red!40!black!10,rounded corners=1,top color=red!40!black!20,bottom color=red!40!black!10,shading angle=20] \tikzstyle{spring}=[line width=0.8,blue!7!black!80,snake=coil,segment amplitude=5,line cap=round] -\begin{tikzpicture}[scale=2] +\begin{tikzpicture}[scale=2,>=latex] \newcommand{\ticks}[2] { % arguments: x, y coordinates @@ -47,9 +47,9 @@ % create springs \draw[spring, segment length=(\xMass1 - \wWall) * \springscale] (\originX1, \originY1) ++ - (\wWall, \wWall + \hMass / 2) --++ (\xMass1 - \wWall, 0) node[midway,above=0.2] {$k$}; + (\wWall, \wWall + \hMass / 2) --++ (\xMass1 - \wWall, 0) node[midway,above=3.5] {$k$}; \draw[spring, segment length=(\xMass2 - \wWall) * \springscale] (\originX2, \originY2) ++ - (\wWall, \wWall + \hMass / 2) --++ (\xMass2 - \wWall, 0) node[midway,above=0.2] {$k$}; + (\wWall, \wWall + \hMass / 2) --++ (\xMass2 - \wWall, 0) node[midway,above=3.5] {$k$}; % create vertical measurement line \draw[vmline] (\xMass1, \xAxisYpos) --+(0, \originY1 + \wWall); @@ -57,10 +57,10 @@ \draw[vmline] (\wWall, \originY1+\wWall) --(\wWall, \originY2 + \hWall); % create horizontal measurement line - \draw[hmline] (\wWall, \xAxisYpos + 0.2) -- (\xMass1, \xAxisYpos + 0.2) node[midway,fill=white,inner sep=0] {$\ell_0$}; + \draw[hmline] (\wWall, \xAxisYpos + 0.2) -- (\xMass1, \xAxisYpos + 0.2) node[midway,fill=white,inner sep=0] {$l_0$}; \draw[hmline] (\xMass1, \xAxisYpos + 0.2) -- (\xMass2, \xAxisYpos + 0.2) node[midway,fill=white,inner sep=0] {$\Delta_{x}$}; - \draw[hmline] (\wWall, \xAxisYpos - 0.3) -- (\xMass2, \xAxisYpos - 0.3) node[midway,fill=white,inner sep=0] {$\ell_{1}$}; + \draw[hmline] (\wWall, \xAxisYpos - 0.3) -- (\xMass2, \xAxisYpos - 0.3) node[midway,fill=white,inner sep=0] {$l_{1}$}; % create force arrow \draw[->,blue, very thick,line cap=round] (\xMass2 + \wMass / 2, \originY2 + \wWall + \hMass + 0.15) node[above] {$\vb{F_{R}}$} --+ (-0.5, 0); -\end{tikzpicture} \ No newline at end of file +\end{tikzpicture} diff --git a/buch/papers/kra/packages.tex b/buch/papers/kra/packages.tex index b16f074..56c48d9 100644 --- a/buch/papers/kra/packages.tex +++ b/buch/papers/kra/packages.tex @@ -8,15 +8,11 @@ % following example %\usepackage{packagename} -\usepackage{physics} -\usepackage{pgfplots} -\usepackage{tikz} +%\usepackage{physics} \usepackage[outline]{contour} \pgfplotsset{compat=1.16} \usetikzlibrary{patterns} \usetikzlibrary{snakes} -\usetikzlibrary{math} \usetikzlibrary{arrows.meta} \usetikzlibrary{decorations} \usetikzlibrary{decorations.markings} -\usetikzlibrary{calc} \ No newline at end of file -- cgit v1.2.1