1

Is there anyway to align the multicolumn text with the fiure in the follwoing MWE?

\documentclass[25pt, a0paper, portrait, margin=0mm, innermargin=15mm, blockverticalspace=15mm, colspace=15mm, subcolspace=8mm]{tikzposter}

    \usepackage{xcolor}
    \usepackage{filecontents}% http://ctan.org/pkg/filecontents
    \usepackage{lipsum}% http://ctan.org/pkg/lipsum
    \usepackage{tikz}
    \usepackage{multicol}
    \usepackage{adjustbox}

    \setlength{\columnsep}{2cm}

    \begin{filecontents*}{myDummyPictureCode.tex}
      \begin{tikzfigure}[Some nice caption for the figure]
        \centering
        \begin{tikzpicture}
          \draw [color=red] (0,0) rectangle (20,10) node [midway] {\huge myFigure};
        \end{tikzpicture}
      \end{tikzfigure}
    \end{filecontents*}

    \title{Title}
    \author{Name}

    \usetheme{Autumn}\usecolorstyle[colorPalette=BrownBlueOrange]{Germany}

    \begin{document}\maketitle

    \begin{columns} 
    \column{0.7} \block{FigureOutside Block}{
      \lipsum[1]
    }

    \column{0.3} \block{}{
    \input{./myDummyPictureCode.tex}
    }
    \end{columns}

    % Text and figure Inside the Block
    \block{Text and figure Block using COLUMNS}{
    \begin{columns} 
    \column{0.7} \lipsum[1]
    \column{0.3} \input{./myDummyPictureCode.tex}
    \end{columns}
    }

    % Text and figure Inside the Block using minipage
    \block{Text and figure Block using MINIPAGE}{
      \fbox{
      \begin{minipage}[t]{0.7\linewidth}
        \lipsum[1]
      \end{minipage}%
      }
      %
      \fbox{
      \begin{adjustbox}{valign=t}
      \fbox{
      \begin{minipage}[t]{0.3\linewidth}
        \input{./myDummyPictureCode.tex}
      \end{minipage} 
      }
      \end{adjustbox}
      }
    }

    % playing with multicolumn text
    \block{Text and figure Block using MULTICOLS}{
      \begin{multicols*}{3}
        \lipsum[1]
        \input{./myDummyPictureCode.tex}
      \end{multicols*}
    }

    % playing with multicolumn text
    \block{Text and figure Block using MINIPAGE and MULTICOLS}{
      \fbox{
      \begin{minipage}[t]{0.7\linewidth}
      \begin{multicols*}{2}
        \lipsum[1]
      \end{multicols*}
      \end{minipage}%
      }
      %
      \fbox{
      \begin{adjustbox}{valign=t}
      \fbox{
      \begin{minipage}[t]{0.3\linewidth}
        \input{./myDummyPictureCode.tex}
      \end{minipage} 
      }
      \end{adjustbox}
      }
    }

    \end{document}

enter image description here

1 Answer 1

2

Since you are using \fbox, you have to change the widths. Also add few % at end of lines. Further, use valign=T. Hence we have,

% playing with multicolumn text
\block{Text and figure Block using MINIPAGE and MULTICOLS}{
  \fbox{%
  \begin{minipage}[t]{\dimexpr0.7\linewidth-2\fboxsep-2\fboxrule\relax}
  \noindent
  \begin{multicols*}{2}
    \lipsum[1]
  \end{multicols*}
  \end{minipage}%
  }%
  %
  \fbox{%
  \begin{adjustbox}{valign=T}
  \fbox{%
  \begin{minipage}{\dimexpr0.3\linewidth-4\fboxsep-4\fboxrule\relax}
    \input{./myDummyPictureCode.tex}
  \end{minipage}
  }%
  \end{adjustbox}%
  }%
}

Full code:

\documentclass[25pt, a0paper, portrait, margin=0mm, innermargin=15mm, blockverticalspace=15mm, colspace=15mm, subcolspace=8mm]{tikzposter}

    \usepackage{xcolor}
    \usepackage{filecontents}% http://ctan.org/pkg/filecontents
    \usepackage{lipsum}% http://ctan.org/pkg/lipsum
    \usepackage{tikz}
    \usepackage{multicol}
    \usepackage{adjustbox}

    \setlength{\columnsep}{2cm}

    \begin{filecontents*}{myDummyPictureCode.tex}
      \begin{tikzfigure}[Some nice caption for the figure]
        \centering
        \begin{tikzpicture}
          \draw [color=red] (0,0) rectangle (20,10) node [midway] {\huge myFigure};
        \end{tikzpicture}
      \end{tikzfigure}
    \end{filecontents*}

    \title{Title}
    \author{Name}

    \usetheme{Autumn}\usecolorstyle[colorPalette=BrownBlueOrange]{Germany}

    \begin{document}\maketitle

    \begin{columns}
    \column{0.7} \block{FigureOutside Block}{
      \lipsum[1]
    }

    \column{0.3} \block{}{
    \input{./myDummyPictureCode.tex}
    }
    \end{columns}

    % Text and figure Inside the Block
    \block{Text and figure Block using COLUMNS}{
    \begin{columns}
    \column{0.7} \lipsum[1]
    \column{0.3} \input{./myDummyPictureCode.tex}
    \end{columns}
    }

    % Text and figure Inside the Block using minipage
    \block{Text and figure Block using MINIPAGE}{
      \fbox{
      \begin{minipage}[t]{0.7\linewidth}
        \lipsum[1]
      \end{minipage}%
      }
      %
      \fbox{
      \begin{adjustbox}{valign=t}
      \fbox{
      \begin{minipage}[t]{0.3\linewidth}
        \input{./myDummyPictureCode.tex}
      \end{minipage}
      }
      \end{adjustbox}
      }
    }

    % playing with multicolumn text
    \block{Text and figure Block using MULTICOLS}{
      \begin{multicols*}{3}
        \lipsum[1]
        \input{./myDummyPictureCode.tex}
      \end{multicols*}
    }

    % playing with multicolumn text
    \block{Text and figure Block using MINIPAGE and MULTICOLS}{
      \fbox{%
      \begin{minipage}[t]{\dimexpr0.7\linewidth-2\fboxsep-2\fboxrule\relax}
      \noindent
      \begin{multicols*}{2}
        \lipsum[1]
      \end{multicols*}
      \end{minipage}%
      }%
      %
      \fbox{%
      \begin{adjustbox}{valign=T}
      \fbox{%
      \begin{minipage}{\dimexpr0.3\linewidth-4\fboxsep-4\fboxrule\relax}
        \input{./myDummyPictureCode.tex}
      \end{minipage}
      }%
      \end{adjustbox}%
      }%
    }

    \end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .