maieul / ledmac

package reledmac for latex
http://www.ctan.org/tex-archive/macros/latex/contrib/reledmac
54 stars 28 forks source link

Line number annotation causes spurious indentation of body text #726

Closed kfeuerherm closed 6 years ago

kfeuerherm commented 6 years ago

In the following minimal example, a line 20a was inserted into the previous edition of the text. The annotation seems to have caused the body text to be indented by approximately the width of the marginal annotation as shown in the attached PDF. (In other words, the "igi" on that line should be directly under the "igi" of the previous line; instead it is indented slightly.)

MWE:

 \documentclass{memoir}

\usepackage{libertine}
\usepackage{reledmac}
    \Xarrangement[A]{paragraph}     % format all A-series critical notes into a single paragraph
    \Xlemmaseparator[A]{:}          % replace ] with : in critical notes
    \Xendlemmaseparator[A]{:}
    \setlength{\linenumsep}{0.5em}  % set space between line number and margin
    \sublinenumberstyle{alph}       % subline numbers 'a', 'b', etc.
    \renewcommand{\printnpnum}[1]{}
    \Xendtxtbeforenotes{\vskip 6pt\footnoterule}
\usepackage{reledpar} 
    \setlength{\Lcolwidth}{0.49\textwidth}
    \setlength{\Rcolwidth}{0.49\textwidth}
    \firstlinenum*{1}               % start line numbering with first line
    \linenumincrement*{1}           % number every line
    \setstanzaindents{1,0}
    \setlength{\stanzaindentbase}{1em}
    \setcounter{stanzaindentsrepetition}{1}
    \AtBeginPairs{\sloppy}
\newcommand{\blankline}{\begin{stanza}
    \skipnumbering\quad{\footnotesize‹space›}\&
    \end{stanza}
}
\newcommand{\blankright}{\noindent\skipnumbering{}\pend}
\newcommand{\RE}{(\textsc{re}:)~}
\newcommand{\ruled}{%
\makebox{\rule[-0.3\baselineskip]{\Lcolwidth}{0.4pt}}\hspace{-\Lcolwidth}%
}
\begin{document}
\chapter{Appendix}  
\section{Editions}
Comments here

\subsubsection{Obverse}
\begin{pairs}
\OnehalfSpacing
\begin{Leftside}
\beginnumbering
\begin{astanza}
1 eše₃ 5 ½ iku 7 sar gišgišimmar íb-sá&
uruki\ \emph{du-un-nim}\&
\end{astanza}
\begin{astanza}
4 iku 32 sar gišgišimmar íb-sá\&
\end{astanza}
\begin{astanza}
1 eše₃iku\  18 ‹sar› kislaḫ&
uruki\ gišgišimmar\&
\end{astanza}
\begin{astanza}
1 eše₃ ½ iku ša  d+en-zu\emph{-- ma-gir}{\sffamily ₁₄}&
\quad(erasures)\&
\end{astanza}
\begin{astanza}
80 sar \emph{ša im-gu-rum}\&
\end{astanza}
\begin{astanza}
10 sar \emph{ša   }{\sffamily x}\emph{-ri-im}&
uruki\ \emph{ ma-ḫa-zum}\&
\end{astanza}
\begin{astanza}
90  sar gišgišimmar íb-sá&
uruki\ \emph{du-ru-du-um}\&
\end{astanza}
\begin{astanza}
ḫa-la \emph{i-din}--\textsuperscript{d}mar-[d]ú dumu \emph{iš₈+tár--}dingir&
gú i₇ idigna\&
\end{astanza}
\begin{astanza}
ur-sè-a-bi&
ì-ba-e-ne\&
\end{astanza}
\pausenumbering
\end{Leftside}
\begin{Rightside}
\beginnumbering
\autopar
\noindent\textsubscript{1--2~}\RE 1 {\sffamily eblum} 5½ {\sffamily ikûm}s 7 {\sffamily mūšarum}s planted with date-palms in the city of {\sffamily Dunnum};\pend
\noindent\textsubscript{3~}4 {\sffamily ikûm}s 32 {\sffamily mūšarum}s planted with date-palms;\pend
\noindent\textsubscript{4--5~}1 {\sffamily eblum} 18 {\sffamily mūšarum}s of empty land in the city of {\sffamily Gišimmar(um)};\pend
\noindent\textsubscript{6~}1 {\sffamily eblum} ½ {\sffamily ikûm} belonging to S{\sffamily în--māgir};\pend
\noindent\textsubscript{7~}80 {\sffamily mūšarum}s belonging to {\sffamily Imgurum};\pend
\noindent\textsubscript{8--9~}10 {\sffamily mūšarum}s belonging to [\dots] in the city of {\sffamily Māḫāzum};\pend
\noindent\textsubscript{10--11~}90 {\sffamily mūšarum}s planted with date-palms in the city of {\sffamily Durudum}---\pend
\noindent\textsubscript{12--13~}the share of {\sffamily Iddin--Amurrum} son of {\sffamily Ištar--ilī} on the bank of the Tigris.\pend
\noindent\textsubscript{14--15~}They will divide (the property) equally.\pend
\pausenumbering
\end{Rightside}
\end{pairs}
\Columns
\doendnotesbysection{A}\leavevmode

