对于我的简历
我想要以下格式:
**Title**
| 1/3 column | 2/3 column |
| | |
| | |
: : :
' ' '
我尝试在谷歌上搜索“偏移双列 Latex”,也尝试了一些示例,但都无济于事。
答案1
的解为tabularx
:的系数比\hsize
必须为 1/2,并且它们之和必须为列数 (2):
\documentclass[]{article}
\usepackage[showframe]{geometry}
\usepackage{tabularx}
\usepackage[svgnames, table]{xcolor}
\usepackage{lipsum}
\begin{document}
\noindent\setlength{\extrarowheight}{2pt}%
\setlength{\arrayrulewidth}{1pt}%
\arrayrulecolor{IndianRed}%
\begin{tabularx}{\linewidth}{|>{\hsize =0.667\hsize}X|>{\hsize =1.333\hsize}X|}
\multicolumn{2}{c}{\bfseries Title} \\[0.8ex]
\hline
\lipsum[47] & \lipsum[48] \\
\hline
\end{tabularx}
\end{document}
答案2
我个人会使用为此目的开发的类,例如,moderncv
然后使用命令\setlength{\hintscolumnwidth}{7cm}
设置左列宽度,如下所示:
\documentclass[11pt,a4paper,sans]{moderncv}
\moderncvstyle{casual}
\moderncvcolor{blue}
% adjust the page margins
\usepackage[scale=0.9]{geometry}
\setlength{\hintscolumnwidth}{7cm}
% personal data
\name{John}{Doe}
\title{title} % optional, remove / comment the line if not wanted
\address{street and number}{postcode city}{country}% optional, remove / comment the line if not wanted; the "postcode city" and "country" arguments can be omitted or provided empty
\phone[mobile]{+1~(234)~567~890} % optional, remove / comment the line if not wanted; the optional "type" of the phone can be "mobile" (default), "fixed" or "fax"
\phone[fixed]{+2~(345)~678~901}
\phone[fax]{+3~(456)~789~012}
\email{[email protected]} % optional, remove / comment the line if not wanted
\homepage{www.johndoe.com} % optional, remove / comment the line if not wanted
\social[linkedin]{john.doe} % optional, remove / comment the line if not wanted
\social[twitter]{jdoe} % optional, remove / comment the line if not wanted
\social[github]{jdoe} % optional, remove / comment the line if not wanted
\extrainfo{additional information} % optional, remove / comment the line if not wanted
\begin{document}
\makecvtitle
\section{Education}
\cventry{year--year}{Degree}{Institution}{City}{\textit{Grade}}{Description} % arguments 3 to 6 can be left empty
\cventry{year--year}{Degree}{Institution}{City}{\textit{Grade}}{Description}
\end{document}
答案3
\linewidth
是线的长度。因此,您将能够使用以下代码实现所需的结果。
\documentclass{article}
\usepackage{lipsum}
\begin{document}
\lipsum[1-4][1-8]
\begin{table}[!h]
\caption{}
\begin{tabular}{|p{0.33\linewidth}|p{0.6\linewidth}|}
\hline
\lipsum[1-2][1-2]& \lipsum[1-2][1-2]\\
\hline
\end{tabular}
\end{table}
\end{document}