Trying to create a new command called mcqimg with parameters like \mcqfour with image on the left and options on the right using multicolumn but it didn't work properly. [reference: img1]. Any suggestions or guidance will be wonderful, I'm new to LaTeX, recently started learning so please consider giving me a bit of details. Image for Refernce:

reference image ![reference][1]


\title{Question Paper}
\date{Feb 2022}

        \includegraphics[ width = #1, height = #2]{#3}


\textbf{Question #1:} #2 \\
(a) #3\\
(b) #4\\
(c) #5\\
(d) #6\\


\mcqfour{1}{Find the area of the figure by splitting the rectangles.}
{190 cm²}
{198 cm²}
{197 cm²}
{203 cm²}

  • Muticol does not support floats, even if you try to hide them. Try using a minipage and \captionof{figure}{...} instead. Also, \label will do no good without a \caption to set \@currentlabel. Feb 26, 2022 at 16:24
  • You might find tex.stackexchange.com/questions/530084/… useful. Feb 26, 2022 at 16:32

1 Answer 1


An \AskQuestion command with 5 parameters was defined. The question will be automatically numbered and the unique label will be added to the question for future reference. (See the two last lines).

\AskQuestion{<text of the question>}{<width of the image>}{<image file>}{<first option>, <second option>, <third option>, <fourth option>, <...>}{<unique label>}

The fourth parameter is a variable number of options to answer the question separated by commas. (From Itemize command with variable number of items)

The command works by using two minipages side by side. Only the width of the figure is used because one usually wants to keep the aspect ratio of the image.

The enumitem package helps to format the list of four options.



\title{Question Paper}
\date{Feb 2022}

%**************************************************************** added <<<<<<<<<<<<<

\noindent \textbf{Question \theNquestion:}\ #1\par% 
\includegraphics[ width = #2, keepaspectratio]{#3}

% From https://tex.stackexchange.com/questions/503307/itemize-command-with-variable-number-of-items
\seq_new:N \l__ryanj_tmp_seq        
\cs_new_protected:Npn \ryanj_output_items:n #1
{   \seq_set_from_clist:Nn \l__ryanj_tmp_seq {#1}
    \seq_use:Nn \l__ryanj_tmp_seq { \item }

\NewDocumentCommand  \VarItemize { m }
        \ryanj_output_items:n {#1}


\AskQuestion{Find the area of the figure by splitting the rectangles.}{7cm}{example-image-a}{190 cm², 198 cm², 197 cm², 203 cm²}{q:area}

\AskQuestion{Identify the Kingdom.}{7cm}{example-image-b}{Eubacteria, Archaebacteria, Protozoa, Plantae, Fungi, Animalia}{q:king}   
How did you solve the question~\ref{q:area}?
What source did you use to answer the question~\ref{q:king}?

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .