2

I have just started using Latex, Here is the code I have used (Texstudio editor):

\documentclass{article}
\usepackage{parskip}
\usepackage[margin=3.5cm]{geometry}
\usepackage{makeidx}
\usepackage{paralist}
\usepackage{amsmath,amssymb}
\usepackage{mdwtab}
\usepackage{graphicx,subfigure}
\DeclareMathSymbol{,}{\mathord}{letters}{''3B}
\newcommand{\np}{\newpage}
\begin{document}
\title{DSC4830\\[3mm]
    Research Project\\[5mm]
    Department of Decision Sciences\\[1cm]
    Assignment 1\\[5mm]
    Typing in \Latex\\[1cm]
}
\author{\textbf{\Large Lashner Ciorovich}\\[3mm]
    /textbf{\Large 07364598}
}
\maketitle
\thispagestyle{empty}
\np
\tableofcontents
\np
\end{document}

I keep getting the following logs:

Missing number, treated as zero. \DeclareMathSymbol{,}{\mathord}{letters}{''3B} Missing \begin{document}. \DeclareMathSymbol{,}{\mathord}{letters}{''3B} Undefined control sequence. \maketitle

Please can someone tell me what is wrong with my code?

Thank you.

  • Stop using \np and delete the definition from your file (else the monster under your bed might get upset). It seems you are usin the wrong document class. Your title is also a mess (read more). – Johannes_B May 16 '17 at 4:15
4

The problem is that you typed '' instead of " in the math symbol definition.

By the way there were other errors too, mainly:

  1. The LaTeX logo is printed using \LaTeX, not \Latex

  2. you had a /textbf instead of \textbf

  3. finally, are you really sure about your substituting the comma and make it an ord math atom? EDIT should you want to use the comma as a decimal separator (as @GustavoMezzetti suggests), try and use the siunitx package, specifically loading it like \usepackage[output-decimal-marker={,}]{siunitx}. I recommend you skim through its documentation (you could obtain it also typing texdoc siunitx in your terminal window).

Anyway, here is my cleared up code

\documentclass{article}
\usepackage{parskip}
\usepackage[margin=3.5cm]{geometry}
\usepackage{makeidx}
\usepackage{paralist}
\usepackage{amsmath,amssymb}
\usepackage{mdwtab}
\usepackage{graphicx,subfigure}
\DeclareMathSymbol{,}{\mathord}{letters}{"3B}
\newcommand{\np}{\newpage}
\begin{document}
\title{DSC4830\\[3mm]
    Research Project\\[5mm]
    Department of Decision Sciences\\[1cm]
    Assignment 1\\[5mm]
    Typing in \LaTeX\\[1cm]
}
\author{\textbf{\Large Lashner Ciorovich}\\[3mm]
    \textbf{\Large 07364598}
}
\maketitle
\thispagestyle{empty}
\np
\tableofcontents
\np
\end{document}

which outputs

enter image description here

  • \DeclareMathSymbol{,}{\mathpunct}{letters}{"3B} does nothing but repeating the default definition: I guess that the OP really wishes to turn , into a \mathord. You might kindly suggest to have a look to the siunit(x) package. – GuM May 15 '17 at 18:44
  • @GustavoMezzetti I use siunitx all the time, but why here? I corrected the mathpunct thing – Moriambar May 15 '17 at 18:45
  • I thought that the OP wanted to use , as a decimal separator, as in $\pi = 3,1415926535897932384626433832795$ (if I recollect correctly the first digits of pi). – GuM May 15 '17 at 18:52
  • @GustavoMezzetti Well, perhaps so, I'll leave it as a suggestion on point 3, then, thanks – Moriambar May 15 '17 at 18:54

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.