Tabella fuori dai margini

  • Creatore
    Topic
  • #115960
    Up
    0
    Down
    ::


    Sto creando tabelle per la mia tesi di laurea.
    Purtroppo vanno oltre i margini richiesti e non so come fare.

    `

    \documentclass[12pt,twoside,openright]{book}

    \usepackage[T1]{fontenc}
    \usepackage[utf8]{inputenc}
    \usepackage[english]{babel}
    \linespread{1.5}

    %\usepackage{layaureo}

    \usepackage{geometry}
    \geometry{
    a4paper,
    left=2.5cm,
    right=2.5cm
    }

    \usepackage{tabularx}
    \usepackage{booktabs,ragged2e,array}
    \usepackage{multirow,multicol}
    \renewcommand\tabularxcolumn[1]{>{\Centering}p{#1}}
    \newcolumntype{L}[1]{>{\raggedright\arraybackslash}p{#1}}
    \newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}}
    \newcolumntype{R}[1]{>{\raggedleft\arraybackslash}p{#1}}

    \begin{document}

    \begin{figure}[!h]
    \centering
    %\begin{table}[]
    \begin{tabular}{lcccccc}
    \multicolumn{7}{c}{\textbf{Geographic Characteristics}} \\
    & \multicolumn{2}{c}{Suitability for Agriculture} & \multicolumn{2}{c}{Altitude} & \multicolumn{2}{c}{Precipitation} \\
    & (1) & (2) & (3) & (4) & (5) & (6) \\
    Sample falls within: & 25 km & 50 km & 25 km & 50 km & 25 km & 50 km \\
    \textbf{Inside SAG Catchment} & \begin{tabular}[c]{@{}c@{}}2.601\\ (1.604)\end{tabular} & \begin{tabular}[c]{@{}c@{}}1.461 \\ (2.391)\end{tabular} & \begin{tabular}[c]{@{}c@{}}-1.782\\ (3.000)\end{tabular} & \begin{tabular}[c]{@{}c@{}}-9.711 \\ (5.980)\end{tabular} & \begin{tabular}[c]{@{}c@{}}1.806\\ (1.003)\end{tabular} & \begin{tabular}[c]{@{}c@{}}2.484\\ (1.031)*\end{tabular} \\
    Observations & 172 & 142 & 172 & 142 & 172 & 142 \\
    Mean & 41.53 & 40.93 & 45.08 & 54.41 & 45.48 & 43.84 \\
    \textbf{Inside SACA Catchment} & \begin{tabular}[c]{@{}c@{}}0.846\\ (2.026)\end{tabular} & \begin{tabular}[c]{@{}c@{}}4.598 \\ (5.713)\end{tabular} & \begin{tabular}[c]{@{}c@{}}-0.312 \\ (1.082)\end{tabular} & \begin{tabular}[c]{@{}c@{}}-5.120 \\ (3.049)\end{tabular} & \begin{tabular}[c]{@{}c@{}}0.212\\ (0.509)\end{tabular} & \begin{tabular}[c]{@{}c@{}}0.754\\ (0.476)\end{tabular} \\
    Observations & 136 & 126 & 136 & 126 & 136 & 126 \\
    Mean & 49.36 & 45.50 & 68.19 & 74.07 & 43.04 & 42.41
    \end{tabular}
    %\end{table}
    \caption{Banana Catchment Boundaries and Geographic Characteristics}
    \end{figure}

    \end{document}

    `

    Questo è il codice e il restante parte del documento è stato fornito dal docente

Visualizzazione 1 filone di risposte
  • Autore
    Risposte
    • #115961
      strolego
      Partecipante
        Up
        0
        Down
        ::


        Poiché hai definito nel preambolo
        `\newcolumntype{L}[1]{>{\raggedright\arraybackslash}p{#1}}`
        se definisci la prima colonna di tipo L e larghezza opportuna dovresti risolvere il problema

        Esempio
        `\begin{tabular}{L{3.5cm}cccccc}`

        Attenzione che la tabella è in un ambiente figure e non table

      • #115962
        OldClaudio
        Partecipante
          Up
          0
          Down
          ::


          Puoi anche impostare \setlength{\tabcolsep}{3pt} fra begin{table} e \begin{tabular}.

      Visualizzazione 1 filone di risposte
      • Devi essere connesso per rispondere a questo topic.

      Go to top