0

I am using ASME template which is a double column template. I have the following issues

Question 1 I am getting a huge blank space in my final document. I tried to remove this by using \vspace but it is of no use. Is there any way I can fix this? blabk space problem

Question 2 I have a Table in my document which I tried to place in the top by giving [H] in the placement, but that is also not working. how to overcome this. Table problem

\documentclass[twocolumn,10pt]{asme2ej}
\usepackage{graphicx}
\usepackage{stfloats}
\usepackage{adjustbox}
\usepackage{scalerel}

\usepackage{lipsum}

\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{lipsum}
\usepackage{mathtools}
\usepackage{cuted}

\usepackage[Symbol]{upgreek}
\usepackage{epstopdf}
\usepackage{float}
\usepackage{caption}
\usepackage{siunitx}
\usepackage{caption}
\usepackage{enumitem}

\usepackage{subcaption}
\usepackage{multirow}
\captionsetup{compatibility=false}
\usepackage{tikz}
\usepackage{pifont}
\usepackage{setspace}

\usepackage{multicol}


\title{xxxxxxxxxxxxxxx}

%%% first author
\author{xxxxx
    \affiliation{
xxxxx\\
xxxx\\
xxxxx
    }   
}

\author{xxxxx
    \affiliation{   xxxxx\\
         xxxx\\
    xxxxx
    }
}

\author{xxxxx \affiliation{ xxxx\\
    xxxxx\\
    xxxxx
    }
} 



\begin{document}


\maketitle    

\lipsum



 \begin{figure}[H]
 \centering
  \includegraphics[width=\columnwidth]{example-image}
  \caption{}
  \label{fig:Transition_curves_spring}
 \end{figure}


 \begin{figure}[H]
 \centering
  \includegraphics[width=\columnwidth]{example-image}
    \label{fig: Transition_curves_spring}
 \end{figure}

\lipsum
\begin{figure}[H]
  \centering
  \begin{subfigure}{0.56\textwidth}
    \includegraphics[width=\columnwidth]{example-image}
    \caption{Cantilever}
    \label{fig:mode_1_max_beta}
  \end{subfigure}
   \begin{subfigure}{0.56\textwidth}
    \includegraphics[width=\columnwidth]{example-image}
    \caption{Simple Support}
    \label{fig:mode_2_max_beta}
  \end{subfigure}
  \begin{subfigure}{0.56\textwidth}
    \includegraphics[width=\columnwidth]{example-image}
    \caption{Clamped-Clamped }
    \label{fig:mode_3_max_beta}
  \end{subfigure}
  \caption{xxxxx} 
  \label{fig:location of max beta}
  \end{figure}

\lipsum

\begin{figure}[H]
         \centering
         \includegraphics[width=\columnwidth]{example-image}
         \caption{xxxx}
         \label{fig:mode shape with two springs}             
\end{figure}
\lipsum
\begin{figure}[H]
  \centering
  \begin{subfigure}{0.56\textwidth}
    \includegraphics[width=\columnwidth]{example-image}
    \caption{Mode 1}
    \label{fig:trans surface mode 1}
  \end{subfigure}
   \begin{subfigure}{0.56\textwidth}
    \includegraphics[width=\columnwidth]{example-image}
    \caption{Mode 2}
    \label{fig:trans surface mode 2}
  \end{subfigure}
  \begin{subfigure}{0.56\textwidth}
    \includegraphics[width=\columnwidth]{example-image}
    \caption{Mode 3 }
    \label{fig:trans surface mode 3}
  \end{subfigure}
 \begin{subfigure}{0.56\textwidth}
     \includegraphics[width=\columnwidth]{example-image}
     \caption{Mode 4 }
     \label{fig:trans surface mode 4}
   \end{subfigure}
   \caption{xxxxx}
   \label{fig:Transition surfaces linear springs}
\end{figure}
\lipsum

\begin{figure}[H]
         \centering
         \includegraphics[width=\columnwidth]{example-image}
         \caption{xxxxx}
         \label{fig:mode shape with three springs}             
\end{figure}




