I want to set a new command which aims at using href (from hyperref package) but by providing some hypertarget as argument of the new command for a specific pdf.
Classical use of hypperref and href is : In first document A, I put some hypertarget :
\hypertarget{fileAhypertarget}{Should come to this} In the second document B, I make a reference to hypertarget of document FileA.pdf
\href{fileA.pdf#fileAhypertarget}{Let's go to file A!} Please notice that syntax of href for url in pdf use a # symbol
It works, but now I want to define a command of this type
\newcommand{\myhref}[2]{\href{fileA.pdf##1}{#2}} But it does not work as # symbol of href command enters in conflict with # symbol of arguments of \newcommand.
Have you any idea, I try different syntax, \protect and thought to \expandafter but I failed.
If you have any idea, Thanks a lot
##for the#and#1for the argument, so 3#