I am not sure I totally understand your question. But, to get the definitions to be numbered by section you just have to add the [section] option in the preamble where you create the definition environment. In other words, add this to your preamble:
ewtheorem{definition}{Definition}[section] Hope that helps.
@@Disha_art_diaries Sorry about that, I forgot to mention that \theoremstyle{definition} has to be placed BEFORE the theorems are defined in the preamble. Example: \documentclass{article} \usepackage{amsthm} \theoremstyle{definition}
ewtheorem{theorem}{Theorem} \begin{document} \begin{theorem} The text here should be in normal font. \end{theorem} \end{document} Does that work?
Hi! Thank you for the very good question. For referencing you want to use the hyperref package as follows: Step 1: Add \usepackage{hyperref} to the preamble (the part before \begin{document}). Step 2: After you have created a theorem environment you can reference the theorem by adding \label{xxx} anywhere between \begin{theorem} and \end{\theorem}. Note that "xxx" can be anything you like and is what will be used to reference the theorem in the text with ef{xxx}. Also NOTE that you will have to compile the document twice to see the reference number. The first time it will show up as "??". Example: \begin{theorem}\label{pythagorus} $$ a^{2}+b^{2}=c^{2} $$ \end{theorem} Theorem ef{pythagorus} is the Pythagorean theorem. In this example I added the label tag to the theorem under the name pythagorus. Then I reference the theorem in the text with ef{pythagorus}. This will show up in the compiled pdf as the number associated with with the Theorem. This works for all theorem environments as well as figures. Finally, note that there is lots of customization you can do here (Google is your friend, try to search for some things). What I am currently using is: \usepackage{hyperref} \hypersetup{ colorlinks, linkcolor={blue}, citecolor={blue!50!black}, urlcolor={blue!80!black} } just add that to the preamble and you will see that it adds some nice features (like being able to click the reference number and jump to the theorem).
Thx ..❤❤ all love for you teacher from algeria north of africa
Thank you so much for the video. You create a good video and it continuing help people even after years!
Thank you ,i have a question: what if we have a report? , i couldn't make a definition with the number of section
I am not sure I totally understand your question. But, to get the definitions to be numbered by section you just have to add the [section] option in the preamble where you create the definition environment. In other words, add this to your preamble:
ewtheorem{definition}{Definition}[section]
Hope that helps.
thanks man!
What if i don't want to change the fontstyle of theorem or want to put normal font of theorem???
For normal fonts in the theorem environment simply add the following to the preamble:
\theoremstyle{definition}
@@tjr1252 but it doesn't work🙄
@@Disha_art_diaries Sorry about that, I forgot to mention that \theoremstyle{definition} has to be placed BEFORE the theorems are defined in the preamble. Example:
\documentclass{article}
\usepackage{amsthm}
\theoremstyle{definition}
ewtheorem{theorem}{Theorem}
\begin{document}
\begin{theorem}
The text here should be in normal font.
\end{theorem}
\end{document}
Does that work?
@@tjr1252 yes it's work😁😁
Thank U😇
How to refer them? We will need to refer lemmas and theorems.
Hi! Thank you for the very good question. For referencing you want to use the hyperref package as follows:
Step 1: Add \usepackage{hyperref} to the preamble (the part before \begin{document}).
Step 2: After you have created a theorem environment you can reference the theorem by adding \label{xxx} anywhere between \begin{theorem} and \end{\theorem}. Note that "xxx" can be anything you like and is what will be used to reference the theorem in the text with
ef{xxx}. Also NOTE that you will have to compile the document twice to see the reference number. The first time it will show up as "??".
Example:
\begin{theorem}\label{pythagorus}
$$
a^{2}+b^{2}=c^{2}
$$
\end{theorem}
Theorem
ef{pythagorus} is the Pythagorean theorem.
In this example I added the label tag to the theorem under the name pythagorus. Then I reference the theorem in the text with
ef{pythagorus}. This will show up in the compiled pdf as the number associated with with the Theorem. This works for all theorem environments as well as figures.
Finally, note that there is lots of customization you can do here (Google is your friend, try to search for some things). What I am currently using is:
\usepackage{hyperref}
\hypersetup{
colorlinks,
linkcolor={blue},
citecolor={blue!50!black},
urlcolor={blue!80!black}
}
just add that to the preamble and you will see that it adds some nice features (like being able to click the reference number and jump to the theorem).
Great
great