我是 Latex 新手,所以請讓解釋變得簡單;)我在 miktex 上使用最新的 Latex 版本
我\newcommand
今天嘗試了一些,並導致此命令出錯:\newcommand{\N0}{ n_{0} }
。當我刪除此命令時,故障消失了,所以這看起來像是一個錯誤。但身為 Windows 用戶,我知道大多數時候問題出在電腦前。錯誤訊息如下:
! 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.
所以我不知道這在說什麼,我的乳膠文件在這裡:
\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}
.
.
.
答案1
命令(通常)不能包含數字。嘗試定義No
or NO
(即小寫和大寫字母“o”)。
例如,在我的序言中,我已經定義了\NNo
。\mathbb N_0