如何将文档类更改为独立的 tikz?

如何将文档类更改为独立的 tikz?

如何将文档类别更改\documentclass[english]{IEEEtran}\documentclass[tikz,border=3.14mm]{standalone}。我仍然可以获得相同的输出图。

   \documentclass{ieeeaccess}
               \usepackage{tabularx}
         \usepackage{booktabs}
         \usepackage{longtable}
          \usepackage{multirow}
      \usepackage{colortbl}
           \usepackage{caption}
       \usepackage{hhline}
        \usepackage{tabularx,colortbl}
       \usepackage{mathtools}
        \usepackage{eqnarray,amsmath}
        \usepackage{amsmath}
        \usepackage{hyperref} % for autoref
     \usepackage{cite}
         \usepackage{amsmath,amssymb,amsfonts}
       \usepackage{algorithmic}
        \usepackage{graphicx}
      \usepackage{enumitem}
        \usepackage[usenames,dvipsnames]{xcolor}


   \usepackage{array}
     \renewcommand{\arraystretch}{1.2}
        \newcolumntype{C}{>{$}c<{$}}
        \usepackage{booktabs}
          \usepackage{makecell}
           \usepackage{tikz}
            \usetikzlibrary{shapes.arrows}

   \usepackage{array}
  \renewcommand{\arraystretch}{1.2}
   \newcolumntype{C}{>{$}c<{$}}
   \usepackage{booktabs}
\usepackage{makecell}
  \usepackage{tikz}
    \usetikzlibrary{shapes.arrows}

   \begin{document}
\begin{table*}

    \begin{minipage}{0.2\linewidth}
        \centering
        \caption{First Table}
        \label{tab:first_table}
        \tikz[remember picture]{\node[inner sep=0pt, outer sep=0pt](A){%contents
        \begin{tabular}{cCc}
            \toprule
            \textbf{Start} & \makecell{\textbf{Interval}\\ \textbf{Time}} 
            & \textbf{Disease} 
            \\
            \midrule
            A & 483 & B \\
            A & 848 & C  \\
            A & 121 & Zone 4  \\
            B & 13 & C \\

            \bottomrule
        \end{tabular}}}   
    \end{minipage}\hfill
    \begin{minipage}{.2\linewidth}

        \caption{Second Table}
        \label{tab:second_table}
        \tikz[remember picture]{\node[inner sep=0pt, outer sep=0pt](B){%contents
        \begin{tabular}{ccc}
            \toprule
            \textbf{Start} & \makecell{\textbf{Interval}\\ \textbf{Time}} 
            & \textbf{Disease} 
            \\
            \midrule
            A & 483 & B \\
            A & 848 & C  \\
            A & 121 & Zone 4  \\
            B & 13 & C \\

            \bottomrule
        \end{tabular}}}   
    \end{minipage}\hfill
       \begin{minipage}{.2\linewidth}

        \caption{Second Table}
        \label{tab:second_table}
        \tikz[remember picture]{\node[inner sep=0pt, outer sep=0pt](C){%contents
        \begin{tabular}{ccc}
            \toprule
            \textbf{Start} & \makecell{\textbf{Interval}\\ \textbf{Time}} 
            & \textbf{Disease} 
            \\
            \midrule
            A & 483 & B \\
            A & 848 & C  \\
            A & 121 & Zone 4  \\
            . & . & . \\
             . & . & .  \\
            B & 13 & C \\
            \bottomrule
        \end{tabular}}}   
    \end{minipage}

\end{table*}



      \end{document}

答案1

我把你的代码改成standalone代码了。

警告:

  1. 表格编号不再起作用(或者我找不到让它起作用的方法)。
    • 您可以通过在主文档中添加 PDF 文件来手动修复它,然后增加table计数器。
  2. 您必须手动添加字幕。使用普通 TiZ 命令用于此。
  3. 标签不再起作用(或者我找不到让它起作用的方法)。
  4. 您无法再使用\hfill。您必须手动调整表格之间的间距。因此,使用它需要您自担风险!
\documentclass[tikz]{standalone} % add margin=3.14mm if you like, but that will produce
                                 % a white space as margin, which should be avoid in
                                 % this particular case
\usepackage{booktabs}
\usepackage{array}
\usepackage{makecell}
\usepackage{times}
\usepackage{mathptmx}
\newcolumntype{C}{>{$}c<{$}}
\usetikzlibrary{positioning}
\begin{document}
\begin{tikzpicture}
\node (tb1) {%Content
\begin{tabular}{cCc}
    \toprule
    \textbf{Start} & \makecell{\textbf{Interval}\\ \textbf{Time}} & \textbf{Disease} \\
    \midrule
    A & 483 & B \\
    A & 848 & C  \\
    A & 121 & Zone 4  \\
    B & 13 & C \\
    \bottomrule
\end{tabular}};
\node[above=1ex,font=\scshape,align=center] at (tb1.north) {TABLE I\\First Table};
\node[right=4cm of tb1] (tb2) {%Content
\begin{tabular}{ccc}
    \toprule
    \textbf{Start} & \makecell{\textbf{Interval}\\ \textbf{Time}} & \textbf{Disease} \\
    \midrule
    A & 483 & B \\
    A & 848 & C  \\
    A & 121 & Zone 4  \\
    B & 13 & C \\
    \bottomrule
\end{tabular}};
\node[above=1ex,font=\scshape,align=center] at (tb2.north) {TABLE II\\Second Table};
\node[right=4cm of tb2] (tb3) {%Content
\begin{tabular}{ccc}
    \toprule
    \textbf{Start} & \makecell{\textbf{Interval}\\ \textbf{Time}} & \textbf{Disease} \\
    \midrule
    A & 483 & B \\
    A & 848 & C  \\
    A & 121 & Zone 4  \\
    . & . & . \\
    . & . & .  \\
    B & 13 & C \\
    \bottomrule
\end{tabular}};
\draw[-latex] (tb1) edge (tb2) (tb2) edge (tb3);
\node[above=1ex,font=\scshape,align=center] at (tb3.north) {TABLE III\\Third Table};
\end{tikzpicture}
\end{document}

在此处输入图片描述

相关内容