\documentclass[12pt ]{res} % default is 10 pt
\usepackage[hidelinks]{hyperref} %% use this to embed links and remove blue box around link
%% \usepackage{academicons} %% use this for google scholar
\usepackage{xcolor}
\usepackage[left=0.2in, right=0.8in, bottom=0.5in,top=0.2in, footskip=5pt]{geometry}
\usepackage{microtype}
\usepackage{enumitem} %% enum list item
\usepackage{fancyhdr} %% fancy headers
\usepackage{index} %% auto generated indexes
%% \usepackage{lipsum}
\usepackage{xfp}
\usepackage{adjustbox}
\usepackage{blindtext}
\usepackage{fontawesome}
\setlength{\headsep}{0.2in} % space between header and text
\renewcommand{\headrulewidth}{0pt} % suppress line drawn by default by fancyhdr
\pagestyle{fancy} % set pagestyle for the document
\fancyhead{}
\fancyfoot{} % Set the right side of the footer to be the page number
\fancyhf{}
\fancyfoot[R]{\thepage}
\begin{document}
\newcommand{\cvgithub}[1]{\renewcommand{\cvgithub}{#1}}
\name{\bf First Last\\[12pt]} % the \\[12pt] adds a blank line after name
%% remove top margin. reduce gap
\address{ Address \\line two \\ city, ST 99999 }
\address{ email[at]gmail[dot]com \\ 70000000 \href{https://github.com/}{ \faGithub} \href{https://www.linkedin.com/in//}{ \faLinkedin} }
\href{https://www.linkedin.com//}
\begin{resume}
\begin{minipage}[t]{.49\textwidth \linewidth - 1\fboxsep}
\raggedright
\section{Education}
Samsung Institute of Technology
Some Institute of Technology
\section{Core Skills}
\section{Technical Skills}
\end{minipage}%
%
\begin{minipage}[t]{.49\textwidth \linewidth - 1\fboxsep}
\raggedleft
\section{Experience}
Somecompany
University of Medical Center
Chicago University
\end{minipage}% <-- Don't forget this one
\end{resume}
\end{document}
如何使体验小页面内的文本左侧缩进?
如何让左侧小页面、教育中的文本更向左缩进?我希望它位于教育标题右侧 1 毫米处。
如何使左侧小页面、教育、核心技能等内容的背景颜色变为灰色,直到页面结束?
答案1
尝试一下这个代码。
\documentclass[12pt ]{res} % default is 10 pt
\usepackage{xcolor}
\usepackage[left=0.2in, right=0.8in, bottom=0.5in,top=0.2in, footskip=5pt,showframe]{geometry} % changed to show margins
\begin{document}
\name{\bfseries First Last\\[12pt]} % changed <<<<<<<<<<<<<<<<
%% remove top margin. reduce gap
\address{ Address \\line two \\ city, ST 99999 }
\begin{resume}
\parindent0mm% <<<<<<<<<<<<<<<
\setlength{\fboxrule}{0pt}
\setlength{\fboxsep}{0pt}
\fcolorbox{lightgray}{gray!20!white}{% color the minipage <<<<<<<<<<<<
\begin{minipage}[t]{.45\textwidth }
\raggedright
\parindent5mm% <<<<<<<<<<< indent inside the minipage
\noindent\textbf{Education}
Samsung Institute of Technology
Some Institute of Technology
\vspace*{12pt}
\noindent\textbf{Core Skills}
Let us suppose that the noumena have nothing to do
with necessity, since knowledge of the Categories is a
posteriori.
\vspace*{12pt}
\noindent\textbf{Technical Skills}
As is shown in the writings of Aristotle, the things
in themselves (and it remains a mystery why this is the case) are a
representation of time.
\end{minipage}}%
\hfill % <<<<<<<<<<<<<<<<<<<<,
\begin{minipage}[t]{.45\textwidth}
\raggedleft\parindent5mm
\textbf{Experience} % next line must be blank!!
\begin{tabular}{l@{}}
Some company\\
University of Medical Center\\
Chicago University
\end{tabular}
\end{minipage}% <-- Don't forget this one
\end{resume}
\end{document}
这res.cls
是一个相当古老的课程。使用以下方法您将获得相同的结果 article
(并且编译时间更短!)
主要代码相同。仅添加了名称和地址。
\documentclass[12pt ]{article} % default is 10 pt
\usepackage{xcolor}
\usepackage[left=0.7in, right=0.5in, bottom=0.5in,top=0.2in, footskip=5pt,showframe]{geometry} % changed to show margins
\begin{document}
\parindent0mm% <<<<<<<<<<<<<<<
\begin{center} % added <<<<<<<<<<<<<<<
\begin{tabular}{l}
\large \textbf{First Last}\\[12pt]
Address \\line two \\ city, ST 99999
\end{tabular}
\end{center}
\setlength{\fboxrule}{0pt}
\setlength{\fboxsep}{0pt}
\fcolorbox{lightgray}{gray!20!white}{%
\begin{minipage}[t]{.45\textwidth }
\raggedright
\parindent5mm% <<<<<<<<<<< indent inside the minipage
\noindent\textbf{Education}
Samsung Institute of Technology
Some Institute of Technology
\vspace*{12pt}
\noindent\textbf{Core Skills}
Let us suppose that the noumena have nothing to do
with necessity, since knowledge of the Categories is a
posteriori.
\vspace*{12pt}
\noindent\textbf{Technical Skills}
As is shown in the writings of Aristotle, the things
in themselves (and it remains a mystery why this is the case) are a
representation of time.
\end{minipage}}%
\hfill % <<<<<<<<<<<<<<<<<<<<,
\begin{minipage}[t]{.45\textwidth}
\raggedleft
\textbf{Experience} % next line must be blank!!
\begin{tabular}{l@{}}
Some company\\
University of Medical Center\\
Chicago University
\end{tabular}
\end{minipage}% <-- Don't forget this one
\end{document}
更新后续问题之后
height
可以使用可选的第二个参数 ( )来控制小页面的高度。
\begin{minipage}[position][height][internal-pos]{width}
其正确值将取决于 CV 标题的最终高度。(如果太大,小页面将转到下一页)
现在右列左对齐并且缩进。
\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} \end{resume} % produce the header of the CV: name, address, etc
\parindent0mm% <<<<<<<<<<<<<<<
\setlength{\fboxrule}{0pt}
\setlength{\fboxsep}{4pt}
\fcolorbox{lightgray}{gray!20!white}{% color the minipage <<<<<<<<<<<<
\begin{minipage}[t][8.7in]{.48\textwidth}
\raggedright
\parindent5mm% <<<<<<<<<<< indent inside the minipage
\section{Education}
Samsung Institute of Technology
Some Institute of Technology
\medskip\section{Core Skills}
Let us suppose that the noumena have nothing to do
with necessity, since knowledge of the Categories is a
posteriori.
\medskip\section{Technical Skills}
As is shown in the writings of Aristotle, the things
in themselves (and it remains a mystery why this is the case) are a
representation of time.
\end{minipage}}%
\hfill % <<<<<<<<<<<<<<<<<<<<,
\begin{minipage}[t]{.48\textwidth}
\raggedright
\parindent5mm% <<<<<<<<<<< indent inside the minipage
\section{Experience} % next line must be blank!!
Some company
University of Medical Center
Chicago University
\end{minipage}%
\end{document}