# Macros passing arguments of different data types [duplicate]

I'm new to LaTeX and quite impressed with this program! So, I'm willing to concede not being entirely certain that the issue I'm having has to do with data types, or just using \includegraphics{} quirks, but here's my dilemma.

I have looked at this answer regarding \includegraphics but it didn't sort-of solve my issue.

I have a document using the memoir class:

\documentclass[a5paper, 11pt, onecolumn, openany]{memoir}


I use a custom style .sty file:

\usepackage{KeysToLife}


I wish to use a UDF (\imgpb = image plus page break) that I define in the .sty with a couple of arguments. The first argument is the name and path of the image file, which would be in the form of "./img/Flourish.png". The second argument is the scale value for that image, which could in the the form of 0.6 or .8 or something along those lines. Here is the \newcommand code I came up with:

\newcommand{\imgpb}[2]{
\begin{center}
\includegraphics[scale={#2}]{#1}
\end{center}
\pagebreak
}


This typically would get called from within the document in this manner:

\imgpb{./img/Flourish02.png,0.6}


The error in TexMaker states "Paragraph ended before \Gin@ii was complete. \par

I'm at a bit of a loss how to proceed. When I call the function with just one argument:

\imgpb{./img/Flourish02.png}


it executes just fine... just appears to have a problem with the second argument. Which is of data type double, in Python terms. Am I barking up the wrong tree?

The full document (with issues) is here as a zip file:

The Zip file

Edited to Announce as SOLVED:

Thanks to Marmot and Werner who pointed out the solution. You send arguments, instead of comma-delimited, as separated in curly-brackets:

\imgpb{./img/Flourish02.png}{.6}


Sorted.

I will endeavour to do due diligence in researching the question before I ask the next one.

## marked as duplicate by Werner macros StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); Feb 2 at 5:19

• Welcome to TeX.SE! Try \imgpb{./img/Flourish02.png}{0.6}. That is, the arguments are not separated by commas. – marmot Feb 2 at 5:11