3

Writing code for two tables and I want to start 2nd table right way the end of 1st table. But 2nd table is starting from the 2nd page keeping large space on the 1st page. I want to strictly start the 2nd table and if the part of the table need to go beyond the 1st page its ok to split.

How can I do so?

Here is my current situation,

enter image description here

For code,

\subsubsection{Classifications}

\noindent
(i) Based on the type of battery RFID tags can be of three types:

\begin{table}[H]
\centering
\small
  \begin{tabular}{ |c|p{3cm}|p{9cm}|}
    \hline
    \thead{Ser} &  \thead{Item} & \thead{Detail}
    \\ \hline
        1. & Active & \begin{itemize}[nosep]
                        \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{itemize} \\ \hline
        2. & Passive & \begin{itemize}[nosep]
                        \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{itemize}  \\ \hline
        3. & Semi passive/ Battery Assisted Passive (BAP) & \begin{itemize}[nosep]
                        \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{itemize}  \\ \hline
     \end{tabular}
  \end{table}

  \newpage

  \noindent
  (ii) Based on the mode of operation tags can be of three types:

 \begin{table}[H]
\centering
\small
  \begin{tabular}{ |c|p{3cm}|p{9cm}|}
    \hline
    \thead{Ser} &  \thead{Item} & \thead{Detail}
    \\ \hline
        1. & Read-only & \begin{itemize}[nosep]
                        \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{itemize} \\ \hline
        2. & Read-write & \begin{itemize}[nosep]
                        \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{itemize}  \\ \hline
        3. & WORM & \begin{itemize}[nosep]
                        \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
            \item It can write data only once, after that works as read only
                     \end{itemize}  \\ \hline
     \end{tabular}
  \end{table}
  • 1
    you are using [H] which by design gives massive white spaces rather than move the table. – David Carlisle Mar 13 '20 at 18:03
  • 2
    both table and tabluar form unbreakable boxes that do not split over a page break. a normal float would move the table to a suitable place but as you have used [H] then you force latex to leave a space. – David Carlisle Mar 13 '20 at 18:05
  • If I use float wont that leave space if space is not enough to fit? @DavidCarlisle – Sazzad Hissain Khan Mar 13 '20 at 18:10
  • 1
    the idea of a float is that it is taken out of the document flow and re-inserted (typically at the top of a page) there is no forced page break needed and any following text in the document would naturally fill the page. [H] disables the floating mechanism. – David Carlisle Mar 13 '20 at 18:13
  • Do you really need two tables to display this information? Why don't you use two enumerate environments with 3 items each and nest an itemize environment in each item? This will most likely save some space and also allow for page breaks if necessary. – leandriis Mar 13 '20 at 18:17
  • @leandriis is it possible to show with an MWE what you are suggesting. – Sazzad Hissain Khan Mar 13 '20 at 18:22
  • 1
    Sure. I'll do so later when I have access to a device with latex again. – leandriis Mar 13 '20 at 18:24
  • 2
    Why you not consider answer on your previous question: https://tex.stackexchange.com/questions/531952/nosep-not-compacting-items-inside-table-as-expected ? – Zarko Mar 13 '20 at 18:46
  • @Zarko did you see the updated version of my previous query? I am still having issues for the problem I referred in that post https://tex.stackexchange.com/questions/531952/nosep-not-compacting-items-inside-table-as-expected – Sazzad Hissain Khan Mar 14 '20 at 02:18
  • I saw this question. I also saw excellent @Mico's answer on it. So far you not reacted on it. As far as I see, this answer solve your problem. Actually, he repeat it below. Sorry, your question becomes even more unclear, what is your problem. – Zarko Mar 14 '20 at 04:48

3 Answers3

5

Here is my suggestion using enumerate with nested itemize environments:

enter image description here

\documentclass{article}
\usepackage{enumitem}
\setlist[itemize,1]{nosep, leftmargin=15pt}
\begin{document}

\subsubsection{Classifications}

\noindent
(i) Based on the type of battery RFID tags can be of three types:

