\cventry 中的不同间距

\cventry 中的不同间距

以下是一个例子:

\documentclass[10pt,a4paper,sans]{moderncv}        % possible options include font size ('10pt', '11pt' and '12pt'), paper size ('a4paper', 'letterpaper', 'a5paper', 'legalpaper', 'executivepaper' and 'landscape') and font family ('sans' and 'roman')

\renewcommand{\familydefault}{\sfdefault}         % to set the default font; use '\sfdefault' for the default sans serif font, '\rmdefault' for the default roman one, or any tex font name

% modern themes
\moderncvstyle{banking}                            % style options are 'casual' (default), 'classic', 'oldstyle' and 'banking'
\moderncvcolor{black}                                % color options 'blue' (default), 'orange', 'green', 'red', 'purple', 'grey' and 'black'

% character encoding
\usepackage[utf8]{inputenc}                   

% adjust the page margins
\usepackage[margin=0.63in]{geometry}
\usepackage{import}
\nopagenumbers{}

% personal data
\name{John}{Doe}
\phone[mobile]{+1 (111) 111-1111}                   
\email{[email protected]}    
\social{https://www.linkedin.com/in/username/}
\homepage{website.github.io}           

\pagenumbering{gobble}

\newcommand{\RN}[1]{%
  \textup{\uppercase\expandafter{\romannumeral#1}}%
}

%----------------------------------------------------------------------------------
%            content
%----------------------------------------------------------------------------------
\begin{document}

\makecvtitle

\vspace{-3em}

\section{Education}

\vspace{5pt}

\begin{itemize}

    \item[]{\cventry{expected June 2025}{Major 1: Computer Science, Minor: Mathematics}{University}{Location, XX}{GPA: 3.95, Dean's Honors List}{\vskip 3pt \footnotesize \textbf{Relevant Courses Completed:} Operating Systems, Data Structures \& OOP, Linear Algebra \RN{1} \& \RN{2}, Discrete Mathematics, \\ Computer Architecture, Software Construction, Single \& Multi-Variable Calculus, Logic Design of Digital Circuits, \\ Computer Organization, Differential Equations, Microeconomic Theory, Symbolic Logic}{\vskip 3pt \footnotesize \textbf{Relevant Courses Completed by Summer 2025:} Algorithms and Complexity, Programming Languages, Computer Networking, \\ Real Analysis, Abstract Algebra, Digital Circuit Design \& Implementation, Compiler Construction, Probability Theory, Computer Security }
}

\end{itemize}

\end{document}

我的问题很简单:为什么“2025 年完成的课程”的第二个(垂直)间距与“已完成的课程”的间距不同,我该如何解决这个问题,以及如何正确格式化它?

答案1

为了解决这个问题,把完整的“描述”(两部分)放在第六个参数中\cventry

您现在正在为第二部分使用第七个参数,其格式不同。

A

\documentclass[10pt,a4paper,sans]{moderncv}        % possible options include font size ('10pt', '11pt' and '12pt'), paper size ('a4paper', 'letterpaper', 'a5paper', 'legalpaper', 'executivepaper' and 'landscape') and font family ('sans' and 'roman')

\renewcommand{\familydefault}{\sfdefault}         % to set the default font; use '\sfdefault' for the default sans serif font, '\rmdefault' for the default roman one, or any tex font name

% modern themes
\moderncvstyle{banking}                            % style options are 'casual' (default), 'classic', 'oldstyle' and 'banking'
\moderncvcolor{black}                                % color options 'blue' (default), 'orange', 'green', 'red', 'purple', 'grey' and 'black'

% character encoding
\usepackage[utf8]{inputenc}                   

% adjust the page margins
\usepackage[margin=0.63in]{geometry}
\usepackage{import}
\nopagenumbers{}

% personal data
\name{John}{Doe}
\phone[mobile]{+1 (111) 111-1111}                   
\email{[email protected]}    
\social{https://www.linkedin.com/in/username/}
\homepage{website.github.io}           

\pagenumbering{gobble}

\newcommand{\RN}[1]{%
    \textup{\uppercase\expandafter{\romannumeral#1}}%
}

%----------------------------------------------------------------------------------
%            content
%----------------------------------------------------------------------------------
\begin{document}

\makecvtitle

\vspace{-3em}
\section{Education}

\vspace{5pt}

\begin{itemize}
    \item[]\cventry{expected June 2025}{Major 1: Computer Science, Minor: Mathematics}{University}{Location, XX}{GPA: 3.95, Dean's Honors List}
    {\vskip 3pt \footnotesize%  sixth parameter <<<<<<<
            \textbf{Relevant Courses Completed:} Operating Systems, Data Structures \& OOP, Linear Algebra \RN{1} \& \RN{2}, Discrete Mathematics, \\ Computer Architecture, Software Construction, Single \& Multi-Variable Calculus, Logic Design of Digital Circuits, \\ Computer Organization, Differential Equations, Microeconomic Theory, Symbolic Logic.
            \vskip 3pt 
            \textbf{Relevant Courses Completed by Summer 2025:} Algorithms and Complexity, Programming Languages, Computer Networking, \\ Real Analysis, Abstract Algebra, Digital Circuit Design \& Implementation, Compiler Construction, Probability Theory, Computer Security.
    }
\end{itemize}


\end{document}

相关内容