0

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}
2
  • Please, provide a full MWE – Maïeul Jan 27 at 8:41
  • @Maïeul, added MWE for clarity. The solution tried is mentioned just above that. – lalitaalaalitah Jan 27 at 11:31
1

I am not sur to understans well what you expect as final output. However, I understand you don't want critical footnote inside familiar footnote (and, even if wanted, relemac can't do it, and I have no time for that),

What you really need is not disable critical footnote, but to transform edtext to a macro which only read the first argument. In fact, \edtext must contain critical note (or endnote). If not, reledmac provides an error.

So you just need to let edtext be @firstoftwo.

\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\edtext\@firstoftwo
        \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}
3
  • So, instead of trying to gobble Afootnote, I've to apply new rules to edtext since Afootnote is just a part of one of it's arguments. The change helped me to compile while avoiding typing the same thing multiple times. Thanks. The line number is still printed in footnote. Anyway to disable it for specific instances? – lalitaalaalitah Jan 28 at 17:51
  • §6.2.2 of the handbook : you can do \Afootnote[nonum}{argument} – Maïeul Jan 29 at 8:47
  • Thanks. I'll implement these. – lalitaalaalitah Jan 30 at 17:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.