\begin{figure}[H]
 \centering
  \includegraphics[width=\columnwidth]{example-image}
  \caption{}
 \end{figure}

 \begin{figure}[H]
  \centering
   \includegraphics[width=\columnwidth]{example-image}
   \caption{}
   \label{fig:Transition_curves_mass}
 \end{figure}



\begin{figure}[!h]
  \centering
  \includegraphics[width=\columnwidth]{example-image}
  \caption{.}
  \label{fig:Linear-rotational spring}
\end{figure}


\lipsum
  \begin{table}[H]
   \caption{}
   \label{table:three spring beam}
  {\centering }

  \bigskip
   \scalebox{1}{%%
  \begin{tabular}{ccccccccccc}
  \hline

  0                            & 0                           & 0                           & 3.142                                                           & 3.140          & 6.281                                                            & 6.2739        \\
  50                           & 0                           & 0                           & 3.458                                                           & 3.461          & 6.382                                                            & 6.374         \\
  0                            & 100                         & 0                           & 0.829                                                           & 0.830          & 6.281                                                            & 6.273         \\
  0                            & 0                           & 200                         & 4.118                                                           & 4.136          & 6.281                                                            & 6.273         \\
  100                          & 200                         & 0                           & 0.812                                                           & 0.813          & 6.456                                                            & 6.449         \\
  300                          & 0                           & 400                         & 4.741                                                           & 4.757          & 6.883                                                            & 6.875         \\
  0                            & 500                         & 100                         & 0.733                                                           & 0.736          & 6.281                                                            & 6.273         \\
  $\infty$                        & 0                           & 1000                        & 5.231                                                           & 5.220          & 9.412                                                            & 9.372         \\
  $\infty$                        & 100                         & $\infty$                       & 1.471                                                           & 1.467          & 7.244                                                            & 7.220         \\
  300                          & 800                         & 1000                        & 0.761                                                           & 0.764          & 6.696                                                            & 6.685         \\
  1000                         & 500                         & 3000                        & 0.918                                                           & 0.922          & 7.007                                                            & 6.990         \\
  500                          & 4000                        & 800                         & 0.525                                                           & 0.527          & 6.837                                                            & 6.824         \\
  $\infty$                        & $\infty$                      & $\infty$                       & 0.0046                                                          & 0.00464        & 7.239                                                            & 7.214       \\
  \hline 
  \end{tabular}}

  \bigskip\bigskip
   \scalebox{0.96}{%%
  \begin{tabular}{ccccccccccc}
  \hline

  0                           & 0                           & 0                           & 9.403                                                            & 9.393         & 12.298                                                           & 12.492        \\
  50                          & 0                           & 0                           & 9.418                                                            & 9.408         & 12.298                                                           & 12.492        \\
  0                           & 100                         & 0                           & 7.857                                                            & 7.830         & 12.273                                                           & 12.492        \\
  0                           & 0                           & 200                         & 9.950                                                            & 9.909         & 13.524                                                           & 13.652        \\
  100                         & 200                         & 0                           & 7.968                                                            & 7.943         & 12.273                                                           & 12.492        \\
  300                         & 0                           & 400                         & 10.049                                                           & 10.009        & 13.617                                                           & 13.734        \\
  0                           & 500                         & 100                         & 7.950                                                            & 7.918         & 13.075                                                           & 13.064        \\
  $\infty$                      & 0                           & 1000                        & 13.611                                                           & 13.484        & 15.701                                                           & 15.434        \\
  $\infty$                      & 100                         & $\infty$                      & 13.122                                                           & 13.071        & 15.720                                                           & 15.490        \\
  300                         & 800                         & 1000                        & 8.325                                                            & 8.297         & 13.173                                                           & 13.130        \\
  1000                        & 500                         & 3000                        & 9.196                                                            & 9.173         & 13.189                                                           & 13.144        \\
  500                         & 4000                        & 800                         & 8.583                                                            & 8.557         & 13.172                                                           & 13.130        \\
  $\infty$                      & $\infty$                      & $\infty$                      & 13.123                                                           & 13.024        & 15.799                                                           & 15.490  \\ 
  \hline    
  \end{tabular}}
  \end{table}

