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}
Mike Renfro
  • 20,550
  • 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 '15 at 18:54
  • Yes, the document class is {revtex4} – Deepesh Patel Apr 16 '15 at 19:04
  • 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 '15 at 19:14
  • how to apply it after question for putting marks ? – Deepesh Patel Apr 16 '15 at 19:16
  • I could show you, if you show some example code... – Werner Apr 16 '15 at 19:17
  • How I paste it? – Deepesh Patel Apr 16 '15 at 19:22
  • \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}

    – Deepesh Patel Apr 16 '15 at 19:25
  • I've edited your question to include the code you provided. If you need to make further changes, click the Edit button below your question. – Mike Renfro Apr 16 '15 at 19:44
  • and you can delete your last comment – touhami Apr 16 '15 at 19:51

1 Answers1

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.

Werner
  • 603,163
  • 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. – Deepesh Patel Apr 17 '15 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 '15 at 18:48