I've managed to use eso-pic
+ calc
packages in order to draw a vertical line on the right margin between a "begin" and an "end" statement.
I made this for manuscript review in order to ease reading and commenting tasks for my thesis supervisors : the line is drawn between \NEW
and \ENDNEW
in order to make the location of new writings obvious to them.
I'm pretty happy with what I've got right now but there is still one thing that bothers me: the line is missing the last page!
In my preambule:
\usepackage{eso-pic,calc}
\newlength{\rightrule}
\setlength{\rightrule}{4\leftmargin+\textwidth+\marginparsep}
\newcommand{\MarginLineNew}{\AddToShipoutPicture{%
\AtPageLowerLeft{%
\put(\LenToUnit{\rightrule},0){\rule{1pt}{\paperheight}} % Rule on the right
}
}}
%start label for new stuff
\newcommand{\NEW}{\MarginLineNew}
%end label for new stuff
\newcommand{\ENDNEW}{\ClearShipoutPicture{}}
In the document:
[...]
Some text
[...]
\NEW
Some text
[...]
\ENDNEW
Obviously, calling \ENDNEW
sets the current page with \ClearShipoutPicture
while I'd need it to apply on the next page, but I don't know how if it's possible to refer to page +1 with this function.
Any ideas with that ?