1

I have a table with 4 columns and 4 rows, in the last row of which I'm using multicolumn to have cells 2 columns wide. However, since one is taller than the other, for some reason they are automatically aligned to the middle (vertically speaking) of the cell, not the top. I have tried p instead of l in the column designation, putting in whitespace (positive and negative), searching on TeX.SX, but I haven't found a solution. Here is a MWE:

\documentclass{standalone}
\usepackage{amsmath, tikz}
\begin{document}

\renewcommand\arraystretch{1.5}
\begin{tabular}{l l|l l}
sheaf space & & stack space & \\\hline
$U\to {\mathcal F}(U)$ & a group & $U\to \widehat {\mathcal F}(U)$ & a groupoid \\
$O(X)^{op} \to \text{Set}$ & open sets to groups & $O(X)^{op}\to \text{Grpd}$ & open sets to groupoids \\[5pt]
\multicolumn{2}{c|}{
\parbox{7cm}{\raggedright
if $s_i\in \mathcal F(U_i)$ and $s_j\in \mathcal F(U_j)$ such that $s_i|_{U_i\cap U_j} = s_j|_{U_i\cap U_j}$, then there exists $s\in \mathcal F(U)$ such that $s|_{U_i} = s_i$ and $s|_{U_j} = s_j$.
}} &
\multicolumn{2}{c}{\parbox{7cm}{\raggedright
if $s_i\in \widehat{\mathcal F}(U_i)$ and $s_j\in \widehat{\mathcal F}(U_j)$ such that there an isomorphism $\varphi_{ij}:s_i|_{U_i\cap U_j} \to s_j|_{U_i\cap U_j}$, then there exists $s\in \mathcal F(U)$ and isomorphisms $\varphi_i:s|_{U_i}\to s_i$, $ \varphi_j:s|_{U_j}\to s_j$ such that the following diagram commutes:
\[
\begin{tikzpicture}
\node (si) at (0,0) {$s_i|_{U_i\cap U_j}$};
\node (sj) at (3,0) {$s_j|_{U_i\cap U_j}$};
\node (s) at (1.5,1.5) {$s$};
\draw[->] (si) to node[above] {$\varphi_{ij}$} (sj);
\draw[->] (s) to node[auto,swap] {$\varphi_i|_{U_i\cap U_j}$} (si);
\draw[->] (s) to node[auto] {$\varphi_j|_{U_i\cap U_j}$} (sj);
\end{tikzpicture}
\]
}}
\end{tabular}
\renewcommand\arraystretch{1}

\end{document}

This is the output:

enter image description here

I would like the text in the bottom left cell to be aligned to the top of its cell, but I can't figure out how to do it.

  • \parbox is vertically centred by default use [t] or better use \multicolumn{2}{p{7cm}|}{ instead of \multicolumn{2}{c|}{ \parbox{7cm}{ – David Carlisle Aug 12 '16 at 23:25
  • @DavidCarlisle strange - changing to \multicolumn{2}{p{7cm}} and removing \parbox for the left cell only did nothing, but doing it for the left and right bottom cells solved the problem. If you'd like to make an answer I'll accept it. – Jānis Lazovskis Aug 12 '16 at 23:36
2

\parbox is vertically centred by default use \parbox[t] or better use

\multicolumn{2}{p{7cm}|}{ 

instead of

 \multicolumn{2}{c|}{\parbox{7cm}{

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.