我對標題使用了 2.5 公分的偏移,現在我想將照片向左移動 2.5 公分。
我怎樣才能做到這一點?
我的MWE:
\documentclass[11pt,a4paper]{moderncv}
\moderncvtheme[grey]{classic} % idem
\usepackage[T1]{fontenc}
\usepackage[utf8x]{inputenc}
\usepackage[utf8x]{luainputenc}
\usepackage{amssymb}
\usepackage{fontawesome}
\usepackage[scale=0.8]{geometry}
\recomputelengths % required when changes are made to page layout lengths
\fancyfoot{} % clear all footer fields
\fancyfoot[LE,RO]{\thepage}
\fancyfoot[RE,LO]{\footnotesize } % other info in "inner" position of footer line
\usepackage{eso-pic}
\newcommand\AtPageUpperMyleft[1]{\AtPageUpperLeft{%
\put(\LenToUnit{2.1cm},\LenToUnit{-6.5cm}){#1}%
}}%
\AddToShipoutPictureBG*{%
\AtPageUpperMyleft{\fboxsep1.5pt
%\fcolorbox{gray}{white}%
{\includegraphics[width=60pt,height=3cm,keepaspectratio]{qrdummy.png}}}
}
\firstname{John}
\familyname{Doe}
\title{Curriculum Vitae}
\photo[84pt]{squirrel.jpg}
\begin{document}
%\vspace{-15cm} % useless?
\hspace{2.5cm}
\maketitle
\vspace{-10mm}
\section{Info}
\cvcomputer
{\textbf{*}}{\small date of birth, City (Country)\normalsize}
{\faFlag{}}{\small Nationality\normalsize}
\section{Desired Employment and Current Skills}
\cvline{}{\Large Computer Guy}
\cvline{}{\small Wow, look at my skills!}
\end{document}
答案1
您必須在內部找到正確的位置\makecvtitle
並使用 修補它etoolbox
。moderncv
沒有為這種調整明確提供鉤子。
以下補丁針對位置進行了調整:
\usepackage{etoolbox}
\patchcmd{\makecvtitle}% <cmd>
{\usebox{\makecvtitlepicturebox}\\[2.5em]}% <search>
{\hspace*{-2.5cm}\usebox{\makecvtitlepicturebox}\\[2.5em]}% <replace>
{}{}% <success><failure>