moderncv クラシック 垂直配置 ヘッダー上部

moderncv クラシック 垂直配置 ヘッダー上部

次のコードは私のスタイルですmoderncvclassic現時点では、ページ (上部) と画像の間に約 4 ~ 5 cm のスペースがあります。このスペースを減らして、完全なヘッダーをさらに上に持ってくるにはどうすればよいですか? 誰かこれを手伝ってくれませんか?

\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}の上にを追加した\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パッケージ

履歴書のタイトルをページのさらに上の方に表示したい場合は、手動で否定を挿入することもできます\vspaceが、これは最初のページにのみ影響します。グローバルに調整したい場合は、geometryパッケージ特定の余白を設定しますtop

関連情報