I am trying to write exam questions for students. Just like any standard exam paper, each question needs to have its associated point (i.e. score) aligned at the right side of the page. I used the following codes to
\documentclass[12pt]{article}
\usepackage[top= .8in, bottom= .8in, left=.8in, right=.8in]{geometry}
\usepackage{amsmath}
\begin{document}
\begin{center}
\large{\textbf{ECO361: Environmental Economics}} \\
\vspace{.5cm}
\textbf{Midterm 2} \\
Total points:
\vspace{1cm}
\end{center}
\begin{enumerate}
\item Suppose there are two sources of the same pollutant, Source 1 \& Source 2. State two possible reasons why blah blah? \hspace*{11.5cm} \textbf{4}
\item Define marginal abatement cost (MAC). Draw an MAC curve of a firm which has to make a substantial outlay blah blah. \hspace*{10.5cm} \textbf{3}
\end{enumerate}
\end{document}
It is very cumbersome to find the correct input for \hspace* for each different item by trial and error. Is there any way this could be done without specifying the measure like 11.5cm or 10.5? It seems that \hspace*{\hfill} does not work in an "itemize" environment. Any easy suggestions, please?
\hspace*{\fill}
forces the numbers to be flush to the right margin, what position do you want that you considers "works" ?\large
does not take an argument so you do not need the brace after\large{
or the matching}
\hspace*{\fill}
in your test file you get this If you want help with an error it's usually best to make the example show the error so it can be debugged oh that's what you did wrong, it is\fill
not\hfill
that should be the argument of\hspace