1

I am trying to add a tabular environment inside a theorem environment and there seems to be a sort of clash. The title and the table just get automatically horizontally aligned and remain stuck together across displaying transformations.

\documentclass[12pt, margin=3in]{article}
\usepackage{amsthm, tabularx, stackrel,amsmath, amssymb,xcolor}


\newtheorem{argument}{Argument} \theoremstyle{definition}

\begin{document}
    
    \begin{argument}
        \begin{tabular}{rl}
            &$\stackrel[]{\emph{Option 1}}{\text{Sanji lives in Calgary}}$ \textcolor{blue}{or} $\stackrel[]{\emph{Option 2}}{\text{Sanji lives in Edmonton}}$ \\
            &We negagate option 2\\
            $\therefore$& Sanjgiv lives in Calgary (Option 1).
        \end{tabular}
    \end{argument}
\end{document}

produces the following output enter image description here

But I am expecting the following output enter image description here

I have tried surrounding the tabular with a center environnement, also tried adding vspace{} around the block, with no success. Anyone have any ideas of how to resolve this issue ?

1
  • Add \leavevmode before the center environment.
    – Bernard
    May 3, 2021 at 19:21

1 Answer 1

2

You have to start the argument environment with something (\mbox or \leavevmode) and then insert a blank line (or paragraph break) to have the tabular set on its own line):

enter image description here

\documentclass{article}

\usepackage{amsthm,amssymb,xcolor}

\theoremstyle{definition}
\newtheorem{argument}{Argument}

\begin{document}
    
\begin{argument}
  \mbox{}% or \leavevmode
  
  \begin{tabular}{rl}
                 & \begin{tabular}[b]{@{} c @{}}
                   \emph{\small Option 1} \\
                   Sanji lives in Calgary
                 \end{tabular} \textcolor{blue}{or}
                 \begin{tabular}[b]{@{} c @{}}
                   \emph{\small Option 2} \\
                   Sanji lives in Edmonton
                 \end{tabular} \\
                 & We negagate option 2 \\
    $\therefore$ & Sanjgiv lives in Calgary (Option 1).
  \end{tabular}
\end{argument}

\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .