Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- documentclass{article}
- usepackage{amsmath}
- usepackage{totcount}
- newcounter{totalpoints}
- regtotcounter{totalpoints}
- newcommand{shcpoint}[1]{%
- addtocounter{totalpoints}{#1}%
- ifnum#1<2
- (emph{#1 point})hphantom{em s}%
- else
- (emph{#1 points})%
- fiquad
- }
- newcommand{totalpoints}{%
- parbox{linewidth}{%
- leavevmoderaisebox{-0.5ex}{llap{textbullet}}!hrulefill\[-0.825ex]%
- nullhfillbfseries Total Points: total{totalpoints}~~rlap{rule{0.4pt}{3ex}}%
- }
- }
- begin{document}
- This questionary has a total of total{totalpoints}~points.
- begin{enumerate}
- item shcpoint{1} Easy question
- item shcpoint{2} Some random question
- item shcpoint{3} Other question
- end{enumerate}
- %------------------------------------------------------------------------------------
- totalpoints
- %------------------------------------------------------------------------------------
- end{document}
- newcommand{totalpoints}{%
- parbox{linewidth}{%
- leavevmoderaisebox{-0.5ex}{llap{textbullet}}!hrulefill\[-0.825ex]%
- nullhfillbfseries Total Points: total{totalpoints}~~rlap{rule{0.4pt}{3ex}}%
- }
- }
- newcommand{totalpoints}{%
- parbox{linewidth}{%
- leavevmoderaisebox{-0.5ex}{llap{textbullet}}!hrulefill\[-0.825ex]%
- nullhfillbfseries Total Points: total{totalpoints}~~rlap{rule{0.4pt}{3ex}}%
- }%
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement