0

Please help, what's wrong with my code:

\documentclass[10pt,a4paper]{article}   
\usepackage[latin1]{inputenc}    
\usepackage{amsmath}  
\usepackage{amsfonts}  
\usepackage{amssymb}  
\usepackage{graphicx}  
\begin{document}   
\begin{center}    

$  
\begin{array}{lll}   
\text{Premis 1} & $ p \Rightarrow q $ &(Benar)\\   
\text{Premis 2} & $ p $ &(Benar) \\   
\text{Kesimpulan} & $\therefore q $ &(Benar)   
\end{array}   
$  

\end{center}   
\end{document}

Errors in line 11 and 13 saying that there are "missing $ inserted"

  • 2
    You have $ ... $ within array. As you can see by the necessity to add \text{} around text within array, array's cells will be in math mode, putting $ ... $ in there takes you out of mathmode right before the maths and the puts you back in it right after the maths – Au101 Jul 14 '17 at 2:04
  • Also you're using \begin{center} ... \end{center} around a text style equation, is there any reason you aren't displaying it with \[ ... \] or an equation environment – Au101 Jul 14 '17 at 2:04
  • That's alright, there's also no need to load amsfonts if you load amssymb since amssymb itself loads amsfonts – Au101 Jul 14 '17 at 2:33
  • Are you certain of that input encoding? Most editors default to unicode these days. – cfr Jul 14 '17 at 2:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.