1

The "jfm.cls" code you can get in http://journals.cambridge.org/data/relatedlink/jfm-ifc.zip

And the table redefined is as follows in "jfm.cls"

\newcounter{table}
\renewcommand\thetable{\@arabic\c@table}
\def\fps@table{tp}
\def\ftype@table{1}
\def\ext@table{lot}
\newcommand\tablename{Table}
\def\fnum@table{\tablename~\thetable}

\newif\iffollowon
\newif\ifrmrule

\newcommand\followon{\global\followontrue}
\newcommand\norule{\global\rmruletrue}

\newenvironment{table}
  {\@float{table}\fstyle@table
   \iffollowon \else \vspace*{9.5\p@}\fi
   \global\followonfalse
   \rule{\textwidth}{.5\p@}\vskip\floatsep\relax}
  {\ifrmrule \global\rmrulefalse \else \rule{\textwidth}{.5\p@}\fi
   \end@float}


\newenvironment{table*}{\@dblfloat{table}\fstyle@table}{\end@dblfloat}
\newenvironment{plaintable}{\@float{table}\fstyle@table}{\end@float}

\def\fstyle@table{\normalfont\small\rmfamily}
\def\fjust@table{\centering}
\def\fcapjust@table{\centering}
\def\fcapsize@table{\normalfont\small\scshape}
\def\fcapstyle@table{\normalfont\small\rmfamily}

And when I use the table, it always on the top. How to edit to not be float or other way to make it below the section title.

enter image description here

And the code is

% This is file according to the JFM2esam.tex
% Copyright (C) 1996, 1997 Cambridge University Press

\NeedsTeXFormat{LaTeX2e}

\documentclass{jfm}

\usepackage{graphicx}
\usepackage{natbib}


\title[Guidelines for authors]{Guidelines for authors and submission template}

\author[A. N. Other, H.-C. Smith and J. Q. Public]%
{Alan N. Other$^1$%
  \thanks{Email address for correspondence: [email protected]},\ns
H. - C. Smith$^1$\break
and J. Q.  Public$^2$}

% NOTE: A full address must be provided: department, university/institution, town/city, zipcode/postcode, country.
\affiliation{$^1$Department of Chemical Engineering, University of America,
Somewhere, IN 12345, USA\\[\affilskip]
$^2$Department of Aerospace and Mechanical Engineering, University of
Camford, Academic Street, Camford CF3 5QL, UK}

\pubyear{2010}
\volume{650}
\pagerange{119--126}
% Do not enter received and revised dates. These will be entered by the editorial office.
\date{?; revised ?; accepted ?. - To be entered by editorial office}
%\setcounter{page}{1}
\begin{document}

\maketitle

\begin{abstract}
This file contains instructions for authors planning to submit a paper to the {\it Journal of Fluid Mechanics}. These instructions were generated in {\LaTeX} using the JFM style, so the {\LaTeX} source file can be used as a template for submissions. The present paragraph appears in the \verb}abstract} environment. All papers should feature a single-paragraph abstract of no more than 250 words, which provides a summary of the main aims and results.
\end{abstract}

