cventry - 如何在 itemize 中完全对齐文本?

cventry - 如何在 itemize 中完全对齐文本?

我很难将逐项要点列表中的文本对齐到右侧。请帮忙。

下面的代码是完整的,如果依赖包可用,它应该可以编译。

在此处输入图片描述


%----------------------------------------------------------------------------------------
%   PACKAGES AND OTHER DOCUMENT CONFIGURATIONS
%----------------------------------------------------------------------------------------

\documentclass[10.5pt,a4paper,roman]{moderncv} % Font sizes: 10, 11, or 12; paper sizes: a4paper, letterpaper, a5paper, legalpaper, executivepaper or landscape; font families: sans or roman

\moderncvstyle{classic} % CV theme - options include: 'casual' (default), 'classic', 'oldstyle' and 'banking'
\moderncvcolor{blue} % CV color - options include: 'blue' (default), 'orange', 'green', 'red', 'purple', 'grey' and 'black'

\usepackage{lipsum} % Used for inserting dummy 'Lorem ipsum' text into the template
%\newgeometry{left=0.5cm,right=1cm}
\usepackage{ragged2e}
\justifying
\usepackage[a4paper, bindingoffset=0.2cm, left=0.5cm, right=1cm, top=1cm, bottom=0.1cm, footskip=.25in]{geometry} % Reduce document margins
\setlength{\hintscolumnwidth}{2.5cm} % Uncomment to change the width of the dates column
%\setlength{\makecvtitlenamewidth}{8cm} % For the 'classic' style, uncomment to adjust the width of th†e space allocated to your name

\usepackage{tasks}
%----------------------------------------------------------------------------------------
%   NAME AND CONTACT INFORMATION SECTION
%----------------------------------------------------------------------------------------

\firstname{John} % Your first name
\familyname{James} % Your last name


%----------------------------------------------------------------------------------------

\begin{document}

%----------------------------------------------------------------------------------------
%   CURRICULUM VITAE
%----------------------------------------------------------------------------------------

\makecvtitle % Print the CV title

\section{Work experience}

%------------------------------------------------

\cventry{{\footnotesize Aug 19--Present}}{Analyst}{BlueFin}{London}{}
{
\begin{itemize}
    \item Developed a generic Monte Carlo payoff framework for pricing \textbf{path-dependant} basket options. 
    \item Implemented a static replication of physical crude \textbf{Oil Storage} with a portfolio of spread options.
    \item Modelled a UK LNG terminal as a \textbf{Gas Storage} facility and structured monetisation strategies.
\end{itemize}}
\vspace*{5px}

\end{document}

答案1

嗯,有一个误会……

您选择的简历边距非常小(顺便说一句,我认为太小了)。如您在以下 MWE 中看到的,没有任何道理(我添加了showframe可视化输入区域和边距的选项):

\documentclass[10.5pt,a4paper,roman]{moderncv} % Font sizes: 10, 11, or 12; paper sizes: a4paper, letterpaper, a5paper, legalpaper, executivepaper or landscape; font families: sans or roman

\moderncvstyle{classic} % CV theme - options include: 'casual' (default), 'classic', 'oldstyle' and 'banking'
\moderncvcolor{blue} % CV color - options include: 'blue' (default), 'orange', 'green', 'red', 'purple', 'grey' and 'black'

\usepackage{lipsum} % Used for inserting dummy 'Lorem ipsum' text into the template
%\usepackage{ragged2e} % <==============================================
%\justifying % <========================================================
\usepackage[%
  a4paper, bindingoffset=0.2cm, 
  left=0.5cm, right=1cm, top=1cm, bottom=0.1cm, 
  footskip=.25in,
  showframe % <=========================================================
]{geometry} % Reduce document margins
\setlength{\hintscolumnwidth}{2.5cm} % Uncomment to change the width of the dates column
%\setlength{\makecvtitlenamewidth}{8cm} % For the 'classic' style, uncomment to adjust the width of th†e space allocated to your name

\usepackage{tasks}
%----------------------------------------------------------------------------------------
%   NAME AND CONTACT INFORMATION SECTION
%----------------------------------------------------------------------------------------

\firstname{John} % Your first name
\familyname{James} % Your last name


%----------------------------------------------------------------------------------------

\begin{document}

%----------------------------------------------------------------------------------------
%   CURRICULUM VITAE
%----------------------------------------------------------------------------------------

\makecvtitle % Print the CV title

\section{Work experience}

%------------------------------------------------

\cventry{{\footnotesize Aug 19--Present}}{Analyst}{BlueFin}{London}{}
{
\begin{itemize}
    \item Developed a generic Monte Carlo payoff framework for pricing \textbf{path-dependant} basket options. 
    \item Implemented a static replication of physical crude \textbf{Oil Storage} with a portfolio of spread options.
    \item Modelled a UK LNG terminal as a \textbf{Gas Storage} facility and structured monetisation strategies.
\end{itemize}}
\vspace*{5px}

\end{document}

以及其第一页的结果:

第一页

如您所见(用红色箭头标记),您的文本行没有到达打字区域的右端......

与上面的 MWE 相同,但带有注释行geometry

% left=0.5cm, right=1cm, top=1cm, bottom=0.1cm, 

你可以得到通常的边距和右侧的对齐:

第二个例子第一页

正如您所看到的,您不需要调用包ragged2e和命令\justifing(我在给定的 MWE 中对它们进行了注释)。

相关内容