-1

I want to place this table on entire page. How can do it:

\newlength\origheight
\setlength\origheight{\textheight}

\begin{landscape}

    \begin{table}
        \scalebox{0.7}{
        \begin{tabularx}{\origheight}{@{} >{\bfseries}l *{7}{L} @{}} 

            \toprule
            Protocol name & \textbf{QT} & \textbf{OQTT} & \textbf{STT} 
            & \textbf{BS} & \textbf{CT} & \textbf{QwT} & \textbf{CwT} \\ 
            \midrule

            Protocol feature
            & They use random multi-access way to identify tags. In case of collision, the tags will be asked to send data later with a random time relay.
            & They identify the total number of tags in the interrogation zone. The reader controls every step of the protocol, using commands or queries to split colliding tags into subsets, and further repeatedly split those subsets until identifies all the tags.
            & They are mixture of Aloha and Tree-based protocols. They use two methods. The first is using randomized divisions in Tree-based algorithms, and another is using tree strategies after a collision in Aloha algorithms.
            & It involves transmitting a serial number from the reader to all the tags. Only tags which have equal or lower ID value than the received serial number will respond on request.
            & It is an improvement of QT which uses Bit tracking technology in order to find which bits collided and also where they are.
            & It applies a dynamic bit window to QT. All the tags compare their ID value with the query received and transmit a certain bit amount managed by the reader.
            & It applies the dynamic bit window to CT and adopts two techniques: bit tracking and the bit window.
            \\ \addlinespace
            Disadvantages
            & The reader sends a query and tags, whose ID prefix match that query, respond their full ID.
            & Very complex protocol, uses three technologies. The preprocessing increases the energy consumption of the protocol, especially in dense tag environments.
            & On every collision, the full tag response, apart from the initial query bits, is wasted.
            & The reader restart the reading process after a tag is identified.
            & It wastes a high number of tag bits on every collision, which increases the energy consumed by the reader during the process.
            & When the calculated ws is high, the reader command needs a high number of bits to represent it. That leads to a wastage of the reader bits.
            & Increase the number of reader bits
            \\ \addlinespace
            RTF/TTF 
            & RTF & RTF & RTF & RTF & RTF & RTF & RTF 
            \\
            Efficiency
            & 34.6\% & 61.4\% & 58\% & & 35\% & 80\% & 61\% 
            \\
            System cost 
            & Very low & Very expensive & Expensive & Medium & Low & Medium & Medium
            \\
            Complexity 
            & Very simple & Very high & High & Medium & Simple & Medium & Medium 
            \\
            \bottomrule 
        \end{tabularx}
    }
        \caption{A comparison of tree-based protocols}
        \label{tab:ComparationThree}
    \end{table}
    \end{landscape}

Please look that this table is just on half page. Maybe need to put more words in every row?

enter image description here

