1

Here is the code :

\documentclass{exam}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{parskip}
\usepackage{dsfont}
\usepackage{graphicx}
\usepackage{adjustbox}
\usepackage{caption}
\usepackage{pdflscape}
\usepackage{booktabs}
\usepackage{cellspace}
\renewcommand{\thequestion}{\textbf{{\large A\arabic{question}}}}

\begin{document}
        \title{\textbf{Assignment 2}}
    \maketitle
\begin{questions}
    \question 
    \begin{parts}
        \part Quantities is what?
        \part Define dudeieiifjfjf
        \part Explain trump
        \end{parts}
    \end{questions}
\end{document}

And the output picture:As you can see, part questions are not vertically aligned

1 Answer 1

1

If you don't need the exact output you put, here is an approach

enter image description here

\documentclass[12pt,a4paper]{exam}
\usepackage[showframe]{geometry}

\renewcommand{\questionshook}{%
    \setlength{\leftmargin}{0pt}%
    \setlength{\labelwidth}{-\labelsep}%
    %\setlength{\labelsep}{0mm}%
    \setlength{\topsep}{0\baselineskip}
}
\qformat{\textbf{\large A\thequestion}\hfill}

\newlength{\partlabelwidth}
\renewcommand{\partshook}{%
    \setlength{\labelwidth}{9mm}%
    \setlength{\partlabelwidth}{\labelwidth}%
    \setlength{\leftmargin}{\labelwidth}%
    \setlength{\labelsep}{0pt}%
    \setlength{\itemsep}{0.5\baselineskip}%
    \def\makelabel##1{##1}%
}

\begin{document}
    \begin{questions}
        \question Some question
        \begin{parts}
            \part first part
            \part second part
        \end{parts}
    \end{questions}
\end{document}
2
  • Can you please help me to produce the output where the question number and the first part of question are in same line but making the first part and the rest of the part questions have the same left vertical alignment
    – itc
    Jun 17, 2020 at 11:34
  • @itc I am afraid I am not able to do so.
    – Diaa
    Jun 17, 2020 at 13:15

You must log in to answer this question.

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