Re: Tabelle affiancate

#36260
robitex
Amministratore del forum
    Up
    0
    Down
    ::

    Ciao a tutti.

    Vorrei mettere due tabelle simili una di fianco all’altra ma utilizzando il pacchetto \subfig, come consigliato nella guida “L’arte di scivere con Latex” di Lorenzo Pantieri, non sono riuscito.
    Se mi aiutaste a capire dove sta l’errore ve ne sarei molto grato.

    Qui di sotto posto una delle due tabelle, che da sola ovviamente non mi da problemi:
    `
    \begin{table}[htbp]
    \begin{center}
    \begin{tabular}{cc}
    \multicolumn{2}{c}{\bf ADIABATIC}\\
    \toprule
    & $\Delta$Resistance \\
    & [$\mu \Omega$] \\
    \midrule
    $\tau_{DUMP}$ & \multirow{2}*{9} \\
    MB (104s-68s) & \\
    & \\
    RRR$_{bus}$ & \multirow{2}*{6.5} \\
    (75-220) & \\
    & \\
    RRR$_{cable}$ & \multirow{2}*{12.9} \\
    (75-150) & \\
    & \\
    Spatial distribution & \multirow{2}*{13} \\
    of the gap & \\
    \bottomrule
    \end{tabular}
    \end{center}
    \caption{\textit{Maximum resistance allowed for different cooling conditions.}
    \label{Delta_Res}
    \end{table}
    `

    Di seguito invece le due tabelle affiancete (che non sono riuscito a fare):
    `
    \begin{table}[htbp]
    \begin{center}
    \begin{tabular}{cc}
    \subfloat[][]
    \multicolumn{2}{c}{\bf ADIABATIC} \\
    \toprule
    & $\Delta$Resistance \\
    & [$\mu \Omega$] \\
    \midrule
    $\tau_{DUMP}$ & \multirow{2}*{9} \\
    MB (104s-68s) & \\
    & \\
    RRR$_{bus}$ & \multirow{2}*{6.5} \\
    (75-220) & \\
    & \\
    RRR$_{cable}$ & \multirow{2}*{12.9} \\
    (75-150) & \\
    & \\
    Spatial distribution & \multirow{2}*{13} \\
    of the gap & \\
    \bottomrule
    \end{tabular}
    \subfloat[][]
    \begin{tabular}{cc}
    \multicolumn{2}{c}{\bf SUPERFLUID HELIUM} \\
    \toprule
    & $\Delta$Resistance \\
    & [$\mu \Omega$] \\
    \midrule
    $\tau_{DUMP}$ & \multirow{2}*{1.3} \\
    MB (104s-68s) & \\
    & \\
    $\tau_{DUMP}$ & \multirow{2}*{5.2} \\
    MQ (32s-17s) & \\
    & \\
    RRR$_{cable}$ & \multirow{2}*{33.8} \\
    MB (75-150) & \\
    & \\
    RRR$_{cable}$ & \multirow{2}*{24.7} \\
    MQ (75-150) & \\
    \bottomrule
    \end{tabular}
    \end{center}
    \caption{\textit{Improvement of the stable zone varying some parameters.}
    \label{Delta_Res}
    \end{table}
    `

    Grazie mille in anticipo.

    Intanto utilizza la direttiva \centering subito doto il \begin{table} anziché l’ambiente center (che provoca l’aggiunta di uno spazio verticale).
    Per quanto riguarda le tabelle affiancate, noterai nel tuo codice che il comando \subfloat nel primo caso è dopo il tabular nel secondo è prima.

    Quindi è l’utilizzo che fai del comando \subfloat a non essere corretto.
    Consulta la guida del pacchetto subfig:

    \subfloat

      [sub-caption]{body}

      This command creates the sub-float in the floating environment. In a figure environment
      it creates a subfigure. The required argument contains the sub-float object or
      “body”. This is the code that imports or creates the figure portion of the sub-float.
      The two optional arguments control the caption. If only one optional argument is
      present, than a caption label is generated and if any text is included in the optional
      argument, than it becomes the caption argument.
      Normally, if a caption is present, it is also included on the List-of-Floats page. However,
      if a second optional argument is present, than the first one controls what is on the
      List-of-Floats page and the second is the caption text. If the List-of-Floats argument
      is empty, than nothing is printed on the List-of-Floats page. Otherwise, if there is text
      in the List-of-Floats argument, than that text is used on the List-of-Floats page rather
      than the text in the other optional argument.
      See table 2 for more detail on the \subfloat command’s arguments.

      Quindi l’ambiente tabular lo devi passare come argomento obbligatorio a \subfloat.

      Ciao e Buon LaTeX.
      Roberto

      Go to top