![テーブルはコードで示されるテキストのポイントに配置されません](https://rvso.com/image/328819/%E3%83%86%E3%83%BC%E3%83%96%E3%83%AB%E3%81%AF%E3%82%B3%E3%83%BC%E3%83%89%E3%81%A7%E7%A4%BA%E3%81%95%E3%82%8C%E3%82%8B%E3%83%86%E3%82%AD%E3%82%B9%E3%83%88%E3%81%AE%E3%83%9D%E3%82%A4%E3%83%B3%E3%83%88%E3%81%AB%E9%85%8D%E7%BD%AE%E3%81%95%E3%82%8C%E3%81%BE%E3%81%9B%E3%82%93.png)
私は LaTeX 初心者です。論文を書いているのですが、次のような状況です:
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.
問題は、この時点でテーブルを配置すると、コンパイラによってこれが次のページの先頭に配置されてしまうことです。
(追記:英語が下手ですみません)
答え1
表形式の資料を「フロート」させたくない場合は (LaTeX の意味で)、 などのフローティング環境に含めないでくださいtable
。LaTeX のフロート配置アルゴリズムに慣れてください。ほとんどの場合、このアルゴリズムは非常に優れています。どうしても必要な場合は、[h!]
配置指定子を指定します。それでも表がページに収まらない場合は、そのページに表を収めるのに十分なスペースが残っていない可能性があります。
追加の提案が 2 つあります。
表形式の資料からすべての垂直線とほとんどの水平線を省略し、
booktabs
パッケージの線描画マクロを使用して残りの水平線を描画します。パッケージの
\num
およびマクロを使用して、それぞれスカラー数と単位付き数を表します。\SI
siunitx
これらの調整を行った結果は、次のスクリーンショットに示されています。
\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}
答え2
[解決] sharelatexガイドに感謝https://it.sharelatex.com/learn/Positioning_images_and_tables- セクション ポジショニング テーブルでは、Mico が提案した h! の代わりにパラメータ H を使用しました。このため、新しいコードは次のようになります。
\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}
皆様、よろしくお願いいたします。