Is there one? (I want this because I want to make the index format 7 n.\,1 if there is more than one note on the page and 7\,n.
PS. More clearly stated, as requested: could one define a macro \fnnonthispage that returned the number of footnotes on the current page? I don't know how to say it more clearly.
PS II. Here is how the macro might be used. On the first page, there are two notes, so the entry should specify the number; but of p. 2, there is only one, and so there the number should not be specified. If a page contains a partial footnote, that should also count as one.
%compile with: pdflatex file; makeindex file; pdflatex file
\documentclass{article}
\usepackage{imakeidx}
\usepackage{hyperref}
\usepackage{letltxmacro}
\makeindex
% \see{} inserts a see in the next entry, after the pp.
\def\seeentry{}
% must be global to work within footnote
\def\see#1{\gdef\seeentry{#1}}
\def\seesep{;\space}
\def\seetext{see\space}
% \index{<entry>|fn} marks the ref. as to a note
\def\fn#1#2{% insert see if \seeentry is not empty
\hyperpage{#2} n.\,#1\ifx\seeentry\empty\else\seesep\seetext\seeentry\def\seeentry{}\fi%
% ----- here is how the desired macro could be used:
%\hyperpage{#2}%
%\ifnum\fnnonthispage>1
%\space n.\,#1\ifx\seeentry\empty\else\seesep\seetext\seeentry\def\seeentry{}\fi%
%\else
%\,n.\ifx\seeentry\empty\else\seesep\seetext\seeentry\def\seeentry{}\fi%
%\fi
}%
% Redefining \index to mark reff. to notes as such.
\LetLtxMacro{\oldindex}{\index}
\renewcommand{\index}[1]{%
\if@noftnote%
\oldindex{#1}%
\else%
\oldindex{#1|fn{\number\value{footnote}}}
\fi%
}
\begin{document}
Cheese.\footnote{\index{cake}cake.}
Whether it be cheese or not.\footnote{What?}
\newpage
Oranges are called Chinese apples in German.\footnote{And in
Danish, of course.\index{Danish}}
\printindex
\end{document}
\thefootnote? – Feb 25 '16 at 11:18.auxfor example. – touhami Feb 25 '16 at 14:14selnoligpackage. :-) – Mico Feb 28 '16 at 23:24selnolig-based solution. :-) – Mico Feb 29 '16 at 10:20