如何避免表格浮动在部分文本之上?

如何避免表格浮动在部分文本之上?

回答Mico 通过减少项目之间的空间将两个表格放在单个页面中。

代码

\documentclass{article}

\usepackage{layout}
\usepackage{tabularx,ragged2e}

\usepackage{geometry}
\geometry{margin=1.5in}

%% Ragged-right rather than full justification in narrow columns:
\newcolumntype{P}[1]{>{\RaggedRight\arraybackslash}p{#1}}
\newcolumntype{L}{>{\RaggedRight\arraybackslash}X}

% Create a bespoke itemize-type list environment

\usepackage{enumitem}
\newlist{myitemize}{itemize}{1}
\setlist[myitemize]{label=\textbullet, nosep, left=0pt,
                    before={\begin{minipage}[t]{\hsize}},
                    after ={\end{minipage}} }

\usepackage{caption} % for "\caption*" macro
\captionsetup{skip=0.333\baselineskip,
              justification=RaggedRight,
              singlelinecheck=false}

% Calculate width of second column:
\newlength\mylen
\settowidth\mylen{Battery Assisted}

\begin{document}
\section{Classification of RFID}
\begin{table}
\setlength\extrarowheight{2pt} % for a less "cramped look
\caption*{(i) Based on the type of battery, RFID tags can be of three types:}
%\small  % not needed
\begin{tabularx}{\textwidth}{| c | P{\mylen} | L |}
    \hline
    Ser & Item & Detail \\ 
    \hline
    1. & Active & 
          \begin{myitemize}
          \item Has its own transmitter and power source (Battery)
          \item Transmits signal from the microchip circuit through the power obtained from the internal battery
          \item High signal range
          \item Larger in size
          \item Expensive than passive
          \item The batteries must be replaced periodically
          \end{myitemize} \\ 
    \hline
    2. & Passive
       & \begin{myitemize}
         \item Operate without a separate external power source
         \item Obtains operating power from the reader
         \item Low signal range
         \item Cheaper than active tags
         \item Smaller in size
         \end{myitemize}  \\ 
    \hline
    3. & Semi passive\slash Battery Assisted Passive (BAP) 
       & \begin{myitemize}
        \item Has a small battery and is activated when in the presence of an RFID reader
        \item Communication method is same as the passive tag
        \end{myitemize}  \\ 
    \hline
\end{tabularx}
\end{table}

\begin{table}
\setlength\extrarowheight{2pt} % for a less "cramped look
\caption*{(i) Based on the type of battery, RFID tags can be of three types:}
%\small  % not needed
\begin{tabularx}{\textwidth}{| c | P{\mylen} | L |}
    \hline
    Ser & Item & Detail \\ 
    \hline
    1. & Active & 
          \begin{myitemize}
          \item Has its own transmitter and power source (Battery)
          \item Transmits signal from the microchip circuit through the power obtained from the internal battery
          \item High signal range
          \item Larger in size
          \item Expensive than passive
          \item The batteries must be replaced periodically
          \end{myitemize} \\ 
    \hline
    2. & Passive
       & \begin{myitemize}
         \item Operate without a separate external power source
         \item Obtains operating power from the reader
         \item Low signal range
         \item Cheaper than active tags
         \item Smaller in size
         \end{myitemize}  \\ 
    \hline
    3. & Semi passive\slash Battery Assisted Passive (BAP) 
       & \begin{myitemize}
        \item Has a small battery and is activated when in the presence of an RFID reader
        \item Communication method is same as the passive tag
        \end{myitemize}  \\ 
    \hline
\end{tabularx}
\end{table}
\end{document}

输出

在此处输入代码

这很有效。但是,当我在开头添加部分时,\begin{document}第一个表格会超出部分标题,而第二个表格会留在下一页,尽管看起来有足够的空间来容纳所有内容。

添加部分

...
\begin{document}
\section{Classification of RFID}
\begin{table}
...

新输出

在此处输入图片描述

  1. 第一页底部的大片空白对我来说看起来很奇怪。
  2. 章节标题应位于顶部。

我该如何处理这种情况?

相关内容