\begin{figure}[H]
         \centering
         \includegraphics[width=\columnwidth]{example-image}
         \caption{.}
         \label{fig:mode shape with three springs}             
\end{figure} 

\begin{figure}[h!]
  \centering
  \begin{subfigure}{0.56\textwidth}
    \includegraphics[width=\columnwidth]{example-image}
    \caption{Mode 1}
    \label{fig: trans surface L-R mode 1}
  \end{subfigure}
   \begin{subfigure}{0.56\textwidth}
    \includegraphics[width=\columnwidth]{example-image}
    \caption{Mode 2}
    \label{fig: trans surface L-R mode 2}
  \end{subfigure}
  \begin{subfigure}{0.56\textwidth}
    \includegraphics[width=\columnwidth]{example-image}
    \label{fig: trans surface L-R mode 3}
  \end{subfigure}
 \begin{subfigure}{0.56\textwidth}
     \includegraphics[width=\columnwidth]{example-image}
     \caption{Mode 4 }
     \label{fig: trans surface L-R mode 4}
   \end{subfigure}
   \caption{}
   \label{fig:Transition surfaces linear rotational springs }
\end{figure}

\lipsum

\begin{figure}[h]
         \centering
         \includegraphics[width=\columnwidth]{example-image}
         \caption{respectively.}
         \label{fig:mode shape with mixed elements}             
\end{figure} 

\begin{table}[H]
 \caption{}
 \label{table:three spring beam}
{\centering }

\bigskip
 \scalebox{1}{%%
\begin{tabular}{ccccccccccc}
\hline

0                            & 0                           & 0                           & 3.142                                                           & 3.140          & 6.281                                                            & 6.2739        \\
50                           & 0                           & 0                           & 3.458                                                           & 3.461          & 6.382                                                            & 6.374         \\
0                            & 100                         & 0                           & 0.829                                                           & 0.830          & 6.281                                                            & 6.273         \\
0                            & 0                           & 200                         & 4.118                                                           & 4.136          & 6.281                                                            & 6.273         \\
100                          & 200                         & 0                           & 0.812                                                           & 0.813          & 6.456                                                            & 6.449         \\
300                          & 0                           & 400                         & 4.741                                                           & 4.757          & 6.883                                                            & 6.875         \\
0                            & 500                         & 100                         & 0.733                                                           & 0.736          & 6.281                                                            & 6.273         \\
$\infty$                        & 0                           & 1000                        & 5.231                                                           & 5.220          & 9.412                                                            & 9.372         \\
$\infty$                        & 100                         & $\infty$                       & 1.471                                                           & 1.467          & 7.244                                                            & 7.220         \\
300                          & 800                         & 1000                        & 0.761                                                           & 0.764          & 6.696                                                            & 6.685         \\
1000                         & 500                         & 3000                        & 0.918                                                           & 0.922          & 7.007                                                            & 6.990         \\
500                          & 4000                        & 800                         & 0.525                                                           & 0.527          & 6.837                                                            & 6.824         \\
$\infty$                        & $\infty$                      & $\infty$                       & 0.0046                                                          & 0.00464        & 7.239                                                            & 7.214       \\
\hline 
\end{tabular}}

\bigskip\bigskip
 \scalebox{0.96}{%%
\begin{tabular}{ccccccccccc}
\hline

0                           & 0                           & 0                           & 9.403                                                            & 9.393         & 12.298                                                           & 12.492        \\
50                          & 0                           & 0                           & 9.418                                                            & 9.408         & 12.298                                                           & 12.492        \\
0                           & 100                         & 0                           & 7.857                                                            & 7.830         & 12.273                                                           & 12.492        \\
0                           & 0                           & 200                         & 9.950                                                            & 9.909         & 13.524                                                           & 13.652        \\
100                         & 200                         & 0                           & 7.968                                                            & 7.943         & 12.273                                                           & 12.492        \\
300                         & 0                           & 400                         & 10.049                                                           & 10.009        & 13.617                                                           & 13.734        \\
0                           & 500                         & 100                         & 7.950                                                            & 7.918         & 13.075                                                           & 13.064        \\
$\infty$                      & 0                           & 1000                        & 13.611                                                           & 13.484        & 15.701                                                           & 15.434        \\
$\infty$                      & 100                         & $\infty$                      & 13.122                                                           & 13.071        & 15.720                                                           & 15.490        \\
300                         & 800                         & 1000                        & 8.325                                                            & 8.297         & 13.173                                                           & 13.130        \\
1000                        & 500                         & 3000                        & 9.196                                                            & 9.173         & 13.189                                                           & 13.144        \\
500                         & 4000                        & 800                         & 8.583                                                            & 8.557         & 13.172                                                           & 13.130        \\
$\infty$                      & $\infty$                      & $\infty$                      & 13.123                                                           & 13.024        & 15.799                                                           & 15.490  \\ 
\hline    
\end{tabular}}
\end{table}


