Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am trying to put arrows between images. I did not want to put arrow images, I prefer LaTeX way solution. I used pointer from wasysym package. The result can be seen below. I know those arrows are considered as text, so they are tiny.

alt text

How can I put centered, big arrows between images?

share|improve this question
add comment

3 Answers

up vote 8 down vote accepted

You could use \vcenter for vertical centering. It requires math mode. You could use font commands for scaling arrows or \scalebox or \resizebox of the graphicx package.

Define macros, so you could make adjustments easily.

Here's an example, using your pointer of wasysym:

\documentclass{article} 
\usepackage{graphicx}
\usepackage{wasysym}
\newcommand*{\vimage}[1]{\vcenter{\hbox{\includegraphics{#1}}}}
\newcommand*{\vpointer}{\vcenter{\hbox{\scalebox{2}{\Huge\pointer}}}}
\begin{document}
$\vimage{one}\vpointer
\vimage{two}\vpointer
\vimage{three}$
\end{document}

alt text

share|improve this answer
add comment

I used this image and rename it as newton.jpg.

alt text


Adjust the parameter until it suits your need.

\documentclass[final,cmyk,table]{article}
\usepackage[a4paper,margin=2cm]{geometry}
\usepackage{graphicx}
\usepackage{amsbsy}%bold math
\usepackage{amsmath}
\usepackage{xcolor}
\usepackage{array}
\usepackage{longtable}
\usepackage{calc}

% adjust until suit your need.
\setlength{\arrayrulewidth}{0pt}
\setlength{\tabcolsep}{10pt}% you can change to a smaller. E.g., 5pt or less.
\arrayrulecolor{red}
\newenvironment{MyCrazyTable}[6][2cm]%
{%
    \newcolumntype{O}[1]%
    {%
        >{%
            \begin{minipage}[c][#1][c]%
            {%
                    ##1\linewidth-2\tabcolsep-1.5\arrayrulewidth%
            }%
            \vspace{\tabcolsep}%
         }%
        c%
        <{%
                \vspace{\tabcolsep}%
                \end{minipage}%
         }%
    }%
    \newcolumntype{I}[1]%
    {%
        >{%
            \begin{minipage}[c][#1][c]%
            {%
                    ##1\linewidth-2\tabcolsep-\arrayrulewidth%
            }%
            \vspace{\tabcolsep}%
         }%
        c%
        <{%
                \vspace{\tabcolsep}%
                \end{minipage}%
         }%
    }%
    \begin{longtable}%
    {%
        |>{\centering}O{#2}%
        |>{\centering}I{#3}%
        |>{\centering}I{#4}%
        |>{\centering}I{#5}%
        |>{\centering}O{#6}%
        |%
    }%
    \hline\ignorespaces%
}%
{%
    \end{longtable}%
}

\newcommand{\myrow}{%
\includegraphics[scale=0.35]{newton.jpg}%
&%
\scalebox{1.1}{$\boldsymbol{\longrightarrow}$}%
&
\includegraphics[scale=0.35]{newton.jpg}%
&%
\scalebox{1.1}{$\boldsymbol{\Longrightarrow}$}%
&
\includegraphics[scale=0.35]{newton.jpg}%
\tabularnewline\hline%
}



\makeatletter
\newcommand\ratio[2]{%
  \strip@pt\dimexpr#1pt/#2\relax
}
\makeatother  


\begin{document}
\begin{MyCrazyTable}[5cm]%
    {\ratio{9}{33}}%adjust please
    {\ratio{3}{33}}%adjust please
    {\ratio{9}{33}}%adjust please
    {\ratio{3}{33}}%adjust please
    {\ratio{9}{33}}%adjust please
\myrow
\myrow
\end{MyCrazyTable}
\end{document}

You can show the frame by changing \setlength{\arrayrulewidth}{1pt} as shown below. alt text

share|improve this answer
    
I suggest to comment out [c][#1][c] to make the height automatically get adjusted. –  xport Dec 29 '10 at 20:00
add comment
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[demo]{graphicx}
\def\Arrow{\raisebox{-.5\height}{\scalebox{4}{$\Rightarrow$}}}
\def\Image#1{\raisebox{-.5\height}{\includegraphics[width=3cm]{#1}}}
\pagestyle{empty}
\begin{document}

\Image{foo}\Arrow%
\Image{bar}\Arrow%
\Image{baz}

\end{document}
share|improve this answer
    
very good. they are not centered though. –  nimcap Dec 29 '10 at 20:13
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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