创建小页面 || 颜色框并缩进框 || res 类

创建小页面 || 颜色框并缩进框 || res 类

我的简历中需要列。我使用 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

尝试此代码。(\subsection此处不是有效命令) b

\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}

相关内容