![在迷你页面中添加新行-右栏](https://linux22.com/image/458859/%E5%9C%A8%E8%BF%B7%E4%BD%A0%E9%A1%B5%E9%9D%A2%E4%B8%AD%E6%B7%BB%E5%8A%A0%E6%96%B0%E8%A1%8C-%E5%8F%B3%E6%A0%8F.png)
我想在每个公司后面添加新行。我尝试通过\ \
或来实现\newline
,但文本会缩进。使用彩色矩形显示。
另外,我希望日期与公司信息在同一行,而不是移到下一行。如下图所示,以椭圆形显示。
实现此目的的一种方法是有职位/职务的日期。
\documentclass[12pt ]{res} % default is 10 pt
\usepackage{xcolor}
\usepackage[left=0.2in, right=0.8in, bottom=0.5in,top=0.2in, footskip=5pt]{geometry} %
\usepackage{fontawesome}
\usepackage[hidelinks]{hyperref}% must be the last package
% ************************************************** added <<<<<<<<<<<<
\renewcommand{\section}[1]{\noindent{\sectionfont#1}}
\makeatletter
\def\opening{\def\@opening{}%
\begingroup
\print@name%
\endgroup}
\makeatother
% **************************************************
\begin{document}
\name{\bfseries First Last\\[12pt]} % changed <<<<<<<<<<<<<<<<
%% remove top margin. reduce gap
\address{ Address \\line two \\ city, ST 99999 }
\address{ mail[at]gmail[dot]com \\ +91-70000-00000 \href{https://github.com/}{ \faGithub} \href{https://www.linkedin.com/in//}{ \faLinkedin} }
\begin{resume}
%% \noindent\makebox[\linewidth]{\rule{\linewidth}{1.2pt}}% changed <<<<<<<<<<<<
\end{resume} % produce the header of the CV: name, address, etc
\parindent0mm% <<<<<<<<<<<<<<<
\setlength{\fboxrule}{0pt}
\setlength{\fboxsep}{4pt}
\hfill % <<<<<<<<<<<<<<<<<<<<,
\begin{minipage}[t]{.48\textwidth}
\raggedright
\parindent3mm% <<<<<<<<<<< indent inside the minipage
\section{Experience} % next line must be blank!!
%% \begin{itemize}
{\bf Get more company} \hfill Nov 2021 - \\
{\it Senior Data Analyst } \\
{ \bf Herbert University Medical Center} \hfill Oct'17 - Oct'21\\
{\it Staff associate } \\
{ \bf Mason Washington University} Feb'15 - Oct'17 \\
{\it Research Associate} \\
{ \bf Software Tele solution Services} \hfill Nov'21 - July'13 \\
{\it Software Engineer}
%% \end {itemize}
\end{minipage}%
\end{document}
答案1
(1)您可以使用tabular
其中的环境minipage
来更轻松地容纳您的数据。
(2)为了使线条适合文本宽度的一半,字体大小必须较小。
(3)要在位置之间添加垂直空间,请使用\\[<space>]
。
(4)避免使用\bf
和\it
。它们是弃用的命令。请改用\bfseries
和\itshape
。
\documentclass[12pt ]{res} % default is 10 pt
\usepackage{xcolor}
\usepackage[left=0.2in, right=0.8in, bottom=0.5in,top=0.2in, footskip=5pt]{geometry} %
\usepackage{fontawesome}
\usepackage[hidelinks]{hyperref}% must be the last package
% ************************************************** added <<<<<<<<<<<<
\renewcommand{\section}[1]{\noindent{\sectionfont#1}}
\makeatletter
\def\opening{\def\@opening{}%
\begingroup
\print@name%
\endgroup}
\makeatother
% **************************************************
\begin{document}
\name{\bfseries First Last\\[12pt]} % changed <<<<<<<<<<<<<<<<
%% remove top margin. reduce gap
\address{ Address \\line two \\ city, ST 99999 }
\address{ mail[at]gmail[dot]com \\ +91-70000-00000 \href{https://github.com/}{ \faGithub} \href{https://www.linkedin.com/in//}{ \faLinkedin} }
\begin{resume}
%% \noindent\makebox[\linewidth]{\rule{\linewidth}{1.2pt}}% changed <<<<<<<<<<<<
\end{resume} % produce the header of the CV: name, address, etc
\parindent0mm% <<<<<<<<<<<<<<<
\setlength{\fboxrule}{0pt}
\setlength{\fboxsep}{4pt}
\hfill % <<<<<<<<<<<<<<<<<<<<,
\begin{minipage}[t]{.48\textwidth}
\section{Experience} % next line must be blank!!
\footnotesize % added <<<<<<<<<<
\begin{tabular}{ll@{}}
{\bfseries Get more company} & Nov 2021-- \\
{\itshape Senior Data Analyst } & \\[1ex] % add vertical space
{\bfseries Herbert University Medical Center} & Oct'17--Oct'21\\
{\itshape Staff associate } & \\[1ex]
{\bfseries Mason Washington University} &Feb'15--Oct'17 \\
{\itshape Research Associate} &\\[1ex]
{\bfseries Software Tele solution Services} & Nov'21--July'13 \\
{\itshape Software Engineer} &
\end{tabular}
\end{minipage}%
\end{document}