LaTeX forum ⇒ Page LayoutA footnote/footnotemark solution to make it compatible with figure/floatrow/hyperref and backreference

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Nilsou
Posts: 1
Joined: Tue Mar 24, 2020 4:12 pm

A footnote/footnotemark solution to make it compatible with figure/floatrow/hyperref and backreference

Postby Nilsou » Tue Mar 24, 2020 4:59 pm

(edit1 to delete a warning)
Hi !
I have searched a long time for a solution that works in a lot of environment (figure, floatrow, text etc...) which allow footnote to work decently and with hyperlinks activated in reference way (from the footnote to the footnote text) and in backreference way (from the footnote text to the footnote).

By combining several packages, I achieved several partial solutions but never succeed in making a full homogeneous solution.

After some digging, a lot of questions everywhere and some coding I achieve to obtain a solution that works in all cases I have tested. (see limitations at the bottom of the post)

So well, I post it here to those who want to use it because it is very useful in my case, but beware : it is a bit technical.
The idea was, in first time, to make a reliable solution for the command footnote{} to make it work with hyperref and backreference in all environment, even exotic one. It is the easy part.

The second point was to allow the use of footnotemark/footnotetext without [] in figure and floatrow with the support of hyperref and back reference because classical footnote tends to be useful if you want footnote at the bottom of figure but not very useful to make footnote from figure or other environment insert versatily in the others defined in plaintext. Not too difficult either but it is not very useful if you want to have multi footnone in a figure or in a floatrow .

