## LaTeX forum ⇒ Page Layout ⇒ Getting paragraph numbers in the margin when using the reledmac pkg (\linenummargin has no effect)

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
cypherpunks
Posts: 7
Joined: Sat Dec 10, 2016 12:26 pm

### Getting paragraph numbers in the margin when using the reledmac pkg (\linenummargin has no effect)

I want numbered paragraphs and I want the numbers to be in the left margin. Example:

\documentclass{scrartcl}
\usepackage[noend]{reledmac} % needed for \pstart & \pend to number paragraphs
\renewcommand{\thepstart}{{\textsuperscript{\fbox{\arabic{pstart}}}}} % ← this puts a box around the paragraph numbers
\linenummargin{outer} % ← the default is "left" which should put the numbers in the left margin (it does not), so trying "outer"
\begin{document}
\numberlinefalse\numberpstarttrue\beginnumbering
\pstart
\pend
This is an unnumbered paragraph to show where the body is. Notice that the position of the number is not in the margin.
\endnumbering
\end{document}


No matter what value is passed to \linenummargin, it's ignored (left, right, center, inner, outer). My hack is to add a \hspace{-1.5em} in the redefinition of \thepstart. But that's flawed because the negative hspace needs to be bigger for single digit paragraph numbers than for double digit numbers.

(edit)
This hack gives the effect I'm after:
\renewcommand{\thepstart}{\makebox[0pt][r]{\raisebox{2pt}{\scriptsize\fbox{\arabic{pstart}}}\hspace{1em}}}


The code is kind of ugly but I'm going to run with this.. unless someone knows a less hacky ledmac-devs-approved approach.