表格中的文字换行

表格中的文字换行

我正在尝试将我的简历(最初在 Word 中整理)转换为 Latex 文件,主要是为了学习练习。我只是想知道是否有人可以帮助我换行,因为在我当前的版本中,某些信息似乎从页面边缘消失了。非常感谢!

\documentclass{article}
\usepackage[sfdefault]{ClearSans}


\usepackage{titlesec}
\usepackage{titling} 
\usepackage[margin=1.25in]{geometry} 


\usepackage{seqsplit}
%This package allows me to wrap text, or at least I thought it did!

\begin{document} 

\begin{table}[]
\begin{tabular}{lp{.5cm}lp{1cm}|}
Research Interests \\                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
Write about research interests here, and here and here, Write about research interests here, and here and here, Write about research interests here, and here and here, Write about research interests here, and here and here, Write about research interests here, and here and here, 
\\ \\
And also here and here and here.
    %This text hasn't been causing many any problem, its the material below that is difficult%                                                                                                                                                                                                                                                              

    \\\\

    \uppercase{\textbf{Education}}                                                                                                                                                                                                                                                                                                                                                                                                                             &                                                                                                                                                                                                                                                                          \\
    2015-2019 
\begin{tabular}[c]{@{}l@{}}University of Life\\ PhD in Life Skills\\ Thesis: ‘The Meaning of Life, without the number 7’\\ Supervised by Dr Smith\\ \end{tabular} \\
\\
2013 - 2014                                                                                                                                                                                                                                                                                                                                                                                                                                    
& \begin{tabular}[c]{@{}l@{}}\\University of Life\\ Masters in Life Skills\\ Thesis: ‘The Meaning of Life, without the number 6’\\ Supervised by Dr Smith\\ \end{tabular} \\

\end{tabular}
\end{table}

\end{document} 

答案1

以下是我的建议:

在此处输入图片描述

\documentclass{article}
\usepackage[sfdefault]{ClearSans}

\usepackage[margin=1.25in]{geometry} 
\setlength{\parindent}{0pt}
\setlength{\parskip}{\baselineskip}

\usepackage{tabularx}
\renewcommand\tabularxcolumn[1]{m{#1}}



\begin{document} 

\uppercase{\textbf{Research Interests}}

Write about research interests here, and here and here, Write about research interests here, and here and here, Write about research interests here, and here and here, Write about research interests here, and here and here, Write about research interests here, and here and here, 

And also here and here and here.


\begin{tabularx}{\textwidth}{@{}lX@{}}
\uppercase{\textbf{Education}} \\
2015-2019
& University of Life \newline PhD in Life Skills\newline Thesis: ‘The Meaning of Life, without the number 7’\newline Supervised by Dr Smith\\ 
\\ 
2013 - 2014                                                                                                                                                                                                                                                                                                                                                                                                                                    
& University of Life\newline Masters in Life Skills\newline Thesis: ‘The Meaning of Life, without the number 6’\newline Supervised by Dr Smith \\

\end{tabularx}


\end{document} 

答案2

我想知道你真的想要表格吗?通常简历是用列表来组织的。表格会有严格定义的行和列,但你的“在这里、这里和这里写下你的研究兴趣……”这句话可能不应该是一行或一列。而且这句话超出了页面的边缘。

无论如何,在 LaTeX 中,文本行在大多数情况下都会自动换行,主要例外是未指定宽度的列。如果没有指定宽度,列会扩展以适应材料量。为了使文本在列内换行,您需要定义列的宽度。

另外,您不需要“表格”环境,这是当您想要创建可以浮动到文档不同部分的文本块(可能包含表格)时所需要的。

以下是我认为您要尝试做的事情。我刚刚重新实现了您所做的事情,并进行了最少的额外格式化。CTAN 上有一些可以格式化简历的软件包,但只是为了了解基础知识,我会尝试这样做:

\documentclass{article}
\usepackage[margin=1.25in]{geometry}
\begin{document} 

\begin{description}
\item[Research Interests]\ 
\begin{itemize}
\item Write about research interests here, and here and here, Write about research interests here, and here and here, Write about research interests here, and here and here, Write about research interests here, and here and here, Write about research interests here, and here and here, 

\item 
And also here and here and here.
\end{itemize}

\item[Education]\ 
\begin{itemize}
\item 2015--2019 
\begin{tabular}[t]{l}
University of Life\\ 
PhD in Life Skills\\ 
Thesis: `The Meaning of Life, without the number 7'\\ 
Supervised by Dr Smith
\end{tabular} 

\item 2013--2014
\begin{tabular}[t]{l}
University of Life\\ 
Masters in Life Skills\\ 
Thesis: `The Meaning of Life, without the number 6'\\ 
Supervised by Dr Smith
\end{tabular}

\end{itemize}
\end{description}
\end{document} 

相关内容