如何在圖形標題中插入表格?

如何在圖形標題中插入表格?

我有一個小表格,我希望將其包含在圖中包含的 tikzpicture 下方的標題中。這可能嗎?

答案1

為此,您有幾個選擇:

  1. 包括數位作為圖像的一部分,而不是標題。

    在此輸入影像描述

    \begin{figure}
      \centering
      \begin{tikzpicture}
        \draw (0,0) -- (1,1);
      \end{tikzpicture}
      \caption{This is a caption}
      \begin{tabular}{c|c} tl & tr \\ \hline bl & br \end{tabular}
    \end{figure}
    
  2. 使用可選參數 來\caption區分目錄和文字內容。這允許您tabular在標題中插入。

    在此輸入影像描述

    \begin{figure}
      \centering
      \begin{tikzpicture}
        \draw (0,0) -- (1,1);
      \end{tikzpicture}
      \caption[This is a caption]{This is a caption 
        \begin{tabular}{c|c} tl & tr \\ \hline bl & br \end{tabular}
      }
    \end{figure}
    

這一切都取決於您的用例。在這兩種情況下,tabular最終都不會出現在 LoF 中。

相關內容