0

There's a noticeable difference in spacing between tcblines and the tcblower in my tcolorbox table. I looked for a relevant spacing setting from tcb's documentation but couldn't find one, so I tried using [size=minimal], and noticed that the tcblines still had like 1em of spacing?

See my previous question for an image and code. What I ultimately want is that the spacings for tcblines and the tcblower would be the same.

Edit2: After creating the following example code, I discovered that by itself it works fine. It appears using the parskip package is what causes the difference in spacing.

Edit3: Solution added.

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[many]{tcolorbox}
\usepackage{tabularx}
\usepackage[paper=a4paper]{geometry}
\usepackage{lipsum}
%\usepackage{parskip}

\begin{document}

    \newgeometry{left=1.5cm, right=1.5cm, top=1.0cm, bottom=1.0cm}
    \thispagestyle{empty}
    \begin{tcolorbox}[
    enhanced, space to upper,
    height fill, sharp corners,
    segmentation style=solid,
    colback=white,
    middle=0.1pc, boxsep=0.1pc]
        \noindent\begin{tabularx}{\textwidth}
        {@{} >{\hsize=1.15\hsize}X >{\hsize=1.15\hsize}X >{\hsize=.7\hsize}X @{}}
            \textbf{Author}
            \vspace*{0.5pc}

            student name here
            &
            \textbf{Degree}
            \vspace*{0.5pc}

            degree programme here
            &
            \textbf{Time}
            \vspace*{0.5pc}

            2018
        \end{tabularx}
    \tcbline
        \noindent\begin{tabularx}{\textwidth}
        {@{} >{\hsize=1.5\hsize}X >{\hsize=0.5\hsize}X @{}}
        \textbf{Thesis title}
        \vspace*{0.5pc}

        paper title here
        &
        99 pages

        9 pages of appendices
        \end{tabularx}
    \tcbline
        \textbf{Commissioned by}

        commissioner here
    \tcbline
        \textbf{Supervisor}

        supervisor here
    \tcbline
        \textbf{Abstract}

        \setlength{\parskip}{\baselineskip}
        \lipsum[3]
        \setlength{\parskip}{0pc}
    \tcblower
        \textbf{Keywords}

        keyword1, keyword2, keyword3, etc.
    \end{tcolorbox}

\end{document}
  • 1
    I honestly don't even understand what space you're referring to. The only noticeable different space is the one after \lipsum[1], but from your description you seem to be talking about something else. – Torbjørn T. Mar 14 '18 at 21:06
  • @TorbjørnT.: I think that's the spacing that is referred too, which is caused by height fill – user31729 Mar 14 '18 at 21:10
  • Sorry, I didn't mean the image from the answer, but the 2nd image from my question. See the "Keywords" row at the bottom, and how it almost touches the tcblower. – TakingItCasual Mar 14 '18 at 21:11
  • @TakingItCasual: Please post the compilable code that causes the issue -- apparently the answer there is not related to your current question – user31729 Mar 14 '18 at 21:13
  • @TakingItCasual: No, please post the compilable document, not just fragments – user31729 Mar 14 '18 at 21:17
0

Turns out it was parskip causing the difference in spacing. I had originally used the [parbox=false] option so that paragraphs would have the empty lines between them, but I found out I can do that manually with \setlength{\parskip}{\baselineskip} before the paragraphs and \setlength{\parskip}{0pc} after the paragraphs, eliminating the need to use [parbox=false]. Not setting the parbox option to false fixes the issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.