我正在使用这个漂亮的简历模板,我唯一的问题是在表格的右上角添加一张图片。
名称可以左对齐,以便为图片腾出空间。
\documentclass[a4paper,oneside,final]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage{microtype}
\usepackage{scrpage2}
\usepackage{titlesec}
\usepackage{marvosym}
\usepackage{tabularx,colortbl}
\usepackage[top=3cm, bottom=3.5cm, left=2cm, right=2cm]{geometry}
\titleformat{\section}{\large\scshape\raggedright}{}{0em}{}[\titlerule]
\pagestyle{scrheadings}
\newcommand{\gray}{\rowcolor[gray]{.90}}
\renewcommand{\headfont}{\normalfont\rmfamily\scshape}
\cofoot{\lsstyle 42nd Street - New York City, NY\\
{\Large\Letter} [email protected] \ {\Large\Telefon} +11111111 }
\begin{document}
\begin{center}
\textsc{\lsstyle\Huge{John Doe}}
\section{Info}
\begin{tabularx}{0.97\linewidth}{>{\raggedleft\scshape}p{3cm}X}
\gray Name & \textbf{John Doe}\\
Birthday & \textbf{1st January 1900}\\
\gray Phone & \textbf{+11111111}\\
Email & \textbf{[email protected]}\\
\end{tabularx}
\section{Education}
\section{Computer Languages}
\end{center}
\end{document}
这是期望的结果:
答案1
我已经解决了这个问题,使用minipage
以避免底部对齐文本并将hfill
名称和图片放在同一行:
\documentclass{scrartcl}
\usepackage{microtype}
\usepackage{graphicx}
\begin{document}
\begin{center}
\begin{minipage}[c]{.75\linewidth} %set percentage of line width as desired
\textsc{\lsstyle\Huge{John Doe}}
\end{minipage}\hfill
\begin{minipage}[c]{.25\linewidth} %set percentage of line width as desired
\includegraphics[scale=0.70]{profile} %set scale as desired, picture named profile.png
\end{minipage}
\end{center}
\end{document}