1

I'm new in Latex. I'm writing my thesis and i have this situation:

texttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttext**:**
\begin{table}[h]
\begin{center} 
\noindent\begin{tabular}{|c|c|c|}
     \hline
     \rowcolor{gray!50}
     \bfseries Specifiche Tecniche & \bfseries Bluetooth BR & \bfseries Bletooth Low Energy \\
     \hline
     Frequenza & Tra $2400$ e $2483.5$ MHz & Tra $2400$ e $2483.5$ MHz \\
     \hline
     Data Channel & $79$ & $37$ \\
     \hline
     Advertising Channel & $32$ & $3$ \\
     \hline
     Criptaggio & $64/128 bit$ & AES $128$ bit \\
     \hline
     Range & $100$ m & $> 100$m \\
     \hline
     Throughput & $0.7-2.1$ Mbit/s & $< 0.3$ Mbit/s \\
     \hline
     Latenza di Connessione &   $ \approx 100$ ms   & $6$ ms \\
     \hline
     Tempo minimo di invio dati & $100$ ms & $3$ ms \\
     \hline
     Potenza di consumo & $1$ W & Tra $0.01$ a $0.5$ W \\
     \hline
     Picco di corrente  & $22-40$ mA & $10-30$ mA \\
     \hline
\end{tabular}
\caption[Differenze tra Bluetooth BR \& Bluetooth 4.0]{Differenze tra Bluetooth BR \& Bluetooth 4.0}
\label{tab:my_label}
\end{center}
\end{table} \\
othertextothertextothertextothertextothertextothertextothertextothertextothertextothertextothertextothertextothertextothertextothertextothertextothertextothertextothertextothertextothertextothertextothertextothertextothertextothertextothertextothertext.

The problem is that i would the table in this point, by the compiler position this at the beginning of the next page.

(PS: sorry for my bad english)

Zarko
  • 296,517

2 Answers2

2

If you don't want tabular material to "float" (in the LaTeX sense of the word), don't encase it in a floating environment such as table. Do learn to live with LaTeX's float placement algorithm -- more often than not, it is very good. If you must, provide the [h!] positioning specifier. If the table still won't fit on the page, there probably just isn't enough space left on that page to fit the table.

I have two additional suggestions:

  • Omit all vertical lines and most horizontal lines from the tabular material, and use the line-drawing macros of the booktabs package to draw the remaining horizontal lines.

  • Use the \num and \SI macros of the siunitx package to denote scalar numbers and numbers with units, respectively.

The results of making these adjustments are shown in the following screenshot.

enter image description here

\documentclass{article}
\usepackage{booktabs}
\usepackage[table]{xcolor}
\usepackage[binary-units,per-mode=symbol]{siunitx}
\usepackage[italian]{babel}
\begin{document}

\begin{table}[h!]
\renewcommand\arraystretch{1.1}
\setlength\tabcolsep{5pt} % default: 6pt
\centering % not '\begin{center}...\end{center}'
\begin{tabular}{lcc}
\rowcolor{gray!30}
\bfseries Specifiche Tecniche & \bfseries Bluetooth BR & \bfseries Bluetooth Low Energy \\ 
\addlinespace

Frequenza  & \num{2400}--\SI{2483.5}{\mega\hertz} &  \num{2400}--\SI{2483.5}{\mega\hertz} \\

Data Channel & 79 & 37 \\

Advertising Channel & 32 & 3 \\

Criptaggio & \SI{64/128}{\bit} & AES \SI{128}{\bit} \\

Range & \SI{100}{\meter} & ${}>\SI{100}{\meter}$ \\

Throughput & \num{0.7}--\SI{2.1}{\mega\bit\per\second} & ${}< 0.3$ Mbit/s \\

Latenza di Connessione & ${}\approx \SI{100}{\milli\second}$  & \SI{6}{\milli\second} \\

Tempo minimo di invio dati & \SI{100}{\milli\second} & \SI{3}{\milli\second} \\

Potenza di consumo & \SI{1}{\watt} & \num{0.01}--\SI{0.5}{\watt} \\

Picco di corrente  & \num{22}--\SI{40}{\milli\ampere} & \num{10}--\SI{30}{\milli\ampere} \\
\bottomrule
\end{tabular}
\caption[Differenze tra Bluetooth BR e Bluetooth 4.0]{Differenze tra Bluetooth BR e Bluetooth 4.0}
\label{tab:my_label}
\end{table} 
\end{document}
Mico
  • 506,678
0

[RESOLVE] Thanks to guide sharelatex https://it.sharelatex.com/learn/Positioning_images_and_tables - section Positioning tables I have used the param H instead h! suggested by Mico. For this my new code is:

 \begin{table}[H]
\centering
\begin{tabular}{|c|c|c|}
     \hline
     \rowcolor{gray!50}
     \bfseries Specifiche Tecniche & \bfseries Bluetooth BR & \bfseries Bletooth Low Energy \\
     \hline
     Frequenza & Tra $2400$ e $2483.5$ MHz & Tra $2400$ e $2483.5$ MHz \\
     \hline
     Data Channel & $79$ & $37$ \\
     \hline
     Advertising Channel & $32$ & $3$ \\
     \hline
     Criptaggio & $64/128 bit$ & AES $128$ bit \\
     \hline
     Range & $100$ m & $> 100$m \\
     \hline
     Throughput & $0.7-2.1$ Mbit/s & $< 0.3$ Mbit/s \\
     \hline
     Latenza di Connessione &   $ \approx 100$ ms   & $6$ ms \\
     \hline
     Tempo minimo di invio dati & $100$ ms & $3$ ms \\
     \hline
     Potenza di consumo & $1$ W & Tra $0.01$ a $0.5$ W \\
     \hline
     Picco di corrente  & $22-40$ mA & $10-30$ mA \\
     \hline
\end{tabular}
\caption[Differenze tra Bluetooth BR \& Bluetooth 4.0]{Differenze tra Bluetooth BR \& Bluetooth 4.0}
\label{tab:my_label}

\end{table}

best regards and thank you all

  • 1
    You will sooner or later see, that this is not good solution but source of new problems. Far better is Mico solution. With [H] you actually jeopardize basic precedence of LaTeX ... – Zarko Feb 24 '16 at 14:39