Приведение примеров к виду теорем/лемм/следствий

Приведение примеров к виду теорем/лемм/следствий

Как сделать так, чтобы в документе Latex примеры были представлены тем же жирным шрифтом, что и теоремы/леммы/следствия?

решение1

Вы можете определять общие утверждения по своему усмотрению; не существует предопределенной среды, подобной теореме, поскольку люди склонны иметь разные ожидания по этому поводу.

\documentclass{article}
\usepackage{amsthm} % for \theoremstyle and proof

\newtheorem{thm}{Theorem}[section] % theorems will be numbered according to section
\newtheorem{lem}[thm]{Lemma} % lemmas share the counter with theorems
\newtheorem{cor}[thm]{Corollary} % ditto

\theoremstyle{definition} % body text will be upright
\newtheorem{defn}[thm]{Definition}
\newtheorem{exa}[thm]{Example}

\begin{document}

\section{A title}

\begin{lem}
This is a lemma.
\end{lem}

\begin{thm}
This is a theorem.
\end{thm}
\begin{proof}
Here's its proof.
\end{proof}

\begin{exa}
An example to illustrate the theorem.
\end{exa}

\end{document}

введите описание изображения здесь

решение2

Есть несколько вариантов. Один из хороших — amsthm. Вот пример.

\documentclass{minimal}
\usepackage{amsthm}
\theoremstyle{plain}  
\newtheorem{thm}{Theorem}
\newtheorem{lem}{Lemma}
\newtheorem{cor}{Corollary}
\newtheorem{exm}{Example}

\usepackage{lipsum}
\begin{document}
\lipsum[1]

\begin{thm} \lipsum[2] \end{thm}
\begin{lem} \lipsum[3] \end{lem}
\begin{cor} \lipsum[4] \end{cor}
\begin{exm} \lipsum[5] \end{exm}

\lipsum[6]
\end{document}

Больше пакетов на CTAN по адресуhttp://www.ctan.org/topic/maths-theorem.

Связанный контент