0

I am using multiple footnotes (\footnoteA, \footnoteB and \footnoteC) in a complicated text. I need to refer to some of them. I therefore tried the package footmisc, but when I have a \label{} within a fn. and later refer to it with a \ref{}, all that I am getting is the number of the section or subsection, not that of the footnote. E.g.:

"See also fn \ref{abhiman3}" 

leads to

"See also fn 12.10.3.1.4" (this is the number of the subsubsection).

I also tried being more precise, i.e. \label{fn:abhiman3} and \ref{fn:abhiman3}, but the same result follows. \footref{} instead of \ref{} changes the section number to superscript, but still does not deliver what I want, namely the footnote number.

I tried the cref package, but it does not compile (possibly because of a conflict with another package).

Any alternative suggestion? Thanks!

UPDATE MWE:

\documentclass[11pt,twoside,a4paper]{book}

[…] \usepackage[noeledmac]{ledmac}

\usepackage{amsmath,amssymb,amsfonts}

\usepackage{footmisc}

\begin{document}

\chapter{Introduction}

Copyist's mangala.\footnoteC{Auspicious verse.\label{mangala}}

Author's mangala\footnoteC{See fn. \ref{mangala}}

\end{document}

marquinho
  • 1,721
  • What if you use \pageref{} instead of \ref{}? This is not going to completely solve your problem, but it would be easier to find a footnote if you know the page number rather than the subsection. EDIT: I found this, it might help. – Amir Parvardi Apr 07 '22 at 15:43
  • 4
    What package(s) are you using for the multiple footnotes? Can you provide a minimal working example? – frabjous Apr 07 '22 at 15:48
  • Please provide an MWE (from \documentclass... to \end{document} that we can compile and that shows your problem. How do you get multiple footnotes? How do you refer to them? – Peter Wilson Apr 07 '22 at 20:56
  • Thanks for your suggestions! —Yes, \pageref{} would help, but is not ideal. – elisa freschi Apr 07 '22 at 22:05
  • If I compile your example with \usepackage{reledmac}, instead of ledmac (and even without footmisc), I get the desired reference: number of the footnoteC, not of the section. reledmac is the "grandchild" of ledmac, which is nowadays deprecated. reledmac is actively maintained, has a variety of tools for referencing footnotes, has hyperref support and is very flexible. Unless there's something specific holding you back, I very warmly recommend migrating to reledmac! (See the migration guide). – marquinho Apr 07 '22 at 22:47
  • I took the liberty to edit your code for readability and have added tags for (re)ledmac, as this could get more attention to the problem. – marquinho Apr 07 '22 at 22:49
  • 1
    Thank you, Marquinho, it works in the MWE and also in my book if I take out a section with a critical edition with multiple apparati. I will try to see how to obtain multiple apparati with reledmac. Thanks! – elisa freschi Apr 07 '22 at 23:12

1 Answers1

1

As mentioned in the comments, it is probably best to switch from ledmac to reledmac, which should solve this problem.

However, if for some reason you need to stay with ledmac, you can redefine the \footnoteC command to use \refstepcounter instead of \stepcounter, i.e., put this in your preamble:

\makeatletter
\renewcommand{\footnoteC}[1]{%
  \refstepcounter{footnoteC}%
  \protected@xdef\@thefnmarkC{\thefootnoteC}%
  \@footnotemarkC
  \vfootnoteC{C}{#1}\m@mmf@prepare}
\makeatother

(If you need to do the same for, e.g., \footnoteB, the code is the same except with Bs where this definition has uppercase Cs.)

frabjous
  • 41,473
  • Thank you! I am now moving to reledmac (thanks to Marquinho again for suggesting it). Advice for people with a similar problem: The reledmac and footmisc packages can work together, but they must be in the correct sequence (footmisc evoked in the preamble before reledmac). – elisa freschi Apr 08 '22 at 15:03
  • @elisafreschi: Glad that the migration to reledmac is working for you :) Regardless, did you try frabjous's suggestion with your old code (f.i. your MWE that used ledmac), and did it solve the problem? If so, please consider upvoting and marking their answer as "accepted" (the green checkmark at the top left) as a reference for future users. – marquinho Apr 14 '22 at 09:32
  • @elisafreschi: can you confirm that frabjous's answer works in the specific case that you asked about? If so, please do mark their answer as "accepted"! Thanks :) – marquinho Apr 30 '22 at 11:53