在 tikzposter 中使用多列时,小页面错位

在 tikzposter 中使用多列时,小页面错位

有没有什么方法可以将多列文本与下面的 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}

在此处输入图片描述

答案1

由于您使用的是\fbox,因此您必须更改宽度。还要%在行尾添加一些。此外,使用valign=T。因此我们有,

% 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}%
  }%
}

完整代码:

\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}

在此处输入图片描述

相关内容