Creating an Example Environment in LaTeX

Use the preamble:

\usepackage{amsthm}
\theoremstyle{definition}
\newtheorem{exmp}{Example}[section]

In the document section:

\begin{exmp}
    This is an example problem.
\end{exmp}

The output will look like this:




Enjoy Reading This Article?

Here are some more articles you might like to read next:

  • Satu EFI untuk Dua Operating System (Ubuntu 24.04 dan Windows 11) pada dua disk yang berbeda
  • Akses internet ITS melalui myITS-WiFi di Ubuntu
  • Menampilkan Label LaTeX di Matplotlib