An
excursus (from
Latin excurrere, "to run out of") is a short episode or anecdote in a work of literature

Often excursuses have nothing to do with the matter being discussed by the work, and are used to lighten the atmosphere in a tragic story, similar to the role of
satyr plays in Greek theatre. Sometimes they are used to provide backstory to the matter being discussed at hand, as in Pseudo-Apollodorus'
Bibliotheke.
Etymologies as excursuses
Sometimes detailed or fanciful
etymologies are used as excursuses. This was used as early as the 5th Century BC by the poet
Pindar. The most famous case of etymologies being used as excursuses is in
The Golden Legend of
Jacobus de Voragine, in which the life of each saint is proceeded by an etymology about the origin of the saint's name.
See also