PROBLEMA SUBFLOAT-NUMERO TABELLA SUCCESSIVA

  • Creatore
    Topic
  • #105246
    Up
    0
    Down
    ::


    Buon Giorno a tutti!
    sto scrivendo la mia tesi di laurea in latex e premetto che sono una principiante nell’utilizzo di LATEX.
    Vi scrivo perché ho un problema:
    nella mia tesi devo riportare 10 piccole tabelle nel seguente modo:

    `\begin{table}[!htp]
    \caption{Matrice 1}
    \centering
    \footnotesize
    \subfloat[][\emph{\textbf{Femmine-Scientifica}}]
    {\begin{tabular}{l|c|c}
    &\textbf{Stato 1}&\textbf{Stato 2} \\
    \midrule
    Stato 1&0,729 (0,468;0,843)&0,228 (0,113;0,412)\\
    Stato 2&0,205 (0,129;0,307)&0,701 (0,502;0,787)\\
    Stato 3&0,033 (0,017;0,351)&0,026 (0,011;0,269)\\
    Stato 4&0,369 (0,191;0,549)&0,071 (0,104;0,481)\\
    &\textbf{Stato 3}&\textbf{Stato 4} \\
    \midrule
    Stato 1&0,019 (0,001;0,103)&0,024 (0,000;0,154)\\
    Stato 2&0,059 (0,002;0,176)&0,035 (0,000;0,197)\\
    Stato 3&0,940 (0,002;0,965)&0,001 (0,000;0,427)\\
    Stato 4&0,071 (0,002;0,560)&0,326 (0,000;0,542)\\
    \end{tabular}}
    \subfloat[][\emph{\textbf{Maschi-Scientifica}}]
    {\begin{tabular}{||c|c}
    \textbf{Stato 1}&\textbf{Stato 2} \\
    \midrule
    0,791 (0,592;0,876)&0,167 (0,082;0,309)\\
    0,238 (0,155;0,342)&0,698 (0,530;0,787)\\
    0,037 (0,019;0,410)&0,021 (0,010;0,156)\\
    0,443 (0,223;0,687)&0,146 (0,067;0,334)\\
    \textbf{Stato 3}& \textbf{Stato 4} \\
    \midrule
    0,026 (0,001;0,142)&0,016 (0,000;0,135)\\
    0,050 (0,004;0,150)&0,013 (0,000;0,106)\\
    0,941 (0,001;0,966)&0,001 (0,000;0,417)\\
    0,069 (0,001;0,587)&0,341 (0,000;0,552)\\
    \end{tabular}}

    \subfloat[][\emph{\textbf{Femmine-Tecnica}}]
    {\begin{tabular}{l|c|c}
    &\textbf{Stato 1}&\textbf{Stato 2} \\
    \midrule
    Stato 1&0,873 (0,752;0,925)&0,112 (0,060;0,210)\\
    Stato 2&0,320 (0,240;0,411)&0,613 (0,479;0,696)\\
    Stato 3&0,024 (0,012;0,354)&0,020 (0,008;0,264)\\
    Stato 4&0,343 (0,229;0,470)&0,250 (0,131;0,397)\\
    &\textbf{Stato 3}& \textbf{Stato 4} \\
    \midrule
    Stato 1&0,003 (0,000;0,033)&0,012 (0,000;0,074)\\
    Stato 2&0,019 (0,000;0,124)&0,047 (0,000;0,142)\\
    Stato 3&0,956 (0,000;0,976)&0,001 (0,000;0,440)\\
    Stato 4&0,076 (0,000;0,577)&0,331 (0,000;0,467)\\
    \end{tabular}}
    \subfloat[][\emph{\textbf{Maschi-Tecnica}}]
    {\begin{tabular}{||c|c}
    \textbf{Stato 1}&\textbf{Stato 2} \\
    \midrule
    0,909 (0,820;0,944)&0,080 (0,045;0,141)\\
    0,364 (0,277;0,451)&0,604 (0,493;0,686)\\
    0,026 (0,015;0,157)&0,016 (0,007;0,157)\\
    0,394 (0,265;0,243)&0,146 (0,075;0,243)\\
    \textbf{Stato 3}&\textbf{Stato 4} \\
    \midrule
    0,004 (0,000;0,033)&0,007 (0,000;0,053)\\
    0,015 (0,001;0,062)&0,017 (0,000;0,085)\\
    0,958 (0,000;0,974)&0,000 (0,000;0,488)\\
    0,075 (0,000;0,581)&0,385 (0,000;0,521)\\
    \end{tabular}}

    \subfloat[][\emph{\textbf{Femmine-Giuridica}}]
    {\begin{tabular}{l|c|c}
    &\textbf{Stato 1}&\textbf{Stato 2} \\
    \midrule
    Stato 1&0,842 (0,003;0,895)&0,133 (0,051;0,214)\\
    Stato 2&0,308 (0,011;0,380)&0,619 (0,523;0,686)\\
    Stato 3&0,055 (0,003;0,407)&0,051 (0,025;0,245)\\
    Stato 4&0,361 (0,008;0,485)&0,199 (0,116;0,310)\\
    &\textbf{Stato 3}& \textbf{Stato 4} \\
    \midrule
    Stato 1&0,003 (0,000;0,929)&0,021 (0,000;0,109)\\
    Stato 2&0,031 (0,000;0,339)&0,042 (0,000;0,109)\\
    Stato 3&0,892 (0,000;0,944)&0,002 (0,000;0,494)\\
    Stato 4&0,119 (0,000;0,629)&0,322 (0,000;0,473)\\
    \end{tabular}}
    \subfloat[][\emph{\textbf{Maschi-Giuridica}}]
    {\begin{tabular}{||c|c}
    \textbf{Stato 1}&\textbf{Stato 2} \\
    \midrule
    0,888 (0,000;0,932)&0,095 (0,036;0,175)\\
    0,352 (0,001;0,455)&0,608 (0,480;0,692)\\
    0,061 (0,000;0,413)&0,041 (0,018;0,138)\\
    0,419 (0,001;0,548)&0,117 (0,063;0,216)\\
    \textbf{Stato 3}&\textbf{Stato 4} \\
    \midrule
    0,002 (0,000;0,955)&0,014 (0,000;0,135)\\
    0,025 (0,001;0,389)&0,016 (0,000;0,086)\\
    0,898 (0,001;0,957)&0,001 (0,000;0,497)\\
    0,115 (0,001;0,635)&0,348 (0,000;0,509)\\
    \end{tabular}}

    \subfloat[][\emph{\textbf{Femmine-Sanitaria}}]
    {\begin{tabular}{l|c|c}
    &\textbf{Stato 1}&\textbf{Stato 2} \\
    \midrule
    Stato 1&0,812 (0,648;0,878)&0,112 (0,058;0,195)\\
    Stato 2&0,416 (0,295;0,546)&0,450 (0,265;0,574)\\
    Stato 3&0,047 (0,023;0,422)&0,028 (0,007;0,172)\\
    Stato 4&0,417 (0,252;0,586)&0,152 (0,065;0,299)\\
    &\textbf{Stato 3}& \textbf{Stato 4} \\
    \midrule
    Stato 1&0,022 (0,000;0,151)&0,055 (0,000;0,165)\\
    Stato 2&0,060 (0,001;0,233)&0,073 (0,000;0,218)\\
    Stato 3&0,922 (0,001;0,963)&0,003 (0,000;0,439)\\
    Stato 4&0,083 (0,001;0,558)&0,347 (0,000;0,529)\\
    \end{tabular}}
    \subfloat[][\emph{\textbf{Maschi-Sanitaria}}]
    {\begin{tabular}{||c|c}
    \textbf{Stato 1}&\textbf{Stato 2} \\
    \midrule
    0,847 (0,667;0,910)&0,079 (0,039;0,152)\\
    0,472 (0,320;0,625)&0,442 (0,253;0,573)\\
    0,052 (0,026;0,502)&0,022 (0,006;0,123)\\
    0,473 (0,277;0,658)&0,091 (0,043;0,195)\\
    \textbf{Stato 3}&\textbf{Stato 4} \\
    \midrule
    0,034 (0,001;0,190)&0,039 (0,000;0,164)\\
    0,054 (0,002;0,204)&0,032 (0,000;0,146)\\
    0,924 (0,001;0,962)&0,002 (0,000;0,426)\\
    0,083 (0,001;0,605)&0,354 (0,000;0,541)\\
    \end{tabular}}
    \end{table}
    \begin{table}[!htp]\ContinuedFloat
    %\caption{Matrice 1}
    \centering
    \footnotesize
    \subfloat[][\emph{\textbf{Femmine-Umanistica}}]
    {\begin{tabular}{l|c|c}
    &\textbf{Stato 1}&\textbf{Stato 2} \\
    \midrule
    Stato 1&0,781 (0,689;0,845)&0,187 (0,111;0,286)\\
    Stato 2&0,201 (0,106;0,264)&0,754 (0,729;0,807)\\
    Stato 3&0,034 (0,018;0,230)&0,028 (0,013;0,418)\\
    Stato 4&0,247 (0,035;0,344)&0,446 (0,034;0,584)\\
    &\textbf{Stato 3}& \textbf{Stato 4} \\
    \midrule
    Stato 1&0,023 (0,002;0,078)&0,009 (0,000;0,052)\\
    Stato 2&0,027 (0,002;0,069)&0,018 (0,000;0,054)\\
    Stato 3&0,938 (0,002;0,960)&0,001 (0,000;0,385)\\
    Stato 4&0,027 (0,002;0,482)&0,280 (0,000;0,404)\\
    \end{tabular}}
    \subfloat[][\emph{\textbf{Maschi-Umanistica}}]
    {\begin{tabular}{||c|c}
    \textbf{Stato 1}&\textbf{Stato 2} \\
    \midrule
    0,820 (0,651;0,887)&0,133 (0,071;0,231)\\
    0,232 (0,160;0,327)&0,736 (0,628;0,803)\\
    0,038 (0,019;0,266)&0,022 (0,009;0,285)\\
    0,292 (0,176;0,435)&0,274 (0,145;0,443)\\
    \textbf{Stato 3}&\textbf{Stato 4} \\
    \midrule
    0,041 (0,001;0,166)&0,006 (0,000;0,074)\\
    0,025 (0,001;0,083)&0,007 (0,000;0,044)\\
    0,940 (0,001;0,965)&0,000 (0,000;0,470)\\
    0,028 (0,001;0,588)&0,405 (0,000;0,554)\\
    \end{tabular}}
    \end{table}
    `

    Come potete notare, ho inserito un [tt]\ContinuedFloat[/tt] perché esse superavano il limite della pagina e ho commentato la caption così da impedire che il numero della tabella che continua nell’altra pagina fosse diverso rispetto a quello della precedente.
    Il problema che riscontro è relativo alla numerazione della tabella successiva che è uguale a quello della tabella che vi ho scritto qui.
    Come posso risolvere questo problema??

