![我怎样才能在乳胶中正确对齐地书写?](https://linux22.com/image/441965/%E6%88%91%E6%80%8E%E6%A0%B7%E6%89%8D%E8%83%BD%E5%9C%A8%E4%B9%B3%E8%83%B6%E4%B8%AD%E6%AD%A3%E7%A1%AE%E5%AF%B9%E9%BD%90%E5%9C%B0%E4%B9%A6%E5%86%99%EF%BC%9F.png)
我尝试在 Latex 上写简历。格式如下图所示
我尝试使用以下代码来实现这一点:
\documentclass{article}
\usepackage[utf8]{inputenc}
\begin{document}
\hline
\begin{paragraph}{\textbf{EXTRA CURRICULAR ACTIVITIES}}
\mbox{}
{Sep 2020 — Present} \hfill{\bf Project Manager, X Consultancy} \hfill
{Groningen} \\
{\mbox{}} \hfill {Have gone through certain projects. Lorem ipsum, or
lipsum as it is
sometimes known, is dummy text used in laying out print, graphic or web
designs. The passage
is attributed to an unknown} \hfill {}
\end{paragraph}
\end{document}
有人能帮助我如何才能获得预期的结果并使中间列与项目符号完美对齐吗?
答案1
如果您真的想从 开始创建自己的 cv 样式article
,我建议使用该geometry
包并创建一个大的左边距,然后使用打印到该边距的宏。
以下内容可以帮助您入门:
\documentclass{article}
\newlength\leftcolwidth
\setlength\leftcolwidth{3cm}
\newlength\leftcolsep
\setlength\leftcolsep{5mm}
\usepackage
[left=\dimexpr\leftcolwidth+\leftcolsep+3.5cm\relax,right=3.5cm]
{geometry}
\makeatletter
\newcommand*\pagerule
{%
\par
\smallskip
\noindent
\kern-\leftcolwidth
\kern-\leftcolsep
\rule{\dimexpr\textwidth+\leftcolwidth+\leftcolsep}{.4pt}%
\par
\smallskip
\@doendpe % suppress indent of the next line if no blank line is following
}
\newcommand*\entry[3]
{%
\par
\noindent
\llap{\makebox[\leftcolwidth][l]{#1}\kern\leftcolsep}%
\textbf{#2}%
\hfill
\makebox{#3}%
\par
\medskip % vertical space below the entries
\@afterindentfalse % don't indent the first paragraph
\@afterheading % don't allow page breaks
}
% change the formatting of paragraph
\renewcommand\paragraph
{%a
\@startsection
{paragraph}{4}%
{-\dimexpr\leftcolwidth+\leftcolsep\relax}% move it into the margin
{3.25ex \@plus 1ex \@minus .2ex}% vertical space before the heading
{1em}% add a bit of vertical space after the heading
{\normalfont\normalsize\bfseries}% set the wanted font
}
\makeatother
\begin{document}
\pagerule
\paragraph{EXTRA CURRICULAR ACTIVITIES}
\entry{Sep 2020 -- Present}{Project Manager, X Consultancy}{Groningen}
\begin{itemize}
\item
Have gone through certain projects. Lorem ipsum, or lipsum as it is
sometimes known, is dummy text used in laying out print, graphic or web
designs. The passage is attributed to an unknown
\end{itemize}
\end{document}