tikzposter 块内的表格内有图形的表格

tikzposter 块内的表格内有图形的表格

我正在尝试在“tikzposter”块环境中将带有图形的表格放在表格内。虽然下面的方法在documentclass{article}+中有效\begin{document} ... \end{document}。但它在环境中不起作用\documentclass[...]{tikzposter}

查看代码:

\documentclass[20pt, a0paper, landscape]{tikzposter}
\usepackage{geometry}
\usepackage{tabularx}
\usepackage{graphicx}

\usetheme{Simple}

\begin{document}

\begin{columns}
\column{0.5}
\block{block title}{
\begin{figure}[ht]
\setkeys{Gin}{width=0.32\linewidth}
\begin{tabularx}{\linewidth}{@{} XX @{}}
    \includegraphics{example-image}\hfill 
    \includegraphics{example-image}\hfill
    \includegraphics{example-image}
   \caption{Some text}
    &   \includegraphics{example-image}\hfill
        \includegraphics{example-image}\hfill
        \includegraphics{example-image} 
        \caption{Some text}
\end{tabularx}
\end{figure}
}

\end{columns}
\end{document}

为此我收到一条错误消息。

我也尝试过:

\documentclass[20pt, a0paper, landscape]{tikzposter}
\usepackage{geometry}
\usepackage{tabularx}
\usepackage{graphicx}

\begin{document}

\begin{columns}
\column{0.5}
\block{block title}{
    \begin{tabular}{cc}
        \begin{figure}
            \begin{tabular}{ccc}
                \includegraphics[width=0.16\linewidth]{example-image} &  
                \includegraphics[width=0.16\linewidth]{example-image} &
                \includegraphics[width=0.16\linewidth]{example-image}
            \end{tabular}
            \caption{Some text}
        \end{figure}
        &
        \begin{figure}
            \begin{tabular}{ccc}
                \includegraphics[width=0.16\linewidth]{example-image} &  
                \includegraphics[width=0.16\linewidth]{example-image} &
                \includegraphics[width=0.16\linewidth]{example-image}
            \end{tabular}
            \caption{Some text}
        \end{figure}
    \end{tabular}
}

\end{columns}
\end{document}

为此,我还收到一条错误消息。

在块内我试图让表看起来像这样: 在此处输入图片描述

谢谢!

答案1

在此处输入图片描述

浮动环境不必位于框内。只需删除figure环境并作为标题使用\captionof{figure}{...}

\documentclass[20pt, a0paper, landscape]{tikzposter}
\usepackage{geometry}
\usepackage{tabularx}
\usepackage{graphicx}
\usepackage{capt-of} % <--- for captions outside floats

\usetheme{Simple}

\begin{document}

\begin{columns}
\column{0.5}
\block{block title}{
\setkeys{Gin}{width=0.32\linewidth}
\begin{tabularx}{\linewidth}{@{} X@{\qquad}X @{}} % <---
    \includegraphics{example-image}\hfill
    \includegraphics{example-image}\hfill
    \includegraphics{example-image}
   \captionof{figure}{Some text}
    &   \includegraphics{example-image}\hfill
        \includegraphics{example-image}\hfill
        \includegraphics{example-image}
        \captionof{figure}{Some text}
\end{tabularx}
}
\end{columns}
\end{document}

相关内容