我对 LaTeX 完全陌生。我在 TeXworks 中写了下面的代码,但它不起作用:
\documentclass{article}
\usepackage{amsthm}
\begin{document}
\section{Introduction}
In this section I introduce some concepts which we need to fully understand the Ellipsoid method.
\begin{definition}
A set $S\in \mathbb R^n$ is said affine set if for every $x,y \in S$ and every $\lambda in \mathbb R$ we have $\lambda x+(1-\lambda )y\in S$.
\end{definition}
\end{document}
你能帮我一下,出了什么问题吗?
答案1
非常简单:默认情况下没有definition
类似定理的环境。只有一个“定义” theorem style
。因此,以下是如何定义它,按部分编号:
\documentclass{article}
\usepackage{amsthm, amssymb}
\theoremstyle{definition}
\newtheorem{definition}{Definition}[section]
\begin{document}
\section{Introduction}
In this section I introduce some concepts which we need to fully understand the Ellipsoid method.
\begin{definition}
A set $S\in \mathbb R^n$ is said affine set if for every $x,y \in S$ and every $\lambda \in \mathbb R$ we have $\lambda x+(1-\lambda )y\in S$.
\end{definition}
\end{document}