3

Can anyone help me revise my code so that I can achieve the following goals.

1.How to make the table to be on the top of the first page? Now it skips the first page and jumps to the middle of the 2nd page.

2.The plots don't look good. Is there a way to make them 2x2 right on the top of the 2nd page. Like the image I attach(which is 1x3, but I want 3x2, not sure if 2x3 look nicer).

3.Any other revision is extermely welcome!

% arara: pdflatex

\documentclass[aps,prl,reprint,twocolumn,secnumarabic,nobalancelastpage,amsmath,amssymb,nofootinbib]{revtex4}
%graphics is outdated, I believe
\usepackage{graphicx} % remove demo!
\usepackage{fancyhdr}
\usepackage{xcolor} % use the more modern xcolor! 
\usepackage{atbegshi}
\usepackage{siunitx}

\pagestyle{fancy}
\lhead{PHYSICS \textbf{18L}}
\chead{MODERN\quad PHYSICS\quad LABOTORARY} 
\rhead{23 APRIL 2015}
\AtBeginDocument{%
  \rfoot{\raisebox{1.5pt}{\scalebox{0.7}{\textcopyright}} 2015 UCLA Physics Department}%
  \AtBeginShipoutNext{%
    \rfoot{}%
  }%
}
\renewcommand{\headrulewidth}{1pt}

\newcommand*\espa{\\[2.5 mm]}

\usepackage{blindtext} % just for demo

\begin{document}
Here are the table and plots.
\begin{table*}[t]
      \begin{tabular}{l >{\ttfamily}l S[table-format=1.6] S[table-format=1.0]}
        \hline\hline \\[-0.8em]
         Method Name & \normalfont Matlab Function & {Elapsed Time(s)}    & {Figure Number}\\[0.5ex]
         \hline \\[-0.35em]
            Component Averaging method   & cav &  2.411990 &  1\espa
          Cimmino's method   & cimmino &  2.197837 &  2\espa
          Diagonally Relaxed Orthogonal Projections method   & drop &  2.268414 &  3\espa
          Landweber's method   & landweber &  2.056113 &  4\espa
          Simultaneous Algebraic Reconstruction Technique(SART)   & sart &  0.864440 &  5\espa
          Algebraic Reconstruction Technique(ART)   & kaczmarz &  784.641220 &  6\espa
         \hline\hline
      \end{tabular} %784.641220
      \caption{Measured elapse time of Matlab internal execution from various tomographic algorithms}
   \end{table*}
\begin{figure*}[t]
   \vspace{-2.42cm}
\begin{minipage}[t]{.50\linewidth}
\includegraphics[width=1.1\textwidth, height = 6cm]{cav.png}
\caption{ cav.}
\end{minipage}%
\hfill
\begin{minipage}[t]{.50\linewidth}
\includegraphics[width=1.1\textwidth, height = 6cm]{cimmino.png}
\caption{ cimmino.}
\end{minipage}
\bigskip%
\begin{minipage}[t]{.50\linewidth}
\includegraphics[width=1.1\textwidth, height = 6cm]{drop.png}
\caption{ drop.}
\end{minipage}%
\hfill
\begin{minipage}[t]{.50\linewidth}
\includegraphics[width=1.1\textwidth, height = 6cm]{landweber.png}
\caption{ landweber.}
\end{minipage}
\bigskip%
\begin{minipage}[t]{.50\linewidth}
\includegraphics[width=1.1\textwidth, height = 6cm]{sart.png}
\caption{ sart.}
\end{minipage}%
\hfill
\begin{minipage}[t]{.50\linewidth}
\includegraphics[width=1.1\textwidth, height = 6cm]{art.png}
\caption{ art.}
\end{minipage}%
\end{figure*}
\end{document}

enter image description here enter image description here

enter image description here

enter image description here

Lawerance
  • 357
  • 5
  • 14

1 Answers1

1

The table on on top of the first row seems to be quite tricky. Please see my link in comment. For the rest, you can do as in my MWE. As subcaption is not compatible with your documentclass, I just put them into minipages. If you want to have it 2x3, just reorder the blank lines and \hfils.

