Saksham Sharma
Saksham Sharma

Reputation: 21

"Justify" align in Latex

I want my email id on left, phone number in middle and site on right side, i.e. I want the line to be "justify" aligned (please look at the image). CV.jpg I used "\hspace{}" for adding space but I think it's not the right way. Link for resume.cls: https://docs.google.com/document/d/12QO34MquVCenQ8Vu8fmuIzrSRqPIhvUZiRdVVCqSqbA/edit

I tried the following code:

\documentclass{resume} 
\usepackage{tabularx}
\usepackage{hyperref} 
\hypersetup{colorlinks=true,urlcolor=blue}
\hypersetup{linktocpage}
\usepackage{marvosym} 
\usepackage[bitstream-charter]{mathdesign}
\usepackage[left=1cm,top=0.5cm,right=1cm,bottom=0.1cm]{geometry} 
\name{\bf Saksham Sharma}
\address{
{\Large\Letter}{\href{mailto:[email protected]}{[email protected]}}
{\Large\Telefon} +1-xxx-xxx-xxxx
{\Large\Mundus} {\href{example.com}{example.com}}
}

\begin{document}

\end{document}

Upvotes: 2

Views: 1401

Answers (1)

Werner
Werner

Reputation: 15105

Use \hfill to push the content to the sides:

enter image description here

\documentclass{resume}

\usepackage{marvosym}
\usepackage[bitstream-charter]{mathdesign}
\usepackage{geometry}
\geometry{
  hmargin=1cm,
  top=5mm,
  bottom=1mm
}

\usepackage{hyperref}
\hypersetup{
  colorlinks=true,
  urlcolor=blue,
  linktocpage
}

\name{\bfseries Saksham Sharma}
\address{%
  {\Large\Letter}{\href{mailto:[email protected]}{[email protected]}}\hfill
  {\Large\Telefon} +1-xxx-xxx-xxxx\hfill
  {\Large\Mundus} {\href{example.com}{example.com}}%
}

\begin{document}

\end{document}

However, I'd advise against using some restrictive resume class for setting your CV, unless it's something really fancy. Instead, just use article:

enter image description here

\documentclass{article}

\usepackage{marvosym}
\usepackage[bitstream-charter]{mathdesign}
\usepackage{geometry}
\geometry{
  hmargin=1cm,
  top=5mm,
  bottom=1mm
}

\usepackage{hyperref}
\hypersetup{
  colorlinks=true,
  urlcolor=blue,
  linktocpage
}

\setlength{\parindent}{0pt}

\begin{document}

{\centering

{\huge\bfseries \MakeUppercase{Saksham Sharma}\par}
\bigskip
{\Large\Letter}{\href{mailto:[email protected]}{[email protected]}}\hfill
{\Large\Telefon} +1-xxx-xxx-xxxx\hfill
{\Large\Mundus} {\href{example.com}{example.com}}
\par}

\smallskip

Your resume here

\end{document}

Upvotes: 2

Related Questions