0

How can I adjust \begin{tabular}{@{}p{0.15\textwidth}|p{13cm}@{}} to adjust the vertical position of |?

| is not aligned with the text that follows.

enter image description here

Thanks in advance.

Regards, Sean

MWE:

\documentclass[a4paper, 11pt]{article}

\usepackage{amssymb, marvosym, fontspec, titlesec, xunicode, xltxtra, parskip, phonenumbers, geometry, color, graphicx, wrapfig, hyperref, arydshln}
\usepackage[export]{adjustbox}
\usepackage[dvipsnames]{xcolor}
\usepackage[utf8]{inputenc}
\usepackage{ebgaramond}

\begin{document}

\section*{Title} \vspace{.7em}

\begin{tabular}{@{}p{0.15\textwidth}|p{13cm}@{}}

9/2018 --- 12/2018 & Hi \\ \multicolumn{2}{c}{} \\

9/2011 --- 7/2017 & Hi \\ \multicolumn{2}{c}{} \\

9/2005 --- 7/2011 & HI \\ \multicolumn{2}{c}{}

\end{tabular}

\end{document}
5
  • 3
    Please provide a minimum working example -- test document that starts with \documentclass and ends with \end{document} -- that replicates the problem you wish to fix. The snippet \begin{tabular}{@{}p{0.15\textwidth}|p{13cm}@{}} does not suffice.
    – Mico
    Commented Apr 24, 2021 at 7:39
  • 2
    Please prepare a a complete and compilable MWE that allows others to reproduce the output and add this example document to your question.
    – leandriis
    Commented Apr 24, 2021 at 7:40
  • 1
    I don't understand what you want to acheive... Commented Apr 24, 2021 at 8:15
  • A sketch or a description of the expected output would also be really useful here. A MWE closer to the actual documen could also be useful here. The screenshot you show contains three lines of text in the right column, the MWE ou posted just contains a single word. and with the MWE you provided so far, I'm unable to recreate an output close to the one you show.
    – leandriis
    Commented Apr 24, 2021 at 8:40
  • 1
    Probably you get the expected output if you add \\ after the last \multicolumn{2}{c}{} in your table. Alternatively, you could just remove this line entirely as it does not seem to serve any purpose here, anyways.
    – leandriis
    Commented Apr 24, 2021 at 8:48

1 Answer 1

1

Maybe you are looking for the attached result. I just put the \multicolumn once in the beginning, but I extended the textwidth to 0.17, the minimum you need to have all data in one single row. The threefold stripe is ugly and unusual in typesetting. I substituted it by a double.

\documentclass[a4paper, 11pt]{article}

\usepackage{amssymb, marvosym, fontspec, titlesec, xunicode, xltxtra, parskip,     phonenumbers, geometry, color, graphicx, wrapfig, hyperref, arydshln}
\usepackage[export]{adjustbox}
\usepackage[dvipsnames]{xcolor}
\usepackage[utf8]{inputenc}
\usepackage{ebgaramond}

\begin{document}

\section*{Title} \vspace{.7em}%

\begin{tabular}{@{}p{0.17\textwidth}|p{13cm}@{}}%
\multicolumn{2}{c}{}\\
9/2018 -- 12/2018 & Hi \\

9/2011 -- 7/2017 & Hi \\% \multicolumn{2}{c}{}\\

9/2005 -- 7/2011 & HI \\% \multicolumn{2}{c}{}\\

\end{tabular}

\end{document}

table

1
  • This and the solution posed by @leandriis in the comments, has resolved the issue. Thanks.
    – Sean
    Commented Apr 25, 2021 at 11:38

You must log in to answer this question.

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