\lipsum

\end{document}
  • 1
    Could you provide a MWE that replicates this problem? – Raaja Feb 11 at 8:48
  • 1
    the space will be caused by some markup in your document but since you have given no indication about that it is very hard to help you. It is best to make a small but complete docuemnt that shows the problem (you can use example-image as the image as that is available for tests) – David Carlisle Feb 11 at 8:51
  • 1
    using [H] by design produces ugly spaces in the output. Normally latex moves figures to avoid bad space at page breaks but using [H] disables that so naturally you get bad space, if you use [H] it is then your responsibility to add the figure at a point in the document were bad space is not generated. – David Carlisle Feb 11 at 10:56
  • 2
    The default placement is [tbp] which includes t so by using [H] you are preventing the figure from being placed at the top of the column, so your "question 2" is rather strange. – David Carlisle Feb 11 at 11:00
  • So what is the solution, how to avoid this? – vijay Feb 11 at 15:50
1

you can try something like this:

\documentclass[twocolumn,10pt]{article}%{asme2ej}
\usepackage{graphicx}
\usepackage{stfloats}
\usepackage{adjustbox}
\usepackage{scalerel}

\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{mathtools}
\usepackage{cuted}

\usepackage[Symbol]{upgreek}
\usepackage{epstopdf}
%\usepackage{float}
\usepackage{siunitx}
%\usepackage{caption}
\usepackage{enumitem}

\usepackage{caption}
\usepackage{subcaption}
\captionsetup{compatibility=false}
\usepackage{multirow, tabularx}
\usepackage{tikz}
\usepackage{pifont}
\usepackage{setspace}

\usepackage{multicol}

\usepackage{lipsum}


\begin{document}
\lipsum[1]
 \begin{figure}[htb]
 \centering
  \includegraphics[width=\columnwidth]{example-image}
  \caption{}
  \label{fig:Transition_curves_spring}
 \end{figure}

\lipsum[1]
 \begin{figure}[htb]
 \centering
  \includegraphics[width=\columnwidth]{example-image}
 \caption{}
    \label{fig: Transition_curves_spring}
 \end{figure}

\lipsum[12]
\begin{figure}[!htb]
\setkeys{Gin}{width=\linewidth, height=0.25\textheight}
  \begin{subfigure}{\columnwidth}
    \includegraphics{example-image}
    \caption{Cantilever}
    \label{fig:mode_1_max_beta}
  \end{subfigure}
   \begin{subfigure}{\columnwidth}
    \includegraphics{example-image}
    \caption{Simple Support}
    \label{fig:mode_2_max_beta}
  \end{subfigure}
  \begin{subfigure}{\columnwidth}
    \includegraphics{example-image}
    \caption{Clamped-Clamped }
    \label{fig:mode_3_max_beta}
  \end{subfigure}
  \caption{xxxxx}
  \label{fig:location of max beta}
  \end{figure}

