![moderncv 클래식 수직 정렬 헤더 상단](https://rvso.com/image/305759/moderncv%20%ED%81%B4%EB%9E%98%EC%8B%9D%20%EC%88%98%EC%A7%81%20%EC%A0%95%EB%A0%AC%20%ED%97%A4%EB%8D%94%20%EC%83%81%EB%8B%A8.png)
다음 코드는 내 moderncv
스타일 입니다 classic
. 현재 페이지(상단)와 사진 사이에 4~5cm 정도의 공간이 있습니다. 헤더를 완성하기 위해 이 공간을 어떻게 줄일 수 있나요? 누구든지 이것에 대해 나를 도울 수 있습니까?
\documentclass[11pt,a4paper,sans]{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'
\makeatletter
\renewcommand{\makecvtitle}{%
\recomputecvlengths%
% optional picture box
\newbox{\makecvtitlepicturebox}%
\savebox{\makecvtitlepicturebox}{%
\ifthenelse{\isundefined{\@photo}}%
{}%
{%
\hspace*{\separatorcolumnwidth}%
\color{color1}%
\setlength{\fboxrule}{\@photoframewidth}%
\ifdim\@photoframewidth=0pt%
\setlength{\fboxsep}{0pt}\fi%
\framebox{\includegraphics[width=\@photowidth]{\@photo}}}}%
\newlength{\makecvtitlepicturewidth}\settowidth{\makecvtitlepicturewidth}{\usebox{\makecvtitlepicturebox}}%
% name and title
\setlength{\makecvtitlenamewidth}{189pt}% dummy value, was overwritten
\begin{minipage}[b]{\makecvtitlenamewidth}%
\raggedleft%
\namestyle{\@firstname} \namestyle{\@familyname}\\[1em]%
\ifthenelse{\equal{\@title}{}}{}{\titlestyle{\@title}}\\[1em]
\vspace{20pt}%
\addressfont\color{color2}%
\ifthenelse{\isundefined{\@addressstreet}}{}{\makenewline\@addressstreet%
\ifthenelse{\equal{\@addresscity}{}}{}{\makenewline\@addresscity}}%
\ifthenelse{\isundefined{\@mobile}}{}{\makenewline mobile: \@mobile}%
\ifthenelse{\isundefined{\@email}}{}{\makenewline mail: \emaillink{\@email}}%
\ifthenelse{\isundefined{\@homepage}}{}{\makenewline\homepagesymbol\httplink{\@homepage}}%
\ifthenelse{\isundefined{\@extrainfo}}{}{\makenewline\@extrainfo}%
\end{minipage}%
\hfill%
% optional picture box
\usebox{\makecvtitlepicturebox}\\[2.5em]%
% optional quote
\ifthenelse{\isundefined{\@quote}}%
{}%
{{\centering\begin{minipage}{\quotewidth}\quotestyle{\@quote}\end{minipage}\\[2.5em]}}%
\par}%
\makeatother
%----------------------------------------------------------------------------------------
\usepackage{lipsum} % Used for inserting dummy 'Lorem ipsum' text into the template
\usepackage[scale=0.75]{geometry} % Reduce document margins
\setlength{\hintscolumnwidth}{3.7cm} % Uncomment to change the width of the dates column
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
%----------------------------------------------------------------------------------------
% NAME AND CONTACT INFORMATION SECTION
%----------------------------------------------------------------------------------------
\firstname{Mr} % Your first name
\familyname{Smith} % Your last name
% All information in this block is optional, comment out any lines you don't need
\title{CV}
\address{mystreet}{mytown}
\mobile{12345}
\email{[email protected]}
\photo[230pt][0pt]{mypic} % The first bracket is the picture height, the second is the thickness of the frame around the picture
\quote{quote}
% ----------------------------------------------------------------------------------------
\usepackage{pdfpages}
\begin{document}
\pdfbookmark[0]{bookmark}{bo}
\begin{minipage}[b]{\textwidth}
\vspace{2cm}
\end{minipage}
%----------------------------------------------------------------------------------------
\makecvtitle % Print the CV title
%----------------------------------------------------------------------------------------
% EDUCATION SECTION
%----------------------------------------------------------------------------------------
\section{me}
\cvitem{born}{1 January 1900}
\vspace{2cm}
%\emptysection \closesection
mytown, \today
\label{lastpage} %
\end{document}
답변1
제목은 기본적으로 페이지 상단에 설정됩니다(세로 공간 추가 없음).너\vspace{2cm}
위에 a를 추가하여 \makecvtitle
2cm 아래로 밀려나게 했습니다. 이것을 제거하면 제목이 상단과 정렬되는 것을 볼 수 있습니다.
\documentclass[11pt,a4paper,sans]{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'
\makeatletter
\renewcommand{\makecvtitle}{%
\recomputecvlengths%
% optional picture box
\newbox{\makecvtitlepicturebox}%
\savebox{\makecvtitlepicturebox}{%
\ifthenelse{\isundefined{\@photo}}%
{}%
{%
\hspace*{\separatorcolumnwidth}%
\color{color1}%
\setlength{\fboxrule}{\@photoframewidth}%
\ifdim\@photoframewidth=0pt%
\setlength{\fboxsep}{0pt}\fi%
\framebox{\includegraphics[width=\@photowidth]{\@photo}}}}%
\newlength{\makecvtitlepicturewidth}\settowidth{\makecvtitlepicturewidth}{\usebox{\makecvtitlepicturebox}}%
% name and title
\setlength{\makecvtitlenamewidth}{189pt}% dummy value, was overwritten
\begin{minipage}[b]{\makecvtitlenamewidth}%
\raggedleft%
\namestyle{\@firstname} \namestyle{\@familyname}\\[1em]%
\ifthenelse{\equal{\@title}{}}{}{\titlestyle{\@title}}\\[1em]
\vspace{20pt}%
\addressfont\color{color2}%
\ifthenelse{\isundefined{\@addressstreet}}{}{\makenewline\@addressstreet%
\ifthenelse{\equal{\@addresscity}{}}{}{\makenewline\@addresscity}}%
\ifthenelse{\isundefined{\@mobile}}{}{\makenewline mobile: \@mobile}%
\ifthenelse{\isundefined{\@email}}{}{\makenewline mail: \emaillink{\@email}}%
\ifthenelse{\isundefined{\@homepage}}{}{\makenewline\homepagesymbol\httplink{\@homepage}}%
\ifthenelse{\isundefined{\@extrainfo}}{}{\makenewline\@extrainfo}%
\end{minipage}%
\hfill%
% optional picture box
\usebox{\makecvtitlepicturebox}\\[2.5em]%
% optional quote
\ifthenelse{\isundefined{\@quote}}%
{}%
{{\centering\begin{minipage}{\quotewidth}\quotestyle{\@quote}\end{minipage}\\[2.5em]}}%
\par}%
\makeatother
%----------------------------------------------------------------------------------------
\usepackage{lipsum} % Used for inserting dummy 'Lorem ipsum' text into the template
\usepackage[scale=0.75]{geometry} % Reduce document margins
\setlength{\hintscolumnwidth}{3.7cm} % Uncomment to change the width of the dates column
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
%----------------------------------------------------------------------------------------
% NAME AND CONTACT INFORMATION SECTION
%----------------------------------------------------------------------------------------
\firstname{Mr} % Your first name
\familyname{Smith} % Your last name
% All information in this block is optional, comment out any lines you don't need
\title{CV}
\address{mystreet}{mytown}
\mobile{12345}
\email{[email protected]}
\photo[230pt][0pt]{example-image} % The first bracket is the picture height, the second is the thickness of the frame around the picture
\quote{quote}
% ----------------------------------------------------------------------------------------
\begin{document}
%----------------------------------------------------------------------------------------
\makecvtitle % Print the CV title
%----------------------------------------------------------------------------------------
% EDUCATION SECTION
%----------------------------------------------------------------------------------------
\section{me}
\cvitem{born}{1 January 1900}
\vspace{2cm}
mytown, \today
\end{document}
위의 시각적 개체는 다음을 추가한 페이지 레이아웃을 보여줍니다.showframe
패키지.
페이지에서 CV 제목을 더 높게 표시하려면 부정적인 매뉴얼을 삽입할 수 있지만 \vspace
이는 첫 번째 페이지에만 영향을 미칩니다. 전역적으로 조정하려면 다음을 사용하세요.geometry
패키지에 대한 특정 여백을 설정합니다 top
.