2

[![enter image description here][1]][1] I want to draw two arrows from one figure in my latex document (It's actually a poster). The same as in the image here. The two images below I want to arrange using "multicols". It may be easy but I am a beginner in Latex and somehow I am not able to do it. Here is what I have done so far:

    \documentclass[landscape,a0paper,fontscale=0.32,margin=25mm]{baposter} % Adjust the font scale/size here

    \usepackage{graphicx} % Required for including images
    \graphicspath{{myfigures/}} % Directory in which figures are stored

    \usepackage{amsmath} % For typesetting math
    \usepackage{amssymb} % Adds new symbols to be used in math mode
    \usepackage[export]{adjustbox}
    \usepackage{booktabs} % Top and bottom rules for tables
    \usepackage{enumitem} % Used to reduce itemize/enumerate spacing
    %\usepackage{palatino} % Use the Palatino font
    \usepackage[font=small,labelfont=bf]{caption} % Required for specifying captions to tables and figures
    \usepackage{ragged2e} % for text alignment

    \usepackage{helvet}
    \renewcommand{\familydefault}{\sfdefault}

    \usepackage {xcolor}\usepackage{xcolor,colortbl}

    \usepackage{multicol} % Required for multiple columns
    \setlength{\columnsep}{0.5em} % Slightly increase the space between columns
    \setlength{\columnseprule}{0mm} % No horizontal rule between columns
    \usepackage{tikz} % Required for flow chart
    \usetikzlibrary{shapes,arrows} % Tikz libraries required for the flow chart in the template
    \usepackage[export]{adjustbox}
    \newcommand{\compresslist}{ % Define a command to reduce spacing within itemize/enumerate environments, this is used right after \begin{itemize} or \begin{enumerate}
    \setlength{\itemsep}{0pt}
    \setlength{\parskip}{0pt}
    \setlength{\parsep}{0pt}
    %\setlist{noitemsep}{format}

    %\setlist[itemize]{leftmargin=*}
    %\setsansfont{HelveticaNeue}
    \newcommand{\squeezeup}{\vspace{-2.5mm}} % To utilize space between text and image

    \renewcommand{\sfdefault}{textsf}
    \setmainfont{\textsf{Sample Text 0123}}


    }

    \definecolor{Turquoise}{rgb}{0.145,0.6666,1} % Defines the color used for content box headers
    \definecolor{uscgold}{rgb}{1,0.6,0}
    \definecolor{skyblue}{rgb}{0.53, 0.81, 0.92}
    \begin{document}

    \begin{poster}
    {
    headerborder=open, % Adds a border around the header of content boxes
    headershade=plain,
    %headershade=shade-lr
    colspacing=0.4em, % Column spacing
    bgColorOne=white, % Background color for the gradient on the left side of the poster
    bgColorTwo=white, % Background color for the gradient on the right side of the poster
    borderColor=Turquoise, % Border color
    headerColorOne= skyblue,%Turquoise, % Background color for the header in the content boxes (left side)
    %headerColorTwo=uscgold, % Background color for the header in the content boxes (right side)
    headerFontColor=Turquoise, % Text color for the header text in the content boxes
    boxColorOne=white, % Background color of the content boxes
    textborder=roundedsmall, % Format of the border around content boxes, can be: none, bars, coils, triangles, rectangle, rounded, roundedsmall, roundedright or faded
    eyecatcher=true, % Set to false for ignoring the left logo in the title and move the title left
    headershape=rounded, % Specify the rounded corner in the content box headers, can be: rectangle, small-rounded, roundedright, roundedleft or rounded
    headerheight=0.1 \textheight, % Height of the header
    headerfont=\Large\bf\textsf, % Large, bold and sans serif font in the headers of content boxes
    %textfont={\setlength{\parindent}{1.5em}}, % Uncomment for paragraph indentation
    linewidth=2pt % Width of the border lines around content boxes
    }

    \headerbox{Introduction}{name=introduction,column=0,span=1}
    \begin{center}
                    \vspace{-0.3em}

        \begin{tikzpicture}[remember picture]
          \node[anchor=south west,inner sep=0] (imageA) {\includegraphics[height=2cm]{spri}};
          \begin{scope}[x={(imageA.south west)},y={(imageA.north east)}]
            \node[coordinate] (A) at (0.4,0.5) {};
          \end{scope}
        \end{tikzpicture}
        \begin{tikzpicture}[remember picture]
          \node[anchor=south west,inner sep=0] (imageB) {\includegraphics[height=2cm]{apr}};
          \begin{scope}[x={(imageB.south west)},y={(imageB.north east)}]
            \node[coordinate] (B) at (0.3,0.3) {};
          \end{scope}
        \end{tikzpicture}
        \begin{tikzpicture}[remember picture,overlay]
          \draw[->] (A) -- (B);
        \end{tikzpicture}

        \begin{tikzpicture}[remember picture]
          \node[anchor=south west,inner sep=0] (imageB) {\includegraphics[height=2cm]{slr}};
          \begin{scope}[x={(imageB.south west)},y={(imageB.north east)}]
            \node[coordinate] (B) at (0.3,0.3) {};
          \end{scope}
        \end{tikzpicture}
        \begin{tikzpicture}[remember picture,overlay]
          \draw[->] (A) -- (B);
        \end{tikzpicture}
    \end{center}    
\begin{multicols}{2}
                \vspace{-1.7cm}
                \subsection*{ Domain 2}
 \includegraphics[width=2.5cm,scale=0.016]{domain1}
                \subsection*{Domain 3} \hspace{0.8cm}
    %           \includegraphics[width=2.5cm,scale=0.016]{domain2}
                \end{multicols}
                \vspace{-1cm}

    }
\end{poster}

Can someone tell me where should I put multicols and how should I get the image as in the picture above? Thanks in advance.

This is what I want to do actually. Multiple arrows showing the region and the name of the region on top of it.

[![enter image description here][2]][2] [![enter image description here][3]][3] [![enter image description here][4]][4]

  • 1
    with help of tikzmark? please extend your code snippet to complete bit small document. welcome to tex.se! – Zarko Apr 07 '18 at 22:18
  • I don't know how to draw arrows in Latex. I thought may be tikz package could help! – Pulsar_534511 Apr 07 '18 at 22:28
  • it's possible to do what you ask but multicols is the wrong tool here that is all about choosing line breaks to balance text, but here you know you want them side by side and if you just positioned them that way you they would be at known locations so easier to draw the arrows – David Carlisle Apr 07 '18 at 22:29
  • I am trying to do so from hours but I am not able to do it. I just started using Latex so I have no idea. I tried the easy way in powerpoint but the output image resolution is not high enough to put in poster! Any help would be appreciated. – Pulsar_534511 Apr 07 '18 at 22:32
  • The problem I face is because of the \begin{center} all the three images show up in the center so I thought to split the two images below into multicolumn – Pulsar_534511 Apr 07 '18 at 22:43
  • It is really hard to help you since your code just produces errors. Among other things, I do not have the baposter document class and there is also no \end{document}. You can draw the arrows with remember picture and overlay but @DavidCarlisle is also right that there will be cleaner solutions than multicol. –  Apr 07 '18 at 23:00
  • @ marmot can you show me the same to do in document class? Do you think it will be totally different from this baposter style? – Pulsar_534511 Apr 07 '18 at 23:36
  • I am able to draw arrows but not able to align the images side by side! There is \end{document} after \end{poster} but I have made mistake in copy paste. From 7 hours I am trying to draw just two arrows!!!!!!!! – Pulsar_534511 Apr 07 '18 at 23:43

1 Answers1

1

I downloaded baposter.cls, but could not make your document compile. So I took the poster from here and just added the figure from your code. Then I rearranged the figures as a bit to obtain after many(!) iterations

\documentclass[portrait,final,a0paper,fontscale=0.32]{baposter}
% except for the figure, everything is from https://tex.stackexchange.com/a/253179/121799
\usepackage{lipsum}
\usepackage{tcolorbox}
\usetikzlibrary{decorations.text}

