我对标题使用了 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>