I'm working on updating my resume and converting it into a LaTeX-based CV. I'm reusing features from several open templates, which I liked, but I'm trying to modify the document per my taste and contents. Long story short, currently I'm experiencing a strange issue, where the content (my researcher identifiers) within a \parbox
, for some reason, gets dislocated down from the expected vertical position. I would appreciate help in fixing that. A picture of the issue and the relevant MWE follow. P.S. Please let me know, if you want my QR Code image file.
The issue:
Code (MWE):
\documentclass[12pt]{article}
\RequirePackage[T1]{fontenc}
\usepackage{charter}
\usepackage{calc}
\usepackage[shortcuts]{extdash}
\reversemarginpar
\usepackage[paper=a4paper,
marginparwidth=30.5mm,
marginparsep=1.5mm,
margin=25mm,
includemp]{geometry}
\setlength{\parindent}{0in}
\usepackage[shortlabels]{enumitem}
\usepackage{graphicx}
% I wasn't sure, if I could omit 'fancyhdr'-related
% code for the MWE purposes, so included just in case
\usepackage{fancyhdr,lastpage}
\pagestyle{fancy}
\fancyhf{}\renewcommand{\headrulewidth}{0pt}
\fancyfootoffset{\marginparsep+\marginparwidth}
\newlength{\footpageshift}
\setlength{\footpageshift}
{0.5\textwidth+0.5\marginparsep+0.5\marginparwidth-2in}
\lfoot{\hspace{\footpageshift}%
\parbox{4in}{\, \hfill %
\arabic{page} of \protect\pageref*{LastPage}
\hfill \,}}
\usepackage{color,hyperref}
\definecolor{darkblue}{rgb}{0.0,0.0,0.3}
\hypersetup{colorlinks,breaklinks,
linkcolor=darkblue,urlcolor=darkblue,
anchorcolor=darkblue,citecolor=darkblue}
\newcommand{\makeheading}[2][]%
{\hspace*{-\marginparsep minus \marginparwidth}%
\begin{minipage}[t]{\textwidth+\marginparwidth+\marginparsep}%
{\large \bfseries #2 \hfill #1}\\[-0.15\baselineskip]%
\rule{\columnwidth}{2pt}%
\end{minipage}}
\renewcommand{\section}[1]{\pagebreak[3]%
\vspace{1.3\baselineskip}%
\phantomsection\addcontentsline{toc}{section}{#1}%
\noindent\llap{\scshape\smash{\parbox[t]{\marginparwidth}{\hyphenpenalty=10000\raggedright #1}}}%
\vspace{-\baselineskip}\par}
\usepackage{url}
\urlstyle{same}
\providecommand*\emaillink[1]{\nolinkurl{#1}}
\providecommand*\email[1]{\href{mailto:#1}{\emaillink{#1}}}
\begin{document}
\makeheading{Aleksandr~L.~Blekh}
\section{Contact Information}
\newlength{\rcollength}\setlength{\rcollength}{1.85in}%
\newlength{\spacewidth}\setlength{\spacewidth}{20pt}
%
\begin{tabular}[t]{@{}p{\textwidth-\rcollength-\spacewidth}@{}p{\spacewidth}@{}p{\rcollength}}%
% Address box
\parbox{\textwidth-\rcollength-\spacewidth}{%
\textit{Mobile:} +1-111-111-1111 \\
\textit{E-mail:} \email{first.last@gmail.com} \\
\textit{E-mail:} \email{second@email.edu} \\
\textit{Web:\ \ \ \ } \href{http://www.aleksandrblekh.com}{www.aleksandrblekh.com}
}
&
{\vrule width 0.5pt}
\parbox[m][5\baselineskip]{\spacewidth}{} &
\parbox{\rcollength}{
\href{http://linkedin.com/in/ablekh}{LinkedIn}\\
\href{https://www.researchgate.net/profile/Aleksandr_Blekh}{ResearchGate}\\
\href{http://quora.com/Aleksandr-Blekh}{Quora}\\
\href{http://stackexchange.com/users/3422261/aleksandr-blekh?tab=accounts}{StackExchange}\\
\href{https://github.com/abnova}{GitHub}
}
\end{tabular}
\section{Researcher Identification}
\begin{tabular}[t]{@{}p{\textwidth-\rcollength-\spacewidth}@{}p{\spacewidth}@{}p{\rcollength}}%
\parbox{\textwidth-\rcollength-\spacewidth}{%
\textit{ORCID:\ \ \ \ \ \ \ \ \ } 0000-0003-4596-8376 $\rightarrow$ \\
\textit{ResearcherID:} P-1489-2014
}
&
%{\vrule width 0.5pt}
\parbox[m][5\baselineskip]{\spacewidth}{} &
\parbox{\rcollength}{
\includegraphics[scale=0.15]{MyOrcidQRcode}
}
\end{tabular}
\end{document}
Best Answer
You haven't said what "the issue" is. If you use no option, or
[c]
then the alignment point for the parbox is its vertical centre. If you use[t]
the alignment point is the baseline of its top row.As far as I can tell none of the
\parbox
in the example code are needed as they are just duplicating thep
columns.I guess you want something like
Although I wouldn't use
ORCID:\ \ \ \ \ \ \ \ \
to fake alignment, use an inner tested tabular to line up those fields.using a
tabular
to avoid using\ \ \ \
and to add the vertical rule