\lipsum[2]
  \begin{table}[tb]
   \caption{}
   \label{table:three spring beam}
   \setlength\tabcolsep{0pt}
  \begin{tabular*}{\linewidth}{@{\extracolsep{\fill}}
                                *{3}{S[table-format=4.0]}
                                     S[table-format=1.4]
                                     S[table-format=1.5]
                                     S[table-format=1.3]
                                     S[table-format=1.4]
                             }
 \hline
  0             & 0     & 0     & 3.142 & 3.140 & 6.281 & 6.2739        \\
  50            & 0     & 0     & 3.458 & 3.461 & 6.382 & 6.374         \\
  0             & 100   & 0     & 0.829 & 0.830 & 6.281 & 6.273         \\
  0             & 0     & 200   & 4.118 & 4.136 & 6.281 & 6.273         \\
  100           & 200   & 0     & 0.812 & 0.813 & 6.456 & 6.449         \\
  300           & 0     & 400   & 4.741 & 4.757 & 6.883 & 6.875         \\
  0             & 500   & 100   & 0.733 & 0.736 & 6.281 & 6.273         \\
  {$\infty$}    & 0     & 1000  & 5.231 & 5.220 & 9.412 & 9.372         \\
  {$\infty$}    & 100   & {$\infty$}    & 1.471 & 1.467 & 7.244 & 7.220 \\
  300           & 800   & 1000  & 0.761 & 0.764 & 6.696 & 6.685         \\
  1000          & 500   & 3000  & 0.918 & 0.922 & 7.007 & 6.990         \\
  500           & 4000  & 800   & 0.525 & 0.527 & 6.837 & 6.824         \\
  {$\infty$}    & $\infty$  & $\infty$  & 0.0046    & 0.00464   & 7.239 & 7.214       \\
  \hline
  \end{tabular*}

    \medskip
 \begin{tabular*}{\linewidth}{@{\extracolsep{\fill}}
                                *{3}{S[table-format=4.0]}
                                *{4}{S[table-format=2.3]}
                             }
  \hline
  0             & 0     & 0     & 9.403 & 9.393 & 12.298    & 12.492        \\
  50            & 0     & 0     & 9.418 & 9.408 & 12.298    & 12.492        \\
  0             & 100   & 0     & 7.857 & 7.830 & 12.273    & 12.492        \\
  0                           & 0                           & 200                         & 9.950                                                            & 9.909         & 13.524                                                           & 13.652        \\
  100                         & 200                         & 0                           & 7.968                                                            & 7.943         & 12.273                                                           & 12.492        \\
  300                         & 0                           & 400                         & 10.049                                                           & 10.009        & 13.617                                                           & 13.734        \\
  0                           & 500                         & 100                         & 7.950                                                            & 7.918         & 13.075                                                           & 13.064        \\
  {$\infty$}    & 0     & 1000          & 13.611    & 13.484    & 15.701    & 15.434    \\
  {$\infty$}    & 100   & {$\infty$}    & 13.122    & 13.071    & 15.720    & 15.490    \\
  300           & 800   & 1000          & 8.325     & 8.297     & 13.173    & 13.130    \\
  1000          & 500   & 3000          & 9.196     & 9.173     & 13.189    & 13.144    \\
  500           & 4000  & 800           & 8.583     & 8.557     & 13.172    & 13.130    \\
  {$\infty$}    & {$\infty$}    & {$\infty$}    & 13.123    & 13.024    & 15.799    & 15.490 \\
  \hline
  \end{tabular*}
  \end{table}

\lipsum[12]
    \begin{figure*}[b]
    \setkeys{Gin}{width=\linewidth, height=0.25\textheight}
\begin{tabularx}{\linewidth}{*{2}{X}}
    \includegraphics{example-image}
    \caption{xxxxx}
    \label{fig:mode shape with three springs}
&
    \includegraphics{example-image}
    \caption{xx}
\\
   \includegraphics{example-image}
   \caption{xxx}
   \label{fig:Transition_curves_mass}
&
  \includegraphics{example-image}
  \caption{xx}
  \label{fig:Linear-rotational spring}
\end{tabularx}
\end{figure*}
\lipsum[2-4]
\end{document}

you should take care that in page (column) is not to much images (standard ratio is 0.3 page should be text). when you have many images for one package, see if you can organize them as is shown for the last four images.

for table i wouldn't avoid use of scalebox, rather reorganize them as shown above.

enter image description here

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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