如何减少乳胶中每个部分之前的间距

如何减少乳胶中每个部分之前的间距

下面是我的 latex 代码。我还上传了一张截图。从截图中你可以看到,我想减少部分标题前的空间。我找到了一些解决方案,但他们改变了部分标题的样式。我想保留这种风格,但只需要减少部分前的空间。

%\title{My two column CV}
%
% tccv (two columns curriculum vitae) is a LaTeX class inspired by
% the template found at latextemplates.com by Alessandro Plasmati.
%
% Create by Nicola Fontana, the original files can be downloaded from:
% http://dev.entidi.com/p/tccv/
%
\documentclass{tccv}
\usepackage{amsmath}%
\usepackage{MnSymbol}%
\usepackage{wasysym}%
\usepackage[english]{babel}


\begin{document}

\part{Md name}

\section{Software skills}

\begin{eventlist}
\textbf{Good level: } Ruby, Ruby on Rails, Active Record, MySQL, C, C++, HTML5, CSS3, Jquery, handlebars.js, Jquery UI, Twitter Bootstrap, Git, Github, Linux, Windows, Apache, MS Visual Studio 2012 \& 2008, Net-beans, RubyMine, Pivotal Tracker
\newline \newline
\textbf{Intermediate: } Backtrack 5, Latex, Wordpress
\newline \newline
\textbf{Basic level: } Java, C\#, PHP, Oracle 10g, AutoCAD 2007, MATLAB 7.0

\end{eventlist}

\section{Achievements}
\begin{itemize}
\item 4 years govt. scholarship for HSC result. 
\item 2 years govt. scholarship for SSC result. 
\end{itemize}
\end{document}

在此处输入图片描述

答案1

如果您想减少所有eventlist环境之后的空间,请将其放在序言中:

%% this will reduce space after all event lists.
\usepackage{etoolbox}
\AfterEndEnvironment{eventlist}{\vspace{-1.5\baselineskip}}

另一方面,如果您只想在某些(或一个)环境之后执行此操作,请\vspace{-1.5\baselineskip}在之后添加\end{eventlist}

\end{eventlist}
%\vspace{-1.5\baselineskip} 

完整代码如下:

%\title{My two column CV}
%
% tccv (two columns curriculum vitae) is a LaTeX class inspired by
% the template found at latextemplates.com by Alessandro Plasmati.
%
% Create by Nicola Fontana, the original files can be downloaded from:
% http://dev.entidi.com/p/tccv/
%
\documentclass{tccv}
\usepackage{amsmath}%
\usepackage{MnSymbol}%
\usepackage{wasysym}%
\usepackage[english]{babel}

%% this will reduce space after all event lists.
\usepackage{etoolbox}
\AfterEndEnvironment{eventlist}{\vspace{-1.5\baselineskip}}

\begin{document}

\part{Md name}

\section{Software skills}

\begin{eventlist}
\textbf{Good level: } Ruby, Ruby on Rails, Active Record, MySQL, C, C++, HTML5, CSS3, Jquery, handlebars.js, Jquery UI, Twitter Bootstrap, Git, Github, Linux, Windows, Apache, MS Visual Studio 2012 \& 2008, Net-beans, RubyMine, Pivotal Tracker
\newline \newline
\textbf{Intermediate: } Backtrack 5, Latex, Wordpress
\newline \newline
\textbf{Basic level: } Java, C\#, PHP, Oracle 10g, AutoCAD 2007, MATLAB 7.0

\end{eventlist}
%\vspace{-1.5\baselineskip}  %% Do this if you want to reduce space only for one instance

\section{Achievements}
\begin{itemize}
\item 4 years govt. scholarship for HSC result.
\item 2 years govt. scholarship for SSC result.
\end{itemize}
\end{document}

您还可以通过以下方式修补环境以删除环境\bigskip插入的eventlist

\renewenvironment{eventlist}{%
    \newcommand*\inskip{}
    \renewcommand\item[3]{%
    \inskip%
    {\raggedleft\textsc{##1}\\[1pt]}
    \ifstrempty{##2}{}{##2\\[2pt]}
    {\Large\textit{##3}}
    \medskip
    \renewcommand\inskip{\bigskip}}}
    {\par\vspace{-\baselineskip}}    %%< here you change, originally {\bigskip}.

再次编码:

%\title{My two column CV}
%
% tccv (two columns curriculum vitae) is a LaTeX class inspired by
% the template found at latextemplates.com by Alessandro Plasmati.
%
% Create by Nicola Fontana, the original files can be downloaded from:
% http://dev.entidi.com/p/tccv/
%
\documentclass{tccv}
\usepackage{amsmath}%
\usepackage{MnSymbol}%
\usepackage{wasysym}%
\usepackage[english]{babel}

\renewenvironment{eventlist}{%
    \newcommand*\inskip{}
    \renewcommand\item[3]{%
    \inskip%
    {\raggedleft\textsc{##1}\\[1pt]}
    \ifstrempty{##2}{}{##2\\[2pt]}
    {\Large\textit{##3}}
    \medskip
    \renewcommand\inskip{\bigskip}}}
    {\par\vspace{-\baselineskip}}    %%< here you change, originally {\bigskip}.

\begin{document}

\part{Md name}

\section{Software skills}

\begin{eventlist}
\textbf{Good level: } Ruby, Ruby on Rails, Active Record, MySQL, C, C++, HTML5, CSS3, Jquery, handlebars.js, Jquery UI, Twitter Bootstrap, Git, Github, Linux, Windows, Apache, MS Visual Studio 2012 \& 2008, Net-beans, RubyMine, Pivotal Tracker
\newline \newline
\textbf{Intermediate: } Backtrack 5, Latex, Wordpress
\newline \newline
\textbf{Basic level: } Java, C\#, PHP, Oracle 10g, AutoCAD 2007, MATLAB 7.0

\end{eventlist}

\section{Achievements}
\begin{itemize}
\item 4 years govt. scholarship for HSC result.
\item 2 years govt. scholarship for SSC result.
\end{itemize}
\end{document}

在此处输入图片描述

相关内容