John988
  • 83
  • 1
    There's a lot of pertinent information missing: Which document class do you load? Which fonts do you employ, and at which size(s)? How wide and tall is the textblock? Which packages do you load in the preamble? What's the purpose of employing a \scalebox directive? Don't count on people being able to guess correctly. – Mico May 05 '18 at 11:34
  • 1
    Maybe you can provide a full, compilable example that we can just copy and paste to see what is going on instead of just a bit of code we need to turn into a compile document ourselves. Some people lose time and maybe motivation during that process. It is also not entirely clear to me what you exactly want to achieve, are we talking height or width here (bearing in mind things are rotated)? It might just be an example, but the text in your table does not seem particularly suitable for a table to me, it is far too wordy, a table should ideally have few words or numbers in it, not full sentences – moewe May 05 '18 at 11:35
  • 2
    The answer that was given to your earlier query, with a very similar table, did manage to place the entire table on a single page. What about that answer isn't working for you? Please be specific. – Mico May 05 '18 at 11:36
  • 2
    And please consider tagging your future questions correctly. I have personally retagged some of your questions before and some other questions of yours also had to be retagged. If you question is about tables, choose the "tables" tag. It is not about biblatex (a bibliography package) or LaTeX 3 (the expl3 language). – moewe May 05 '18 at 11:36
  • 4
    never apply \scalebox to tables it forces inconsistent font size, and here it also makes the table too small, you specify it to be a as wide as the landscape page but then scale it to 70% of that. – David Carlisle May 05 '18 at 11:38
  • 3
    I just went back through your questions. All seven (7) questions you have asked so far were initially wrongly tagged with biblatex. Six of them with latex3. A few others included other inappropriate tags as well. Appropriate tags help other people find your question and find out whether or not they can/should have a look at it to see if they can answer it. So it is also in your interest to choose the correct tags. I think i mentioned this before on one of your questions. – moewe May 05 '18 at 11:41
  • I used pretty long file for preamble (3 pages of packages..). It is thesis. I have just a problem just to adapt table for one page. I updated picture without "\scalebox" – John988 May 05 '18 at 11:49
  • @John988 please have a look at https://tex.stackexchange.com/questions/425453/why-not-scale-elements-that-contain-text – samcarter_is_at_topanswers.xyz May 05 '18 at 12:53
  • 2
    Two comments: First, if your preamble consists (in part) of three pages' worth of package-loading instructions, you are almost certainly loading far too many packages. Second, having a document with a complicated preamble shouldn't keep you from answering some basic questions: Which fonts do you use? Which font sizes do you use? What's the paper size: A4, US letter, or something else? And, how tall and how wide is the text block? If you can't provide these parameters, do really expect others to be able to guess them correctly? – Mico May 05 '18 at 12:56
  • 3
    the preamble in your original document is not relevant, you should make a small complete document using a minimum number of packages that demonstrates the problem. What do you expect anyone to do with the code you have posted? It is (far) too large to debug by eye and yet you have not provided any way to run it through latex to see the problem, you are expecting anyone offering to help to guess all needed packages and your page size, to see the problem and suggest changes. – David Carlisle May 05 '18 at 13:07
  • 1
    anyway use \small or \footnotesize before the tabular so the font is smaller then it probably fits. – David Carlisle May 05 '18 at 13:08
  • 1
    The code you posted fits just fine on a single page, without resorting to \scalebox, provided that the paper size is "A4", the margins are 2.5cm all around, and the font is Computer Modern at a size of 10pt. If your table does not fit on a page, it must be because one or more of the following conditions are true: (a) your paper size is substantially smaller than "A4"; (b) the margins are substantially wider than 2.5cm; and (c) the font size is larger than 10pt. Unless you tell which of these conditions are met, it's not possible to provide actionable advice on how to fix up your table. – Mico May 05 '18 at 14:02
  • I use A4 and 12pt in the whole text. I don't know what is a problem. How can to add more word in every row since now there are just 2 words. I cannot find where I declare width on every row – John988 May 05 '18 at 15:07
  • 2
    use \small as I said above. – David Carlisle May 05 '18 at 15:29
  • @DavidCarlisle I tried but "save" a little bit more space. Again table can to be correctly placed on page – John988 May 05 '18 at 15:32
  • 3
    you still have not provided an example so it is impossible to help more sorry. – David Carlisle May 05 '18 at 15:43
  • When I implement my code without thesis folder it doesn't work :( I just wont how GENERALLY can increase the number of words in one row. For example to be the first row in my table "They use random" – John988 May 05 '18 at 15:48
  • 2
    to get more words in a row you need to make the page bigger or the font smaller. If \small isn't enough then \footnotesize but it is impossible to give a definite answer if you do not supply a reasonable example. – David Carlisle May 05 '18 at 15:57
  • @DavidCarlisle I think it is not true. If I resize table (add more words in every row) I can make smaller table. – John988 May 05 '18 at 16:19
  • 2
    @John988 - In short, you're willfully ignoring David Carlisle's well-meant and entirely reasonable advice not to use \adjustbox and \resizebox. Are you at all interested in taking advice from an absolute LaTeX expert? If not, why bother ask for LaTeX-related advice in the first place? – Mico May 05 '18 at 17:47
  • Since you have some responses below that seem to answer your question, please consider marking one of them as ‘Accepted’ by clicking on the tickmark below their vote count (see How do you accept an answer?). This shows which answer helped you most, and it assigns reputation points to the author of the answer (and to you!). It's part of this site's idea to identify good questions and answers through upvotes and acceptance of answers. – samcarter_is_at_topanswers.xyz May 28 '18 at 19:20

1 Answers1

3

The following answer "works", but only because I chose the "fill in the blanks" by providing guesses to fill information gaps left wide-open by the OP. E.g., we don't really know how wide and tall the text block is, and we don't know which font is in use. No warranties whatsoever. Buyer beware.

