Warning: Please use \TABLE{...} in place of LaTeX environment

jhep is a somehow very strange class ;-)

Seriously spoken: I would not use this class if it is not really necessary, but, honestly, I can not provide an alternative however.

Perhaps unrelated, but Change font size in JHEP class document shows that this class is really weird.

\documentclass{jhep}
\usepackage{blindtext}
\author{me}
\abstract{a}
\title{JHEP -- a very strange \LaTeX~ class}



\begin{document}
\blindtext
\TABLE{%
\begin{tabular}{llll}%
1 & 2 & 3 & 4 \tabularnewline
1 & 4 & 9 & 16 \tabularnewline
\end{tabular}%
\caption{Some Table}
}%

\blindtext % Some dummy text, otherwise the table is not shipped out


\end{document}

Notes

  • jhep seems to be up to date (if up to date means 2002/2003) ;-)

  • Tables are somehow wrapped around

  • Shipout of tables/figures seems to be only possible if there is any other content too.

enter image description here

EDIT

With jheppub.sty everything works as expected, please download it from http://jhep.sissa.it/jhep/help/JHEP_TeXclass.jsp

\documentclass{article}
\usepackage{jheppub}
\author{me}
\abstract{a}
\title{JHEPPUB -- a better package}



\begin{document}
\maketitle
\begin{table}
\begin{tabular}{llll}%
1 & 2 & 3 & 4 \tabularnewline
1 & 4 & 9 & 16 \tabularnewline
\end{tabular}%
\caption{Some Table}
\end{table}



\end{document}

enter image description here


Perhapsthe environ package can be used to redefine the table environment:

enter image description here

Notes:

  • The \fbox{} was added to highlight the table in the output.

Code:

\documentclass{class/JHEP}
\usepackage{environ}

\let\table\relax
\let\endtable\relax
\NewEnviron{table}{%
    \TABLE{\BODY}%
}%

\author{me}
\abstract{a}
\title{title}

\begin{document}
Some text before
\begin{table}
\begin{tabular}{c}
 \fbox{hello}
\end{tabular}
\end{table}
Some text after
\end{document}