0

I am trying to create my resume in latex, but I am a complete beginner, and here is what I have been able to do so far

\documentclass{article}

\usepackage{titlesec}
\usepackage{titling}
\usepackage[margin=0.5in]{geometry}
\usepackage{hyperref}
\usepackage{graphicx}
\usepackage[export]{adjustbox}

\renewcommand{\maketitle}
{
\noindent
\begin{center}
    {\huge\bfseries
    \theauthor}
    
    \vspace{0.25em}
    
    \href{mailto:[email protected]}{\textit{[email protected]}} 
    \vert 
    \href{https://example.github.io/}{~example.github.io~} 
    \vert 
    \href{https://github.com/example}{~github.com/example~} 
    \vert 
    \href{https://www.linkedin.com/in/example/}{~linkedin.com/in/example}    
    
\end{center}
}

\begin{document}

\title{Resume}

\author{Firstname Lastname}

\maketitle

\end{document}

Which looks like this Current state

I want to also include my profile picture on the right side in the red box such that the two lines move to the left and are centered within the green box

What I want


So far I have tried adding the following lines after the href but they add the image to a new line

\begin{figure}[h]
    \includegraphics[width=2cm, right]{profile-pic.png}
    \label{fig:my_label}
\end{figure}

My attempt at inserting image

Is this the correct way of trying to do this or should I try different method?

2 Answers 2

1

Try this code using two minipages.

a

\documentclass{article}

\usepackage{titlesec}
\usepackage{titling}
\usepackage[margin=0.5in]{geometry}

\usepackage{graphicx}
\usepackage[export]{adjustbox}

\usepackage{hyperref} % last package !

\renewcommand{\maketitle}{% 
\noindent\begin{minipage}{0.8\textwidth}
    \centering
    {\huge\bfseries \theauthor}
    \vspace*{0.25em}
    
    \href{mailto:[email protected]}{\textit{[email protected]}} 
    \textbar
    \href{https://example.github.io/}{\textit{~example.github.io~}}
    \textbar
    \href{https://github.com/example}{\textit{~github.com/example~}}
    \textbar
    \href{https://www.linkedin.com/in/example/}{\textit{~linkedin.com/in/example}}    
\end{minipage}
\hfill
\begin{minipage}{0.1\textwidth}
    \includegraphics[height=2cm]{example-grid-100x100pt}    
\end{minipage}
\vspace*{8ex}   
}

\usepackage{kantlipsum} % dummy text

\begin{document}
    
    \title{Resume}
    
    \author{Firstname Lastname}
    
    \maketitle
    
    \kant[1]
    
\end{document}
1

You could skip using the built in commands and use minipage to split the page up. Use the defined variable just before \begin{document} to easily swap things out.

enter image description here

\documentclass{article}
\usepackage[margin=0.5in]{geometry}
\usepackage{graphicx} % For example image
\usepackage[hidelinks]{hyperref}

\usepackage{blindtext} % For dummy text


\newcommand{\vertbar}{\hspace{1.5mm}\rule[-0.4ex]{0.41pt}{2.3ex}\hspace{1.5mm}}

\def\firstname{First name}
\def\lastname{Last name}
\def\email{\href{mailto:[email protected]}{\textit{[email protected]}}}
\def\githubIO{\href{https://example.github.io/}{~example.github.io~}}
\def\github{\href{https://github.com/example}{~github.com/example~}}
\def\linkedin{\href{https://www.linkedin.com/in/example/}{~linkedin.com/in/example}}

\begin{document}

\begin{minipage}{0.75\textwidth}
    \centering
    \textbf{\LARGE \firstname, \lastname}\\
    \textit{\footnotesize \email \vertbar \githubIO \vertbar \github \vertbar \linkedin}
\end{minipage}\hfill
\begin{minipage}{0.20\textwidth}
    \includegraphics[width=\textwidth]{example-image-a}
\end{minipage}

\vspace{1cm}

\blindtext

\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .