1

I would like to center the Available Expression, Very Busy Expression... Live Variables cells. The following code aligns the quoted cells only on the bottom of the cell itself: is there a way to center vertically even those cells? Thanks in advance.

\usepackage{bbm}
\usepackage[italian]{babel}
\usepackage[italian]{varioref}
\usepackage{rotating}
\usepackage{pgf,tikz}
\usepackage{etex}
\usepackage{tikz-cd}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[utf8]{inputenx}
\usepackage{braket}
\usepackage[a4paper]{geometry}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{mathabx}
\usepackage{examples}
\usepackage{multirow}
\newcommand{\spheading}[2][10em]{% \spheading[<width>]{<stuff>}\rotatebox{90}{\parbox{#1}{\raggedright #2}}}
\newcolumntype{P}[1]{>{\centering\arraybackslash}p{#1}}
\newcolumntype{M}[1]{>{\centering\arraybackslash}m{#1}}

  ......

  \begin{tabular}{c|M{20mm} M{30mm}}
      & forward ($flow$) & backward ($flow^R$)\\
    \midrule
    \spheading[4em]{must ($\cap$)} & Available Expression & Very Busy Expression\\
    \spheading[4em]{may ($\cap$)} & Reaching Definition & Live Variables\\
     \bottomrule
   \end{tabular}

enter image description here

  • When you write $flow$, LaTeX typesets this as the quantities f, l, o and w all "multiplied together". You should use $\mathit{flow}$ and $\mathit{flow}^R$ instead. Also, one of your \caps should be a \cup. – John Wickerson May 22 '13 at 14:42
  • It's better if you post a complete compilable .tex file, starting with \documentclass. Otherwise people trying to reproduce your problem have to guess which packages (e.g. booktabs) you've loaded. – John Wickerson May 22 '13 at 14:55
3

You can get a reasonable approximation by putting \raisebox{-1.5em}{...} around your \rotatebox.

Code

\documentclass{article}
\usepackage{array}
\usepackage{booktabs}
\usepackage{graphicx}

\newcommand{\spheading}[2][10em]{% \spheading[<width>]{<stuff>}
\raisebox{-1.5em}{\rotatebox{90}{\parbox{#1}{\raggedright #2}}}}
\newcolumntype{P}[1]{>{\centering\arraybackslash}p{#1}}
\newcolumntype{M}[1]{>{\centering\arraybackslash}m{#1}}

\begin{document}
  \begin{tabular}{c|M{20mm} M{30mm}}
      & forward ($\mathit{flow}$) & backward ($\mathit{flow}^R$)\\
    \midrule
    \spheading[4em]{must ($\cap$)} & Available Expression & Very Busy Expression\\
    \spheading[4em]{may ($\cap$)} & Reaching Definition & Live Variables\\
     \bottomrule
   \end{tabular}
\end{document}

Output

enter image description here

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.