1

How to align the contents of the \thead cell to the right?

\documentclass[12pt]{memoir}

\usepackage{tabularx}
\usepackage{makecell}

\begin{document}

    \begin{tabular}{|c|}
    \thead{Content \\ Other alignment}
    \end{tabular}

\end{document}

enter image description here

I know I can globally override all \thead environments alignment with something line \renewcommand\theadalign{ll}. Is there another way other than globally overriding all \thead environments alignment, i.e., doing it only for one cell?

  1. How to add a forced line break inside a table cell
2

You can achieve this by specifying that option in \thead. Such as \thead[r], \thead[l], \thead[c], etc.

\documentclass[12pt]{memoir}
\usepackage{tabularx}
\usepackage{makecell}

\begin{document}

    \begin{tabular}{|c|}
        \thead[l]{Content \\ Other alignment}\\
        \hline
        \thead[c]{Content \\ Other alignment}\\
        \hline
        \thead[r]{Content \\ Other alignment}\\
    \end{tabular}

\end{document}

enter image description here

2

Use \thead[l]{...} option.

\documentclass[12pt]{memoir}

\usepackage{tabularx}
\usepackage{makecell}

\begin{document}

    \begin{tabular}{|c|c|c|c|}
    \thead[l]{Content \\ Other alignment} &
    \thead[r]{Content \\ Other alignment} &
    \thead[t]{Content \\ Other alignment} &
    \thead[b]{Content \\ Other alignment}         
    \end{tabular}

\end{document}

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.