将列文本与部分标题对齐

将列文本与部分标题对齐

在以下 MWE 中摘自此处并进行了修改如何才能使每个条目与部分名称对齐,即不缩进?我还希望每个条目跨越整个文本宽度。

\documentclass[10pt]{article}
\usepackage{array, xcolor, lipsum, bibentry}
\usepackage[margin=1cm]{geometry}

\title{\bfseries\Huge Tom T. Texblog}
\author{[email protected]}
\date{}

\definecolor{lightgray}{gray}{0.8}
\newcolumntype{L}{>{\raggedleft}p{0.1\textwidth}}
\newcolumntype{R}{p{0.85\textwidth}}
\newcommand\VRule{\color{lightgray}\vrule width 0.5pt}

\begin{document}
\maketitle
\vspace{1em}
\begin{minipage}[ht]{0.48\textwidth}
Main Road 25\\
City 12345\\
State of Sabotage
\end{minipage}
\begin{minipage}[ht]{0.48\textwidth}
Nonlandian\\
January 3rd, 2020\\
+12 34 56 789
\end{minipage}
\vspace{20pt}

\section*{Objective}
\lipsum[33]

\section*{Professional Experience}
\begin{tabular}{L!{\VRule}R}
2011--today&{\bf Work at company XY.}\\
&\lipsum[66]\\
\end{tabular}

\section*{Education}
\begin{tabular}{L!{\VRule}R}
2005--2007&{\bf MSc in Computer Science, Great University, Country.}\\[5pt]
2001--2005&BSc in Life Science, Great University, Country.\\
\end{tabular}

\section*{Languages}
\begin{tabular}{L!{\VRule}R}
Klingon&Mother tongue\\
{\bf English}&{\bf Fluent}\\
French&Fluent (DELF 2010)\\
Japanese&Fair\\
\end{tabular}


\end{document}

在此处输入图片描述

答案1

因为只有将第一列在左对齐才有意义,所以我推测这就是您所需要的,对我来说,覆盖缩进的最简单方法是在每个表格环境前添加一个 -9pt 空格,然后只需调整列文本宽度比例。

在此处输入图片描述

\documentclass[10pt]{article}
\usepackage{array, xcolor, lipsum, bibentry}
\usepackage[margin=1cm]{geometry}

\title{\bfseries\Huge Tom T. Texblog}
\author{[email protected]}
\date{}

\definecolor{lightgray}{gray}{0.8}
\newcolumntype{L}{>{\raggedright}p{0.09\textwidth}}
\newcolumntype{R}{p{0.89\textwidth}}
\newcommand\VRule{\color{lightgray}\vrule width 0.5pt}

\begin{document}
\maketitle
\vspace{1em}
\begin{minipage}[ht]{0.48\textwidth}
Main Road 25\\
City 12345\\
State of Sabotage
\end{minipage}
\begin{minipage}[ht]{0.48\textwidth}
Nonlandian\\
January 3rd, 2020\\
+12 34 56 789
\end{minipage}
\vspace{20pt}

\section*{Objective}
\lipsum[33]

\section*{Professional Experience}
\hspace{-9pt} \begin{tabular}{L!{\VRule}R}
 2011--today&{\bf Work at company XY.}\\
&\lipsum[66]\\
\end{tabular}

\section*{Education}
\hspace{-9pt} \begin{tabular}{L!{\VRule}R}
2005--2007&{\bf MSc in Computer Science, Great University, Country.}\\[5pt]
2001--2005&BSc in Life Science, Great University, Country.\\
\end{tabular}

\section*{Languages}
\hspace{-9pt} \begin{tabular}{L!{\VRule}R}
Klingon&Mother tongue\\
{\bf English}&{\bf Fluent}\\
French&Fluent (DELF 2010)\\
Japanese&Fair\\
\end{tabular}

\end{document}

相关内容