2
\documentclass[12pt,a4paper]{exam}
\renewcommand{\baselinestretch}{1.2}
\oddsidemargin 0in \evensidemargin 0in \topmargin 0in \textheight
9.2in \textwidth 6.5in
%\hoffset -1in
%\voffset -1in
%\evensidemargin 14pt
\usepackage{amsmath,amsthm,amsfonts,amssymb,dsfont}
\pagestyle{headandfoot} \extraheadheight{.5in} \lhead[]{}
\chead[ \vskip .1in  MATHEMATICS\\
STANDARD X(CBSE)\\
      %\hrule
    \textbf{PAIR OF LINEAR EQUATIONS IN TWO VARIABLES} \linebreak
       \textbf{Time: 1 Hour}   \hskip 1.3in  \textsf{ }
       \hfill{\textbf{Max. Marks:30}}\vskip.05in \vskip -.5in]{}
\rhead[]{} \lfoot{David 7502878908} \cfoot{HOME TUITIONS}
\rfoot{\iflastpage{$\maltese\maltese\maltese \maltese
\maltese$}{Continued...\ldots}} \pointsinrightmargin
\newcommand{\ntt}{\normalfont\ttfamily}
%    command name
\newcommand{\cn}[1]{{\protect\ntt\bslash#1}}
\hfuzz1pc % Don't bother to report overfull boxes if overage is < 1pc

\newcommand{\thmref}[1]{Theorem~\ref{#1}}
\newcommand{\secref}[1]{\S\ref{#1}}
\newcommand{\lemref}[1]{Lemma~\ref{#1}}
%\newcommand{\bysame}{\mbox{\rule{3em}{.4pt}}\,}
\newcommand{\sqt}[1]{\sqrt{\smash[b] {#1}}}

%    \interval is used to provide better spacing after a [ that
%    is used as a closing delimiter.
\newcommand{\interval}[1]{\mathinner{#1}}

%    Notation for an expression evaluated at a particular condition. The
%    optional argument can be used to override automatic sizing of the
%    right vert bar, e.g. \eval[\biggr]{...}_{...}
\newcommand{\eval}[2][\right]{\relax
  \ifx#1\right\relax \left.\fi#2#1\rvert}

%    Enclose the argument in vert-bar delimiters:
\newcommand{\envert}[1]{\left\lvert#1\right\rvert}
\let\abs=\envert

%    Enclose the argument in double-vert-bar delimiters:
\newcommand{\enVert}[1]{\left\lVert#1\right\rVert}
\let\norm=\enVert
\newcommand{\pad}[2]{\frac{\der #1}{\der #2}}
\newcommand{\IC}{{\mathbb C}}
\newcommand{\IN}{{\mathbb N}}
\newcommand{\IR}{{\mathbb R}}
\newcommand{\gol}{\mbox{$\,${\rm Log}$\,$}}
\newcommand{\Log}{\ln}
\newcommand{\ov}[1]{\overline{\smash[b] {#1}}}
\newcommand{\Ndash}{\nobreakdash--}
\newcommand{\IE}{{\mathds{R}^n}}
\newcommand{\IF}{{\mathds{R}^m}}
\begin{document}

\hrule 

\vskip .1cm
{\hskip 2.5in \textbf{Part A} \hfill{}}

 \underline{Answer all the questions:}
  \begin{questions}
 \question Which subject you like very much?
 \choice mathematics
\choice physics
\cchoice chemisty %cchoice means that correct choice
\choic biology 

\end{questions}
\cfoot{$\maltese\maltese\maltese \maltese \maltese$} \rfoot{}
\end{document}

I need these commands in my questions with the following alignments..that is the output should be like this.

1.Which subject you like very much?

(a) mathematics                      (b) physics
(c) chemistry                        (d) biology

What should i do for this.. and if the choices are lengthy it has to be aligned automatically...kindly help me...

  • hi @Torbjorn T. hw you are editing like tell me.. so that i can post my question in this manner.. what mistake i have did.. – David Jul 1 '14 at 18:48
  • To highlight code just select it and click the button marked {} just above the text field. This indents blocks by four spaces, or places inline code between backticks (`). Edit: The keyboard shorcut is Ctrl + K. – Torbjørn T. Jul 1 '14 at 18:51
3

The multicols environment from the multicol package may work for you. You can use the columnbreak to split the column between any two answer choices. If the answers are about the same length, then the lines will probably align but if the answers vary in length, then the choices will not be aligned automatically. You could use the \\[length] structure at the end of a choice to increase the space, as shown in the second question. But, it's not automatic.

\documentclass{exam}
\usepackage{multicol}
\usepackage{lipsum}
\begin{document}
\begin{questions}

\question
Which subject you like very much?

\begin{multicols}{2}
\begin{choices}
    \choice Mathematics
    \choice Physics
    \columnbreak
    \choice Chemistry
    \correctchoice Biology
\end{choices}
\end{multicols}

\question
Do you like questions that require you to read long answers?

\begin{multicols}{2}
\begin{choices}
    \choice Yes, I do.
    \correctchoice No, I don't.\\[24pt]
    \columnbreak
    \choice Not if it is a hard subject that requires lots of concentration. Please do not make me have to read a very long answer. 
    \correctchoice Doesn't matter. I had the answers in advance. I don't have to read anything. So I do not really care how long the answer is.
\end{choices}
\end{multicols}

\end{questions}
\end{document}

enter image description here

  • to print the answer in a separate sheet what should i do @3cat? – David Jul 2 '14 at 5:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.