1

I'm trying to put an arrow on the right of the text rectangles, but it doesn't work. Here is what I have:

\documentclass[compress,blue]{beamer}
\mode<presentation>
\usetheme{Warsaw}
\definecolor{azure}{RGB}{74,100,217}
\useoutertheme[subsection=false]{smoothbars}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{tikz}
\usetikzlibrary{shapes.misc, fit, arrows}
\usetikzlibrary{shapes.callouts, shapes.symbols}

\tikzset{product size/.style={minimum width=1cm, 
    minimum height=1cm,
    text height=1ex,
  },
  product/.style={
    draw,signal, 
    signal to=east, 
    signal from=west,
    product size,
    fill=azure,
    draw=gray!50!white,
    text=white,
 },
}

\begin{document}

\frame{\frametitle{test...}

\begin{tikzpicture}

\node (1-t) at (10,12.2) [draw, minimum width=6cm,minimum height=1.2cm, text width=5.8cm, inner sep = 1pt] {She sells seashells by the seashore,};
\node (2-t) at (10,10.5) [draw, minimum width=6cm,minimum height=1.2cm, text width=5.8cm] {shells she sells are sure seashells,};
\node (3-t) at (10,8.7) [draw, minimum width=6cm,minimum height=1.2cm, text width=5.8cm] {so if she sells shells on the seashore,};
\node (4-t) at (10,6.9) [draw, minimum width=6cm,minimum height=1.2cm, text width=5.8cm] {I am sure she sells seashore shells.};

\node[product] (map) at (10, 12) {Input};

\end{tikzpicture}
}

\end{document}

How can I position the arrow?

  • Welcome to TeX.SX! Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – Dai Bowen Nov 25 '16 at 22:54
1

See the following solution:

\documentclass[compress,blue]{beamer}
\mode<presentation>
\usetheme{Warsaw}
\definecolor{azure}{RGB}{74,100,217}
\useoutertheme[subsection=false]{smoothbars}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{tikz}
\usetikzlibrary{calc, chains, positioning, shapes}

\tikzset{product size/.style={minimum width=1cm,
    minimum height=1cm,
    text height=1ex,
  },
  product/.style={
    draw,signal,
    signal to=east,
    signal from=west,
    product size,
    fill=azure,
    draw=gray!50!white,
    text=white,
 },
}

\begin{document}

\frame{\frametitle{test...}
    \begin{tikzpicture}[
 node distance = 3mm and 10 mm,
   start chain = going below, 
    box/.style = {draw, minimum height=1.2 cm, text width=5.9cm, 
                  on chain}
                        ]

\node (1-t) [box] {She sells seashells by the seashore,};
\node (2-t) [box] {shells she sells are sure seashells,};
\node (3-t) [box] {so if she sells shells on the seashore,};
\node (4-t) [box] {I am sure she sells seashore shells.};
%
\node[product, right=of $(1-t.east)!0.5!(4-t.east)$] (map) {Input};
\end{tikzpicture}
}

\end{document}

I try to slightly optimize your code with use of two TikZ libraries: calc, \chains and positioning. The obtained result is:

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.