I'm new in [tex.se] and I want to ask you how do I correct the problem I have with this snippet:
\section{Latex meltdown my brain!!!}
This longtable table shows a weird behaviour. If I don't use a minipage, the result doesn't show as I want
I show you various problems I've encountered mixing the 3 variants: equal size, one more than another, and viceversa.
\begin{longtable}{@{} p{0.48\textwidth} p{0.48\textwidth} @{}}
\rowcolor[HTML]{C0C0C0}
Column fine & Column with problems \\
BLABLA BLABLABLA BLABLA BLABLABLA BLABLABLA BLABLA BLA & \par\begin{minipage}{0.48\textwidth} In eget tortor libero. Duis vulputate scelerisque. \\ Etiam nec ornare nisi, eu semper augue \end{minipage}\\
\rowcolor[HTML]{EFEFEF}
BLABLA BLABLABLA BLABLA BLABLABLA BLABLA BLA & \par\begin{minipage}{0.48\textwidth} Integer condimentum elit a finibus. \\ Praesent sed vestibulum sapien. \\ Donec molestie eros nulla, et finibus urna ut. \\ Morbi at malesuada erat. \end{minipage}\\
BLABLA BLABLABLA BLABLA BLABLABLA BLABLABLA BLABLA BLA BLABLA BLABLABLA BLABLA BLA & \par\begin{minipage}{0.48\textwidth} Praesent sit amet condimentum lectus: \\ Butvitae dignissim sem tortor ut dolor \end{minipage}\\
\end{longtable}
\clearpage
This code, when I use XeTeX and nice fonts, output this:
The packages I used for minimal compiling this snippet are the follows (it could be compiled without most of them, I don't tested with less packages):
\usepackage{tikz}
\usepackage{verbatim}
\usepackage{graphicx}
\usepackage[utf8]{inputenc}
\usepackage{color}
\usepackage{longtable}
\usepackage{colortbl}
\usepackage{kpfonts}
\usepackage[explicit]{titlesec}
\usepackage{fontspec}
The document type is a:
\documentclass[svgnames]{book}
I've tried to change \par with \noindent prior to \begin{minipage}, with no noticeable changes.
I've tried using the solution approach commented here: Problem with balancing multicols with minipage inside but it doesn't work, too.
The question is: What I type into the longtable table or in the minipages to look with correct spacing in the upper and lower parts of the cell?
The minimal compilable document is:
\documentclass[svgnames]{book}
\usepackage{tikz}
\usepackage{verbatim}
\usepackage{graphicx}
\usepackage[utf8]{inputenc}
\usepackage{color}
\usepackage{longtable}
\usepackage{colortbl}
\usepackage{kpfonts}
\usepackage[explicit]{titlesec}
\usepackage{fontspec}
\begin{document}
\section{Latex meltdown my brain!!!}
This longtable table shows a weird behaviour. If I don't use a minipage, the result doesn't show as I want
I show you various problems I've encountered mixing the 3 variants: equal size, one more than another, and viceversa.
\begin{longtable}{@{} p{0.48\textwidth} p{0.48\textwidth} @{}}
\rowcolor[HTML]{C0C0C0}
Column fine & Column with problems \\
BLABLA BLABLABLA BLABLA BLABLABLA BLABLABLA BLABLA BLA & \par\begin{minipage}{0.48\textwidth} In eget tortor libero. Duis vulputate scelerisque. \\ Etiam nec ornare nisi, eu semper augue \end{minipage}\\
\rowcolor[HTML]{EFEFEF}
BLABLA BLABLABLA BLABLA BLABLABLA BLABLA BLA & \par\begin{minipage}{0.48\textwidth} Integer condimentum elit a finibus. \\ Praesent sed vestibulum sapien. \\ Donec molestie eros nulla, et finibus urna ut. \\ Morbi at malesuada erat. \end{minipage}\\
BLABLA BLABLABLA BLABLA BLABLABLA BLABLABLA BLABLA BLA BLABLA BLABLABLA BLABLA BLA & \par\begin{minipage}{0.48\textwidth} Praesent sit amet condimentum lectus: \\ Butvitae dignissim sem tortor ut dolor \end{minipage}\\
\end{longtable}
\clearpage
\end{document}
I followed the anotations by Andrew Swann, putting \strut at the beggining and the end of the cell, and there is no better spacing around them:
\begin{longtable}{@{} p{0.48\textwidth} p{0.48\textwidth} @{}}
\rowcolor[HTML]{C0C0C0}
Column fine & Column with problems \\
BLABLA BLABLABLA BLABLA BLABLABLA BLABLABLA BLABLA BLA & \strut\begin{minipage}{0.48\textwidth} In eget tortor libero. Duis vulputate scelerisque. \\ Etiam nec ornare nisi, eu semper augue \end{minipage}\strut\\
\rowcolor[HTML]{EFEFEF}
BLABLA BLABLABLA BLABLA BLABLABLA BLABLA BLA & \strut\begin{minipage}{0.48\textwidth} Integer condimentum elit a finibus. \\ Praesent sed vestibulum sapien. \\ Donec molestie eros nulla, et finibus urna ut. \\ Morbi at malesuada erat. \end{minipage}\strut\\
BLABLA BLABLABLA BLABLA BLABLABLA BLABLABLA BLABLA BLA BLABLA BLABLABLA BLABLA BLA & \strut\begin{minipage}{0.48\textwidth} Praesent sit amet condimentum lectus: \\ Butvitae dignissim sem tortor ut dolor \end{minipage}\strut\\
\end{longtable}
I try to achieve, exactly, a bit more spacing between minipage and the start/end of the cell in the longtable, without adding extra spacing inside each minipage.





\strutand the beginning and the end of the text in the cells? – Andrew Swann Dec 11 '18 at 11:36\strutparameter you comment – José Manuel Ramos Dec 11 '18 at 11:44