\begin{enumerate}
  \item Active 
      \begin{itemize}
           \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{itemize}
  \item Passive 
      \begin{itemize}
           \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{itemize} 
  \item Semi passive/ Battery Assisted Passive (BAP) 
      \begin{itemize}
           \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{itemize}
\end{enumerate}

  \noindent
  (ii) Based on the mode of operation tags can be of three types:


\begin{enumerate}
  \item Read-only 
      \begin{itemize}
           \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
      \end{itemize}
  \item Read-write 
      \begin{itemize}
           \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{itemize} 
  \item WORM 
      \begin{itemize}
           \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
           \item It can write data only once, after that works as read only
       \end{itemize}
\end{enumerate}

\end{document}
Sebastiano
  • 54,118
leandriis
  • 62,593
3

Some suggestions and observations:

  • You're not really making use of the table environment; e.g., you don't employ \caption directives. Shat little functionality of the table environment you do use, you then negate by using the [H] placement specifier. I suggest you use two separate minipage environments instead; that way, a page break can occur, if needed.

  • As in your earlier query, you're employing the nosep option of the enumitem package, but not doing much else in terms of making the displayed material crisp and compact. Below, I set up a custom itemize-style environment and employ tabularx environments.

enter image description here

\documentclass{article} % or some other suitable document class

\usepackage{makecell} % for "\thead" macro

%% Ragged-right rather than full justification in narrow columns:
\usepackage{tabularx,ragged2e}
\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}} }

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

\begin{document}
\subsubsection{Classifications}

\noindent
\begin{minipage}{\textwidth}
\setlength\extrarowheight{2pt} % for a more open "look"
\small
(i) Based on the type of battery RFID tags can be of three types:

\begin{tabularx}{\textwidth}{ |c|P{\mylen}|L| }
\hline
Ser &  \thead{Item} & \thead{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{minipage}

\bigskip
\noindent
\begin{minipage}{\textwidth}
\setlength\extrarowheight{2pt}  % for a more open "look"
\small
(ii) Based on the mode of operation tags can be of three types:

\begin{tabularx}{\textwidth}{ |c|P{\mylen}|L| }
\hline
Ser &  \thead{Item} & \thead{Detail}
\\ \hline
1. & Read-only  
   & \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. & Read-write 
   & \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. & WORM 
   & \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
     \item It can write data only once, after that works as read only
     \end{myitemize}  
\\ \hline
\end{tabularx}
\end{minipage}

\end{document}
Mico
  • 506,678
2

To long for a comment ...

From received answer from your previous question you should learned the following:

  • Use of the package enumerate not enable enough possibilities for improving your table design. Therefore in received answer is suggested to use enumitem package instead of it.
  • Better and simpler utilization of available space for your table can be achieved by use of the ˙tabularx` table environment. It enable, that the width of the last column of your table is automatically adopted to available width for the table.
  • Instead of your rude solution for itemize list in table is suggested very cleaver solution based on the enumitem package.
  • If you still have problem with suggested solution, you should note answerer (@Mico), which part of the your problem has been unresolved. You just ask again almost the same question (difference is only in used table placement specifier) without considering/mentioned the answer you got.

Frankly said, your question is not very clear (see comments on it). Lack of MWE (Minimal Working Example), which would give us more insights in your document (pages layout, what is text indexed with (i) /is this part of some enumeration?/, etc), left people who like to help you to guessing.

I strongly encourage you to edit your question and in it clarify at least the following:

  • that question is follow up question to your previous question
  • what is the new problem
  • illustrate this problem with MWE (complete small document beginning with \documentclass[...]{...} and ending with \end{document}, which demonstrate/reproduce your problem
  • why received answers on this question not solve your problem

So far I estimate, that your question is unclear. Consequently I suggest to close it if you will not clarify your problem better.

Zarko
  • 296,517
  • Thanks for your help. I have posted a fresh question with complete minimal workable example which arises after I applied your solution on previous post. You can find the new post here (https://tex.stackexchange.com/q/532522/200866). Might not be related to your solution but requesting your suggestion. – Sazzad Hissain Khan Mar 14 '20 at 07:10