Generate line numbers for the plugin tutorial code examples

Closes #336