如何為我的履歷正確對齊、拆分和填充表格條目?

如何為我的履歷正確對齊、拆分和填充表格條目?

我正在嘗試用 LaTeX 製作一份漂亮的簡歷,但在對齊、破壞和填充表格條目方面遇到一些困難。

履歷必須簡短明了。因此,我需要一個允許分成多個頁面的表格環境。表格環境的「條目」必須水平對齊,但不應拆分。例如,如果我們考慮以下情況

\section*{Work experience}
    \begin{tabular}{ll}
        Starting date 1 - End date 1 & Name 1\\
        & Description 1 description 1 description 1 description 1 description 1 description 1 description 1 description 1 description 1 description 1 description 1 description 1 description 1 description 1 description 1 description 1 description 1 description 1\\
        \\
        Starting date 2 - End date 2 & Name 2\\
        & Description 2 description 2 description 2 description 2 description 2 description 2 description 2 description 2 description 2 description 2 description 2 description 2 description 2 description 2 description 2 description 2 description 2 description 2\\
        \\
    \end{tabular}

,我希望描述僅限於頁面寬度減去其水平偏移量,並且我不希望描述跨多個頁面拆分。只允許在「條目 1」和「條目 2」之間進行拆分。

對於前者,您可以使用\usepackage{tabularx},對於後者,\usepackage{supertabular}也許會有所幫助。但是,我不知道如何同時使用它們,而且超表每次都會中斷,\\而不僅僅是在「條目 1」和「條目 2」之間。

我該如何解決這些問題?

答案1

您可以tabularx使用ltablex基於longtable.只需導入包就足夠了 - 然後你可以只使用 tabularx 並且你的表格將跨越多個頁面(請參閱:Tabularx:將長表格分成幾頁)。

若要禁止在行末尾使用分頁符,請使用\\*代替\\,如第 9 頁所述長桌手冊

在你的例子中它看起來像這樣:

\documentclass{article}

\usepackage{tabularx}
\usepackage{ltablex}

\begin{document}
    \section*{Work experience}
    \begin{tabularx}{\linewidth}{ l | X }
        Starting date 1 - End date 1 & Name 1\\*
        & Description 1 description 1 description 1 description 1 ... \\
        \\
        Starting date 2 - End date 2 & Name 2\\*
        & Description 2 description 2 description 2 description 2 ... \\
    \end{tabularx}
\end{document}

相關內容