\subsubsection{Reverse}
\begin{pairs}
\OnehalfSpacing
\begin{Leftside}
\resumenumbering
\begin{astanza}
igi [\dots]\&
\end{astanza}
\begin{astanza}
igi [\dots]\&
\end{astanza}
\begin{astanza}
igi [\dots] x lugal\&
\end{astanza}
\begin{astanza}
 igi \dots ] 30\&
\end{astanza}
\begin{astanza}
igi [\dots] gàr\&
\end{astanza}
\begin{astanza}
\setline{20}
\linenumannotation{a}igi [\dots] d+en-líl\&
\end{astanza}
\begin{astanza}
igi [\dots]\emph{--iš-me-ni}\&
\end{astanza}
\begin{astanza}
igi [\dots]\emph{--}{\sffamily [}\emph{i-ri-ba-am}\&
\end{astanza}
\begin{astanza}
igi [\dots] x\&
\end{astanza}
\begin{astanza}
igi \emph{a-bu-- wa}{\sffamily ]}\emph{-}{\sffamily [}\emph{qar}\ dumu \emph{i-din}{\sffamily ]}--èr-ra\&
\end{astanza}
\begin{astanza}
igi \emph{ú-ṣí--nu- ru}{\sffamily ]}\emph{-}{\sffamily [}\emph{um}\  dam-gàr\&
\end{astanza}
\begin{astanza}
igi \emph{e! -la-a}\ tibira\&
\end{astanza}
\begin{astanza}
igi d+en-zu\emph{--i-qí-ša-am}\ dam-gàr\&
\end{astanza}
\begin{astanza}
igi an-na\emph{--i-mi-it-ti}&
\quad dumu dingir-\emph{šu}--illat-\emph{sú}\&
\end{astanza}
\begin{astanza}
igi \textsuperscript{d}utu--\emph{ga-mil}\&
\end{astanza}
\begin{astanza}
kišib lú-inim-ma-bi-me-eš\&
\end{astanza}
\begin{astanza}
iti 2 ab-è\&
\end{astanza}
\begin{astanza}
mu é--d+en-ki šà uriki-ma\&
\end{astanza}
\pausenumbering
\end{Leftside}
\begin{Rightside}
\resumenumbering
\autopar
\noindent\textsubscript{16--30~}Before [\dots];\pend
\noindent before [\dots];\pend
\noindent before [\dots], royal [\dots];\pend
\noindent b[efore \dots ]{\sffamily --Sîn};\pend
\noindent before [\dots  mer]chant;\pend
\noindent before {\sffamily [\dots]--Enlil};\pend
\noindent before {\sffamily [\dots]--išmēni};\pend
\noindent before {\sffamily [\dots]--irībam};\pend
\noindent before {\sffamily [\dots]};\pend
\noindent before {\sffamily Abu--wa[qar} son of {\sffamily Iddin]--Erra};\pend
\noindent before {\sffamily Ûṣi--nūrum}, merchant;\pend
\noindent before {\sffamily Elai̯a}, coppersmith;\pend
\noindent before {\sffamily Sîn--iqīšam}, merchant;\pend
\noindent before anna{\sffamily --imittī} son of {\sffamily Ilšu--tillassu};\pend
\noindent before {\sffamily Šamaš--gāmil};\pend
\noindent\textsubscript{32′~}Those witnesses (have applied) seals.\pend
\noindent\textsubscript{33′~}Month mmm,\pend
\noindent\textsubscript{30--33~}year Rim--Sîn~8.\pend
\pausenumbering
\end{Rightside}
\end{pairs}
\Columns
\doendnotesbysection{A}\leavevmode

\subsubsection{Upper edge}
\begin{pairs}
\OnehalfSpacing
\begin{Leftside}
\resumenumbering
\begin{astanza}
eakone ù  é \textsuperscript{d}nin--é--nim-ma&
eakonešà é--\textsuperscript{d}nin-marki\ mu-un-&
\quad eakonedù-a\&
\end{astanza}
\endnumbering
\end{Leftside}
\begin{Rightside}
\resumenumbering
\autopar
\noindent{}\pend
\endnumbering
\end{Rightside}
\end{pairs}
\Columns
\doendnotesbysection{A}\leavevmode

\end{document}
screen shot 2017-11-23 at 19 14 41
maieul commented 6 years ago

The problem is in your code. You add space after the argument, so it is added.

e79e50f93450748f33c79367710b783d5851ad48 explain you how to solve it.

This MWE show you the problem

\documentclass{article}

\begin{document}
\newcommand\foo[1]{}

a
\foo{a} a

a
\foo{a}a

a%
\foo{a}a

\end{document}

By the way, could you please use ```` to mark the beginining and ending your code?