我需要帮助
将图片变成圆形而不是方形
将图片进一步向左移动。
以下是部分代码:
\documentclass[letterpaper,8 pt]{article}
\usepackage{titlesec}
\usepackage[margin=0.3in]{geometry}
\usepackage{longtable}
\usepackage{marvosym}
\usepackage{amsmath}
\usepackage{underscore}
\renewcommand{\familydefault}{\sfdefault}
\renewcommand{\sfdefault}{ppl}
\newcommand{\at}{\makeatletter @\makeatother}
\usepackage{graphicx}
\usepackage{tikz}
\usepackage{tikzpagenodes}
\titleformat{\section}{\large\scshape\raggedright}{}{1em}{}[\titlerule]
\titlespacing{\section}{0pt}{3pt}{3pt}
\begin{document}
\begin{tikzpicture}[remember picture,overlay]
\usetikzlibrary{calc} \node [left] at ($(current page text area.north east)!0.06!(current page text area.south east)$) {\includegraphics[width=0.2\linewidth]{ola.jpg}};
\end{tikzpicture}
\pagenumbering{gobble}
\par{ {\Huge \textbf{My name}}
\vspace{0.5cm}\par
\begin{tabular}{rl}
\textsc{Email:} & x_x\at gmail.com \\
\textsc{Phone:} & $xx \ xx \ 3x \ x5$ \\
\textsc{Location:} & xxx, Norway
}{\end{tabular}}
\vspace{0.3cm}
\section{Education}
\begin{longtable}{r|p{14cm}}
答案1
您可以通过\clip
将页面左上角的坐标混合到其中来实现这一点。
\documentclass[letterpaper,8 pt]{article}
\usepackage{titlesec}
\usepackage[margin=0.3in]{geometry}
\usepackage{longtable}
\usepackage{marvosym}
\usepackage{amsmath}
\usepackage{underscore}
\renewcommand{\familydefault}{\sfdefault}
\renewcommand{\sfdefault}{ppl}
\newcommand{\at}{\makeatletter @\makeatother}
\usepackage{graphicx}
\usepackage{tikz}
\usepackage{tikzpagenodes}
\usetikzlibrary{calc}
\titleformat{\section}{\large\scshape\raggedright}{}{1em}{}[\titlerule]
\titlespacing{\section}{0pt}{3pt}{3pt}
\begin{document}
\begin{tikzpicture}[remember picture,overlay]
\clip ($(current page text area.north east)!0.06!(current page text area.south east)!0.12!(current page text area.north west)$)
circle (2cm) node {\includegraphics[width=0.2\linewidth]{ola.jpg}};
\end{tikzpicture}
\pagenumbering{gobble}
\par{ {\Huge \textbf{My name}}
\vspace{0.5cm}\par
\begin{tabular}{rl}
\textsc{Email:} & x_x\at gmail.com \\
\textsc{Phone:} & $xx \ xx \ 3x \ x5$ \\
\textsc{Location:} & xxx, Norway
}{\end{tabular}}
\vspace{0.3cm}
\section{Education}
\end{document}
我猜想当你在机器上编译它时照片会改变;-)
编辑:为了使我的第二条陈述更加明确,我混合了更多的左上角坐标,即将混合物从0.12
上方改为此处0.2
前面!(current page text area.north west)
。
\documentclass[letterpaper,8 pt]{article}
\usepackage{titlesec}
\usepackage[margin=0.3in]{geometry}
\usepackage{longtable}
\usepackage{marvosym}
\usepackage{amsmath}
\usepackage{underscore}
\renewcommand{\familydefault}{\sfdefault}
\renewcommand{\sfdefault}{ppl}
\newcommand{\at}{\makeatletter @\makeatother}
\usepackage{graphicx}
\usepackage{tikz}
\usepackage{tikzpagenodes}
\usetikzlibrary{calc}
\titleformat{\section}{\large\scshape\raggedright}{}{1em}{}[\titlerule]
\titlespacing{\section}{0pt}{3pt}{3pt}
\begin{document}
\begin{tikzpicture}[remember picture,overlay]
\clip ($(current page text area.north east)!0.06!(current page text area.south east)!0.2!(current page text area.north west)$)
circle (2cm) node {\includegraphics[width=0.2\linewidth]{ola.jpg}};
\end{tikzpicture}
\pagenumbering{gobble}
\par{ {\Huge \textbf{My name}}
\vspace{0.5cm}\par
\begin{tabular}{rl}
\textsc{Email:} & x_x\at gmail.com \\
\textsc{Phone:} & $xx \ xx \ 3x \ x5$ \\
\textsc{Location:} & xxx, Norway
}{\end{tabular}}
\vspace{0.3cm}
\section{Education}
\end{document}
第二次编辑:好的,这是一个快速解决方案,可以实现“我的目标是将我的照片放在左侧,将我的名字放在中间(已实现),将我的表格放在右侧”。有很多其他方法可以实现此目标。
\documentclass[letterpaper,8 pt]{article}
\usepackage{titlesec}
\usepackage[margin=0.3in]{geometry}
\usepackage{longtable}
\usepackage{marvosym}
\usepackage{amsmath}
\usepackage{underscore}
\renewcommand{\familydefault}{\sfdefault}
\renewcommand{\sfdefault}{ppl}
\newcommand{\at}{\makeatletter @\makeatother}
\usepackage{graphicx}
\usepackage{tikz}
\usepackage{tikzpagenodes}
\usetikzlibrary{calc}
\titleformat{\section}{\large\scshape\raggedright}{}{1em}{}[\titlerule]
\titlespacing{\section}{0pt}{3pt}{3pt}
\begin{document}
\pagenumbering{gobble}
\begin{minipage}[t]{5cm}
\hspace*{0.4cm}
\begin{tikzpicture}[baseline=(ola.center),inner sep=0pt]
\clip (0,0) circle (2cm) node (ola) {\includegraphics[width=4cm]{ola.jpg}};
\end{tikzpicture}
\end{minipage}
\hfill
\begin{minipage}[t]{5cm}
\centerline{\Huge \textbf{My name}}
\end{minipage}
\hfill
\begin{minipage}[t]{5cm}
\begin{tabular}{rl}
\textsc{Email:} & x_x\at gmail.com \\
\textsc{Phone:} & $xx \ xx \ 3x \ x5$ \\
\textsc{Location:} & xxx, Norway
\end{tabular}
\end{minipage}
\hspace*{0.4cm}\\[0.3cm]
\section{Education}
\end{document}
我希望这能让你实现你的愿望。