我可以使用 tikzfigure! 中的子图并带有不同的标签吗?!

我可以使用 tikzfigure! 中的子图并带有不同的标签吗?!

我正在使用 tikzposter 包制作科学海报,我想在 tikzfigure 中添加几个子图。在代码中,您可以在名为“A 图”的块中看到我的尝试。任何帮助都将不胜感激。

    \documentclass[25pt, a1papper, portrait]{tikzposter}
\usepackage[utf8]{inputenc}
\usepackage{subfigure}
\title{\parbox{\linewidth}{\centering dsfds sdfsfd}}
\author{fdssfa}
\date{\today}
\institute{fsdfs sdfdsfds}
\usepackage{blindtext}
\usepackage{comment}
\usetheme{Desert}

\defineblockstyle{MyBlock}{% define a custom style for a block
    titlewidthscale=0.8, bodywidthscale=1, titlecenter,
    titleoffsetx=0pt, titleoffsety=0pt, bodyoffsetx=0pt, bodyoffsety=15mm,
    bodyverticalshift=15mm, roundedcorners=22, linewidth=5pt,
    titleinnersep=8mm, bodyinnersep=8mm
}{
    \draw[rounded corners=\blockroundedcorners, inner sep=\blockbodyinnersep,
          line width=\blocklinewidth, color=black,
          top color=titlebgcolor!90, bottom color=titlebgcolor!20!white,
          %fill=blockbodybgcolor
          ]
      (blockbody.south west) rectangle (blockbody.north east); %
    \ifBlockHasTitle%
        \draw[rounded corners=\blockroundedcorners, inner sep=\blocktitleinnersep,
          top color=titlebgcolor!90, bottom color=titlebgcolor!20!white,
          line width=\blocklinewidth, color=black, %fill=blocktitlebgcolor
          ]
      (blocktitle.south west) rectangle (blocktitle.north east); %
    \fi%
}
\newcommand\myblock[3][MyBlock]{\useblockstyle{#1}\block{#2}{#3}\useblockstyle{Basic}}



\begin{document}
\useblockstyle{Basic}

\maketitle

\block{Introduction}
{
    \blindtext
}


\begin{columns}
    \column{0.4}
    \myblock{Objectives}{% use custom block to define the objectives
      \blindtext \vspace{2cm}
     }

    \column{0.6}{
    \block{Something else}{Here, \blindtext \vspace{4cm}}
    \note[
        targetoffsetx=-9cm,
        targetoffsety=-6.5cm,
        width=0.5\linewidth
        ]
        {e-mail \texttt{[email protected]}}}
\end{columns}

\begin{columns}
    \column{0.5}
    \block{A figure}
    {
        \begin{tikzfigure}[dssd]
     \begin{center}
       \subfigure[$ \varepsilon_1=\varepsilon_2=0$]{%
            \label{fig:second}
            \includegraphics[scale=0.28]{fig3_1-eps-converted-to}
            }
       \subfigure[$\phi=0\,, \varepsilon_1=\varepsilon_2=\varepsilon$]{%
            \label{fig:third}
            \includegraphics[scale=0.28]{fig3_2-eps-converted-to}
            }\\
       \subfigure[$\phi=\pi/2\,, \varepsilon_1=\varepsilon_2=\varepsilon$]{%
            \label{fig:third}
            \includegraphics[scale=0.28]{fig3_3-eps-converted-to}
            }
       \subfigure[$\phi=\pi/2\,, \varepsilon_1=-\varepsilon_2=\varepsilon$]{%
            \label{fig:second}
            \includegraphics[scale=0.28]{fig3_4-eps-converted-to}
            }
    \end{center}
   \label{fig34}

    }
    \column{0.5}
    \block{Description of the figure}{\blindtext}
\end{columns}
\block[titleleft,titleoffsetx=2em,titleoffsety=1em,bodyoffsetx=2em,
bodyoffsety=1em,titlewidthscale=.6, bodywidthscale=.8, roundedcorners=14,
linewidth=8mm, bodyinnersep=4em, titleinnersep=2em]
{Sample Block}{Text\\Text\\Text Text}
\end{document} 

答案1

子图应该位于图形内,但 tikzfigure 的作用只是有点像图形。幸运的是,子图不需要位于图形内,它只是认为它位于图形内,所以我将\@captype整个文档设置为图形。

注意:您还可以将一个 tikzfigure 放置到另一个 tikzfigure 内,但它们似乎以 结尾\par,因此不要将它们放入行中。

不用说,由于无法访问您的图像,所以我改用标准 MWE 图像。

\documentclass[25pt, a1papper, portrait]{tikzposter}
\usepackage[utf8]{inputenc}
\usepackage{subfigure}
\title{\parbox{\linewidth}{\centering dsfds sdfsfd}}
\author{fdssfa}
\date{\today}
\institute{fsdfs sdfdsfds}
\usepackage{blindtext}
\usepackage{comment}
\usetheme{Desert}

\defineblockstyle{MyBlock}{% define a custom style for a block
    titlewidthscale=0.8, bodywidthscale=1, titlecenter,
    titleoffsetx=0pt, titleoffsety=0pt, bodyoffsetx=0pt, bodyoffsety=15mm,
    bodyverticalshift=15mm, roundedcorners=22, linewidth=5pt,
    titleinnersep=8mm, bodyinnersep=8mm
}{
    \draw[rounded corners=\blockroundedcorners, inner sep=\blockbodyinnersep,
          line width=\blocklinewidth, color=black,
          top color=titlebgcolor!90, bottom color=titlebgcolor!20!white,
          %fill=blockbodybgcolor
          ]
      (blockbody.south west) rectangle (blockbody.north east); %
    \ifBlockHasTitle%
        \draw[rounded corners=\blockroundedcorners, inner sep=\blocktitleinnersep,
          top color=titlebgcolor!90, bottom color=titlebgcolor!20!white,
          line width=\blocklinewidth, color=black, %fill=blocktitlebgcolor
          ]
      (blocktitle.south west) rectangle (blocktitle.north east); %
    \fi%
}
\newcommand\myblock[3][MyBlock]{\useblockstyle{#1}\block{#2}{#3}\useblockstyle{Basic}}

\makeatletter
\def\@captype{figure}% make entire document a figure
\makeatother

\begin{document}
\useblockstyle{Basic}

\maketitle

\block{Introduction}
{
    \blindtext
}


\begin{columns}
    \column{0.4}
    \myblock{Objectives}{% use custom block to define the objectives
      \blindtext \vspace{2cm}
     }

    \column{0.6}{
    \block{Something else}{Here, \blindtext \vspace{4cm}}
    \note[
        targetoffsetx=-9cm,
        targetoffsety=-6.5cm,
        width=0.5\linewidth
        ]
        {e-mail \texttt{[email protected]}}}
\end{columns}

\begin{columns}
    \column{0.5}
    \block{A figure}{%
     \begin{tikzfigure}[dssd]
     \centering
       \subfigure[$ \varepsilon_1=\varepsilon_2=0$]{%
            \label{fig:second}
            \includegraphics[scale=0.28]{example-image-a}
            }
       \subfigure[$\phi=0\,, \varepsilon_1=\varepsilon_2=\varepsilon$]{%
            \label{fig:third}
            \includegraphics[scale=0.28]{example-image-b}
            }\\
       \subfigure[$\phi=\pi/2\,, \varepsilon_1=\varepsilon_2=\varepsilon$]{%
            \label{fig:fourth}
            \includegraphics[scale=0.28]{example-image-c}
            }
       \subfigure[$\phi=\pi/2\,, \varepsilon_1=-\varepsilon_2=\varepsilon$]{%
            \label{fig:fifth}
            \includegraphics[scale=0.28]{example-image}
            }
   \label{fig34}
   \end{tikzfigure}}
    \column{0.5}
    \block{Description of the figure}{\blindtext}
\end{columns}
\block[titleleft,titleoffsetx=2em,titleoffsety=1em,bodyoffsetx=2em,
bodyoffsety=1em,titlewidthscale=.6, bodywidthscale=.8, roundedcorners=14,
linewidth=8mm, bodyinnersep=4em, titleinnersep=2em]
{Sample Block}{Text\\Text\\Text Text}
\end{document} 

相关内容