0

I've seen related to this problem, but my problem is the output shows mathstyle with italic font instead of textstyle (Not italic). And then i tried to use \text{...}, but it didn't work and a lot of errors happened.

And what if i get rid the dollar symbol? The tabular will fail.

So, this is my code:

\begin{center}
     \begin{tabular}
      $\begin{array}{ll}
       \text{My Name   & : Justin Bieber \\
        Class          & : VIII D \\
        NIM            & : 1234567890}
     \end{array}$
     \end{tabular}
\end{center}

Please help me to fix my code until shows textstyle, tabular set with left justify. Thanks!

  • 2
    Welcome to TeX.SE. Your code contains several syntax errors. Don't just blow past them and see if the code will still somehow compile. – Mico Jul 29 '20 at 01:02

1 Answers1

1

It's not a good idea to place an array environment inside a tabular environment -- at least not the way you are attempting to do it. array is mainly for math-mode material; tabular is mainly for text-mode material. Your code also generates quite a few syntax error messages -- don't ignore them.

Anyway, here's an attempt to fix your code:

\begin{center}
     \begin{tabular}{ll}
        My Name   & Justin Bieber \\
        Class     & VIII D \\
        NIM       & 1234567890
     \end{tabular}
\end{center}
Mico
  • 506,678