入口列表中的间距会移动相邻的块

入口列表中的间距会移动相邻的块

这里有一个小问题。我正在使用一个我不太熟悉的模板,而且有点新手。所以我遇到问题的代码部分

\begin{entrylist}
  \entry
    {RELAP \\ SIMPLER \\ XX   
    }
    {Nuclear Safety, Neutronic and Termohidraulics Analysis}
    {}
    {\emph{I can use several computational tools for engineering analysis. I've used codes such as  and programed implementations with the Point Kinetic Equations, }}

输出为

在此处输入图片描述

如您所见,“核安全的开始...”跟在另一个块的最后一行后面,在左侧。我希望左侧的列表,即“ RELAP SIMPLER ..”位于 \emph 文本的左侧

在此处输入图片描述

不触及标题。

我认为这个问题与环境有关,与格式无关。模板的格式如下

\ProvidesClass{friggeri-cv}[2012/04/30 CV class]
\NeedsTeXFormat{LaTeX2e}

\DeclareOption{print}{\def\@cv@print{}}
\DeclareOption*{%
  \PassOptionsToClass{\CurrentOption}{article}%
}
\ProcessOptions\relax
\LoadClass{article}

´

%%%%%%%%%%
% Colors %
%%%%%%%%%%
[stuff]


%%%%%%%%%
% Fonts %
%%%%%%%%%


%%%%%%%%%%%%%%%%%%%%
% List environment %
%%%%%%%%%%%%%%%%%%%%

\setlength{\tabcolsep}{0pt}
\newenvironment{entrylist}{%
  \begin{tabular*}{\textwidth}{@{\extracolsep{\fill}}ll}
}{%
  \end{tabular*}
}
\renewcommand{\bfseries}{\headingfont\color{headercolor}}
\newcommand{\entry}[4]{%
  #1&\parbox[t]{11.8cm}{%
    \textbf{#2}%
    \hfill%
    {\footnotesize\addfontfeature{Color=lightgray} #3}\\%
    #4\vspace{\parsep}%
  }\\}

minipage我知道这可以用和来实现tabular,但这会产生其他间距等问题,如果能够直接解决这个问题,实现模板已经使用的结构就好了。提前致谢

Format file-----------> friggeri-cv.cls

\RequirePackage[absolute,overlay]{textpos}
\setlength{\TPHorizModule}{1cm}
\setlength{\TPVertModule}{1cm}
\newenvironment{aside}{%
  \let\oldsection\section
  \renewcommand{\section}[1]{
    \par\vspace{\baselineskip}{\Large\headingfont\color{headercolor} ##1}
  }
  \begin{textblock}{3.6}(1.5, 4.33)
  \begin{flushright}
  \obeycr
}{%
  \restorecr
  \end{flushright}
  \end{textblock}
  \let\section\oldsection
}

%%%%%%%%%%%%%%%%
% Bibliography %
%%%%%%%%%%%%%%%%

\RequirePackage[style=verbose, maxnames=99, sorting=ydnt]{biblatex}

\DeclareFieldFormat[article]{title}{#1\par}
\DeclareFieldFormat[inproceedings]{title}{#1\par}
\DeclareFieldFormat[misc]{title}{#1\par}
\DeclareFieldFormat[report]{title}{#1\par}

\DeclareBibliographyDriver{article}{%
  \printfield{title}%
  \newblock%
  \printnames{author}%
  \par%
  \newblock%
  {%
    \footnotesize\addfontfeature{Color=lightgray}\itshape%
    \usebibmacro{journal+issuetitle}%
    \setunit{\space}%
    \printfield{pages}%
    \newunit%
    \printlist{publisher}%
    \setunit*{\addcomma\space}%
    \printfield{year}%
    \newunit%
  }
  \par\vspace{0.3\baselineskip}
}

\DeclareBibliographyDriver{inproceedings}{%
  \printfield{title}%
  \newblock%
  \printnames{author}%
  \par%
  \newblock%
  {%
    \footnotesize\addfontfeature{Color=lightgray}%
    \printfield{booktitle}%
    \setunit{\addcomma\space}%
    \printfield{year}%
    \setunit{\addcomma\space}%
    \printlist{location}%
    \newunit%
  }
  \par\vspace{0.3\baselineskip}
}

\DeclareBibliographyDriver{misc}{%
  \printfield{title}%
  \newblock%
  \printnames{author}%
  \par%
  \newblock%
  {%
    \footnotesize\addfontfeature{Color=lightgray}\itshape%
    \printfield{booktitle}%
    \setunit*{\addcomma\space}%
    \printfield{note}%
    \setunit*{\addcomma\space}%
    \printfield{year}%
    \setunit{\addcomma\space}%
    \printlist{location}%
    \newunit%
  }
  \par\vspace{0.3\baselineskip}
}

\DeclareBibliographyDriver{report}{%
  \printfield{title}%
  \newblock%
  \printnames{author}%
  \par%
  \newblock%
  {%
    \footnotesize\addfontfeature{Color=lightgray}\itshape%
    \printfield{type}%
    \setunit{\space}%
    \printfield{number}%
    \setunit{\addcomma\space}%
    \printfield{year}%
    \newunit%
  }
  \par\vspace{0.3\baselineskip}
}

\DeclareNameFormat{author}{%
  \small\addfontfeature{Color=lightgray}%
  \ifblank{#3}{}{#3\space}#1%
  \ifthenelse{\value{listcount}<\value{liststop}}
    {\addcomma\space}
    {}%
}

\newcommand{\printbibsection}[2]{
  \begin{refsection}
    \nocite{*}
    \printbibliography[sorting=chronological, type={#1}, title={#2}, heading=subbibliography]
  \end{refsection}
}

\DeclareSortingScheme{chronological}{
  \sort[direction=descending]{\field{year}}
  \sort[direction=descending]{\field{month}}
}



%%%%%%%%%%%%%%%%
% Other tweaks %
%%%%%%%%%%%%%%%%

\RequirePackage[left=6.1cm,top=2cm,right=1.5cm,bottom=2.5cm,nohead,nofoot]{geometry}
\RequirePackage{hyperref}

主文件 CV.tex

%!TEX TS-program = xelatex
\documentclass[]{friggeri-cv}
\addbibresource{bibliography.bib}
\usepackage{verbatim}
\begin{document}
\header{XX}{XX}
       {XX}


% In the aside, each new line forces a line break
\begin{aside}
  \section{about}
    XX
  \section{languages}
    XX
  \section{programming}
      XX             
\end{aside}

\begin{entrylist}
  \entry
    {RELAP \\ SIMPLER 
    }
    {Nuclear Safety, Neutronic and Termohidraulics Analysis}
    {}
    {\emph{text text text}}
  \entry
    {06–08 2007}
    {LIP6/CNRS, Paris}
    {Research Internship.}
    {\emph{Kernels in real world networks.}}
\end{entrylist}


\end{document}

答案1

也许你想要这样的东西?我截取了你的代码的几个片段,并纠正了一些不一致之处(和拼写错误)。我更喜欢使用环境tabularx,但我不明白你为什么设置为 0pt。最后,可以使用而不是 来\tabcolsep解决块的对齐问题。\break\\

\documentclass[a4paper,10pt]{article}
\usepackage{fontspec}
\usepackage{ragged2e}
\usepackage{tabularx}
\usepackage{xcolor}

\colorlet{headercolor}{black}
\let\headingfont\sffamily
\setlength{\tabcolsep}{0pt}
\newenvironment{entrylist}{%
\noindent\sffamily\tabularx{\textwidth}{@{}p{25mm} > {\RaggedRight\arraybackslash}X@{}}
}{%
  \endtabularx
}
%

\newcommand{\entry}[4]{%
  #1  &
    \textbf{\headingfont\color{headercolor}#2}%
    \hfill%
    {\footnotesize\addfontfeature{Color=lightgray} #3\break}%
    #4\vspace{\parsep}%
\\}

\begin{document}

\begin{entrylist}
  \entry
    {RELAP \break SIMPLER \break XX
    }
    {Nuclear Safety, Neutronic and Thermohydraulics Analysis}
    {}
    {\emph{I can use several computational tools for engineering analysis. I've used codes such as  and programmed implementations with the Point Kinetic Equations, }}
    \end{entrylist}

\end{document} 

在此处输入图片描述

答案2

我知道这个话题已经很老了,你说

minipage我知道这可以用和来实现tabular,但这会产生其他间距等问题,如果能够直接解决这个问题,实现模板已经使用的结构就好了。提前致谢

但我遇到了类似的问题,并且能够用 很好地解决它minipage。我认为间距没有任何问题,如果我错了,请纠正我。因此,对于遇到此主题、遇到相同问题并像我一样正在寻找快速(且粗糙)解决方案的任何人,请尝试

%!TEX TS-program = xelatex
\documentclass[]{friggeri-cv}
\addbibresource{bibliography.bib}
\usepackage{verbatim}
\begin{document}
\header{XX}{XX}
       {XX}


% In the aside, each new line forces a line break
\begin{aside}
  \section{about}
    XX
  \section{languages}
    XX
  \section{programming}
      XX             
\end{aside}

\begin{entrylist}
  \entry
      {
        \begin{minipage}[t]{0.15\textwidth}
            RELAP \\ SIMPLER
        \end{minipage}
     }
    {Nuclear Safety, Neutronic and Termohidraulics Analysis}
    {}
    {\emph{text text text}}
  \entry
    {06–08 2007}
    {LIP6/CNRS, Paris}
    {Research Internship.}
    {\emph{Kernels in real world networks.}}
\end{entrylist}


\end{document}

即在第一个 {} 括号内使用minipage带有所需内容的 。这里,我从 OP 使用的主文件 CV.tex 中获取了代码。如果您希望它与 中的文本对齐\emph{...},您仍然可以\valign{0.175cm}在 中添加 (或该值附近的内容)minipage。也许您也必须尝试一下0.15\textwidth,但我仍然认为我的情况中的间距没有任何问题。

比较: 无迷你页面

使用小页面

相关内容