I am creating a cv using multirow
. I fix the width of the column so that multirow
automatically splits the text into different rows. I want to control the distance between the last row and the next block of the table while multirow only allows me to set the distance between the first line of the multirow
environment.
Here is my MWE.
\documentclass[letterpaper,8pt,oneside]{article}
\usepackage{longtable}
\usepackage{multirow}
\usepackage[centering,includeheadfoot,margin=2cm]{geometry}
\newcommand\x{8cm} % width
\newcommand\dist{2cm} % distance
\begin{document}
\begin{longtable}{ll}
%
%
% EDUCATION
%
%
\hline \noalign{\vskip 0.2cm}
\Large{\textbf{Education}}
&
\\
\small{2017 - 2021 (expected)}
&
\textbf{Ph.D. in Economic Analysis}\\
&
\multirow{1}{\x}{Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu.}\\[\dist]
&
\textbf{Ph.D. in Economic Analysis}\\
&
\multirow{1}{\x}{Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes,.}\\[\dist]
\end{longtable}
\end{document}
In this example, I choose the "variable" \dist = 2 on purpose, so that the two parts of the text overlap. I know I could set a bigger \dist specific to each block, but I would like Latex to do automatically.
EDIT
I implemented the solution proposed y @Zarco in the comments. However, I have the same problem. I want to control the distance between the line of text while the usual command \\[some distance]
allows me to control the distance between the cells. The problem arises when there is one cell with more than one line of text.
In the example below I would like to have the distance between [here] and M.Res. to be the same as the distance between [here2] and Bachelor.
\documentclass[letterpaper,8pt,oneside]{article}
\usepackage[utf8]{inputenc}
\usepackage{setspace}
\usepackage{booktabs}% http://ctan.org/pkg/booktabs
\newcommand{\tabitem}{~~\llap{\textbullet}~~}
\usepackage{longtable}
\usepackage{marvosym}
\usepackage[centering, left=2cm, bottom=2cm, top=2cm]{geometry}
%\usepackage[centering,includeheadfoot,margin=2cm]{geometry}
\usepackage{array}
\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
%% Distances
% distance line header
\newcommand\dista{0.2cm}
% distance bold-text
\newcommand\distb{0cm}
% distance bold-text academic exp
\newcommand\distba{0.2cm}
% distance text-bold/line
\newcommand\distc{0.8cm}
\begin{document}
\begin{longtable}{L{8cm} p{8cm}}
%
%
% EDUCATION
%
%
\hline \noalign{\vskip 0.2cm}
\Large{\textbf{Education}}
&
\\
\small{2017 - 2021 (expected)}
&
\textbf{Ph.D. in Economic Analysis}\\[\distb]
&
Universitat Example1, Universitat Autonoma, Universitat [Here].\\[\distc]
\small{Fall 2015 - Spring 2017}
&
\textbf{M.Res. in Economics Analysis }\\[\distb]
&
Universitat [here2].\\[\distc]
\small{Fall 2011 - Fall 2014}
&
\textbf{Bachelor Degree in Mechanical Engineering}\\[\distb]
&
Univeristy X.\\[\distc]
\hline
\end{longtable}
\end{document}
multirow
cells. In fact your approach is wrong. Eventualy in its place you should usemulticolumn
cells. However, far more simple is to defie table with\begin{longtable}{l >{\raggedright\arraybackslash}p{\x}}
and not use\multirow
at all.xltabular
and itsX
type column might be an idea to also automatically calculated the width of the second column.xltabular
.