I write a document that discusses syntactic differences between two languages (let's say, TeX and Markdown). Going through various topics, the text talks some time about one language and then about the other language.
What I want to do is to place marks in the margin to show which regions discuss TeX and which discuss Markdown. For example:
Here are some paragraphs \ discussing features | TeX | of TeX. / And the text starting here \ | Markdown discusses Markdown /
Since I have quite some region pairs like this, I would like to generate them with environment, like so:
\starttexdiscussion Here are some paragraphs discussing features of TeX. \stoptexdiscussion \startmarkdowndiscussion And the text starting here discusses Markdown \stopmarkdowndiscussion
Is it possible to define environments that do that for me? How would I adjust position and length of the margin content to match the main content? How could I handle page breaks?