2

I want to put the marking of each question in right side of paper equally. How to set the equal length of question marks in latex que paper ?

\documentclass[aps,pra,floatfix,amsmath,preprint,showpacs,12pt]{revtex4}
\usepackage{graphicx}
\usepackage{amssymb}
%\usepackage{dsfont}
\usepackage{ulem}
\usepackage{float}
\restylefloat{figure}
\linespread{1}
\thispagestyle{empty}
\pagestyle{empty}
\topmargin=0.5cm \oddsidemargin=-0.9cm
\renewcommand{\baselinestretch}{1.05}
\begin{document}
\baselineskip=1.0\baselineskip

All questions are compulsory. \\
\begin{enumerate}
\item[Q. 1 (a)] My Question prove that ...? [Mark here]
\end{enumerate}
\end{document}
10
  • Are yo using any existing, special, document class to create your questionnaire paper? how about providing the community with a template document that shows your setup? This template should start with \documentclass and end with \end{document}. Include a couple of questions using dummy text (possible from lipsum).
    – Werner
    Apr 16, 2015 at 18:54
  • Yes, the document class is {revtex4} Apr 16, 2015 at 19:04
  • ...then show us via a minimal working example (MWE).
    – Werner
    Apr 16, 2015 at 19:07
  • The easiest way to achieve what you're looking for might be via \newcommand{\points}[1]{\hfill\makebox[0pt][l]{[#1]}. This will print the points/marks in the right column for 99.9% of its uses. 0.01% may overflow to the next line where it's used, but a question rewording quickly takes care of that.
    – Werner
    Apr 16, 2015 at 19:14
  • how to apply it after question for putting marks ? Apr 16, 2015 at 19:16

1 Answer 1

2

Perhaps the following might be a good start:

enter image description here

\documentclass{article}
\usepackage{geometry,enumitem}
\geometry{margin=1cm}
\pagestyle{empty}
\newcommand{\marksA}[1]{\hfill\makebox[0pt][l]{~[#1]}}
\newcommand{\marksB}[1]{\hfill\makebox[0pt][r]{[#1]}}

\newcounter{newquestion}
\setlist[enumerate]{before={\stepcounter{newquestion}},label={Q.\ \thenewquestion (\alph*)},align=left}

\begin{document}
All questions are compulsory.

\begin{enumerate}
  \item My question prove that ...? [Mark here]
\end{enumerate}

\begin{enumerate}
  \item My question prove that ...? \marksA{10}
  \item My question prove that ...? \marksA{5}
  \item My question prove that ...? \marksA{1}
\end{enumerate}

\begin{enumerate}
  \item My question prove that ...? \marksB{10}
  \item My question prove that ...? \marksB{5}
  \item My question prove that ...? \marksB{1}
\end{enumerate}
\end{document}

\marksA or \marksB puts the marks either flush left/right around the margin. \marksA would work best since it allows your questions to sit within the entire \textwidth block, if need be.

You'll note that I've used article with layout set via geometry and enumitem for list processing.

2
  • In case of any mathematical equation it appears in next line, and taking a big space. So how we can put it in same line where our equation is. Apr 17, 2015 at 16:30
  • @DeepeshPatel: Try setting the marks on the last line of text before the equation. If this is not satisfactory, then you could try \[ \makebox[\textwidth]{\displaystyle ...}\marksA{..} \].
    – Werner
    Apr 17, 2015 at 18:48

You must log in to answer this question.

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