问题/疑问
当前环境中的所有项目itemize
(1. Lorem Ipsum (...) - 4. Lorem Ipsum (...)) 都在第 2 页。
我想将第一项(1. Lorem Ipsum (...))保留在第一页,然后让其余项目(2. Lorem Ipsum (...) 及以后)转到第二页。
我尝试在第一个项目和第二个项目之间使用和\begin{samepage} \end{samepage}
添加垂直空间,但似乎没有任何效果。\vspace{}
\vfill{}
代码
%% start of file `template.tex'.
%% Copyright 2006-2013 Xavier Danaux ([email protected]).
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License version 1.3c,
% available at http://www.latex-project.org/lppl/.
\documentclass[11pt,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')
% moderncv themes
\moderncvstyle{classic} % style options are 'casual' (default), 'classic', 'oldstyle' and 'banking'
\moderncvcolor{black} % color options 'blue' (default), 'orange', 'green', 'red', 'purple', 'grey' and 'black'
%\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
%\nopagenumbers{} % uncomment to suppress automatic page numbering for CVs longer than one page
%For bulleted list in cventry
\newcommand\mybitem[1]{%
\parbox[t]{3mm}{\textbullet}\parbox[t]{10cm}{#1}\\[1.6mm]}
% character encoding
\usepackage[utf8]{inputenc} % if you are not using xelatex ou lualatex, replace by the encoding you are using
%\usepackage{CJKutf8} % if you need to use CJK to typeset your resume in Chinese, Japanese or Korean
% adjust the page margins
\usepackage[scale=0.75]{geometry}
%\setlength{\hintscolumnwidth}{3cm} % if you want to change the width of the column with the dates
%\setlength{\makecvtitlenamewidth}{10cm} % for the 'classic' style, if you want to force the width allocated to your name and avoid line breaks. be careful though, the length is normally calculated to avoid any overlap with your personal info; use this at your own typographical risks...
% personal data
\name{John}{Doe}
\title{curriculum vitae} % optional, remove / comment the line if not wanted
% optional, remove / comment the line if not wanted
\photo[74pt][0.6pt]{DisplayImage} % optional, remove / comment the line if not wanted; '64pt' is the height the picture must be resized to, 0.4pt is the thickness of the frame around it (put it to 0pt for no frame) and 'picture' is the name of the picture file
% optional, remove / comment the line if not wanted
% to show numerical labels in the bibliography (default is to show no labels); only useful if you make citations in your resume
%\makeatletter
%\renewcommand*{\bibliographyitemlabel}{\@biblabel{\arabic{enumiv}}}
%\makeatother
%\renewcommand*{\bibliographyitemlabel}{[\arabic{enumiv}]}% CONSIDER REPLACING THE ABOVE BY THIS
% bibliography with mutiple entries
%\usepackage{multibib}
%\newcites{book,misc}{{Books},{Others}}
%----------------------------------------------------------------------------------
% content
%----------------------------------------------------------------------------------
\begin{document}
%\begin{CJK*}{UTF8}{gbsn} % to typeset your resume in Chinese using CJK
%----- resume ---------------------------------------------------------
\makecvtitle
\section{Personal Data}
\cvdoubleitem{Name}{}{}{}
\cvdoubleitem{Born}{}{}{}
\cvdoubleitem{Address}{}{}{}
\cvdoubleitem{}{}{}{}
\cvdoubleitem{Email}{}{}{}
\cvdoubleitem{Linkedin}{}{}{}
\cvdoubleitem{Facebook}{}{}{}
\section{Education}
\cventry{2014}{}{}{}{}{}
\cventry{2011--2014}{}{}{}{}{} % arguments 3 to 6 can be left empty
\cventry{2008--2011}{}{}{}{}{} % arguments 3 to 6 can be left empty
\cventry{2005--2008}{}{}{}{}{}
\section{Job experience}
\cventry{2017--} %1
{Lorem Ipsum} %2
{Lorem Ipsum} %3
{Lorem Ipsum} %4
{} %5
{
\begin{itemize}
\item 1. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
\begin{itemize}
\item Urna porttitor rhoncus dolor purus.
\item Magna fringilla urna porttitor rhoncus dolor purus non enim praesent.
\item In aliquam sem fringilla ut morbi.
\item In hac habitasse platea dictumst quisque sagittis purus.
\item Malesuada fames ac turpis egestas integer.
\item Nulla pharetra diam sit amet. Urna porttitor rhoncus dolor purus. Amet mauris commodo quis imperdiet massa tincidunt nunc. Volutpat commodo sed egestas egestas fringilla phasellus.
\end{itemize}
\item 2. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
\begin{itemize}
\item Urna porttitor rhoncus dolor purus.
\item Magna fringilla urna porttitor rhoncus dolor purus non enim praesent.
\item In aliquam sem fringilla ut morbi.
\item In hac habitasse platea dictumst quisque sagittis purus.
\item Malesuada fames ac turpis egestas integer.
\item Nulla pharetra diam sit amet. Urna porttitor rhoncus dolor purus. Amet mauris commodo quis imperdiet massa tincidunt nunc. Volutpat commodo sed egestas egestas fringilla phasellus.
\end{itemize}
\item 3. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
\begin{itemize}
\item Urna porttitor rhoncus dolor purus.
\item Magna fringilla urna porttitor rhoncus dolor purus non enim praesent.
\item In aliquam sem fringilla ut morbi.
\item In hac habitasse platea dictumst quisque sagittis purus.
\item Malesuada fames ac turpis egestas integer.
\item Nulla pharetra diam sit amet. Urna porttitor rhoncus dolor purus. Amet mauris commodo quis imperdiet massa tincidunt nunc. Volutpat commodo sed egestas egestas fringilla phasellus.
\end{itemize}
\item 4. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
\begin{itemize}
\item Urna porttitor rhoncus dolor purus.
\item Magna fringilla urna porttitor rhoncus dolor purus non enim praesent.
\item In aliquam sem fringilla ut morbi.
\item In hac habitasse platea dictumst quisque sagittis purus.
\item Malesuada fames ac turpis egestas integer.
\item Nulla pharetra diam sit amet. Urna porttitor rhoncus dolor purus. Amet mauris commodo quis imperdiet massa tincidunt nunc. Volutpat commodo sed egestas egestas fringilla phasellus.
\end{itemize}
\end{itemize}
} %6
\end{document}
%% end of file `template.tex'.
答案1
好吧,在我的回答中https://tex.stackexchange.com/a/403557/16550我定义了一个新命令\cventrylong
来满足您的需求:
\newenvironment{myitemize}%
{\begin{list}{}{%
\setlength{\labelwidth}{0pt}
\setlength{\leftmargin}{\hintscolumnwidth+\separatorcolumnwidth}
}}%
{\end{list}}
\newcommand*{\cventrylong}[7][.25em]{%
\begin{tabular}{@{}p{\hintscolumnwidth}@{\hspace{\separatorcolumnwidth}}p{\maincolumnwidth}@{}}%
\raggedleft\hintstyle{#2} &{%
{\bfseries#3}%
\ifthenelse{\equal{#4}{}}{}{, {\slshape#4}}%
\ifthenelse{\equal{#5}{}}{}{, #5}%
\ifthenelse{\equal{#6}{}}{}{, #6}%
}%
\end{tabular}%
\vspace*{-\baselineskip}
{\vspace{-.25em}
\small\begin{myitemize}\item #7\end{myitemize}}%
\par\addvspace{#1}%
}
所用环境myitemize
允许内部分页。要使用它,您需要\cventrylong
在简历中使用命令。
请参阅以下完整的 MWE
\documentclass[11pt,a4paper,sans]{moderncv}
% moderncv themes
\moderncvstyle{classic}
\moderncvcolor{black}
%For bulleted list in cventry
\newcommand\mybitem[1]{%
\parbox[t]{3mm}{\textbullet}\parbox[t]{10cm}{#1}\\[1.6mm]}
% character encoding
\usepackage[utf8]{inputenc}
% adjust the page margins
\usepackage[scale=0.75]{geometry}
% https://tex.stackexchange.com/questions/403541/break-moderncv-cventry-into-multiple-pages-without-using-list-items
\newenvironment{myitemize}%
{\begin{list}{}{%
\setlength{\labelwidth}{0pt}
\setlength{\leftmargin}{\hintscolumnwidth+\separatorcolumnwidth}
}}%
{\end{list}}
\newcommand*{\cventrylong}[7][.25em]{%
\begin{tabular}{@{}p{\hintscolumnwidth}@{\hspace{\separatorcolumnwidth}}p{\maincolumnwidth}@{}}%
\raggedleft\hintstyle{#2} &{%
{\bfseries#3}%
\ifthenelse{\equal{#4}{}}{}{, {\slshape#4}}%
\ifthenelse{\equal{#5}{}}{}{, #5}%
\ifthenelse{\equal{#6}{}}{}{, #6}%
}%
\end{tabular}%
\vspace*{-\baselineskip}
{\vspace{-.25em}
\small\begin{myitemize}\item #7\end{myitemize}}%
\par\addvspace{#1}%
}
% personal data
\name{John}{Doe}
\title{curriculum vitae}
\photo[74pt][0.6pt]{example-image}
\begin{document}
\makecvtitle
\section{Personal Data}
\cvdoubleitem{Name}{}{}{}
\cvdoubleitem{Born}{}{}{}
\cvdoubleitem{Address}{}{}{}
\cvdoubleitem{}{}{}{}
\cvdoubleitem{Email}{}{}{}
\cvdoubleitem{Linkedin}{}{}{}
\cvdoubleitem{Facebook}{}{}{}
\section{Education}
\cventry{2014}{}{}{}{}{}
\cventry{2011--2014}{}{}{}{}{} % arguments 3 to 6 can be left empty
\cventry{2008--2011}{}{}{}{}{} % arguments 3 to 6 can be left empty
\cventry{2005--2008}{}{}{}{}{}
\section{Job experience}
\cventrylong{2017--} %1 <===============================================
{Lorem Ipsum} %2
{Lorem Ipsum} %3
{Lorem Ipsum} %4
{} %5
{
\begin{itemize}
\item 1. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
\begin{itemize}
\item Urna porttitor rhoncus dolor purus.
\item Magna fringilla urna porttitor rhoncus dolor purus non enim praesent.
\item In aliquam sem fringilla ut morbi.
\item In hac habitasse platea dictumst quisque sagittis purus.
\item Malesuada fames ac turpis egestas integer.
\item Nulla pharetra diam sit amet. Urna porttitor rhoncus dolor purus. Amet mauris commodo quis imperdiet massa tincidunt nunc. Volutpat commodo sed egestas egestas fringilla phasellus.
\end{itemize}
\item 2. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
\begin{itemize}
\item Urna porttitor rhoncus dolor purus.
\item Magna fringilla urna porttitor rhoncus dolor purus non enim praesent.
\item In aliquam sem fringilla ut morbi.
\item In hac habitasse platea dictumst quisque sagittis purus.
\item Malesuada fames ac turpis egestas integer.
\item Nulla pharetra diam sit amet. Urna porttitor rhoncus dolor purus. Amet mauris commodo quis imperdiet massa tincidunt nunc. Volutpat commodo sed egestas egestas fringilla phasellus.
\end{itemize}
\item 3. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
\begin{itemize}
\item Urna porttitor rhoncus dolor purus.
\item Magna fringilla urna porttitor rhoncus dolor purus non enim praesent.
\item In aliquam sem fringilla ut morbi.
\item In hac habitasse platea dictumst quisque sagittis purus.
\item Malesuada fames ac turpis egestas integer.
\item Nulla pharetra diam sit amet. Urna porttitor rhoncus dolor purus. Amet mauris commodo quis imperdiet massa tincidunt nunc. Volutpat commodo sed egestas egestas fringilla phasellus.
\end{itemize}
\item 4. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
\begin{itemize}
\item Urna porttitor rhoncus dolor purus.
\item Magna fringilla urna porttitor rhoncus dolor purus non enim praesent.
\item In aliquam sem fringilla ut morbi.
\item In hac habitasse platea dictumst quisque sagittis purus.
\item Malesuada fames ac turpis egestas integer.
\item Nulla pharetra diam sit amet. Urna porttitor rhoncus dolor purus. Amet mauris commodo quis imperdiet massa tincidunt nunc. Volutpat commodo sed egestas egestas fringilla phasellus.
\end{itemize}
\end{itemize}
} %6
\end{document}
得到结果:
如果你想在某个特殊点设置分页符,\clearpage
可以\items
添加
\section{Job experience}
\cventrylong{2017--} %1 <===============================================
{Lorem Ipsum} %2
{Lorem Ipsum} %3
{Lorem Ipsum} %4
{} %5
{
\begin{itemize}
\item 1. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
\begin{itemize}
\item Urna porttitor rhoncus dolor purus.
\item Magna fringilla urna porttitor rhoncus dolor purus non enim praesent.
\item In aliquam sem fringilla ut morbi.
\item In hac habitasse platea dictumst quisque sagittis purus.
\item Malesuada fames ac turpis egestas integer.
\item Nulla pharetra diam sit amet. Urna porttitor rhoncus dolor purus. Amet mauris commodo quis imperdiet massa tincidunt nunc. Volutpat commodo sed egestas egestas fringilla phasellus.
\end{itemize}
\clearpage % <======================================================
\item 2. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
\begin{itemize}
结果如下:
您是否考虑过使用enumerate
而不是itemize
类似:
\begin{enumerate} % <==============================================
\item Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
\begin{itemize}
\item Urna porttitor rhoncus dolor purus.
\item Magna fringilla urna porttitor rhoncus dolor purus non enim praesent.
\item In aliquam sem fringilla ut morbi.
\item In hac habitasse platea dictumst quisque sagittis purus.
\item Malesuada fames ac turpis egestas integer.
\item Nulla pharetra diam sit amet. Urna porttitor rhoncus dolor purus. Amet mauris commodo quis imperdiet massa tincidunt nunc. Volutpat commodo sed egestas egestas fringilla phasellus.
\end{itemize}
\clearpage % <======================================================
\item Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
\begin{itemize}
\item Urna porttitor rhoncus dolor purus.
\item Magna fringilla urna porttitor rhoncus dolor purus non enim praesent.
\item In aliquam sem fringilla ut morbi.
\item In hac habitasse platea dictumst quisque sagittis purus.
\item Malesuada fames ac turpis egestas integer.
\item Nulla pharetra diam sit amet. Urna porttitor rhoncus dolor purus. Amet mauris commodo quis imperdiet massa tincidunt nunc. Volutpat commodo sed egestas egestas fringilla phasellus.
\end{itemize}
\item Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
\begin{itemize}
\item Urna porttitor rhoncus dolor purus.
\item Magna fringilla urna porttitor rhoncus dolor purus non enim praesent.
\item In aliquam sem fringilla ut morbi.
\item In hac habitasse platea dictumst quisque sagittis purus.
\item Malesuada fames ac turpis egestas integer.
\item Nulla pharetra diam sit amet. Urna porttitor rhoncus dolor purus. Amet mauris commodo quis imperdiet massa tincidunt nunc. Volutpat commodo sed egestas egestas fringilla phasellus.
\end{itemize}
\item Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
\begin{itemize}
\item Urna porttitor rhoncus dolor purus.
\item Magna fringilla urna porttitor rhoncus dolor purus non enim praesent.
\item In aliquam sem fringilla ut morbi.
\item In hac habitasse platea dictumst quisque sagittis purus.
\item Malesuada fames ac turpis egestas integer.
\item Nulla pharetra diam sit amet. Urna porttitor rhoncus dolor purus. Amet mauris commodo quis imperdiet massa tincidunt nunc. Volutpat commodo sed egestas egestas fringilla phasellus.
\end{itemize}
\end{enumerate} % <==========================================
给出结果: