4

I have a formula under which I need te put a drawing explaining part of the formula, I have the following MWE:

\documentclass{beamer}
\usepackage{tikz}

\usetikzlibrary{chains,shapes.multipart}
\usetikzlibrary{shapes,calc}
\usepackage{amsmath}
\usepackage[utf8]{inputenc}
\usetikzlibrary{automata,arrows,shapes,snakes,automata,backgrounds,petri,positioning}
\usetikzlibrary{calc}
\begin{document}
\begin{frame}
$F(t+\Delta, 0) = \underset{\begin{tikzpicture}[scale = 0.7]
\draw[->, thick] (-0.1,0) -- (2,0);
\draw[->,thick] (0,-0.1) -- (0,2.3);
\draw[-, thick] (0.3,-0.1) -- (0.3,0.1) node[inner sep=1pt,at start, anchor=north] (A)  {$t$};
\draw[-, thick] (1.7,-0.1) -- (1.7,0.1) node[inner sep=1pt,at start, anchor=north] (A)  {$t+\Delta$};
\draw[-, very thick, color=red!100] (0.3,0) -- (1.7,0);
\end{tikzpicture}}{\underbrace{F(t,0) - \lambda \int_{v = 0}^{\Delta}\overline{C_d}(t+v,0)dv}} + \int_{v=0}^{\Delta} f(t+v, \Delta - v) du + o(\Delta)$,
\end{frame}
\end{document}

which produces the following result: pic1

I would like this picture to be drawn under directly under the curly braces.

7

You can put the picture in a \text or other box.

\documentclass{beamer}
\usepackage{tikz}

\usetikzlibrary{chains,shapes.multipart}
\usetikzlibrary{shapes,calc}
\usepackage{amsmath}
\usepackage[utf8]{inputenc}
\usetikzlibrary{automata,arrows,shapes,snakes,automata,backgrounds,petri,positioning}
\usetikzlibrary{calc}
\begin{document}
\begin{frame}
$F(t+\Delta, 0) = \underbrace{F(t,0) - \lambda 
\int_{v = 0}^{\Delta}\overline{C_d}(t+v,0)dv}_{\text{\begin{tikzpicture}[scale = 0.7]
\draw[->, thick] (-0.1,0) -- (2,0);
\draw[->,thick] (0,-0.1) -- (0,2.3);
\draw[-, thick] (0.3,-0.1) -- (0.3,0.1) node[inner sep=1pt,at start, anchor=north] (A)  {$t$};
\draw[-, thick] (1.7,-0.1) -- (1.7,0.1) node[inner sep=1pt,at start, anchor=north] (A)  {$t+\Delta$};
\draw[-, very thick, color=red!100] (0.3,0) -- (1.7,0);
\end{tikzpicture}}} + 
\int_{v=0}^{\Delta} f(t+v, \Delta - v) du + o(\Delta)$,
\end{frame}
\end{document}

enter image description here

  • Very simple but effective solution! Thanks! – HolyMonk Jan 6 '18 at 15:50
3

slightly different alternative to nice marmot answer. differences (used baseline option for tikzpicture, defined styles) are indicated by % <---:

\documentclass{beamer}
\usepackage{amsmath}
\usepackage[utf8]{inputenc}
\usepackage{tikz}

\begin{document}
\begin{frame}
\frametitle{Domain}
    \begin{multline*}
F(t+\Delta, 0) = \\
    \underbrace{F(t,0) - \lambda\int\limits_{v = 0}^{\Delta} \overline{C_d}(t+v,0)dv}_{% <---
    \begin{tikzpicture}[baseline,             % <---
        N/.style = {font=\footnotesize,below},% <---
        every path/.style = {thick, ->}       % <---  
                        ]
\draw (-0.1,0) -- (2.5,0);                                 % <---
\draw (0,-0.1) -- (0,1.5);                                 % <---
\draw[-] (0.5,0.1) -- + (0,-0.2) node[N] (A)  {$t$};       % <---
\draw[-] (2.0,0.1) -- + (0,-0.2) node[N] (A)  {$t+\Delta$};% <---
\path[draw=red,very thick,-] (0.5,0) -- + (1.5,0);
    \end{tikzpicture}} +
\int\limits_{v=0}^{\Delta} f(t+v, \Delta - v) du + o(\Delta)
    \end{multline*}
\end{frame}
\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.