0

im new to Latex, so pleas make explenation easy ;) im working with latest latex version on miktex

i tried some \newcommand today and caused an error with this command: \newcommand{\N0}{ n_{0} }. when i delete this command the failure is gone, so that looks like a bug. but as windows user i know that most of the time the problem is sitting in front of the pc. Error message follows:

! LaTeX Error: Missing \begin{document}.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.34 \newcommand{\N0}[1]{ n_{0} }
You're in trouble here. Try typing <return> to proceed.
If that doesn't work, type X <return> to quit.
! Missing $ inserted.
<inserted text>
$
l.34 \newcommand{\N0}[1]{ n_{0} }
I've inserted a begin-math/end-math symbol since I think
you left one out. Proceed, with fingers crossed.
LaTeX Font Info: Try loading font information for U+msa on input line 34.
("C:\Program Files\MiKTeX 2.9\tex\latex\amsfonts\umsa.fd"
File: umsa.fd 2013/01/14 v3.01 AMS symbols A
)
LaTeX Font Info: Try loading font information for U+msb on input line 34.
("C:\Program Files\MiKTeX 2.9\tex\latex\amsfonts\umsb.fd"
File: umsb.fd 2013/01/14 v3.01 AMS symbols B
)
! Extra }, or forgotten $.
\@argdef ...definable #1{\@yargdef #1\@ne {#2}{#3}
}
l.34 \newcommand{\N0}[1]{ n_{0} }
I've deleted a group-closing symbol because it seems to be
spurious, as in `$x}$'. But perhaps the } is legitimate and
you forgot something else, as in `\hbox{$x}'. In such cases
the way to recover is to insert both the forgotten and the
deleted material, e.g., by typing `I$}'.
! Extra }, or forgotten $.
\@argdef ...efinable #1{\@yargdef #1\@ne {#2}{#3}}
l.34 \newcommand{\N0}[1]{ n_{0} }
I've deleted a group-closing symbol because it seems to be
spurious, as in `$x}$'. But perhaps the } is legitimate and
you forgot something else, as in `\hbox{$x}'. In such cases
the way to recover is to insert both the forgotten and the
deleted material, e.g., by typing `I$}'.
! Missing $ inserted.
<inserted text>
$
l.36
I've inserted a begin-math/end-math symbol since I think
you left one out. Proceed, with fingers crossed.
("C:\Users\Daniel\Dropbox\Uni\03 SS 2015\ANA\LATEX Skript\ANA-Skript.aux")
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 37.
LaTeX Font Info: ... okay on input line 37.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 37.
LaTeX Font Info: ... okay on input line 37.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 37.
LaTeX Font Info: ... okay on input line 37.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 37.
LaTeX Font Info: ... okay on input line 37.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 37.
LaTeX Font Info: ... okay on input line 37.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 37.
LaTeX Font Info: ... okay on input line 37.
("C:\Program Files\MiKTeX 2.9\tex\context\base\supp-pdf.mkii"
[Loading MPS to PDF converter (version 2006.09.02).]
\scratchcounter=\count104
\scratchdimen=\dimen116
\scratchbox=\box30
\nofMPsegments=\count105
\nofMParguments=\count106
\everyMPshowfont=\toks23
\MPscratchCnt=\count107
\MPscratchDim=\dimen117
\MPnumerator=\count108
\makeMPintoPDFobject=\count109
\everyMPtoPDFconversion=\toks24
)
LaTeX Font Info: Try loading font information for T1+cmss on input line 39.
("C:\Program Files\MiKTeX 2.9\tex\latex\base\t1cmss.fd"
File: t1cmss.fd 1999/05/25 v2.5h Standard LaTeX font definitions
)
LaTeX Font Info: Try loading font information for OMS+cmr on input line 52.
("C:\Program Files\MiKTeX 2.9\tex\latex\base\omscmr.fd"
File: omscmr.fd 1999/05/25 v2.5h Standard LaTeX font definitions
)
LaTeX Font Info: Font shape `OMS/cmr/m/n' in size <10> not available
(Font) Font shape `OMS/cmsy/m/n' tried instead on input line 52.

So I have no idea what this is talkin about, my latex document comes here:

\documentclass[a4paper, 10pt]{scrreprt}

\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{enumitem}
\usepackage{xcolor}
\usepackage{graphicx} 

\title{Erstes Dokument}
\author{ich}
\date{2015}


\newcommand{\changefont}[3]{
\fontfamily{#1} \fontseries{#2} \fontshape{#3} \selectfont}
%Modifikationen
\changefont{ppl}{m}{n}
\parindent 0pt
\parskip 9pt
%Mathematische Kommandos und Abkürzungen
\newcommand{\<}{\lbrace}
\renewcommand{\>}{\rbrace}
\newcommand{\NEN}{n \in \mathbb{N}}
\newcommand{\FANEN}{\< a_{n} \> _{\NEN}}
\newcommand{\FBNEN}{\< b_{n} \> _{\NEN}}
\newcommand{\FGNEN}{\< g_{n} \> _{\NEN}}
\newcommand{\FAKEN}{\< a_{k} \> _{\NEN}}
\newcommand{\FNKEN}{\< n_{k} \> _{\NEN}}
\newcommand{\AN}{ a_{n} }
\newcommand{\BN}{ b_{n} }
\newcommand{\AK}{ a_{k} }
\newcommand{\N0}{ n_{0} }
\newcommand{\NF}{Nullfolge }

\begin{document}
.
.
.
0

1 Answer 1

0

Commands cannot (usually) contain numbers. Try defining No or NO (those are the letter 'o' in lower and upper case) instead.

In my preamble I have defined \NNo for \mathbb N_0 for example.

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