0

How to change the document class \documentclass[english]{IEEEtran} to \documentclass[tikz,border=3.14mm]{standalone}. And I still can get the same output figure.

   \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}
  • One question first. Why do you want to change to \documentclass[tikz,border=3.14mm]{standalone}? I think we should do the contrary: change from standalone to IEEEtran or so. – user156344 Apr 13 '19 at 2:28
  • @JouleV since I want to use the same table in IEEE access class \documentclass{ieeeaccess} but I got many errors. And I googled the problem, it needs a lot of time to be fixed. So, I want to make it in standalone so I can get the output table as a pdf and just use it in my access document. – Heba Mohsen Apr 13 '19 at 2:44
  • Then here is my suggestion: remove all TikZ-related stuff here, you don't need TikZ here. And the problem will be easier to solve. Could you please add a code using ieeeaccess (which returns errors)? – user156344 Apr 13 '19 at 2:47
  • @JouleV I edited it. I do not why tikz is not working with ieeeaccess. There is worka around to solve the problem but when I tried, the first page does not show up. tex.stackexchange.com/questions/440422/… – Heba Mohsen Apr 13 '19 at 3:01
  • Have a look at tex.stackexchange.com/q/91262/156344. Btw, I don't think TikZ helps here - it is completely useless. – user156344 Apr 13 '19 at 3:03
1

I change your code to a standalone code.

Warnings:

  1. Table numbering no longer works (or I can't find a way to make it work).
    • You may fix it manually by adding the PDF file in your main document, and then increase table counter.
  2. You have to manually add captions. Use normal TikZ commands for this.
  3. Labels no longer works (or I can't find a way to make it work).
  4. You can no longer use \hfill. You have to adjust the spacing between tables manually. Therefore, use it at your own risk!
\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}

enter image description here

| improve this answer | |
  • Oh greet. How to add captions to each table. – Heba Mohsen Apr 13 '19 at 3:42
  • @HebaMohsen I added some captions. – user156344 Apr 13 '19 at 3:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.