A numbered environment for example sentences

I want an environment for example sentences where sentences are numbered and can be referenced. This is common in publications in the area of linguistics and there are a few packages that do the trick. But here is my own.

First, we need a counter that provides the number for the sentence:


We reset sentence counter for each chapter:


We print the sentence number as (chapter.sentence):


Then we define an environment for one example sentence, where the number will be printed in the beginning of the line and then the sentence follows:

{% start env
\begin{enumerate} \small%
\itemsep0pt \parskip0pt%
{% end env

Next is an environment for more than one example sentence. Here the sentence number will be printed in the beginning of the line and the individual sentences get an a., b., c., in front of them:

{% start env
\begin{enumerate} \itemsep0pt \parskip0pt%
{% end env
This entry was posted in LaTeX and tagged , by swk. Bookmark the permalink.

About swk

I am a software developr, data scientist, computational linguist, teacher of computer science and above all a huge fan of LaTeX. I use LaTeX for everything, including things you never wanted to do with LaTeX. My latest love is lilypond, aka LaTeX for music. I'll post at irregular intervals about cool stuff, stupid hacks and annoying settings I want to remember for the future.