LaTeX 表格浮动在页面外

LaTeX 表格浮动在页面外

我们有一张包含 7 列的表格。我们试图让它适合页面,但做不到。您对我们如何才能让它适合水平或垂直方向有什么建议吗?

http://imgur.com/a/9NYcA

\begin{table}[]
\centering
\caption{My caption}
\label{my-label}
\begin{tabular}{|l|l|l|l|l|l|ll}
    \cline{1-6}
    \textbf{Communication task}  & \textbf{Audience}                                             & \textbf{Objectives/ Goals}                                                                                                     & \textbf{Tools/ Resources Needed}                                                               & \textbf{Method of communication}                              & \textbf{Outcome}                                                                             &  &  \\ \cline{1-6}
    Initial Group Meeting        & Project group                                                  & Exchange contact details\\and establish group \\weaknesses and strengths                                                          & Notes                                                                                          & Face-to-face                                                  & Group chat created                                                                           &  &  \\ \cline{1-6}
    Arrange meeting with sponsor & Communications leader and Sponsor                              & Establish meeting time                                                                                                         &                                                                                                & Email                                                         & Meeting arranged with sponsor                                  &  &  \\ \cline{1-6}
    Group meeting                & Project group                                                  & \begin{tabular}[c]{@{}l@{}}Read project brief\\ Discuss questions to ask sponsor\end{tabular}                                  & \begin{tabular}[c]{@{}l@{}}Project brief\\ Notes\end{tabular}                                  & Face-to-face                                                  & List of questions to ask sponsor                                                             &  &  \\ \cline{1-6}
    Meeting with sponsor         & \begin{tabular}[c]{@{}l@{}}Project team\\ Sponsor\end{tabular} & Clarify the project requirements                                                                                               & \begin{tabular}[c]{@{}l@{}}Audio recording\\ \\ OneDrive\end{tabular}                          & \begin{tabular}[c]{@{}l@{}}Email\\ Face-to-face\end{tabular}  & Established project requirements                                                             &  &  \\ \cline{1-6}
    Team meeting                 & Project team                                                   & \begin{tabular}[c]{@{}l@{}}Division of tasks for formative coursework\\ Test blackboard collaboration application\end{tabular} & \begin{tabular}[c]{@{}l@{}}Coursework brief\\ OneDrive\\ Blackboard collaboration\end{tabular} & \begin{tabular}[c]{@{}l@{}}Face-to-face\\ Webcam\end{tabular} & \begin{tabular}[c]{@{}l@{}}Tasks allocated \\ Established how to work BB collab\end{tabular} &  &  \\ \cline{1-6}
    &                                                                &                                                                                                                                &                                                                                                &                                                               &                                                                                              &  &  \\ \cline{1-6}
\end{tabular}
\end{table}

答案1

您的表格确实很大……下面是 MWE 的四种可能解决方案。全部使用较小的字体,其中两种是纵向的,两种是横向的。对于后两种,表格被转置,希望在单元格中获得更多文本空间。

对于表格环境,使用tabularx修改后的X列 ( \newcolumntype{L}{>{\raggedright\arraybackslash}X})。单元格宽度保持相等,但通过一些手动调整(如上一个示例中所做的那样),可以获得更好的单元格间距。

梅威瑟:

\documentclass{article}
\usepackage{makecell, tabularx}
\renewcommand\theadfont{\bfseries}
\newcolumntype{L}{>{\raggedright\arraybackslash}X}
\usepackage{rotating}
\usepackage{caption}
\usepackage{geometry}

\usepackage{showframe}
\renewcommand*\ShowFrameColor{\color{red}}

\begin{document}

\begin{table}
\centering
\caption{My caption}
\label{my-label}
\footnotesize
\setlength\tabcolsep{3pt}
\begin{tabularx}{\textwidth}{|*{6}{L|}}
    \hline
\thead[b]{Communica-\\ tion task}  
    &   \thead[b]{Audience}                        
        &   \thead[b]{Objectives/\\ Goals}                        
            &   \thead[b]{Tools/\\ Resources\\ Needed}
                &   \thead[b]{Method of\\ communication}                              
                    &   \thead[b]{Outcome}                 
                        \\ \hline
Initial Group Meeting        
    &   Project group                            
        &   Exchange contact details and establish group weaknesses and strengths
            &   Notes
                &   Face-to-face  
                    &   Group chat created  
                        \\ \hline
Arrange meeting with sponsor 
    &   Communications leader and Sponsor        
        &   Establish meeting time                            
            &   
                &   Email   
                    & Meeting arranged with sponsor    
                        \\ \hline
Group meeting                
    &   Project group                            
        &   Read project brief\newline
            Discuss questions to ask sponsor  
            &   Project brief Notes
                &   Face-to-face
                    &   List of questions to ask sponsor                                                             
                        \\ \hline
Meeting with sponsor         
    &   Project team Sponsor
        &   Clarify the project requirements 
            &   Audio recording OneDrive
                &   Email Face-to-face
                    &   Established project requirements 
                        \\ \hline
Team meeting                 
    &   Project team
        &    Division of tasks for formative coursework\newline
             Test blackboard collaboration application
            &   Course work brief\newline
                OneDrive Blackboard collaboration
                &    Face-to-face Webcam
                    &   Tasks allocated Established 
                        how to work BB collab
                        \\ \hline
