I've a custom command which takes one argument and prints it and adds to footnote too. I'm using normal footnotes and critical footnotes, both from Reledmac.
In this post(Avoid footnotes inside footnotes), I learnt to redefine macros inside a command and some conflicts were resolved.
\newcommand{\FoundBelowLine}[1]{%
{#1}\footnoteA{%
\begingroup%
\let\footnoteE\@gobble%
{#1} - इति पङ्क्तेरधो लब्द्धम् ।%
\endgroup%
}%
}%
Now, In some cases I've to add critical footnotes to the text. In that case I faced ! Package reledmac Error: \edtext outside numbered paragraph (\pstart ... \pend ).
So, I tried to redefine it inside the command with previously learned @gobble command. But, it still produces same error.
\newcommand{\FoundBelowLine}[1]{%
{#1}\footnoteA{%
\begingroup%
\let\footnoteE\@gobble%
\let\Afootnote\@gobble%
{#1} - इति पङ्क्तेरधो लब्द्धम् ।%
\endgroup%
}%
}%
Obviously, adding \Afootnote doesn't work for critical footnotes inside a normal footnote.
To clarify again, I provide one argument and print it as main text and footnote both, and adding critical footnote to that argument(text) in desire to add it to main text only is not working.
Any help is appreciated.
The MWE is attached below.
\documentclass[twoside]{book}
\usepackage[paperheight=8.3in,paperwidth=5.8in,margin=1in]{geometry}
\usepackage[parapparatus]{reledmac}
\makeatletter
%\newcommand{\FoundBelowLine}[1]{{#1}\footnoteA{{#1} - was found below line.}}
\newcommand{\FoundBelowLine}[1]{%
{#1}\footnoteA{%
\begingroup%
\let\MSSWrongReading@gobble%
\let\MSSLineEnd@gobble%
{#1} - इति पङ्क्तेरधो लब्द्धम् ।%
\endgroup%
}%
}%
\newcommand{\FoundLeftMargin}[1]{{#1}\footnoteA{{#1} - was found in left margin.}}
\newcommand{\FoundRightMargin}[1]{{#1}\footnoteA{{#1} - was found in right margin.}}
\newcommand{\MSSWrongReading}[2]{{#1}\footnoteC{{#1} - is not correct. It should be {#2}.}}
\newcommand{\MSSLineEnd}[1]{\footnoteD{{#1} line ends here.}}
\makeatother
\begin{document}
\beginnumbering
\pstart
%This compiles, obviously.
\FoundBelowLine{
\textbf{
Some text in the main body of MSS.
}
}
%This doesn't.
%I'll like to use the first argument of \MSSWrongReading{arg1}{arg2} so that footnote has all words. So, we can't fully ignore the macro.
% We solved it a few months ago.
\FoundBelowLine{
\textbf{
Some text in the main \MSSWrongReading{doby}{body} of MSS.
}
}
%This also doesn't compile. Here I want to use the \MSSLineEnd{arg1} when it is use by \FoundBelowLine{arg1} as main text, but want to totally ignore when it is used by the same command inside \footnote command.
% We solved it a few months ago.
\FoundBelowLine{
\textbf{
Some text in the main body of\MSSLineEnd{1} MSS.
}
}
% The below is a sample of critical footnote. It work.
\edtext{below}{%
\lemma{}%
\Afootnote{%
What do you mean by below?
Below means just below the line, not at bottom of the page
}%
}
% The below is a sample of critical footnote inside a normal footnote, caused by my multipurpose command.
% This fails.
\FoundBelowLine{%
Here is some text which was just \edtext{below}{%
\lemma{}%
\Afootnote{}%
} line.%
}
\pend
\endnumbering
\end{document}