使表格中的文字适合于页面[关闭]

问题描述 投票:0回答:1

我有一个乳胶表,延伸到页面之外,就像这样

enter image description here

乳胶代码如下

% Please add the following required packages to your document preamble:
% \usepackage{longtable}
% Note: It may be necessary to compile the document several times to get a multi-page table to line up properly
\begin{longtable}[c]{|l|l|l|}
\hline
Term            & Explanation                                                                                                                                                                                                                                                                                                                                     & Comment \\ \hline
\endfirsthead
%
\endhead
%
Product Owner   & Otto \& Lene                                                                                                                                                                                                                                                                                                                                    &         \\ \hline
Lene            & Team Manager                                                                                                                                                                                                                                                                                                                                    &         \\ \hline
Otto            & Software Engineer                                                                                                                                                                                                                                                                                                                               &         \\ \hline
Angular         & Frontend javascript framework to build modern single page applications                                                                                                                                                                                                                                                                          &         \\ \hline
GFS Upload      & \begin{tabular}[c]{@{}l@{}}GFS Upload is an internal system used by employees at  to insert the extra financial statements that haven't been inserted automatically yet.\\ \\ While there are different financial information the different places want GFS upload sorts by having Chart Bookings and Account Bookings.\end{tabular} &         \\ \hline
Chart Booking   & Chart Booking is financial statements used to report to Nationalbanken.                                                                                                                                                                                                                                                                         &         \\ \hline
Account Booking & Account booking is used for internal  account reporting.                                                                                                                                                                                                                                                                             &         \\ \hline
Cloud 2         &  cloud service                                                                                                                                                                                                                                                                                                                       &         \\ \hline
\end{longtable}

我希望文字能适合在页面内,自动插入换行符。我怎样才能做到这一点?

latex
1个回答
0
投票

你可以使用固定宽度的列。你必须自己找出你的文档所需要的宽度,因为这取决于你所使用的确切的页面几何形状,而且不幸的是,你只提供了一个不可编译的代码片段,而没有提供一个最小的工作示例。

\documentclass{article}

\usepackage{geometry}
\usepackage{longtable}



\begin{document}

% Please add the following required packages to your document preamble:
% \usepackage{longtable}
% Note: It may be necessary to compile the document several times to get a multi-page table to line up properly
\begin{longtable}[c]{|l|p{9.7cm}|l|}
\hline
Term            & Explanation                                                                                                                                                                                                                                                                                                                                     & Comment \\ \hline
\endfirsthead
%
\endhead
%
Product Owner   & Otto \& Lene                                                                                                                                                                                                                                                                                                                                    &         \\ \hline
Lene            & Team Manager                                                                                                                                                                                                                                                                                                                                    &         \\ \hline
Otto            & Software Engineer                                                                                                                                                                                                                                                                                                                               &         \\ \hline
Angular         & Frontend javascript framework to build modern single page applications                                                                                                                                                                                                                                                                          &         \\ \hline
GFS Upload & GFS Upload is an internal system used by employees at  to insert the extra financial statements that haven't been inserted automatically yet. While there are different financial information the different places want GFS upload sorts by having Chart Bookings and Account Bookings. & \\ \hline
Chart Booking   & Chart Booking is financial statements used to report to Nationalbanken.                                                                                                                                                                                                                                                                         &         \\ \hline
Account Booking & Account booking is used for internal  account reporting.                                                                                                                                                                                                                                                                             &         \\ \hline
Cloud 2         &  cloud service                                                                                                                                                                                                                                                                                                                       &         \\ \hline
\end{longtable}

\end{document}

enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.