![创建小页面 || 颜色框并缩进框 || res 类](https://linux22.com/image/458151/%E5%88%9B%E5%BB%BA%E5%B0%8F%E9%A1%B5%E9%9D%A2%20%7C%7C%20%E9%A2%9C%E8%89%B2%E6%A1%86%E5%B9%B6%E7%BC%A9%E8%BF%9B%E6%A1%86%20%7C%7C%20res%20%E7%B1%BB.png)
我的简历中需要列。我使用 res 类文件并使用 latex 进行编译。当我这样做时,我看到使用 minipage 创建的框向右偏移,而文本:教育和技能在左侧的框中。
\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{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 \\more address \\ city, state pinconde }
\address{ mail[at]gmail[dot]com \\ +91-70000-00000 \href{https://github.com/}{ \faGithub} \href{https://www.linkedin.com/in//}{ \faLinkedin} }
%% {\aiGoogleScholar} \href{https://www.linkedin.com/in//}
\begin{resume}
\noindent\makebox[\linewidth]{\rule{\paperwidth}{1.2pt}}
\fcolorbox{white}{gray!22} {
\raggedleft
\begin{minipage}[t]{0.5\columnwidth} % The left column takes up 33% of the text width of the page
\section{Education}
\subsection{Samsun Institute of Technology}
\subsection{Some Institute of Technology}
\section{Skills}
\subsection{Programming}
\textbullet{} python, R, LaTeX \\
%----------------------------------------------------------------------------------------
\end{minipage} }
\begin{minipage}[t]{0.5\columnwidth}
\end{minipage}
\end{resume}
\end{document}
如何编辑框的大小、宽度?
答案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}% added showframe <<<<<<<<<
\usepackage{fancyhdr} %% fancy headers
\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}
% ************************************************** added <<<<<<<<<<<<
\makeatletter
\def\opening{\def\@opening{}%
\begingroup
\print@name%
\endgroup}
\makeatother
% **************************************************
\usepackage[hidelinks]{hyperref} %% use this to embed links and remove blue box around link. Put in HERE <<<<
\begin{document}
\newcommand{\cvgithub}[1]{\renewcommand{\cvgithub}{#1}}
\name{\bfseries first last\\[12pt]} % the \\[12pt] adds a blank line after name
%% remove top margin. reduce gap
\address{ address \\more address \\ city, state pinconde }
\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 <<<<<<<<<<<<
\fcolorbox{white}{gray!22}{%
\raggedleft
\begin{minipage}[t]{0.5\linewidth} % The left column takes up 33% of the text width of the page
\parindent12pt
\section{\hspace{6ex}Education}
Samsung Institute of Technology
Some Institute of Technology
\section{\hspace{6ex}Skills}
Programming
\textbullet{} python, R, LaTeX \\
\end{minipage}
}
\begin{minipage}[t]{0.5\columnwidth}
\end{minipage}
\end{resume}
\end{document}