I need a horizontal line to span across the page, up to the right margin (where the text would end). This works:
\rule{\hsize}{0.4pt}
But, when inside a list, the line goes over the margin because it is indented, and \hsize of course doesn't check for indentation.
How can I make the line's length account for the list's indentation?
Example:
\documentclass{article}
\begin{document}
\section{Some section}
\begin{enumerate}
\item Some text \\ \rule{\hsize}{0.4pt}
\end{enumerate}
\end{document}
As you can see, the line goes over the right margin. (compare to left and top margins)


\documentclassto compile it? Or adocumentenvironment? Amazing. I do. – cfr May 04 '16 at 02:43