Latex Table in Exam Class
I'm trying to add Question Type : Match the Pairs using EXAM Class use
code mentioned below : [FYI: I'm converting HTML Table into Latex table.
I'm using pdflatex to get pdf from tex file mentioned below.]
\documentclass[addpoints,answers,10pt]{exam}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{tabularx}
\usepackage{nonfloat}
\usepackage{caption}
\usepackage{amsmath,amssymb}
\usepackage{lmodern}
\usepackage{textcomp}
\usepackage{ifpdf}
\usepackage[export]{adjustbox}
\newenvironment{Figure}
{\par\medskip\noindent\minipage{\linewidth}}
{\endminipage\medskip\par}
\marksnotpoints
\bracketedpoints
\pointsdroppedatright
\qformat{Q. \thequestion: \thequestiontitle\hfill\thepoints}
\renewcommand{\thesubsubpart}{\arabic{subsubpart}}
\renewcommand{\thechoice}{\arabic{choice}}
\runningheadrule
\pagestyle{headandfoot}
\runningheader{Competitive Examination}{}{}
\firstpagefooter{}{Page \thepage}{}
\runningfooter{}{Page \thepage}{}
\footrule
\renewcommand{\thepartno}{\Alph{partno}}
\begin{document}
\begin{center} {\centering \textbf{\Large{Dummy Value}}} \end{center}
\small{ABCD1234} \hspace*{\fill}
\small{TERMINAL EXAMINATION} \hspace*{\fill}
\small{Marks: 60}
\newline
\small{SSC-SET1} \hspace*{\fill}
\small{Science (Ch - 1,2,3)} \hspace*{\fill}
\small{2\textonehalf Hours}
\newline
\noindent\makebox[\linewidth]{\rule{\textwidth}{1pt}}
\begin{center} {\centering \textbf{SECTION A}} \end{center}
\begin{questions}
\titledquestion{Match the Pairs}[10]
\begin{table}[ht] \begin{tabular}{l l l} \hline \hline
A &
B &
\\
\ 1) Why this text is dummy over here &
\ a) there is not dummy text &
\\
\ 2) THis is one word &
\ b) THis is not the correct word &
\\
\ 3) This is dummy value al dfadf adf adfasdf \ ddfakdfaasdf .\ &
\ c) values are here for all fasdf ad asdfasdkfad.\ &
\\
\ 4) asd fads adsfkaj dkladjsflkadsf asdfa skdlj, asdfasdasdfasdfa &
\ d) adjfklasd fasldfjasdlkfjasdlkfadsflkja
sdflkjasd;lfkjasd;lfkja;sldkfjals;dk\ &
\\
\ 5) asdfasdfjas;dlfkjaslkdalkdsjf;alksdjfasdklfads &
\ e)
adjfklasdjfa;lksdjf;alskdjf;alskdjf;alksdjf;laksdjf;alksdfj;alksdfja;lksdfja;lksdfja;lskdfj;alksdjfalksdfjasdklfjas;dlfja;sdlkfalkdjfa;lkdsjf;alksdfaldfja;lsdkfja;lsdkjf;alskdfj;aldkjf;alksdjfalksddddddfajsdlkfja;lsdkjf
;alsdjf ;asdjf; ajdf;l j;asdlfj ;alkdjsf;laksejriaeidkl ja;dlkfja;slkdfj
a;ldskfja;sdikdfka dof asdf asdfk;lajsd;flkaj d;lkfajsd;lfk ja;dsfj
;alskdjf; lkadsjf;alksdjf; alsdfkja;lskdjf;alsdjf;alsdkjf;alskdjf\ &
\\
\hline \end{tabular} \label{table:nonlin} \end{table}
\end{questions}
\end{document}
Generated output is mentioned below
I'm facing two problems in this code :
Match the pair table is coming above question title
If there is longer word or more text, it's going outside pagewidth
Can you please give me direction to solve these errors?
No comments:
Post a Comment