我正在尝试制作简历模板,需要将大量内容压缩到一两页中。
我发现了一些带阴影颜色框和标尺部分的环境。
\newlist{experience}{description}{1}
\setlist[experience]{labelwidth=4em, align=left}
\newenvironment{zero_experience}{
\begin{experience}
\setlength{\itemsep}{0pt}
\setlength{\parskip}{0pt}
\setlength{\parsep}{0pt}}{\end{experience}
}
\definecolor{shadecolor}{gray}{.95}
\setlength{\FrameSep}{0pt}
\titleformat{\section}{\large\scshape\raggedright}{}{0em}{}[\titlerule]
用于诸如
\section{Education}
\begin{shaded}
\begin{zero_experience}
\item[\ School] University of A at B \hfill B, CA (Jan. 2013 --- Aug. 2016) \mbox{\hspace*{.5em}}
\item[\ Degree] \textbf{ABC. Physics}
\end{zero_experience}
\end{shaded}
\begin{experience}[leftmargin=\dimexpr\FrameRule+4em+\labelsep]
\item[] Research on Software Engineering and its application to Research on Software Engineering and its application to Research on Software Engineering and its application to
\end{experience}
但结果显示空间太大
- 剖面线和阴影框之间。
- 阴影框中的上部空间。
- 阴影框下方的空间。
- 阴影框和体验环境之间。
我本来可以用它\vspace
来控制空间,但我发现它并不总是有效。因此,我需要更新设置来控制空间。我该怎么做?
这是源代码。
\documentclass[a4paper, oneside, final]{scrartcl}
\usepackage{scrpage2}
\usepackage{titlesec}
\usepackage{xcolor}% http://ctan.org/pkg/xcolor
\usepackage{enumitem}% http://ctan.org/pkg/enumitem
\usepackage{framed}% http://ctan.org/pkg/framed
\usepackage{hyperref}
\usepackage[textwidth=18cm, textheight=25cm]{geometry}
\newlist{experience}{description}{1}
\setlist[experience]{labelwidth=4em, align=left}
\newenvironment{zero_experience}{
\begin{experience}
\setlength{\itemsep}{0pt}
\setlength{\parskip}{0pt}
\setlength{\parsep}{0pt}
}{\end{experience}
}
\definecolor{shadecolor}{gray}{.95}
\setlength{\FrameSep}{0pt}
\titleformat{\section}{\large\scshape\raggedright}{}{0em}{}[\titlerule]
\pagestyle{scrheadings}
\begin{document}
\section{Education}
\begin{shaded}
\begin{zero_experience}
\item[\ School] University of A at B \hfill B, CA (Jan. 2013 --- Aug. 2016) \mbox{\hspace*{.5em}}
\item[\ Degree] \textbf{ABC. Physics}
\end{zero_experience}
\end{shaded}
\begin{experience}[leftmargin=\dimexpr\FrameRule+4em+\labelsep]
\item[] Research on Software Engineering and its application to Research on Software Engineering and its application to Research on Software Engineering and its application to
\end{experience}
\end{document}
答案1
首先...titlesec
还有KOMA
...叹息...
topsep
现在,可以通过设置enumitem
列表和包\OuterFrameSep
的值来控制间距framed
。
\documentclass[a4paper, oneside, final]{scrartcl}
\usepackage{scrpage2}
\usepackage{titlesec}
\usepackage{xcolor}% http://ctan.org/pkg/xcolor
\usepackage{enumitem}% http://ctan.org/pkg/enumitem
\usepackage{framed}% http://ctan.org/pkg/framed
\usepackage[textwidth=18cm, textheight=25cm]{geometry}
\usepackage{hyperref}
\newlist{experience}{description}{1}
\setlist[experience]{labelwidth=4em, align=left}
\newenvironment{zero_experience}{%
\setlength{\parskip}{0pt}%
\begin{experience}[itemsep=0pt,parsep=0pt,topsep=0pt]
}{\end{experience}
}
\definecolor{shadecolor}{gray}{.95}
\setlength{\FrameSep}{0pt}
\setlength{\OuterFrameSep}{1pt}
\titleformat{\section}{\large\scshape\raggedright}{}{0em}{}[\titlerule]
\pagestyle{scrheadings}
\begin{document}
\section{Education}
\begin{shaded}
\begin{zero_experience}
\item[\ School] University of A at B \hfill B, CA (Jan. 2013 --- Aug. 2016) \mbox{\hspace*{.5em}}
\item[\ Degree] \textbf{ABC. Physics}
\end{zero_experience}
\end{shaded}
\begin{experience}[leftmargin=\dimexpr\FrameRule+4em+\labelsep]
\item[] Research on Software Engineering and its application to Research on Software Engineering and its application to Research on Software Engineering and its application to
\end{experience}
\end{document}