I would like to place numbers on the left margin of the document, similar to the line number of fancyvrb
or other listing packages, but for ordinary text. I don't want to it be margin par, which will float. And in fact, I still want to keep the margin in the right, which might have some real margin notes. (So some questions that were answered with techniques using margin par, or reverse margin, does not apply here). So far, my best attempt is something similar to the following MWE,
\documentclass{article}
\usepackage[showframe]{geometry}
\begin{document}
\hbox{\hbox to 0pt{\hss{Numbers}\hskip1em}Beginning of the line...}
\end{document}
Thi is more or less what I want to get in the end. However, without the outer hbox
, I got a missed aligned two lines, with apparently a line break after Numbers
,
Insert an unbreakable space ~
or temporarily change the line break penalty does not seem to help. With the outer hbox
, it works fine for shorter text, but first line may not fit into a single line and thus it is troubling.
I would like to know how do I get the effect in the first screen shot for arbitrarily long line after Benning of lines
.
lineno
package?