The main changes relative to the OP's code fragment are

  • assumed width of all margins: 2.5cm

  • assumed font: Computer Modern Roman

  • relative font: \small (for a 10% linear reduction in font size relative to \normalsize)

  • less inter-column space: 3pt (default is 6pt)

  • made first column a bit less wide, allocated the saved amount equally to the 7 data columns.

enter image description here

\documentclass[12pt]{article}
\usepackage[a4paper,margin=2.5cm]{geometry} 
\usepackage{pdflscape,booktabs,tabularx,ragged2e}
\newcolumntype{L}{>{\RaggedRight\arraybackslash}X} 
\newlength\mylen
\settowidth\mylen{{\small\textbf{Protocol name}}} % width of 1st col.
\newcolumntype{P}{>{\bfseries\RaggedRight}p{\mylen}}
\usepackage[skip=0.333\baselineskip]{caption}
\begin{document}

%% Save original value of \textheight parameter:
\newlength\origheight
\setlength\origheight{\textheight}

\begin{landscape}
\begin{table}

\frenchspacing % no extra space after "."
\small
\setlength\tabcolsep{3pt} % default: 6pt

\begin{tabularx}{\origheight}{@{} P *{7}{L} @{}} 
\toprule
Protocol name & \textbf{QT} & \textbf{OQTT} & \textbf{STT} 
& \textbf{BS} & \textbf{CT} & \textbf{QwT} & \textbf{CwT} \\ 
\midrule

Protocol feature
& They use random multi-access way to identify tags. In case of collision, the tags will be asked to send data later with a random time relay.
& They identify the total number of tags in the interrogation zone. The reader controls every step of the protocol, using commands or queries to split colliding tags into subsets, and further repeatedly split those subsets until identifies all the tags.
& They are mixture of Aloha and Tree-based protocols. They use two methods. The first is using randomized divisions in Tree-based algorithms, and another is using tree strategies after a collision in Aloha algorithms.
& It involves transmitting a serial number from the reader to all the tags. Only tags which have equal or lower ID value than the received serial number will respond on request.
& It is an improvement of QT which uses Bit tracking technology in order to find which bits collided and also where they are.
& It applies a dynamic bit window to~QT. All the tags compare their ID value with the query received and transmit a certain bit amount managed by the reader.
& It applies the dynamic bit window to~CT and adopts two techniques: bit tracking and the bit window.
\\ \addlinespace
Disadvantages
& The reader sends a query and tags, whose ID prefix match that query, respond their full~ID.
& Very complex protocol, uses three technologies. The preprocessing increases the energy consumption of the protocol, especially in dense tag environments.
& On every collision, the full tag response, apart from the initial query bits, is wasted.
& The reader restart the reading process after a tag is identified.
& It wastes a high number of tag bits on every collision, which increases the energy consumed by the reader during the process.
& When the calculated ws is high, the reader command needs a high number of bits to represent it. That leads to a wastage of the reader bits.
& Increase the number of reader bits
\\ \addlinespace
RTF/TTF 
& RTF & RTF & RTF & RTF & RTF & RTF & RTF 
\\
Efficiency
& 34.6\% & 61.4\% & 58\% & & 35\% & 80\% & 61\% 
\\
System cost 
& Very low & Very expensive & Expensive & Medium & Low & Medium & Medium
\\
Complexity 
& Very simple & Very high & High & Medium & Simple & Medium & Medium 
\\
\bottomrule 
\end{tabularx}
\caption{A comparison of tree-based protocols}
\label{tab:ComparationThree}
\end{table}
\end{landscape}
\end{document}
Mico
  • 506,678
  • Again can to fit the whole table. In preamble I found "\LoadClass[dvips, a4paper]{book}". @Mico maybe to try to resize row width and will have smaller table – John988 May 05 '18 at 16:15
  • 2
    @John988 - Changing the argument of \documentclass from article to book makes absolutely no difference for the table itself. The only way to "resize" -- I assume that you mean "increase" -- the row widths is to decrease the document's margins. Since that's one piece of information that you appear to be loathe to share despite repeated requests by David, myself, and others, I am utterly unable to offer any additional advice at this time. – Mico May 05 '18 at 17:01