Visualizzazione 1 filone di risposte
  • Autore
    Risposte
    • #105247
      OldClaudio
      Partecipante
        Up
        0
        Down
        ::


        Non usare l’ambiente table, ma l’ambiente longtable, che non è flottante, ma che consente di comporre il suo contenuto su diverse pagine successive.
        Non so se accetta al suo interno il comando subfloat, a puoi sempre provare.

      • #105248
        Up
        0
        Down
        ::


        Non metterei quattro sottotabelle in una pagina e una nell’altra, meglio tre e due.

        Evita subfig: con subcaption si può fare meglio; c’è anche il vantaggio che [tt]\ContinuedFloat[/tt] funziona. 8)

        Ho aggiunto filetti in testa, in mezzo e in coda, le sottotabelle su ogni riga vengono ben allineate. Ovviamente ho rimosso tutti i filetti verticali che non servono a nulla se non a peggiorare le tabelle.

        Aggiusta la correzione a [tt]\tabcolsep[/tt] per far stare ogni riga senza sbordare.

        `
        \documentclass[a4paper]{article}
        %\usepackage[margin=2cm]{geometry}
        \usepackage{booktabs}
        \usepackage{subcaption}

        \begin{document}

        \begin{table}[p]

        \caption{Matrice 1}
        \centering
        \footnotesize
        \addtolength{\tabcolsep}{-1.2pt}% aggiusta qui

        \subcaptionbox{Femmine-Scientifica}
        {\begin{tabular}{@{}lcc}
        \toprule
        &\textbf{Stato 1}&\textbf{Stato 2} \\
        \midrule
        Stato 1&0,729 (0,468;0,843)&0,228 (0,113;0,412)\\
        Stato 2&0,205 (0,129;0,307)&0,701 (0,502;0,787)\\
        Stato 3&0,033 (0,017;0,351)&0,026 (0,011;0,269)\\
        Stato 4&0,369 (0,191;0,549)&0,071 (0,104;0,481)\\
        \midrule[\heavyrulewidth]
        &\textbf{Stato 3}&\textbf{Stato 4} \\
        \midrule
        Stato 1&0,019 (0,001;0,103)&0,024 (0,000;0,154)\\
        Stato 2&0,059 (0,002;0,176)&0,035 (0,000;0,197)\\
        Stato 3&0,940 (0,002;0,965)&0,001 (0,000;0,427)\\
        Stato 4&0,071 (0,002;0,560)&0,326 (0,000;0,542)\\
        \bottomrule
        \end{tabular}}%
        \subcaptionbox{Maschi-Scientifica}
        {\begin{tabular}{cc@{}}
        \toprule
        \textbf{Stato 1}&\textbf{Stato 2} \\
        \midrule
        0,791 (0,592;0,876)&0,167 (0,082;0,309)\\
        0,238 (0,155;0,342)&0,698 (0,530;0,787)\\
        0,037 (0,019;0,410)&0,021 (0,010;0,156)\\
        0,443 (0,223;0,687)&0,146 (0,067;0,334)\\
        \midrule[\heavyrulewidth]
        \textbf{Stato 3}& \textbf{Stato 4} \\
        \midrule
        0,026 (0,001;0,142)&0,016 (0,000;0,135)\\
        0,050 (0,004;0,150)&0,013 (0,000;0,106)\\
        0,941 (0,001;0,966)&0,001 (0,000;0,417)\\
        0,069 (0,001;0,587)&0,341 (0,000;0,552)\\
        \bottomrule
        \end{tabular}}

        \bigskip

        \subcaptionbox{Femmine-Tecnica}
        {\begin{tabular}{@{}lcc}
        \toprule
        &\textbf{Stato 1}&\textbf{Stato 2} \\
        \midrule
        Stato 1&0,873 (0,752;0,925)&0,112 (0,060;0,210)\\
        Stato 2&0,320 (0,240;0,411)&0,613 (0,479;0,696)\\
        Stato 3&0,024 (0,012;0,354)&0,020 (0,008;0,264)\\
        Stato 4&0,343 (0,229;0,470)&0,250 (0,131;0,397)\\
        \midrule[\heavyrulewidth]
        &\textbf{Stato 3}& \textbf{Stato 4} \\
        \midrule
        Stato 1&0,003 (0,000;0,033)&0,012 (0,000;0,074)\\
        Stato 2&0,019 (0,000;0,124)&0,047 (0,000;0,142)\\
        Stato 3&0,956 (0,000;0,976)&0,001 (0,000;0,440)\\
        Stato 4&0,076 (0,000;0,577)&0,331 (0,000;0,467)\\
        \bottomrule
        \end{tabular}}%
        \subcaptionbox{Maschi-Tecnica}
        {\begin{tabular}{cc@{}}
        \toprule
        \textbf{Stato 1}&\textbf{Stato 2} \\
        \midrule
        0,909 (0,820;0,944)&0,080 (0,045;0,141)\\
        0,364 (0,277;0,451)&0,604 (0,493;0,686)\\
        0,026 (0,015;0,157)&0,016 (0,007;0,157)\\
        0,394 (0,265;0,243)&0,146 (0,075;0,243)\\
        \midrule[\heavyrulewidth]
        \textbf{Stato 3}&\textbf{Stato 4} \\
        \midrule
        0,004 (0,000;0,033)&0,007 (0,000;0,053)\\
        0,015 (0,001;0,062)&0,017 (0,000;0,085)\\
        0,958 (0,000;0,974)&0,000 (0,000;0,488)\\
        0,075 (0,000;0,581)&0,385 (0,000;0,521)\\
        \bottomrule
        \end{tabular}}

        \bigskip

        \subcaptionbox{Femmine-Giuridica}
        {\begin{tabular}{@{}lcc}
        \toprule
        &\textbf{Stato 1}&\textbf{Stato 2} \\
        \midrule
        Stato 1&0,842 (0,003;0,895)&0,133 (0,051;0,214)\\
        Stato 2&0,308 (0,011;0,380)&0,619 (0,523;0,686)\\
        Stato 3&0,055 (0,003;0,407)&0,051 (0,025;0,245)\\
        Stato 4&0,361 (0,008;0,485)&0,199 (0,116;0,310)\\
        \midrule[\heavyrulewidth]
        &\textbf{Stato 3}& \textbf{Stato 4} \\
        \midrule
        Stato 1&0,003 (0,000;0,929)&0,021 (0,000;0,109)\\
        Stato 2&0,031 (0,000;0,339)&0,042 (0,000;0,109)\\
        Stato 3&0,892 (0,000;0,944)&0,002 (0,000;0,494)\\
        Stato 4&0,119 (0,000;0,629)&0,322 (0,000;0,473)\\
        \bottomrule
        \end{tabular}}%
        \subcaptionbox{Maschi-Giuridica}
        {\begin{tabular}{cc@{}}
        \toprule
        \textbf{Stato 1}&\textbf{Stato 2} \\
        \midrule
        0,888 (0,000;0,932)&0,095 (0,036;0,175)\\
        0,352 (0,001;0,455)&0,608 (0,480;0,692)\\
        0,061 (0,000;0,413)&0,041 (0,018;0,138)\\
        0,419 (0,001;0,548)&0,117 (0,063;0,216)\\
        \midrule[\heavyrulewidth]
        \textbf{Stato 3}&\textbf{Stato 4} \\
        \midrule
        0,002 (0,000;0,955)&0,014 (0,000;0,135)\\
        0,025 (0,001;0,389)&0,016 (0,000;0,086)\\
        0,898 (0,001;0,957)&0,001 (0,000;0,497)\\
        0,115 (0,001;0,635)&0,348 (0,000;0,509)\\
        \bottomrule
        \end{tabular}}
        \end{table}

        \begin{table}[p]\ContinuedFloat

        \caption{Matrice 1}
        \centering
        \footnotesize
        \addtolength{\tabcolsep}{-1.2pt}% aggiusta qui

        \subcaptionbox{Femmine-Sanitaria}
        {\begin{tabular}{@{}lcc}
        \toprule
        &\textbf{Stato 1}&\textbf{Stato 2} \\
        \midrule
        Stato 1&0,812 (0,648;0,878)&0,112 (0,058;0,195)\\
        Stato 2&0,416 (0,295;0,546)&0,450 (0,265;0,574)\\
        Stato 3&0,047 (0,023;0,422)&0,028 (0,007;0,172)\\
        Stato 4&0,417 (0,252;0,586)&0,152 (0,065;0,299)\\
        \midrule[\heavyrulewidth]
        &\textbf{Stato 3}& \textbf{Stato 4} \\
        \midrule
        Stato 1&0,022 (0,000;0,151)&0,055 (0,000;0,165)\\
        Stato 2&0,060 (0,001;0,233)&0,073 (0,000;0,218)\\
        Stato 3&0,922 (0,001;0,963)&0,003 (0,000;0,439)\\
        Stato 4&0,083 (0,001;0,558)&0,347 (0,000;0,529)\\
        \bottomrule
        \end{tabular}}%
        \subcaptionbox{Maschi-Sanitaria}
        {\begin{tabular}{cc@{}}
        \toprule
        \textbf{Stato 1}&\textbf{Stato 2} \\
        \midrule
        0,847 (0,667;0,910)&0,079 (0,039;0,152)\\
        0,472 (0,320;0,625)&0,442 (0,253;0,573)\\
        0,052 (0,026;0,502)&0,022 (0,006;0,123)\\
        0,473 (0,277;0,658)&0,091 (0,043;0,195)\\
        \midrule[\heavyrulewidth]
        \textbf{Stato 3}&\textbf{Stato 4} \\
        \midrule
        0,034 (0,001;0,190)&0,039 (0,000;0,164)\\
        0,054 (0,002;0,204)&0,032 (0,000;0,146)\\
        0,924 (0,001;0,962)&0,002 (0,000;0,426)\\
        0,083 (0,001;0,605)&0,354 (0,000;0,541)\\
        \bottomrule
        \end{tabular}}

        \bigskip

        \subcaptionbox{Femmine-Umanistica}
        {\begin{tabular}{@{}lcc}
        \toprule
        &\textbf{Stato 1}&\textbf{Stato 2} \\
        \midrule
        Stato 1&0,781 (0,689;0,845)&0,187 (0,111;0,286)\\
        Stato 2&0,201 (0,106;0,264)&0,754 (0,729;0,807)\\
        Stato 3&0,034 (0,018;0,230)&0,028 (0,013;0,418)\\
        Stato 4&0,247 (0,035;0,344)&0,446 (0,034;0,584)\\
        \midrule[\heavyrulewidth]
        &\textbf{Stato 3}& \textbf{Stato 4} \\
        \midrule
        Stato 1&0,023 (0,002;0,078)&0,009 (0,000;0,052)\\
        Stato 2&0,027 (0,002;0,069)&0,018 (0,000;0,054)\\
        Stato 3&0,938 (0,002;0,960)&0,001 (0,000;0,385)\\
        Stato 4&0,027 (0,002;0,482)&0,280 (0,000;0,404)\\
        \bottomrule
        \end{tabular}}%
        \subcaptionbox{Maschi-Umanistica}
        {\begin{tabular}{cc@{}}
        \toprule
        \textbf{Stato 1}&\textbf{Stato 2} \\
        \midrule
        0,820 (0,651;0,887)&0,133 (0,071;0,231)\\
        0,232 (0,160;0,327)&0,736 (0,628;0,803)\\
        0,038 (0,019;0,266)&0,022 (0,009;0,285)\\
        0,292 (0,176;0,435)&0,274 (0,145;0,443)\\
        \midrule[\heavyrulewidth]
        \textbf{Stato 3}&\textbf{Stato 4} \\
        \midrule
        0,041 (0,001;0,166)&0,006 (0,000;0,074)\\
        0,025 (0,001;0,083)&0,007 (0,000;0,044)\\
        0,940 (0,001;0,965)&0,000 (0,000;0,470)\\
        0,028 (0,001;0,588)&0,405 (0,000;0,554)\\
        \bottomrule
        \end{tabular}}
        \end{table}

        \end{document}
        `

        [attachment=1546]ScreenShot2016-02-22at14.10.30.png[/attachment]

        Ciao
        Enrico

        Attachments:
        You must be logged in to view attached files.
    Visualizzazione 1 filone di risposte
    • Devi essere connesso per rispondere a questo topic.

    Go to top