我想在乳胶中重新创建这种格式:
到目前为止,我想出了这个
\begin{tabularx}{\linewidth}{
@{} p{.2\textwidth}
@{} X @{}
{\raggedleft\arraybackslash} p{.1\textwidth} @{}
}
\small{Sep 2022 - Jan 2023} &
\large\textbf{Teaching Assistant, Cloud Computing} \vspace{2mm}\newline\vspace{2mm}\normalsize
Under the supervision of Dr. Random.
\begin{itemize}[leftmargin=0.3in]
\item Did this super important thing Did this super important thing Did this super important thing Did this super important thing
\item Worked on that research paper
\end{itemize}
\hfill \normalsize &
\small{Random Univ. of Tech.} \\
\small{Sep 2018 - Feb 2023} &
\large\textbf{Teaching Assistant, Machine Learning} \vspace{2mm}\newline\vspace{2mm}\normalsize Under the supervision of Dr. Random
\begin{itemize}[leftmargin=0.3in]
\item Did this super important thing
\item Worked on that research paper
\end{itemize}
\hfill \normalsize
& \small{Random Univ. of Tech.} \\
\end{tabularx}
这给了我这个:
我的代码的问题是,当到达第三列时,第二列的文本会换行。我希望文本在表格宽度的末尾换行,即我希望它溢出到第三列。
我已经检查过了问题,makebox
提出的解决方案对我来说不起作用,因为文本将溢出整个表格宽度。
答案1
为了包装表格右侧的文本,此代码使用了两列:第一列具有固定宽度,第二列为 X 列。
\documentclass{article}
\usepackage{tabularx}
\usepackage[left=3.00cm, right=3.00cm, top=4.00cm, bottom=3.00cm, showframe]{geometry}
\usepackage{enumitem}
\begin{document}
\noindent\begin{tabularx}{\linewidth}{@{}>{\small}p{.2\textwidth} X@{}}
Sep 2022 - Jan 2023 &
\large\textbf{Teaching Assistant, Cloud Computing}\hfill\small Random Univ. of Tech. \\
& Under the supervision of Dr. Random \\
& \begin{itemize}[leftmargin=0.3in, topsep=0pt]
\item Did this super important thing did this super important thing did this super important thing did this super important thing
\item Worked on that research paper
\end{itemize} \\
Sep 2018 - Feb 2023 &
\large\textbf{Teaching Assistant, Machine Learning}\hfill\small Random Univ. of Tech. \\
& Under the supervision of Dr. Random \\
& \begin{itemize}[leftmargin=0.3in, topsep=0pt]
\item Did this super important thing
\item Worked on that research paper
\end{itemize} \\
\end{tabularx}
\end{document}
使用该enumitem
包,您可以为列表设置全局配置。例如,要获取紧凑列表,请使用
\setlist[itemize]{leftmargin=6ex,noitemsep, nosep}