\begin{keywords}
Authors should not enter keywords on the manuscript, as these must be chosen by the author during the online submission process and will then be added during the typesetting process (see http://journals.cambridge.org/data/\linebreak[3]relatedlink/jfm-\linebreak[3]keywords.pdf for the full list)
\end{keywords}

\section{How to submit to the \textbf{\textit{Journal of Fluid Mechanics}}}
Authors must submit using the online submission and peer review system, Scholar One Manuscripts (formerly Manuscript Central) at http://mc.manuscriptcentral.com/jfm. If visiting the site for the first time, users must create a new account by clicking on `register here'. Once logged in, authors should click on the `Corresponding Author Centre', from which point a new manuscript can be submitted, with step-by-step instructions provided. Authors must at this stage specify whether the submission is a standard paper, or a {\it JFM Rapids} paper (see  for more details). In addition, authors must specify an editor to whom the paper will be submitted from the drop-down list provided. Note that all editors exclusively deal with either standard papers or {\it JFM Rapids} (clearly indicated on the list), so please ensure that you choose an editor accordingly. Once your submission is completed you will receive an email confirmation.  Book reviews should not be submitted via the online submission site and should instead be submitted by email to [email protected].

\section{Rules of submission}\label{sec:rules_submission}
Submission of a paper implies a declaration by the author that the work has not previously been published, that it is not being considered for publication elsewhere and that it has not already been considered by a different editor of the Journal. Note that a report on a conference must be submitted within 3 months of the meeting.

\section{Types of paper}\label{sec:types_paper}
\subsection{Standard papers}
Regular submissions to JFM are termed `standard papers'. Note that such papers must contain original research, as review articles are not published in JFM. Papers should be written in a concise manner; though JFM has no page limit, each paper will be judged on its own merits, and those deemed excessive in length will be rejected or will require significant revision.
\subsection{JFM Rapids}
{\it JFM Rapids} is an evolution of the Fast Track scheme, and is devoted to the rapid publication of short, high-impact papers across the full range of fluid mechanics. {\it Rapids}  must occupy 10 or fewer printed pages, and must be submitted in {\LaTeX} using the jfm.cls class file, so as to ensure that they meet the page limit and to expedite their production.  The principal and over-riding objective is to publish papers of the highest scientific quality. Once a paper is submitted, referees are asked to provide reports with a short turnaround.  In order to be accepted for publication in {\it JFM Rapids}, such papers must require only minor revisions to improve clarity, usually without recourse to a second round of refereeing.  Where the editor, guided by the referees, judges that a paper has merit but requires substantial revision that will require significant refereeing, a decision of `revise and resubmit' will be given. On re-submission, such papers will be handled as standard JFM papers and will not subsequently appear as {\it JFM Rapids}.

{\it Rapids} will be published online within one month of final acceptance.  They will appear within a new devoted section on the Journal of Fluid Mechanics website, which has been re-designed as part of this development. Each {\it Rapid} will still be cited and indexed as a JFM article but with a distinctive {\it Rapids} identifier, and will be assigned to a JFM volume. {\it Rapids} will not be included in the regular print versions of JFM, but a collection of all {\it Rapids} will be available to order in print at the end of each year. {\it JFM Rapids} will have free colour and for the first year of operation will be freely accessible to all.


\appendix
\section{}\label{appA}

\begin{table}
  \begin{center}
\def~{\hphantom{0}}
  \begin{tabular}{lccc}
      $a/d$  & $M=4$   &   $M=8$ & Callan  \\[3pt]
       0.1   & 1.56905 & ~~1.56~ & 1.56904\\
       0.3   & 1.50484 & ~~1.504 & 1.50484\\
       0.55  & 1.39128 & ~~1.391 & 1.39131\\
       0.7   & 1.32281 & ~10.322 & 1.32288\\
       0.913 & 1.34479 & 100.351 & 1.35185\\
  \end{tabular}
  \caption{Values of $kd$ at which trapped modes occur when $\rho(\theta)=a$}
  \label{tab:kd}
  \end{center}
\end{table}



\end{document}

Then I get the advice from @masu it makes the table below,but get more empty space like above enter image description here

@masu solve the question. Then if I add the \newpage, it just make the table bottom like this. How can it be solved.

enter image description here

5
  • 1
    Which document class do you use? The standard LaTeX document classes (article, report, and book) as well as many other document classes all define a counter named table and an environment named table. Using your code with one of these document classes throws an immediate error message that the counter \c@table has already been defined.
    – Mico
    Commented Nov 19, 2013 at 12:56
  • @Mico Ok, I refine the question. two extra document including "jfm.bst", and "jfm.cls" Commented Nov 20, 2013 at 1:23
  • @Mico How can I upload files Commented Nov 20, 2013 at 1:31
  • Since it would appear that you've already managed to download and unpack the zip file that contains jfm.bst and jfm.cls, just locate these two files and copy them to the directory that contains your main TeX documents.
    – Mico
    Commented Nov 20, 2013 at 9:51
  • @Mico Yes, I have already done this, but my problem is to put the table not float or below the section. Commented Nov 20, 2013 at 13:13

1 Answer 1

3

If that's an official journal cls file, you shouldn't change it. I suppose it is.

Here is a nice and easy solution which leaves the class definition as it is right now, but won't let the floats from appendix go before it actually begins.

Use the \FloatBarrier macro of the placeins package. If you put it right before the section title, it will prevent floats to go over it.


I'm not really sure this works all the time, but fixes your problem for this exact cause.

\usepackage{xpatch}
\makeatletter
\xpatchcmd{\@float}{\csname fps@#1\endcsname}{b!}{}{}
\makeatother

If you want to change the behavior only at certain places:

  1. Put this in your preamble:

    \usepackage{xpatch}
    
  2. Put these around the place where you want to force bottom alignment:

    \makeatletter
    \let\@float@original\@float
    \xpatchcmd{\@float}{\csname fps@#1\endcsname}{b!}{}{}
    \makeatother
    

    ...

    \makeatletter
    \let\@float\@float@original
    \makeatother
    
5
  • it makes the table below,but get more empty space like above Commented Nov 20, 2013 at 13:09
  • @ytyyutianyun yes, it'll be top aligned, because the cls file makes all tables top aligned. Do you really want to change the expected behavior of the journal cls?
    – masu
    Commented Nov 20, 2013 at 13:20
  • Yes, @masu it makes the table bottom.Thank you. Then if I add the \newpage before \appendix. How can I put this below. Commented Nov 21, 2013 at 2:37
  • 1
    @ytyyutianyun Sorry, but: What? What do you want below what? If you want the image below the section title, but on the top of the area, use h! instead of b!. But that's float placement only.
    – masu
    Commented Nov 21, 2013 at 7:58
  • Thank you @masu, I get what I want \xpatchcmd{\@float}{\csname fps@#1\endcsname}{h!}{}{} is useful. (^o^)/YES! Commented Nov 21, 2013 at 9:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .