% Author: Alexey Shipunov, dactylorhiza@gmail.com

\ProvidesPackage{dline}
	[2019/10/03 v1.01 Double line on the left of text, based on "lineno" and "bframe"]

\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{lineno}}
\ProcessOptions*
\RequirePackage{lineno}

\newbox\dlinebox

% In principle, this is possible to redefiine...
\newdimen\dlinerule \dlinerule=\fboxrule
\newdimen\ddlinerule \ddlinerule=3\fboxrule
\newdimen\dlinesep \dlinesep=3\fboxsep
\newdimen\ddlinesep \ddlinesep=\fboxsep

\newenvironment{dline}
  {\par
   \@tempdima\textwidth
   \advance\@tempdima 2\dlinesep
   \setbox\dlinebox\hbox to\textwidth{%
      \hskip-\dlinesep
      \vrule\@width\dlinerule\@height\baselineskip\@depth\ddlinesep
      \hskip-\ddlinesep
      \vrule\@width\ddlinerule\@height\baselineskip\@depth\ddlinesep
   }%
   \nobreak
   \runninglinenumbers
   \def\makeLineNumber{\copy\dlinebox\hss}%
  }
  {\par
   \@tempdima\textwidth
   \advance\@tempdima 2\dlinesep
  }

\endinput
