How to define a custom \footref

by King Chung Lo   Last Updated January 14, 2018 07:23 AM

Here is a minimal example of my work:

\usepackage[total={5in, 8in}]{geometry} 
\renewcommand {\thefootnote}{\alph{footnote}}


\makeatletter         %<-- these lines add the page numbering
    \if@enotesopen \else \@openenotes \fi
    \immediate\write\@enotes{\@doanenote{\@theenmark \ [pg \thepage]}}

\renewcommand{\notesname}{Footnotes of Chapter \thechapter} %<-- this is for the title of the footnotes at the end of the chapter
\counterwithin*{endnote}{chapter} %<-- this restarts the numbering of the footnotes for each chapter, requires the package "chngcntr"

    \part{part 1}
    \chapter{chapter 1}

    Testing \footref{001}FFFF\footnote{\label{001}footnote 1 ootnote 1\footnoteB{footnote 2\footnoteC{footnote 3\footnoteD{footnote 4 footnote 4 footnote 4 footnote 4 } footnote 3 footnote 3 footnote 3 } footnote 2 footnote 2 } footnote 1 ootnote 1 ootnote 1 } Testing Testing Testing Testing Testing Testing Testing Testing 
\parindent 0pt
\parskip 2ex
\theendnotes %<---- this prints all the footnotes together


In this work, the critical footnote \footref{001}FFFF\footnote{\label{001}... turns in the result with a page number like this: enter image description here I don't want this "[pg 2]" appearing in the foot-reference (but remains in footnote). How can I make this? By the way, you are also appreciated if you can help me to make more space between the footnote mark and footnote on the first level of footnote. (I can make the others with command \setlength{\footnotemargin}{5mm}.

Related Questions

Footnote text: 2nd paragraph and subsequent indenting

Updated February 18, 2017 02:23 AM

Definition environment in footnotes

Updated May 09, 2017 06:23 AM