# Use \showlabel package with newcommand \loadnote

Inside my main.tex I inserted a function called \loadnote which refers to an external file notepie.tex in which are considered the footnotes (with reference to this discussion) .

\usepackage{catchfilebetweentags}
}


I have repeatedly the following error :

Latexmk: Summary of warnings from last run of (pdf)latex: Latex found
3 multiply defined reference(s)


and in the search discovered a convenient package \usepackage{showlabels} that allows viewing the position of footnotes and references to equations.

I would like to understand if it was possible to implement the changes regarding the footed notes written with the command \loadnote{}.

for example :

1.file notepie.tex:

\documentclass[8pt]{article}

\begin{document}
%<*notes004>
\footnote{La mia footnotes è questa.}
%</notes004>

\end{document}


2.in the main.tex file :

\documentclass{article}

\usepackage{catchfilebetweentags}
}

\begin{document}

equazione : $\tau = \mu\,\dot{\theta}{t}$\label{eq080}
\end{document}


the \loadnote is not a \label, I would like to know if it is possible to implement something to make sure that the lateral reference to the note is highlighted

thanks very much :)

• yes probably you just need \SK@def \loadnote something.... A small test document showing \loadnote use would help answer the quesion – David Carlisle Nov 16 '18 at 9:43
• @DavidCarlisle if I enter \SK@def , I have many errors and the file is not compiled – Antonio Nov 16 '18 at 10:16
• that's what I meant by "something". showlabels lets you use \SK@def to hook into existing commands but the details depend on the command. you need \SK@def\loadnote#1{.....} where a small test file would help test what the .... has to be. (I see you added one thanks, I'll look in a bit) – David Carlisle Nov 16 '18 at 10:26
• @DavidCarlisle I do not understand how to insert SK@def, in the command \newcommand{\loadnote}[1]{% \ExecuteMetaData[notepie.tex]{notes#1}% }, because if I insert, I get errors. – Antonio Nov 16 '18 at 11:54

This just hooks the \ref showkeys styling on to \loadnote

\documentclass{article}
\usepackage{showkeys}

\usepackage{catchfilebetweentags}
}
\makeatletter
\makeatother

\begin{document}

equazione : $\tau = \mu\,\dot{\theta}{t}$\label{eq080}
\end{document}

• the solution is excellent and very useful when mentioning the quations of which I often forget the position. I will have to read about this package. I am too new to latex and I often encounter difficulties in apparently trivial aspects – Antonio Nov 17 '18 at 6:24

Another possibility is to use the \showlabels command of the showlabels package (which is a distinct package from showkeys):

\documentclass{article}

\usepackage{catchfilebetweentags}
}

\usepackage{showlabels}
equazione : $\tau = \mu\,\dot{\theta}{t}$\label{eq080}