Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Please see the MWE:

\documentclass{JHEP}

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

\begin{document}
\begin{table}
\begin{tabular}{c}
 hello
\end{tabular}
\end{table}

\end{document}

After compiling i got this warning:

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

Why is that? What does this warning mean? Also getting similar warning with \figure enviroment

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

JHEP avaliable here

share|improve this question
    
Use \TABLE{\begin{tabular}{c} ... \end{tabular}} instead, the same holds true for \FIGURE instead of \begin{figure}...\end{figure}. It is a little bit unusual, in my point of view... –  Christian Hupfer May 17 at 15:23
    
It does not really work, "hello" won't deisplayed, and \begin{center} gives error for \documentclass{JHEP} \author{me} \abstract{a} \title{title} \begin{document} \TABLE{ \begin{center} \begin{tabular}{c} hello \end{tabular} \end{center} } \end{document} –  Tomas Carnogursky May 17 at 15:35
    
Well, is "don't publish in JHEP" a valid answer"? /sarcasm –  tohecz May 17 at 18:20
    
@tohecz: I did not say 'do not publish in JHEP';-) –  Christian Hupfer May 17 at 18:23
    
@tohecz,@JosephWright: I found a link: jhep.sissa.it/jhep/help/helpLoader.jsp?pgType=author#file, with a download link to a (presumably) more up-to-date *.sty file named jheppub.sty –  Christian Hupfer May 17 at 18:27

2 Answers 2

up vote 8 down vote accepted

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.

\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

share|improve this answer
3  
Certainly odd: claims GPL license but 'name must change'! –  Joseph Wright May 17 at 18:19
    
@JosephWright: Do you think it would be useful to notice the 'maintainer'? ;-) –  Christian Hupfer May 17 at 18:22
    
@ChristianHupfer Unfortunately i must use JHEP. I think i can live with that warning. –  Tomas Carnogursky May 17 at 18:53

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}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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