\end{tabularx}
\end{table}

\begin{sidewaystable}
\centering
\caption{My caption}
\label{my-label-2}
\small
\setlength\tabcolsep{3pt}
\begin{tabularx}{\textwidth}{|*{6}{L|}}
    \hline
\thead[b]{Communication\\ task}
    &   \thead[b]{Audience}
        &   \thead[b]{Objectives/Goals}
            &   \thead[b]{Tools/Resources\\ Needed}
                &   \thead[b]{Method of\\ communication}
                    &   \thead[b]{Outcome}
                        \\ \hline
Initial Group Meeting
    &   Project group
        &   Exchange contact details and establish group weaknesses and strengths
            &   Notes
                &   Face-to-face
                    &   Group chat created
                        \\ \hline
Arrange meeting with sponsor
    &   Communications leader and Sponsor
        &   Establish meeting time
            &
                &   Email
                    & Meeting arranged with sponsor
                        \\ \hline
Group meeting
    &   Project group
        &   Read project brief\newline
            Discuss questions to ask sponsor
            &   Project brief Notes
                &   Face-to-face
                    &   List of questions to ask sponsor
                        \\ \hline
Meeting with sponsor
    &   Project team Sponsor
        &   Clarify the project requirements
            &   Audio recording OneDrive
                &   Email Face-to-face
                    &   Established project requirements
                        \\ \hline
Team meeting
    &   Project team
        &    Division of tasks for formative coursework\newline
             Test blackboard collaboration application
            &   Course work brief\newline
                OneDrive Blackboard collaboration
                &    Face-to-face Webcam
                    &   Tasks allocated Established
                        how to work BB collab
                        \\ \hline
\end{tabularx}
\end{sidewaystable}

\begin{table}
\centering
\caption{My caption}
\label{my-label}
\footnotesize
\setlength\tabcolsep{3pt}
\begin{tabularx}{\textwidth}{|>{\bfseries}L|*{5}{L|}}
    \hline
Communication task
    &   Initial Group Meeting
        &   Arrange meeting with sponsor
            &   Group meeting
                &   Meeting with sponsor
                    &   Team meeting
                        \\ \hline
Audience
    &   Project group
        &   Communications leader and Sponsor
            &   Project group
                &   Project team Sponsor
                    &   Project team
                        \\ \hline
Objectives/ Goals
    &   Exchange contact details and establish group weaknesses and strengths
        &   Establish meeting time
            &   Read project brief\newline
                Discuss questions to ask sponsor
                &   Clarify the project requirements
                    &    Division of tasks for formative coursework\newline
                         Test blackboard collaboration application
                        \\ \hline
Tools/ Resources Needed
    &   Notes
        &
            &   Project brief Notes
                &   Audio recording OneDrive
                    &   Course work brief\newline
                        OneDrive Blackboard collaboration
                        \\ \hline
Method of communication
    &   Face-to-face
        &   Email
            &   Face-to-face
                &   Email Face-to-face
                    &    Face-to-face Webcam
                        \\ \hline
Outcome
    &   Group chat created
        &   Meeting arranged with sponsor
            &   List of questions to ask sponsor
                &   Established project requirements
                    &   Tasks allocated Established
                        how to work BB collab
                        \\ \hline
\end{tabularx}
\end{table}

\begin{sidewaystable}
\centering
\caption{My caption}
\label{my-label}
\small
\setlength\tabcolsep{3pt}
\begin{tabularx}{\textwidth}{|>{\setlength\hsize{0.85\hsize}\bfseries}L|
                              >{\setlength\hsize{0.95\hsize}}L|
                              >{\setlength\hsize{0.90\hsize}}L|
                              >{\setlength\hsize{0.90\hsize}}L|
                              >{\setlength\hsize{0.90\hsize}}L|
                              >{\setlength\hsize{1.50\hsize}}L| }
    \hline
Communication task
    &   Initial Group Meeting
        &   Arrange meeting with sponsor
            &   Group meeting
                &   Meeting with sponsor
                    &   Team meeting
                        \\ \hline
Audience
    &   Project group
        &   Communications leader and Sponsor
            &   Project group
                &   Project team Sponsor
                    &   Project team
                        \\ \hline
Objectives/ Goals
    &   Exchange contact details and establish group weaknesses and strengths
        &   Establish meeting time
            &   Read project brief\newline
                Discuss questions to ask sponsor
                &   Clarify the project requirements
                    &    Division of tasks for formative coursework\newline
                         Test blackboard collaboration application
                        \\ \hline
Tools/ Resources Needed
    &   Notes
        &
            &   Project brief Notes
                &   Audio recording OneDrive
                    &   Course work brief\newline
                        OneDrive Blackboard collaboration
                        \\ \hline
Method of communication
    &   Face-to-face
        &   Email
            &   Face-to-face
                &   Email Face-to-face
                    &    Face-to-face Webcam
                        \\ \hline
Outcome
    &   Group chat created
        &   Meeting arranged with sponsor
            &   List of questions to ask sponsor
                &   Established project requirements
                    &   Tasks allocated Established
                        how to work BB collab
                        \\ \hline
\end{tabularx}
\end{sidewaystable}
\end{document}

下面是第一个和最后一个示例的结果,其他的你可以通过整个 MWE 的测试来查看:

在此处输入图片描述

在此处输入图片描述

相关内容