Currvita: 第一个 CVlistitem 下的行

Currvita: 第一个 CVlistitem 下的行

我希望每个第一行下面都有一行cvlist标题下(到页边距末尾)加一行,但该行不应该增加标题和后续条目之间的空间。有什么好方法可以实现这一点吗?

\documentclass{article}
\usepackage[ngerman]{babel}
\usepackage{currvita}
\usepackage[T1]{fontenc}            
\usepackage[utf8]{inputenc}

\begin{document} \setlength{\cvlabelwidth}{6cm}
  \begin{cvlist}{Schulbildung:} 
  \item[\rule{\textwidth}{0.4pt}]
  \item[08/200X ~\textemdash~ zurzeit] Grundschule und Gymnasium in Mettmann
    (Leistungskurse Mathematik und Physik)
  \end{cvlist}
\end{document}

在此处输入图片描述

答案1

困难的方法是更新cvlist环境:

\documentclass{article}
\usepackage[ngerman]{babel}
\usepackage{currvita}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}

\makeatletter
\renewenvironment{cvlist}[1]{%
  \sbox{\@cvlistheading}{\makebox[0pt][l]{\rule[-0.5\baselineskip]{\textwidth}{0.4pt}}%
  \cvlistheadingfont#1}%
  \begin{list}{}{%
      \renewcommand*{\makelabel}[1]{%
        \settowidth{\@tempdima}{\usebox{\@cvlistheading}}%
        \ifthenelse{\lengthtest{\@tempdima > 0pt}}{%
          \settowidth{\@tempdimb}{\cvlabelfont##1}%
          \ifthenelse{%
            \lengthtest{\@tempdima < \cvlabelwidth} \and
            \lengthtest{\@tempdimb = 0pt}}{%
            \parbox[b]{\cvlabelwidth}{%
              \vspace{\cvlabelskip}%
              \makebox[\cvlabelwidth][l]{%
                \box\@cvlistheading
              }%
            }%
          }{%
            \parbox[b]{0pt}{%
              \makebox[0pt][l]{\box\@cvlistheading}%
              \\*[0.5\baselineskip plus 1pt minus 1pt]%
            }%
          }%
        }{}%
        \cvlabelfont##1\hfill
      }%
      \setlength{\itemsep}{0ex}%
      \setlength{\parsep}{%
        0.5\baselineskip plus 1pt minus 1pt%
      }%
      \setlength{\topsep}{%
        1\baselineskip plus 2pt minus 2pt%
      }%
      \setlength{\partopsep}{0ex}%
      \setlength{\labelsep}{\cvlabelsep}%
      \setlength{\labelwidth}{\cvlabelwidth}%
      \setlength{\leftmargin}{\cvlabelwidth}%
      \addtolength{\leftmargin}{\cvlabelsep}%
    }%
}{%
  \end{list}%
}%
\makeatother

\begin{document} \setlength{\cvlabelwidth}{6cm}
  \begin{cvlist}{Schulbildung:}
  %\item[\rule{\textwidth}{0.4pt}]
  \item[08/200X ~\textemdash~ zurzeit] Grundschule und Gymnasium in Mettmann
    (Leistungskurse Mathematik und Physik)
  \end{cvlist}
\end{document}

软方法是修补:

\documentclass{article}
\usepackage[ngerman]{babel}
\usepackage{currvita}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{xpatch}
\xpatchcmd{\cvlist}{\cvlistheadingfont#1}
                   {\makebox[0pt][l]{\rule[-0.5\baselineskip]{\textwidth}{0.4pt}}\cvlistheadingfont#1}
                   {}{}


\begin{document} \setlength{\cvlabelwidth}{6cm}
  \begin{cvlist}{Schulbildung:}
  %\item[\rule{\textwidth}{0.4pt}]
  \item[08/200X ~\textemdash~ zurzeit] Grundschule und Gymnasium in Mettmann
    (Leistungskurse Mathematik und Physik)
  \end{cvlist}
\end{document}

在此处输入图片描述

相关内容