Ciao a tutti,
sono un principiante di Latex e sto scrivendo la mia tesi di dottorato con winedit e miktex 2.9. Al momento ho un problema con le tabelle. Ho la necessità di inserire due tabelle una sotto altra ma ho cercato in rete diversi manuali e non sono riuscito a fare questa cosa. Le due tabelle mi vengono inserite sempre una di fianco all’altra. Vi riporto il codice che sto usando ora:`
\begin{table}[!h]
\caption{Values of the elements used in the filter presented in \figurename \ \ref{fig:fig37}.} % title of Table
\begin{center}
%\centering % used for centering table
\scalebox{0.7}{%
\subtable{%
\begin{tabular}{c|c|c|c|c|c|c|c|c|c|c} % centered columns (10 columns)
\hline %inserts double horizontal lines
$\mathbf{R_{in}}$ & $\mathbf{R_{out}}$ & $\mathbf{C_{in}}$ & $\mathbf{C_{out}}$ & $\mathbf{C_{23}}$ & $\mathbf{C_{m1}=C_{m3}}$ & $\mathbf{C_{m2}=C_{m4}}$ & $\mathbf{L_{m1}=L_{m3}}$ & $\mathbf{L_{m2}=L_{m4}}$ & $\mathbf{f_{s1}=f_{s3}}$ & $\mathbf{f_{s2}=f_{s4}}$ \\ % inserts table
\hline\hline % inserts single horizontal line
19.5 $\Omega$ & 43.2 $\Omega$ & 0.82 pF & 0.37 pF & 0 pF & 0.02362 pF & 0.02243 pF & 183 nH & 177.8 nH & 2.421 GHz & 2.52 GHz \\
\hline %inserts single line
\end{tabular}}\qquad
\subtable{%
\begin{tabular}{c|c|c|c|c|c|c|c|c|c} % centered columns (10 columns)
\hline %inserts double horizontal lines
$\mathbf{L_{ser1}}$ & $\mathbf{L_{ser2}}$ & $\mathbf{L_{ser3}}$ & $\mathbf{L_{ser4}}$ & $\mathbf{C_0/C_m}$ & $\mathbf{R_s}$ & $\mathbf{L_{in}}$ & $\mathbf{L_{out}}$ & $\mathbf{Q_{x}}$ & $\mathbf{Q_{L_{in}}=Q_{L_{out}}=Q_{L_{ser}}}$\\
\hline\hline % inserts single horizontal line
0 nH & 1.19 nH & 0 nH & 3.46 nH & 22 & 2.83 $\Omega$ & 1.86 nH & 0.09 nH & 1000 & 50 \\
\hline %inserts single line
\end{tabular}}
\label{table:tab15}} % is used to refer this table in the text
\end{center}
\end{table}
`Chi mi dice dove sbaglio?
GrazieBenvenuto. Gli errori però sono numerosissimi, temo.
1. Non usare il pacchetto subfigure, ma subfig (il comando diventa \subfloat e non più \subtable}; nel tuo caso non serve a nulla.
2. Le tabelle riquadrate sono orribili.
3. I pedici del tipo “out” vanno in tondo
4. Non si deve usare l’ambiente center dentro table
5. L’opzione !h all’ambiente table è perniciosa.
6. Se una tabella non ci sta, rimpicciolirla oltre certi limiti è assurdo
7. Le unità di misura vanno specificate in modo corretto con il pacchetto siunitx
Vediamo come si può migliorare la resa caricando i pacchetti booktabs, amsmath e siunitx:
`\documentclass[a4paper]{article}
\usepackage{booktabs,amsmath,siunitx}
\begin{document}\begin{table}
\caption{Values of the elements used in the filter presented in
\figurename~\ref{fig:fig37}.}\label{table:tab15}\centering
\begin{tabular}{*{7}{c}}
\toprule
$\mathbf{R}_\textup{in}$ &
$\mathbf{R}_\textup{out}$ &
$\mathbf{C}_\textup{in}$ &
$\mathbf{C}_\textup{out}$ &
$\mathbf{C}_{23}$ &
$\mathbf{C}_\textup{m1}=\mathbf{C}_\textup{m3}$ &
$\mathbf{C}_\textup{m2}=\mathbf{C}_\textup{m4}$ \\
\midrule
\SI{19.5}{\ohm}& \SI{43.2}{\ohm}& \SI{0.82}{pF} & \SI{0.37}{pF} &
\SI{0}{pF} & \SI{0.02362}{pF} & \SI{0.02243}{pF} \\
\bottomrule
\end{tabular}\medskip
\begin{tabular}{*{5}{c}}
\toprule
$\mathbf{L}_\textup{m1}=\mathbf{L}_\textup{m3}$ &
$\mathbf{L}_\textup{m2}=\mathbf{L}_\textup{m4}$ &
$\mathbf{f}_\textup{s1}=\mathbf{f}_\textup{s3}$ &
$\mathbf{f}_\textup{s2}=\mathbf{f}_\textup{s4}$ \\
\midrule
\SI{183}{nH} & \SI{177.8}{nH} & \SI{2.421}{GHz} & \SI{2.52}{GHz} \\
\bottomrule %inserts single line
\end{tabular}\medskip
\begin{tabular}{*{6}{c}}
\toprule
$\mathbf{L}_\textup{ser1}$ &
$\mathbf{L}_\textup{ser2}$ &
$\mathbf{L}_\textup{ser3}$ &
$\mathbf{L}_\textup{ser4}$ &
$\mathbf{C}_0/\mathbf{C}_\textup{m}$ &
$\mathbf{R}_\textup{s}$ \\
\midrule
\SI{0}{nH} & \SI{1.19}{nH} & \SI{0}{nH} & \SI{3.46}{nH} & 22 & \SI{2.83}{\ohm} \\
\bottomrule
\end{tabular}\medskip
\begin{tabular}{*{4}{c}}
\toprule
$\mathbf{L}_\textup{in}$ &
$\mathbf{L}_\textup{out}$ &
$\mathbf{Q}_\textup{x}$ &
$\mathbf{Q}_{\mathbf{L}_\textup{in}}
=\mathbf{Q}_{\mathbf{L}_\textup{out}}
=\mathbf{Q}_{\mathbf{L}_\textup{ser}}$\\
\midrule
\SI{1.86}{nH} & \SI{0.09}{nH} & 1000 & 50 \\
\bottomrule
\end{tabular}
\end{table}\end{document}`
Ciao
Enrico
Grazie della risposta molto gentile. Ho un solo piccolo problema, vorrei avere il carattere delle tabelle un po’ più piccolo di quello del corpo del testo, come posso fare? Mi hanno dato un template con un file document class ma non ci so mettere mano.
Grazie