# Macro for displaying a name, date, and a hyperlink is not working?

I'm trying to create a macro that takes \$4\$ parameters. A name, a date, a hyperlink address, and text for the hyperlink. My macro is:

``````\newcommand\authordate[4]{\textbf{Author}: #1, #2. \\ \textbf{Source}:
\href{#3}{#4}}
``````

However it's working, if I call it with the following:

``````\authordate{Joe, 2017, http://www.google.com, Google}
``````

I get the error message:

``````! Paragraph ended before \hyper@n@rmalise was complete.
``````

It should look like:

Author: John, 2017.

Does anyone know how I can fix it?

• You say it should have 4 arguments. You would have to use `\authordate{Joe}{2017}{http://www.google.com}{Google}`. – TeXnician Mar 17 '17 at 17:31
• Then please close/delete this question. – TeXnician Mar 17 '17 at 17:35

``````\newcommand\authordate[4]{\textbf{Author}: #1, #2. \\ \textbf{Source}:
The `[4]` indicates you want it to have 4 arguments. The problem: TeX does not interpret lists like `a,b,c,d`. It wants them to have as `{a}{b}{c}{d}`.
``````\authordate{Joe}{2017}{http://www.google.com}{Google}