我只需要将照片添加到我的课程中,我完全不知道如何将其放在右上角。我试过了\smash
,但没有任何效果......
documentclass[10pt,a4paper]{article}
\usepackage[margin=0.5in]{geometry}
\usepackage[utf8]{inputenc}
\usepackage[UKenglish]{babel}
\usepackage[UKenglish]{isodate}
\usepackage[page]{appendix}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage[space]{grffile}
\usepackage{pdflscape}
\usepackage{caption}
\usepackage{ragged2e}
\usepackage{setspace}
\usepackage[round]{natbib}
\usepackage[bottom]{footmisc}
\usepackage{nopageno}
\usepackage[T1]{fontenc}
\usepackage{tabularx}
\usepackage{datetime}
\usepackage{multicol}
\usepackage{hyperref}
\hypersetup{hidelinks = true,}
\newcolumntype{L}{>{\hsize=.190\hsize}X}
\newcolumntype{R}{>{\hsize=.85\hsize}X}
\newcolumntype{M}{>{\hsize=.28\hsize}X}
\newcolumntype{s}{>{\hsize=.5\hsize}X}
\hyphenpenalty=10000
\setlength\parindent{0pt}
\linespread{1.1}
\setlength{\extrarowheight}{2pt}
\begin{document}
\cleanlookdateon
%----------------------------------------------------------------------------------------
% PERSONAL DETAILS
%----------------------------------------------------------------------------------------
{\LARGE \textsc{\textbf{Matteo Bulgarelli}}} \\
Updated: {\monthname} \the\year \\
\includegraphics[scale=0.2]{somepicture.jpg} % No idea on how to position this
Via San Pierino 25,\\
40013 Castel Maggiore, Bologna\\
Italy\\
email: \href{mailto:[email protected]}{[email protected]} \\
\medskip
\bigskip
\end{document}
我希望我没有削减运行代码所需的一些环境,很抱歉,我试图报告最小值,但由于我从朋友那里获取了模板,我真的不知道最小可重现代码是什么......
答案1
我建议您使用\usepackage{wrapfig}
并将\begin{document}
图形包装到右上角。
\begin{wrapfigure}{r}{0.2\textwidth}
\includegraphics[scale=0.2]{somepicture.jpg} % No idea on how to position this
\end{wrapfigure}
答案2
\documentclass[10pt,a4paper]{article}
\usepackage[margin=0.5in]{geometry}
\usepackage[utf8]{inputenc}
\usepackage[UKenglish]{babel}
\usepackage[UKenglish]{isodate}
\usepackage[page]{appendix}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage[space]{grffile}
\usepackage{pdflscape}
\usepackage{caption}
\usepackage{ragged2e}
\usepackage{setspace}
\usepackage[round]{natbib}
\usepackage[bottom]{footmisc}
\usepackage{nopageno}
\usepackage[T1]{fontenc}
\usepackage{tabularx}
\usepackage{datetime}
\usepackage{multicol}
\usepackage{hyperref}
\hypersetup{hidelinks = true,}
\newcolumntype{L}{>{\hsize=.190\hsize}X}
\newcolumntype{R}{>{\hsize=.85\hsize}X}
\newcolumntype{M}{>{\hsize=.28\hsize}X}
\newcolumntype{s}{>{\hsize=.5\hsize}X}
\hyphenpenalty=10000
\setlength\parindent{0pt}
\linespread{1.1}
\setlength{\extrarowheight}{2pt}
\cleanlookdateon
%----------------------------------------------------------------------------------------
% PERSONAL DETAILS
%----------------------------------------------------------------------------------------
\begin{document}
\begin{figure}[h]
\flushright
\includegraphics[scale=0.2]{example-image-a} % No idea on how to position this
\end{figure}
{\LARGE \textsc{\textbf{Matteo Bulgarelli}}} \\
Updated: {\monthname} \the\year \\
Via San Pierino 25,\\
40013 Castel Maggiore, Bologna\\
Italy\\
email: \href{mailto:[email protected]}{[email protected]} \\
\medskip
\bigskip
\end{document}