The final point, which is the more tricky was to change the behaviour of footnotemark[] / footnotetext[] to a label/ref like behaviour. Indeed : footnotemark[]/footnotetext[] vanilla can be used inside several environnement with manual numbering. And some tricks from the hyperref manual (http://ctan.tetaneutral.net/macros/latex/contrib/hyperref/doc/manual.pdf) allow using footnotemark and footnotetext with reference on and a simple label/hyperref tricks can help with backreference. But all of this give a looooot of ugly code in the text file, which is not very practical.

So here the idea is to transform this function to include all of these tricks and to change the behaviour to a label/ref one.

A footref command slightly tuned allow to reference indiferently to old footnote/footnotetext/footnotetext[] defined elsewhere in the code. And other tricks allow to call footnotetext before or after the footnotemark indiferently.
A final big tricks allows the code to automatically defined if it is the first footnotemark called (and the tricks is not so simple in environment like floatrow) and switch automatically to a footref in this case to make references to the old footnotemark without disturbing the footnotetext thing.


The result :
Image

The result pdf to test hyperref and backreference :
https://mega.nz/#!zGAgDK4a!SDWr_4c-Dsq9nQZFfr0jRfN6m-XQcdqyfpx069nGLMQ

The (long) code :
Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
  1. %%%%%%%%%%% LOT OF PACKAGES AND DEFINITIONS %%%%%%%%%%
  2. %\pdfobjcompresslevel 0
  3. %
  4.  
  5. %%%% work with koma-script, should also work on standard classes %%%%
  6. \documentclass[a4paper,12pt,oneside,final, DIV=12, listof=totoc, bibliography=totoc, toc=bibliography, open=right, chapterprefix=true]{scrbook} % If you want to use the option footnote=multiple you have to copy some code of Koma script about footnotemark and patch this file to make it compatible
  7.  
  8. \usepackage[greek,english,french]{babel} % It work with or without babel french (see the patch at the bottom)
  9.  
  10. % I have not tried with other encoding or other font
  11. \usepackage{lmodern}
  12. \usepackage[utf8]{inputenc}
  13. \usepackage[T1]{fontenc}
  14.  
  15. \usepackage{graphicx} % only for testing
  16. \usepackage[final]{hyperref} % for the links
  17.  
  18. %%% some package that correct some bug on the linking and make the hack bellow easier, they are may be not all usefull but i worked with them %%%%
  19. \usepackage{footnotehyper}
  20. \usepackage{footnotebackref}
  21. \usepackage{tablefootnote}
  22. %\usepackage[all]{hypcap} % not usefull but you can include it i guess
  23. %\usepackage{afterpage} % afterpage could be usefull for defining footnotetext associated to big figure that take a full page
  24.  
  25. %%%%% Floatrow + perpage are necesserary to have a good numbering of the footnotes, etoolbox and refcount are needed too %%%%%%
  26. \usepackage{etoolbox}
  27. \usepackage{refcount}
  28. \usepackage{floatrow}
  29.  
  30. %%%% Perpage package (footnote reset on each page) + the hack to remove the bug introduce on the perpage package by the new versions of latex %%%
  31. \usepackage{perpage} %the perpage package
  32. \MakePerPage{footnote} %the perpage package command
  33. \makeatletter
  34. \@removefromreset{footnote}{chapter}
  35. \makeatother
  36.  
  37. \usepackage[float=false]{scrhack} % small hack for compatibilité with koma-script, not critical.
  38.  
  39. %%%%% Setup of Hyperref, do as you wish %%%%%%
  40. \hypersetup{
  41. pdfpagemode=FullScreen,%
  42. bookmarksnumbered=true,%
  43. colorlinks=true, %
  44. breaklinks=true, %
  45. urlcolor= blue, %
  46. linkcolor= red, %
  47. citecolor=blue, %
  48. pdftitle={Footnotemark the label way, demonstration}, %i
  49. pdfauthor={Nils Beaussé}, %
  50. pdfsubject={Footnotemark the label way, demonstration} %
  51. pdfkeywords={Footnotemark, Footnotetext}
  52. }
  53.  
  54. %%%%%%%%%% LOT OF PACKAGES AND DEFINITIONS END %%%%%%%%%%
  55.  
  56. %%%%%%%%%% Utility commands %%%%%%%%%
  57.  
  58. %%% refsetcounter like refstepcounter %%%
  59. \makeatletter
  60. \newcommand*\refsetcounter[2]{\setcounter{#1}{#2}%
  61. \protected@edef\@currentlabel{\csname p@#1\endcsname\csname the#1\endcsname}%
  62. }
  63. \makeatother
  64.  
  65.  
  66. %%% Based on <!-- m --><a class="postlink" href="https://tex.stackexchange.com/questions/533647/how-to-make-a-robust-conditional-labeling-that-resist-multiple-compilation-and-f">https://tex.stackexchange.com/questions ... tion-and-f</a><!-- m --> : allow robust testing of label existence through diverse environnement, including floatrow %%%
  67. \makeatletter
  68.  
  69. \newcommand*{\my@MaybeDefine}[2]{%
  70. \ifcsundef{my@goodvalue@#1}{\csgdef{my@goodvalue@#1}{#2}}{}%
  71. }
  72.  
  73. \newcommand*{\my@WriteCtr}[2]{%
  74. \write\@auxout{\string\my@MaybeDefine{#1}{#2}}%
  75. }
  76.  
  77. \newcommand*{\ConditionnalRobustLabel}[3]{%
  78. \ifx\protect\@typeset@protect% On rentre ici seulement si on est en mode typesetting (la fin pour tout le monde sauf pour floatrow)
  79. \ifcsdef{c@mycount@#1}{%
  80. \stepcounter{mycount@#1}% On augmente le conteur mycount de ce label à chaque appelle de mylabel (à chaque fois qu'il est traité en mode typesetting)
  81. }{%
  82. \newcounter{mycount@#1}%
  83. \stepcounter{mycount@#1}%
  84. }%
  85. \edef\my@internal@label{my@internal@label@#1@\number\value{mycount@#1}}%
  86. \ifcsdef{my@goodvalue@#1}% Si mygoodvalue existe (a priori : c'est qu'on est bien là ou il faut)
  87. {\ifnum\value{mycount@#1}=\csuse{my@goodvalue@#1}%
  88. %\refstepcounter{#2}%
  89. \label{#1}%
  90. #2%
  91. \else%
  92. \IfRefUndefinedBabel{#1}{}{% Ref #1 is defined
  93. \IfRefUndefinedBabel{\my@internal@label}%
  94. {}%
  95. {%
  96. \ifnum\getpagerefnumber{\my@internal@label}=\getpagerefnumber{#1}%
  97. #3%
  98. \else%
  99. \ifnum\getpagerefnumber%
  100. {\my@internal@label}>\getpagerefnumber{#1}%
  101. #3%
  102. \fi%
  103. \fi%
  104. }%
  105. }%
  106. \fi%
  107. }%
  108. {\typeout{You need to rerun LaTeX for the special labels.}}%
  109. \label{\my@internal@label}%
  110. \begingroup% On écrit my@goodvalue avec la valeur du nombre de fois qu'on a été typesetté mais seulement au dernier typesetting !
  111. \edef\tmp{\endgroup\noexpand\my@WriteCtr{#1}{\number\value{mycount@#1}}}%
  112. \tmp% Apelle de my@WriteCtr avec le label
  113. \fi%
  114. }%
  115. \makeatother
  116.  
  117. %%%%%%%%%% End of Utility commands %%%%%%%%%
  118.  
  119. %%%%%%%%%% Work on the command footnote for backref etc... %%%%%%%%
  120. \let\oldfootnote\footnote
  121. %\renewcommand{\footref}[1]{\,\oldfootref{#1}}
  122.  
  123. %a new counter to create an unambiguous label-tag
  124. \newcounter{myHyperFootnoteCounter}
  125.  
  126. \makeatletter
  127.  
  128. % branch between the footnote with/without opt. argument
  129. \renewcommand{\footnote}{\@ifnextchar[\my@OptHyperFootnote\my@HyperFootnote}
  130.  
  131. %define an new footnote without optional argument
  132. \newcommand{\my@HyperFootnote}[1]{%
  133. \refstepcounter{myHyperFootnoteCounter}%
  134. \def\myFootnoteTag{hfn:\themyHyperFootnoteCounter}%
  135. \label{\myFootnoteTag}%
  136. \oldfootnote{\hyperref[\myFootnoteTag]{$\uparrow$}~#1}%
  137. }
  138.  
  139. %define an new footnote with optional argument
  140. \newcommand{\my@OptHyperFootnote}[2][plop]{%
  141. \refstepcounter{myHyperFootnoteCounter}%
  142. \def\myFootnoteTag{hfn:\themyHyperFootnoteCounter}%
  143. \label{\myFootnoteTag}%
  144. % put the optional argument to the original `footnote`
  145. \oldfootnote[#1]{\hyperref[\myFootnoteTag]{$\uparrow$}~#2}%
  146. }
  147.  
  148. %%%%%%%%%% New footref command that works in any situation and compatible with hyperref etc... %%%%%%%%%
  149. \makeatletter
  150. \newcommand\footnoteref[1]{\protected@xdef\@thefnmark{\ref{#1}}\@footnotemark}
  151. \makeatother
  152. %
  153. % Footref is not taken into account by Babel and so have different spacing between text and footnotemark, here we use thefootnotespaceN defined in the babel hack to make it work with babel %
  154. \let\oldfootref\footref
  155. \renewcommand{\footref}[1]{\thefootnotespaceN\oldfootref{#1}}
  156. \newcommand\footrefwithoutspace[1]{\oldfootref{#1}}
  157.  
  158. %%%%%%%%%%% BEGENNING OF THE WORK ON FOOTNOTEMARK/FOOTNOTETEXT %%%%%%%%%%
  159.  
  160. \makeatletter
  161.  
  162. %%%%%% BEGENNING OF THE WORK ON FOOTNOTEMARK/FOOTNOTETEXT without [] %%%%%
  163.  
  164. \newcounter{myHyperFootnoteCounterMARK} % For footnotemark without [] a simple global counter is enough
  165. \newcounter{conteur_temporaire_footnote}
  166. \newcounter{lalala}
  167.  
  168. \let\oldfootnotetext\footnotetext
  169. \let\oldfootnotemark\footnotemark
  170. %
  171. \renewcommand{\footnotetext}{\@ifnextchar[\myOptHyperFootnotetext\my@HyperFootnotetext}
  172. %
  173. \newcommand{\my@HyperFootnotetext}[1]{%
  174. \def\myFootnoteTagtext{hfu:\themyHyperFootnoteCounterMARK}%
  175. \oldfootnotetext{\hyperref[\myFootnoteTagtext]{$\uparrow$}~#1}
  176. }
  177.  
  178. \renewcommand{\footnotemark}{\@ifnextchar[\myOptHyperFootnotemark\my@HyperFootnotemark}%
  179. %
  180. \newcommand{\my@HyperFootnotemark}{%
  181. \refstepcounter{myHyperFootnoteCounterMARK}%
  182. \def\myFootnoteTagtext{hfu:\themyHyperFootnoteCounterMARK}%
  183. \label{\myFootnoteTagtext}%
  184. \oldfootnotemark%
  185. }
  186.  
  187. %%%%%% BEGENNING OF THE WORK ON FOOTNOTEMARK/FOOTNOTETEXT with [] %%%%%
  188.  
  189. %%% we defined a personnal version of the footnotemark code, we use refstepcounter to allow the work of the label/hyperref mechanism and we transmit the two new argument to @myfootnotemark %%%%
  190. \def\mymyfootnotemark #1#2{%
  191. \refstepcounter{footnote}%
  192. \protected@xdef\@thefnmark{\thefootnote}%
  193. \@myfootnotemark{#1}{#2}%
  194. }
  195.  
  196. %%% We defined a personnal version of the hyperref code for footnotemark, we use the hyperref command \hyperlink or \hyperref with the optionnal argument instead of the structure of hyperef : the idea is that hyperlink/hypertarget/hyperref allow crossreferencing but the classical hyperref version implemented in footnotemark don't (why hypperef don't use its own cross-reference compatible command .... a mystery ... . %%%%%
  197.  
  198. % Code of footnotemark copy paste and modified from hyperref code, we use refstepcounter for the same reason that in mymyfootnotemark and we use the hyperref mechanism directly (or the \hypertarge/thyperlink but the anchor in this case is set not far bellow the line, which is not very good) %
  199. \newcommand{\@myfootnotemark}[2]{%
  200. \leavevmode%
  201. \ifhmode\edef\@x@sf{\the\spacefactor}\nobreak\fi%
  202. \refstepcounter{Hfootnote}%
  203. \global\let\Hy@saved@currentHref\@currentHref%
  204. \hyper@makecurrent{Hfootnote}%
  205. \global\let\Hy@footnote@currentHref\@currentHref%
  206. \global\let\@currentHref\Hy@saved@currentHref%
  207. %\hyperlink{#1}{\hypertarget{#2}{\@makefnmark}} % uncomment this for the hyperlink/hypertarget mode : more precise but go ont line bellow ... (don't know why)
  208. \label{#2}% For the backreference
  209. \hyperref[#1]{\@makefnmark} % For the reference
  210. \ifhmode\spacefactor\@x@sf\fi%
  211. \relax%
  212. }%
  213. \makeatother
  214.  
  215. %%% Counter for saving temporary value unique ID for the footnotemark and footnotetext without [] %%%%%%%
  216.  
  217. %%% Counter for saving temporary value in myOptHyperFootnotetext, could be create locally but it work %%%%%%%
  218. \newcounter{counteur_temporary_footnote}
  219. \newcounter{counteur_temporary_Hfootnote}
  220.  
  221. %%%%% define an new footnotemark/footnotetext with optional argument that will act like a label instead of the classical footnotemark[number] : implement diverses tricks from the hyperref manual and from the web to allow proper backreferencing-hyperlink and standard hyperlink outside and inside figure, floatrow and other environnement %%%%%
  222.  
  223. \makeatletter
  224.  
  225. %%%% The footnotetext[] part %%%%
  226. \newcommand{\myOptHyperFootnotetext}[2][plop]{
  227. \def\myFootnoteTagtextARGU{hfoi:#1}%
  228. \def\myFootnoteTagtextARGUU{hfoz:#1}%
  229. %
  230. \ifcsname counter@Href:#1\endcsname
  231. % CASE DEFINED
  232. \expandafter\let\expandafter\@plip\csname counter@Href:#1\endcsname%
  233. \expandafter\let\expandafter\@plipp\csname counterr@Href:#1\endcsname%
  234. \setcounter{counteur_temporary_footnote}{\value{footnote}}%
  235. \setcounter{counteur_temporary_Hfootnote}{\value{Hfootnote}}%
  236. \refsetcounter{footnote}{\@plip}%
  237. \refsetcounter{Hfootnote}{\@plipp}%
  238. %
  239. \oldfootnotetext{\phantomsection\label{\myFootnoteTagtextARGUU}\hyperref[\myFootnoteTagtextARGU]{$\uparrow$}~#2\label{#1}}%
  240. %\footnotetext{\hyperlink{\myFootnoteTagtextARGU}{$\uparrow$}\hypertarget{\myFootnoteTagtextARGUU}{~#2}\label{#1}}%Uncomment this for the fyperlink/hypertarget version : more precise but go one line bellow, don't know why...
  241. %
  242. \refsetcounter{footnote}{\value{counteur_temporary_footnote}}%
  243. \refsetcounter{Hfootnote}{\value{counteur_temporary_Hfootnote}}%
  244. \else
  245. %nothing to do : wait that it is defined by a footonotemark and reexecute at the next compilation : maybe should add a warning to rerun latex here
  246. \fi
  247. }
  248. \makeatother
  249. %
  250.  
  251. %%%% The footnotemark[] part %%%%
  252. \makeatletter
  253. \newcommand{\myOptHyperFootnotemark}[1][plop]{%
  254. \def\myFootnoteTagtextargu{hfoi:#1}%
  255. \def\myFootnoteTagtextarguu{hfoz:#1}%
  256. % \def\mylabeltest{labeltest@Href@#1}%
  257. % \def\mylabeltestt{r@labeltest@Href@#1}%
  258. %
  259. \ifcsname counter@Href:#1\endcsname%
  260. % CASE DEFINED
  261. \ConditionnalRobustLabel{labeltesttest@Href@#1}{\mymyfootnotemark{\myFootnoteTagtextarguu}{\myFootnoteTagtextargu}}{\footref{#1}}{}%ConditionnalRobustLabel is mandatory here to allow the switch between the classic footnotemark and footref in all situation, including in special environnement like floatrow
  262. %
  263. % Don't know why, but without this last uncoherent lines, this cause glitch...
  264. \expandafter\xdef\csname counter@Href:#1\endcsname{\arabic{footnote}}%
  265. \expandafter\xdef\csname counterr@Href:#1\endcsname{\arabic{Hfootnote}}%
  266. %For second execution of latex, we store the value of the footnote (case where footnotetext is called before footnotemark).
  267. \immediate\write\@auxout{\noexpand\expandafter\noexpand\xdef\noexpand\csname counter@Href:#1\endcsname{\arabic{footnote}}}%
  268. \immediate\write\@auxout{\noexpand\expandafter\noexpand\xdef\noexpand\csname counterr@Href:#1\endcsname{\arabic{footnote}}}%
  269. \else%
  270. % CASE UNDEFINED
  271. \mymyfootnotemark{\myFootnoteTagtextarguu}{\myFootnoteTagtextargu}%
  272. \expandafter\xdef\csname counter@Href:#1\endcsname{\arabic{footnote}}%
  273. \expandafter\xdef\csname counterr@Href:#1\endcsname{\arabic{Hfootnote}}%
  274. %For second execution of latex, we store the value of the footnote (case where footnotetext is called before footnotemark).
  275. \immediate\write\@auxout{\noexpand\expandafter\noexpand\xdef\noexpand\csname counter@Href:#1\endcsname{\arabic{footnote}}}%
  276. \immediate\write\@auxout{\noexpand\expandafter\noexpand\xdef\noexpand\csname counterr@Href:#1\endcsname{\arabic{footnote}}}%
  277. \fi
  278. %
  279. }%
  280. \makeatother
  281. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  282. %%%%%%%%%% Babel compatibility fix %%%%%%%%%%%%%%
  283. \makeatletter
  284. %%% copy-paste from the babel code for hacking footnotemark %%%
  285. \ifdefined\frenchbsetup
  286. \AtBeginDocument{
  287. \@ifpackageloaded{bigfoot}%
  288. {\PackageInfo{french.ldf}%
  289. {bigfoot package in use.\MessageBreak
  290. babel-french will NOT customise footnotes;%
  291. \MessageBreak reported}}%
  292. {\let\@footnotemarkORII\@myfootnotemark%we change the name
  293. \def\@footnotemarkFBI{\leavevmode\unskip\unkern
  294. \,\@footnotemarkORII}%we change the name
  295. \ifFBAutoSpaceFootnotes
  296. \let\@myfootnotemark\@footnotemarkFBI%And applied it to our version of footnotemark
  297. \fi}%
  298. \csgdef{thefootnotespaceN}{\,}%In addition : for footnoteref, same type off space saved.
  299. }
  300. \else
  301. \AtBeginDocument{\csgdef{thefootnotespaceN}{}}%in other case we return to english case : no space.
  302. \fi
  303.  
  304.  
  305. \makeatother
  306.  
  307.  
  308. \title{Demonstration label-like footnotemark / footnotetext} % Les paramètres du titre : titre, auteur, date
  309. \author{Nils Beaussé}
  310.  
  311. %\usepackage[perpage]{footmisc}
  312.  
  313. %%%%%%% some package %%%%%%%
  314. \KOMAoptions{DIV=last}
  315.  
  316. %%%%%% begin %%%%%%%
  317. \begin{document}
  318. %%%%%% TEST %%%%%%
  319.  
  320. \chapter{TEST}
  321. \section{Introduction}
  322.  
  323. A classical footnote\footnote{a classical footnote}
  324. A classical footnotemark footnotetext without []\footnotemark
  325. \footnotetext{classical footnotemark/footnotetext}
  326. The new footnotemark[] with footnotetext defined after\footnotemark[yap] and again here\footnotemark[oup].
  327. \footnotetext[yap]{first footnote defined before}
  328. \footnotetext[oup]{first footnote defined after}
  329.  
  330. \footnotetext[bloup]{Footnotetext defined before}
  331. The new footnotemark[] with footnotetext defined before if you want\footnotemark[bloup]
  332.  
  333. \begin{figure}[h]
  334. \centering
  335. \includegraphics[scale=0.2]{example-image-b}
  336. \caption[test]{footnotemark[] in figure\footnotemark[thing] footnotemark[] again\footnotemark[thingg]}%
  337. \label{Tux}
  338. \end{figure}
  339. \footnotetext[thing]{A first footnote from a figure (defined after)}%
  340. \footnotetext[thingg]{A second footnote from a figure}%
  341.  
  342. %\footnotetext{A footnote}
  343. %\footnotetext{A footnote}
  344.  
  345. %%%%%%%% The code calling from the caption inside a floatrow %%%%%%%%
  346. \footnotetext[truc]{A floatrow footnote defined before}%
  347. \begin{figure}[ht]
  348. \centering
  349. {
  350. \begin{floatrow}[1]
  351. \ffigbox[\FBwidth]{\caption[Floatrow footnotemark]{\label{Tino}Floatrow footnotemark[]\footnotemark[truc]}}{\includegraphics[scale=0.4]{example-image-a}}
  352. \end{floatrow}
  353. }
  354. \end{figure}
  355.  
  356. A classical footnote again with a label for footref\footnote{\label{yolo}yolo}
  357. A classical footnotemark/footnotetext with a label\footnotemark !
  358. \footnotetext{\label{yili}footnotetext classical again}
  359.  
  360. Or footref to the classical footnote\footref{yolo}
  361. A footref to the classical footnotetext\footref{yili}
  362. A footref to the footnotemark[] in the floatrow\footref{truc}
  363.  
  364. \end{document}


Limitation 1 :
For now there are no reorganizing in footnote. So even if the footnotemark number always match the footnotetext number, the order of footnotetext in the footnote section of the document still depend of the order of the footnotetext command. Even if footnotetext can be called everywhere in practical like :
Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
  1. footnotetext[foo]
  2. footnotemark[foo]
  3.  
  4. Footnotemark[baa]
  5. footnotetext[baa]


A called like :
Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
  1. footnotetext[baa]{second footnote}
  2. footnotemark[foo]%first footnote
  3.  
  4. Footnotemark[baa]%second footnote
  5. footnotetext[foo]{firstfootnote}

will give :

2 : second footnote
1 : first footnote

With a good numbering but a wrong order.

At this point of my use this is not a real problem, but later i think i could extract the automatic reorganisation of footnote/list/whatever in some package to put this in good order.

I guess with some other tricks it should be possible to hack figure and other environnement to add at the end an automatic insertion of the footnotetext and make a general footnote command which allow everything in all environnement, but it is too much work for me at this point ;)

Limitation 2 :
Due to the usage of footref, the code need Koma-script classes. I guess it should be possible to copy-paste the footref definition of koma-script and to make a conditionnal switch to use the one of Komascript of the other, but i have no time for this right now.
An other idea is to delete the footref reference, but a footnotemark[foo] footnotemark[foo] will give an empty result for the second one.

Limitation 3 :
I have not tested it with the « multiple » option of koma-script. I have based my footnote code on the simple version, it is easy to copy-paste the other version in the komascript code and to make a switch in this code with it, but i have no time for this neither :p

Limitation 4 :
Due to the nature of tricks used in the code, it requires a loooooooooooooot of compiling to stabilise. A new file require 5/6 compilations to stabilise.

I guess that other solution could work or that some package does the same job, but i didn't find any reliable solutions in my search, the most of them are incompatible with hyperref for example or just put the footnote bellow the environnement, or are specialised for one environnement (tablefootnote) and don't work in others, here i have tried a more general approach...

You are free to use it as you wish ;)

Return to “Page Layout”

Who is online

Users browsing this forum: No registered users and 2 guests