\setlength{\columnsep}{1.5em}
\setlength{\columnseprule}{0mm}

\begin{document}

\definecolor{lightblue}{rgb}{0.145,0.6666,1}
\hyphenation{resolution occlusions}

\begin{poster}%
  % Poster Options
  {
  % Show grid to help with alignment
  grid=false,
  % Column spacing
  colspacing=1em,
  % Color style
  bgColorOne=white,
  bgColorTwo=white,
  borderColor=lightblue,
  headerColorOne=black,
  headerColorTwo=lightblue,
  headerFontColor=white,
  boxColorOne=white,
  boxColorTwo=lightblue,
  textborder=roundedleft,
  eyecatcher=true,
  headerborder=closed,
  headerheight=0.15\textheight,
  headershape=roundedright,
  headershade=shadelr,
  headerfont=\Large\bf\textsc, %Sans Serif
  textfont={\setlength{\parindent}{1.5em}},
  boxshade=plain,
  background=plain,
  linewidth=2pt
  }
  % Eye Catcher
  {}
  %{\includegraphics[height=5em]{images/logoUPM.pdf}} 
  % Title
  {\bf\textsc{Tittle}\vspace{0.5em}}
  % Authors
  {Authors\\
   University\\
    mail@mail.com}


  \headerbox{Abstract}{name=problem,column=0,span=3, row=0}{
Text

    }
  \headerbox{Introduction}{name=introduction,column=0,  below=problem}{
Text

  }

  \headerbox{References}{name=references,column=0, above=bottom}{
Text

  }

  \headerbox{Conclusions}{name=results,column=1,span=2, above=bottom}{
Text

 } 
 \headerbox{Results}{name=Shaped-Beam,below=problem, above=results,column=1,span=2,row=0}{
\section*{First result}
\lipsum[1]
\begin{tcolorbox}[colback=blue!5!white,colframe=blue!75!black,title=Second result]
Awesome results.
\tcblower
\lipsum[2]
\end{tcolorbox}  }

  \headerbox{Some Maths}{name=method,column=0,below=introduction,above=references}{

Text

\def\myshift#1{\raisebox{1ex}} % from https://tex.stackexchange.com/a/22316/121799
    \begin{center}
        \begin{tikzpicture}[remember picture]
          \node[anchor=south west,inner sep=0,label={[above=2mm]:Europe}] (imageA)
          {\includegraphics[height=2cm]{imgA.png}};
%         \draw[help lines] (imageA.south west) grid[step=1mm] (imageA.north east); %<-remove in the end
          \node[anchor=north west,xshift=1mm,yshift=-1mm](label) at (imageA.north west)
          {some text};
          \coordinate (startB) at (1.05,0.58);
          \coordinate (startC) at (1.13,0.65);
        \end{tikzpicture}\\[0.8cm] %<- to make the pictures not sit too closely 
        \begin{tikzpicture}[remember picture]
          \node[anchor=south west,inner sep=0,label={[name=s,yshift=-2mm]below:Switzerland}] (imageB)
          {\includegraphics[height=2cm]{imgB.jpg}};
        \end{tikzpicture}~~~
        \begin{tikzpicture}[remember picture]
          \node[anchor=south west,inner sep=0,label={[name=m,yshift=-2mm]below:Marmot
          sanctuaries}] (imageC)
          {\includegraphics[height=2cm]{imgC.jpg}};
        \end{tikzpicture}
        \begin{tikzpicture}[remember picture,overlay]
          \draw[thick,latex-,postaction={decorate,decoration={text along
          path,text align=center,text={|\sffamily\tiny\myshift|Swiss marmots}}}]
          (imageB.north) to[out=90,in=-90] (startB);
          \draw[thick,-latex,postaction={decorate,decoration={text along
          path,text align=center,text={|\sffamily\tiny\myshift|marmot
          sanctuaries}}}] (startC) to[out=0,in=90] (imageC.north);
        \end{tikzpicture}
    \end{center}    
}

\end{poster}

\end{document}