答案1
你留下了行尾空格。%
在行尾的两个地方添加空格,例如
\newcommand\Myhref[2]{%<-------- here
\href{#1}{#2}% <-------- and here
}
然后你就可以出发了。
\documentclass{article}
\usepackage{hyperref}
\newcommand\Myhref[2]{%<-------- here
\href{#1}{#2}% %<-------- and here
}
\begin{document}
A link is placed \href{www.google.com}{here} to google.
A link is placed \Myhref{www.google.com}{here} to google.
\end{document}