I'm working on an example document for a book that I bought for my girlfriend. The book does not have any examples inside and I want to make a note such that she can see how the math works.
Down below you can see a picture of how my code:
\documentclass[12pt,oneside,final]{report}
\newenvironment{eks}[2][Example]{\begin{trivlist}
\item[\hskip \labelsep {\bfseries #1}\hskip \labelsep {\bfseries #2.}]}{\end{trivlist}}
\begin{document}
\chapter{Linear Algebra}
\section{Vectors}
\begin{eks}{}
Let $X$ be...
\end{eks}
\section{Matrices}
\begin{eks}{}
Let $X$ be...
\end{eks}
\end{document}
works.
Now to my question. First, I don't know how to create a line at left margin in my example environment. I've tried by reading on the internet for some useful packages and also readed on this page.
The next thing is how can I make a pattern for my example? My picture above only show "Example" in each section. I wan't it to look like "Example 1.1.1" and for the second section, "Example 1.2.1" and so on. Down below you can see my idea on how it should look like. (It is made in MSPaint).