Showing points and total points using exercise or any other suitable package












4















I want to prepare a book with many chapters (and sections), notes, exercises and linked solutions at the end of the book . I decided to adopt the example from on matching enumerated exercises with their answer. However, I want to display points per question part as shown here on the image. The exam package



documentclass{memoir}

usepackage{amsmath}
usepackage[inline]{enumitem}
usepackage{xcolor}
usepackage{ntheorem}
theorembodyfont{upshape}
theoremseparator{.}

usepackage{answers}
Newassociation{sol}{Solution}{ans}
renewcommand{Solutionlabel}[1]{small{#1.}}
newtheorem{ex}{}[section]
renewcommand{theex}{arabic{ex}}
newenvironment{Ex}[1]{begin{trivlist}item textsc{#1} %
renewcommand{Currentlabel}{#1}}{end{trivlist}}

usepackage{multicol}
newenvironment{mtmulticols}[1]{%
Writetofile{ans}{stringbegin{multicols}{#1}}
begin{multicols}{#1}}{end{multicols}%
Writetofile{ans}{stringend{multicols}}}

Newassociation{solitem}{Solutionsubitem}{ans}
renewcommand{Solutionsubitemlabel}[1]{#1}
newenvironment{Solutionsublist}{Writetofile{ans}{stringbegin{Solution} {theex}}}{Writetofile{ans}{stringend{Solution}}}`

begin{document}
chapter{Polynomials}
section{Partial fractions}
label{sec:partial-fractions}
tracingmacros=1
Opensolutionfile{ans}[partial-fractions]
section*{Exercises for Section ref{sec:partial-fractions}}
vspace{-0.6cm}
hrulefill
begin{Ex}{Warm-ups}
end{Ex}
begin{ex}
Who is the most famous mathematician of all time?
begin{sol}
Euler
end{sol}
end{ex}
begin{ex}
Resolve each of the following proper rational expressions (some filler here) into partial fractions.
begin{multicols}{3}
begin{Solutionsublist}
begin{enumerate}[label=(alph*)]
item $displaystyle{frac{1}{(x - 1)(x - 2)}}$
begin{solitem}
$displaystyle{frac{1}{x - 2} - frac{1}{x - 1}}$
end{solitem}
item $displaystyle{frac{5x + 4}{x^2 + x - 2}}$
begin{solitem}
$displaystyle{frac{2}{x + 2} + frac{3}{x - 1}}$
end{solitem}
item $displaystyle{frac{7x - 1}{2x^2 - x - 1}}$
begin{solitem}
$displaystyle{frac{3}{2x + 1} + frac{2}{x - 1}}$
end{solitem}
item $displaystyle{frac{25}{18x^3 - 9x^2 - 11x + 2}}$
begin{solitem}
$displaystyle{frac{3}{3x + 2} - frac{12}{6x - 1} + frac{1}{x -
1}}$
end{solitem}
item $displaystyle{frac{x^2 + 15x - 4}{(x + 1)(x + 2)(x - 8)}}$
begin{solitem}
$displaystyle{frac{2}{x - 8} + frac{2}{x + 1} - frac{3}{x +
2}}$
end{solitem}
item $displaystyle{frac{48}{(x^2 - 1)(x^2 - 9)}}$
begin{solitem}
$displaystyle{frac{3}{x - 1} + frac{3}{x + 1} - frac{1}{x + 3}
+ frac{1}{x - 3}}$
end{solitem}
end{enumerate}
end{Solutionsublist}
end{multicols}
end{ex}

Closesolutionfile{ans}
section*{Answers for Section ref{sec:partial-fractions}}
input{partial-fractions}

end{document}









share|improve this question

























  • At a certain point, it becomes easier to start from scratch than modify a package. There are a number of ways to set this up, including tabular and makebox. You will need a counter for the (a) (b)... and another if you want to automatically compute the total.

    – John Kormylo
    Feb 4 at 16:15
















4















I want to prepare a book with many chapters (and sections), notes, exercises and linked solutions at the end of the book . I decided to adopt the example from on matching enumerated exercises with their answer. However, I want to display points per question part as shown here on the image. The exam package



documentclass{memoir}

usepackage{amsmath}
usepackage[inline]{enumitem}
usepackage{xcolor}
usepackage{ntheorem}
theorembodyfont{upshape}
theoremseparator{.}

usepackage{answers}
Newassociation{sol}{Solution}{ans}
renewcommand{Solutionlabel}[1]{small{#1.}}
newtheorem{ex}{}[section]
renewcommand{theex}{arabic{ex}}
newenvironment{Ex}[1]{begin{trivlist}item textsc{#1} %
renewcommand{Currentlabel}{#1}}{end{trivlist}}

usepackage{multicol}
newenvironment{mtmulticols}[1]{%
Writetofile{ans}{stringbegin{multicols}{#1}}
begin{multicols}{#1}}{end{multicols}%
Writetofile{ans}{stringend{multicols}}}

Newassociation{solitem}{Solutionsubitem}{ans}
renewcommand{Solutionsubitemlabel}[1]{#1}
newenvironment{Solutionsublist}{Writetofile{ans}{stringbegin{Solution} {theex}}}{Writetofile{ans}{stringend{Solution}}}`

begin{document}
chapter{Polynomials}
section{Partial fractions}
label{sec:partial-fractions}
tracingmacros=1
Opensolutionfile{ans}[partial-fractions]
section*{Exercises for Section ref{sec:partial-fractions}}
vspace{-0.6cm}
hrulefill
begin{Ex}{Warm-ups}
end{Ex}
begin{ex}
Who is the most famous mathematician of all time?
begin{sol}
Euler
end{sol}
end{ex}
begin{ex}
Resolve each of the following proper rational expressions (some filler here) into partial fractions.
begin{multicols}{3}
begin{Solutionsublist}
begin{enumerate}[label=(alph*)]
item $displaystyle{frac{1}{(x - 1)(x - 2)}}$
begin{solitem}
$displaystyle{frac{1}{x - 2} - frac{1}{x - 1}}$
end{solitem}
item $displaystyle{frac{5x + 4}{x^2 + x - 2}}$
begin{solitem}
$displaystyle{frac{2}{x + 2} + frac{3}{x - 1}}$
end{solitem}
item $displaystyle{frac{7x - 1}{2x^2 - x - 1}}$
begin{solitem}
$displaystyle{frac{3}{2x + 1} + frac{2}{x - 1}}$
end{solitem}
item $displaystyle{frac{25}{18x^3 - 9x^2 - 11x + 2}}$
begin{solitem}
$displaystyle{frac{3}{3x + 2} - frac{12}{6x - 1} + frac{1}{x -
1}}$
end{solitem}
item $displaystyle{frac{x^2 + 15x - 4}{(x + 1)(x + 2)(x - 8)}}$
begin{solitem}
$displaystyle{frac{2}{x - 8} + frac{2}{x + 1} - frac{3}{x +
2}}$
end{solitem}
item $displaystyle{frac{48}{(x^2 - 1)(x^2 - 9)}}$
begin{solitem}
$displaystyle{frac{3}{x - 1} + frac{3}{x + 1} - frac{1}{x + 3}
+ frac{1}{x - 3}}$
end{solitem}
end{enumerate}
end{Solutionsublist}
end{multicols}
end{ex}

Closesolutionfile{ans}
section*{Answers for Section ref{sec:partial-fractions}}
input{partial-fractions}

end{document}









share|improve this question

























  • At a certain point, it becomes easier to start from scratch than modify a package. There are a number of ways to set this up, including tabular and makebox. You will need a counter for the (a) (b)... and another if you want to automatically compute the total.

    – John Kormylo
    Feb 4 at 16:15














4












4








4


1






I want to prepare a book with many chapters (and sections), notes, exercises and linked solutions at the end of the book . I decided to adopt the example from on matching enumerated exercises with their answer. However, I want to display points per question part as shown here on the image. The exam package



documentclass{memoir}

usepackage{amsmath}
usepackage[inline]{enumitem}
usepackage{xcolor}
usepackage{ntheorem}
theorembodyfont{upshape}
theoremseparator{.}

usepackage{answers}
Newassociation{sol}{Solution}{ans}
renewcommand{Solutionlabel}[1]{small{#1.}}
newtheorem{ex}{}[section]
renewcommand{theex}{arabic{ex}}
newenvironment{Ex}[1]{begin{trivlist}item textsc{#1} %
renewcommand{Currentlabel}{#1}}{end{trivlist}}

usepackage{multicol}
newenvironment{mtmulticols}[1]{%
Writetofile{ans}{stringbegin{multicols}{#1}}
begin{multicols}{#1}}{end{multicols}%
Writetofile{ans}{stringend{multicols}}}

Newassociation{solitem}{Solutionsubitem}{ans}
renewcommand{Solutionsubitemlabel}[1]{#1}
newenvironment{Solutionsublist}{Writetofile{ans}{stringbegin{Solution} {theex}}}{Writetofile{ans}{stringend{Solution}}}`

begin{document}
chapter{Polynomials}
section{Partial fractions}
label{sec:partial-fractions}
tracingmacros=1
Opensolutionfile{ans}[partial-fractions]
section*{Exercises for Section ref{sec:partial-fractions}}
vspace{-0.6cm}
hrulefill
begin{Ex}{Warm-ups}
end{Ex}
begin{ex}
Who is the most famous mathematician of all time?
begin{sol}
Euler
end{sol}
end{ex}
begin{ex}
Resolve each of the following proper rational expressions (some filler here) into partial fractions.
begin{multicols}{3}
begin{Solutionsublist}
begin{enumerate}[label=(alph*)]
item $displaystyle{frac{1}{(x - 1)(x - 2)}}$
begin{solitem}
$displaystyle{frac{1}{x - 2} - frac{1}{x - 1}}$
end{solitem}
item $displaystyle{frac{5x + 4}{x^2 + x - 2}}$
begin{solitem}
$displaystyle{frac{2}{x + 2} + frac{3}{x - 1}}$
end{solitem}
item $displaystyle{frac{7x - 1}{2x^2 - x - 1}}$
begin{solitem}
$displaystyle{frac{3}{2x + 1} + frac{2}{x - 1}}$
end{solitem}
item $displaystyle{frac{25}{18x^3 - 9x^2 - 11x + 2}}$
begin{solitem}
$displaystyle{frac{3}{3x + 2} - frac{12}{6x - 1} + frac{1}{x -
1}}$
end{solitem}
item $displaystyle{frac{x^2 + 15x - 4}{(x + 1)(x + 2)(x - 8)}}$
begin{solitem}
$displaystyle{frac{2}{x - 8} + frac{2}{x + 1} - frac{3}{x +
2}}$
end{solitem}
item $displaystyle{frac{48}{(x^2 - 1)(x^2 - 9)}}$
begin{solitem}
$displaystyle{frac{3}{x - 1} + frac{3}{x + 1} - frac{1}{x + 3}
+ frac{1}{x - 3}}$
end{solitem}
end{enumerate}
end{Solutionsublist}
end{multicols}
end{ex}

Closesolutionfile{ans}
section*{Answers for Section ref{sec:partial-fractions}}
input{partial-fractions}

end{document}









share|improve this question
















I want to prepare a book with many chapters (and sections), notes, exercises and linked solutions at the end of the book . I decided to adopt the example from on matching enumerated exercises with their answer. However, I want to display points per question part as shown here on the image. The exam package



documentclass{memoir}

usepackage{amsmath}
usepackage[inline]{enumitem}
usepackage{xcolor}
usepackage{ntheorem}
theorembodyfont{upshape}
theoremseparator{.}

usepackage{answers}
Newassociation{sol}{Solution}{ans}
renewcommand{Solutionlabel}[1]{small{#1.}}
newtheorem{ex}{}[section]
renewcommand{theex}{arabic{ex}}
newenvironment{Ex}[1]{begin{trivlist}item textsc{#1} %
renewcommand{Currentlabel}{#1}}{end{trivlist}}

usepackage{multicol}
newenvironment{mtmulticols}[1]{%
Writetofile{ans}{stringbegin{multicols}{#1}}
begin{multicols}{#1}}{end{multicols}%
Writetofile{ans}{stringend{multicols}}}

Newassociation{solitem}{Solutionsubitem}{ans}
renewcommand{Solutionsubitemlabel}[1]{#1}
newenvironment{Solutionsublist}{Writetofile{ans}{stringbegin{Solution} {theex}}}{Writetofile{ans}{stringend{Solution}}}`

begin{document}
chapter{Polynomials}
section{Partial fractions}
label{sec:partial-fractions}
tracingmacros=1
Opensolutionfile{ans}[partial-fractions]
section*{Exercises for Section ref{sec:partial-fractions}}
vspace{-0.6cm}
hrulefill
begin{Ex}{Warm-ups}
end{Ex}
begin{ex}
Who is the most famous mathematician of all time?
begin{sol}
Euler
end{sol}
end{ex}
begin{ex}
Resolve each of the following proper rational expressions (some filler here) into partial fractions.
begin{multicols}{3}
begin{Solutionsublist}
begin{enumerate}[label=(alph*)]
item $displaystyle{frac{1}{(x - 1)(x - 2)}}$
begin{solitem}
$displaystyle{frac{1}{x - 2} - frac{1}{x - 1}}$
end{solitem}
item $displaystyle{frac{5x + 4}{x^2 + x - 2}}$
begin{solitem}
$displaystyle{frac{2}{x + 2} + frac{3}{x - 1}}$
end{solitem}
item $displaystyle{frac{7x - 1}{2x^2 - x - 1}}$
begin{solitem}
$displaystyle{frac{3}{2x + 1} + frac{2}{x - 1}}$
end{solitem}
item $displaystyle{frac{25}{18x^3 - 9x^2 - 11x + 2}}$
begin{solitem}
$displaystyle{frac{3}{3x + 2} - frac{12}{6x - 1} + frac{1}{x -
1}}$
end{solitem}
item $displaystyle{frac{x^2 + 15x - 4}{(x + 1)(x + 2)(x - 8)}}$
begin{solitem}
$displaystyle{frac{2}{x - 8} + frac{2}{x + 1} - frac{3}{x +
2}}$
end{solitem}
item $displaystyle{frac{48}{(x^2 - 1)(x^2 - 9)}}$
begin{solitem}
$displaystyle{frac{3}{x - 1} + frac{3}{x + 1} - frac{1}{x + 3}
+ frac{1}{x - 3}}$
end{solitem}
end{enumerate}
end{Solutionsublist}
end{multicols}
end{ex}

Closesolutionfile{ans}
section*{Answers for Section ref{sec:partial-fractions}}
input{partial-fractions}

end{document}






exam exercises xsim points






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Feb 4 at 6:44









CarLaTeX

31.4k450132




31.4k450132










asked Feb 4 at 5:31









FreemanFreeman

1008




1008













  • At a certain point, it becomes easier to start from scratch than modify a package. There are a number of ways to set this up, including tabular and makebox. You will need a counter for the (a) (b)... and another if you want to automatically compute the total.

    – John Kormylo
    Feb 4 at 16:15



















  • At a certain point, it becomes easier to start from scratch than modify a package. There are a number of ways to set this up, including tabular and makebox. You will need a counter for the (a) (b)... and another if you want to automatically compute the total.

    – John Kormylo
    Feb 4 at 16:15

















At a certain point, it becomes easier to start from scratch than modify a package. There are a number of ways to set this up, including tabular and makebox. You will need a counter for the (a) (b)... and another if you want to automatically compute the total.

– John Kormylo
Feb 4 at 16:15





At a certain point, it becomes easier to start from scratch than modify a package. There are a number of ways to set this up, including tabular and makebox. You will need a counter for the (a) (b)... and another if you want to automatically compute the total.

– John Kormylo
Feb 4 at 16:15










1 Answer
1






active

oldest

votes


















1














I am not familiar with the answer package but would propose a solution to add score points consisting of three parts:




  1. Use of a displayed math environment with tag to display the appropriate score (additional benefit: remove need for endless displaystyle calls).

  2. Redefine the tag format to use brackets instead of parentheses () (possible with the mathtools package).

  3. Tweak from this answer to get the displayed math to appear on the same line as the item number.


Further adjustment may be required to suit your tastes. For starters, I would personally suggest adding at least leftmargin=* in the enumerate environment options in order to give your equations a bit more space (you may also wish to experiment with the fleqn option of the amsmath package).



Additional code for your preamble:



usepackage{mathtools}
% Change tag form to brackets
newtagform{brackets}{[}{]}
usetagform{brackets}
% Tweak to have displayed math appear on same line as item. See https://tex.stackexchange.com/a/58145
newcommandItem[1]{%
ifxrelax#1relax item else item[#1] fi
abovedisplayskip=0ptabovedisplayshortskip=0pt~vspace*{-baselineskip}}


Example use:



 begin{ex}
begin{multicols}{2} % Changed from 3
begin{Solutionsublist}
begin{enumerate}[label=(alph*)]
% Optional - give equations a bit more room with leftmargin=*
%begin{enumerate}[leftmargin=*,label=(alph*)]
Item
begin{equation}
frac{1}{(x - 1)(x - 2)}tag{1}
end{equation}
begin{solitem}
$displaystyle{frac{1}{x - 2} - frac{1}{x - 1}}$
end{solitem}
end{enumerate}
end{Solutionsublist}
end{multicols}
end{ex}


Note only 2 columns of equations sensibly fit (I've also left the solutions unchanged - you may want to change how you format these as well).



Example output:



enter image description here



This approach has the benefit that you can label each equation and retrieve the score at any time easily with eqref.






share|improve this answer























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "85"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f473279%2fshowing-points-and-total-points-using-exercise-or-any-other-suitable-package%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    I am not familiar with the answer package but would propose a solution to add score points consisting of three parts:




    1. Use of a displayed math environment with tag to display the appropriate score (additional benefit: remove need for endless displaystyle calls).

    2. Redefine the tag format to use brackets instead of parentheses () (possible with the mathtools package).

    3. Tweak from this answer to get the displayed math to appear on the same line as the item number.


    Further adjustment may be required to suit your tastes. For starters, I would personally suggest adding at least leftmargin=* in the enumerate environment options in order to give your equations a bit more space (you may also wish to experiment with the fleqn option of the amsmath package).



    Additional code for your preamble:



    usepackage{mathtools}
    % Change tag form to brackets
    newtagform{brackets}{[}{]}
    usetagform{brackets}
    % Tweak to have displayed math appear on same line as item. See https://tex.stackexchange.com/a/58145
    newcommandItem[1]{%
    ifxrelax#1relax item else item[#1] fi
    abovedisplayskip=0ptabovedisplayshortskip=0pt~vspace*{-baselineskip}}


    Example use:



     begin{ex}
    begin{multicols}{2} % Changed from 3
    begin{Solutionsublist}
    begin{enumerate}[label=(alph*)]
    % Optional - give equations a bit more room with leftmargin=*
    %begin{enumerate}[leftmargin=*,label=(alph*)]
    Item
    begin{equation}
    frac{1}{(x - 1)(x - 2)}tag{1}
    end{equation}
    begin{solitem}
    $displaystyle{frac{1}{x - 2} - frac{1}{x - 1}}$
    end{solitem}
    end{enumerate}
    end{Solutionsublist}
    end{multicols}
    end{ex}


    Note only 2 columns of equations sensibly fit (I've also left the solutions unchanged - you may want to change how you format these as well).



    Example output:



    enter image description here



    This approach has the benefit that you can label each equation and retrieve the score at any time easily with eqref.






    share|improve this answer




























      1














      I am not familiar with the answer package but would propose a solution to add score points consisting of three parts:




      1. Use of a displayed math environment with tag to display the appropriate score (additional benefit: remove need for endless displaystyle calls).

      2. Redefine the tag format to use brackets instead of parentheses () (possible with the mathtools package).

      3. Tweak from this answer to get the displayed math to appear on the same line as the item number.


      Further adjustment may be required to suit your tastes. For starters, I would personally suggest adding at least leftmargin=* in the enumerate environment options in order to give your equations a bit more space (you may also wish to experiment with the fleqn option of the amsmath package).



      Additional code for your preamble:



      usepackage{mathtools}
      % Change tag form to brackets
      newtagform{brackets}{[}{]}
      usetagform{brackets}
      % Tweak to have displayed math appear on same line as item. See https://tex.stackexchange.com/a/58145
      newcommandItem[1]{%
      ifxrelax#1relax item else item[#1] fi
      abovedisplayskip=0ptabovedisplayshortskip=0pt~vspace*{-baselineskip}}


      Example use:



       begin{ex}
      begin{multicols}{2} % Changed from 3
      begin{Solutionsublist}
      begin{enumerate}[label=(alph*)]
      % Optional - give equations a bit more room with leftmargin=*
      %begin{enumerate}[leftmargin=*,label=(alph*)]
      Item
      begin{equation}
      frac{1}{(x - 1)(x - 2)}tag{1}
      end{equation}
      begin{solitem}
      $displaystyle{frac{1}{x - 2} - frac{1}{x - 1}}$
      end{solitem}
      end{enumerate}
      end{Solutionsublist}
      end{multicols}
      end{ex}


      Note only 2 columns of equations sensibly fit (I've also left the solutions unchanged - you may want to change how you format these as well).



      Example output:



      enter image description here



      This approach has the benefit that you can label each equation and retrieve the score at any time easily with eqref.






      share|improve this answer


























        1












        1








        1







        I am not familiar with the answer package but would propose a solution to add score points consisting of three parts:




        1. Use of a displayed math environment with tag to display the appropriate score (additional benefit: remove need for endless displaystyle calls).

        2. Redefine the tag format to use brackets instead of parentheses () (possible with the mathtools package).

        3. Tweak from this answer to get the displayed math to appear on the same line as the item number.


        Further adjustment may be required to suit your tastes. For starters, I would personally suggest adding at least leftmargin=* in the enumerate environment options in order to give your equations a bit more space (you may also wish to experiment with the fleqn option of the amsmath package).



        Additional code for your preamble:



        usepackage{mathtools}
        % Change tag form to brackets
        newtagform{brackets}{[}{]}
        usetagform{brackets}
        % Tweak to have displayed math appear on same line as item. See https://tex.stackexchange.com/a/58145
        newcommandItem[1]{%
        ifxrelax#1relax item else item[#1] fi
        abovedisplayskip=0ptabovedisplayshortskip=0pt~vspace*{-baselineskip}}


        Example use:



         begin{ex}
        begin{multicols}{2} % Changed from 3
        begin{Solutionsublist}
        begin{enumerate}[label=(alph*)]
        % Optional - give equations a bit more room with leftmargin=*
        %begin{enumerate}[leftmargin=*,label=(alph*)]
        Item
        begin{equation}
        frac{1}{(x - 1)(x - 2)}tag{1}
        end{equation}
        begin{solitem}
        $displaystyle{frac{1}{x - 2} - frac{1}{x - 1}}$
        end{solitem}
        end{enumerate}
        end{Solutionsublist}
        end{multicols}
        end{ex}


        Note only 2 columns of equations sensibly fit (I've also left the solutions unchanged - you may want to change how you format these as well).



        Example output:



        enter image description here



        This approach has the benefit that you can label each equation and retrieve the score at any time easily with eqref.






        share|improve this answer













        I am not familiar with the answer package but would propose a solution to add score points consisting of three parts:




        1. Use of a displayed math environment with tag to display the appropriate score (additional benefit: remove need for endless displaystyle calls).

        2. Redefine the tag format to use brackets instead of parentheses () (possible with the mathtools package).

        3. Tweak from this answer to get the displayed math to appear on the same line as the item number.


        Further adjustment may be required to suit your tastes. For starters, I would personally suggest adding at least leftmargin=* in the enumerate environment options in order to give your equations a bit more space (you may also wish to experiment with the fleqn option of the amsmath package).



        Additional code for your preamble:



        usepackage{mathtools}
        % Change tag form to brackets
        newtagform{brackets}{[}{]}
        usetagform{brackets}
        % Tweak to have displayed math appear on same line as item. See https://tex.stackexchange.com/a/58145
        newcommandItem[1]{%
        ifxrelax#1relax item else item[#1] fi
        abovedisplayskip=0ptabovedisplayshortskip=0pt~vspace*{-baselineskip}}


        Example use:



         begin{ex}
        begin{multicols}{2} % Changed from 3
        begin{Solutionsublist}
        begin{enumerate}[label=(alph*)]
        % Optional - give equations a bit more room with leftmargin=*
        %begin{enumerate}[leftmargin=*,label=(alph*)]
        Item
        begin{equation}
        frac{1}{(x - 1)(x - 2)}tag{1}
        end{equation}
        begin{solitem}
        $displaystyle{frac{1}{x - 2} - frac{1}{x - 1}}$
        end{solitem}
        end{enumerate}
        end{Solutionsublist}
        end{multicols}
        end{ex}


        Note only 2 columns of equations sensibly fit (I've also left the solutions unchanged - you may want to change how you format these as well).



        Example output:



        enter image description here



        This approach has the benefit that you can label each equation and retrieve the score at any time easily with eqref.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Feb 4 at 14:52









        Pippip19Pippip19

        4486




        4486






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f473279%2fshowing-points-and-total-points-using-exercise-or-any-other-suitable-package%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            How to send String Array data to Server using php in android

            Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

            Is anime1.com a legal site for watching anime?