% arara: pdflatex

\documentclass[aps,prl,reprint,twocolumn,secnumarabic,nobalancelastpage,amsmath,amssymb,nofootinbib]{revtex4}
%graphics is outdated, I believe
\usepackage[demo]{graphicx} % remove demo!
\usepackage{fancyhdr}
\usepackage{xcolor} % use the more modern xcolor! 
\usepackage{atbegshi}
\usepackage{siunitx}

\pagestyle{fancy}
\lhead{PHYSICS \textbf{18L}}
\chead{MODERN\quad PHYSICS\quad LABOTORARY} 
\rhead{23 APRIL 2015}
\AtBeginDocument{%
  \rfoot{\raisebox{1.5pt}{\scalebox{0.7}{\textcopyright}} 2015 UCLA Physics Department}%
  \AtBeginShipoutNext{%
    \rfoot{}%
  }%
}
\renewcommand{\headrulewidth}{1pt}

\newcommand*\espa{\\[2.5 mm]}

\usepackage{blindtext} % just for demo

\begin{document}
\begin{table*}
      \begin{tabular}{l >{\ttfamily}l S[table-format=1.6] S[table-format=1.0]}
        \hline\hline \\[-0.8em]
         Method Name & \normalfont Matlab Function & {Elapsed Time(s)}    & {Figure Number}\\[0.5ex]
         \hline \\[-0.35em]
            Component Averaging method   & cav &  2.411990 &  1\espa
          Cimmino's method   & cimmino &  2.197837 &  2\espa
          Diagonally Relaxed Orthogonal Projections method   & drop &  2.268414 &  3\espa
          Landweber's method   & landweber &  2.056113 &  4\espa
          Simultaneous Algebraic Reconstruction Technique(SART)   & sart &  0.864440 &  5\espa
         \hline\hline
      \end{tabular}
      \caption{Measured elapse time of Matlab internal execution from various tomographic algorithms}
   \end{table*}
   \Blindtext\Blindtext
\begin{figure*}[t]
\begin{minipage}[t]{.3\linewidth}
\includegraphics[scale=0.677]{cav.png}
\caption{ cav.}
\end{minipage}\hfil
\begin{minipage}[t]{.3\linewidth}
\includegraphics[scale=0.677]{cimmino.png}
\caption{ cimmino.}
\end{minipage}\hfil
\begin{minipage}[t]{.3\linewidth}
\includegraphics[scale=0.677]{cimmino.png}
\caption{ cimmino.}
\end{minipage}%
\bigskip%

\begin{minipage}[t]{.3\linewidth}
\includegraphics[scale=0.245]{drop.png}
\caption{ drop.}
\end{minipage}\hfil
\begin{minipage}[t]{.3\linewidth}
\includegraphics[scale=0.677]{landweber.png}
\caption{ landweber.}
\end{minipage}\hfil
\begin{minipage}[t]{.3\linewidth}
\includegraphics[scale=0.677]{sart.png}
\caption{ sart.}
\end{minipage}%
\end{figure*}
   \Blindtext\Blindtext
\end{document}

Please note how much code I had to delete in order to get a clearer look. And this is still far away from an MWE. For future questions, please try to reduce as much as you can.

LaRiFaRi
  • 43,807
  • I basically implement your idea and I'm using 3x2(2 plots each row). But one problem occur is when you use \hfil, the two plots are reaching towards the right end instead of center. I attach the picture in my question. – Lawerance Jul 19 '15 at 03:59
  • Basically, I want to achieve that the left png end stretch to the left end of the hline, while the right png end stretch to the right end of the hline. – Lawerance Jul 19 '15 at 04:01
  • @Lawerance Use \hfill with two "l"s. I forgot a percent sign after each last minipage. You will need this, too. As your documentclass is auto-centering the images, you will have to carefully adapt the sizes of your minipages to the sizes of your figures. – LaRiFaRi Jul 19 '15 at 07:10
  • Sorry, I'm actually really confused now about your advice. I'm posting the codes I changed here to see if it makes sense. Thanks. – Lawerance Jul 19 '15 at 14:36