Print answers as a table with the exam class












2















Within the exam class i have been putting tables in for the people doing the questions to fill in the gaps. However when i write printanswers i wish for the answers to appear within the table





begin{table}[h]
centering
begin{tabular}{|l|l|l|}
hline
textbf{Item } & textbf{Full Price (£)} & textbf{Sale Price (£)} \ hline
Shoes & 25 & \ hline
Jeans & 40 & \ hline
Socks & 2 & \ hline
Jumper & 17.50 & \ hline
Suit & 120 & \ hline
end{tabular}
end{table}


But i wish the answers to appear red or something to clearly show that they are the solutions.



begin{table}[h]
centering
begin{tabular}{|l|l|l|}
hline
textbf{Item } & textbf{Full Price (£)} & textbf{Sale Price (£)} \ hline
Shoes & 25 & 21.25 \ hline
Jeans & 40 & 34 \ hline
Socks & 2 & 1.70 \ hline
Jumper & 17.50 & 14.88 \ hline
Suit & 120 & 102 \ hline
end{tabular}
end{table}









share|improve this question





























    2















    Within the exam class i have been putting tables in for the people doing the questions to fill in the gaps. However when i write printanswers i wish for the answers to appear within the table





    begin{table}[h]
    centering
    begin{tabular}{|l|l|l|}
    hline
    textbf{Item } & textbf{Full Price (£)} & textbf{Sale Price (£)} \ hline
    Shoes & 25 & \ hline
    Jeans & 40 & \ hline
    Socks & 2 & \ hline
    Jumper & 17.50 & \ hline
    Suit & 120 & \ hline
    end{tabular}
    end{table}


    But i wish the answers to appear red or something to clearly show that they are the solutions.



    begin{table}[h]
    centering
    begin{tabular}{|l|l|l|}
    hline
    textbf{Item } & textbf{Full Price (£)} & textbf{Sale Price (£)} \ hline
    Shoes & 25 & 21.25 \ hline
    Jeans & 40 & 34 \ hline
    Socks & 2 & 1.70 \ hline
    Jumper & 17.50 & 14.88 \ hline
    Suit & 120 & 102 \ hline
    end{tabular}
    end{table}









    share|improve this question



























      2












      2








      2


      0






      Within the exam class i have been putting tables in for the people doing the questions to fill in the gaps. However when i write printanswers i wish for the answers to appear within the table





      begin{table}[h]
      centering
      begin{tabular}{|l|l|l|}
      hline
      textbf{Item } & textbf{Full Price (£)} & textbf{Sale Price (£)} \ hline
      Shoes & 25 & \ hline
      Jeans & 40 & \ hline
      Socks & 2 & \ hline
      Jumper & 17.50 & \ hline
      Suit & 120 & \ hline
      end{tabular}
      end{table}


      But i wish the answers to appear red or something to clearly show that they are the solutions.



      begin{table}[h]
      centering
      begin{tabular}{|l|l|l|}
      hline
      textbf{Item } & textbf{Full Price (£)} & textbf{Sale Price (£)} \ hline
      Shoes & 25 & 21.25 \ hline
      Jeans & 40 & 34 \ hline
      Socks & 2 & 1.70 \ hline
      Jumper & 17.50 & 14.88 \ hline
      Suit & 120 & 102 \ hline
      end{tabular}
      end{table}









      share|improve this question
















      Within the exam class i have been putting tables in for the people doing the questions to fill in the gaps. However when i write printanswers i wish for the answers to appear within the table





      begin{table}[h]
      centering
      begin{tabular}{|l|l|l|}
      hline
      textbf{Item } & textbf{Full Price (£)} & textbf{Sale Price (£)} \ hline
      Shoes & 25 & \ hline
      Jeans & 40 & \ hline
      Socks & 2 & \ hline
      Jumper & 17.50 & \ hline
      Suit & 120 & \ hline
      end{tabular}
      end{table}


      But i wish the answers to appear red or something to clearly show that they are the solutions.



      begin{table}[h]
      centering
      begin{tabular}{|l|l|l|}
      hline
      textbf{Item } & textbf{Full Price (£)} & textbf{Sale Price (£)} \ hline
      Shoes & 25 & 21.25 \ hline
      Jeans & 40 & 34 \ hline
      Socks & 2 & 1.70 \ hline
      Jumper & 17.50 & 14.88 \ hline
      Suit & 120 & 102 \ hline
      end{tabular}
      end{table}






      tables exam






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Feb 23 at 16:43









      Hafid Boukhoulda

      4,3721624




      4,3721624










      asked Feb 23 at 15:25









      Jettie BakerJettie Baker

      395




      395






















          1 Answer
          1






          active

          oldest

          votes


















          2














          There is the fillin command which do what you need



          documentclass[answers]{exam}
          usepackage{xcolor}

          CorrectChoiceEmphasis{color{red}}

          setlengthfillinlinelength{1cm}

          setlengthanswerclearance{0.5ex}

          begin{document}
          begin{questions}
          question

          Fill in the table

          centering
          begin{tabular}{|l|l|c|}
          hline
          textbf{Item } & textbf{Full Price (£)} & textbf{Sale Price (£)} \ hline
          Shoes & 25 & fillin[20] \ hline
          Jeans & 40 & fillin[30] \ hline
          Socks & 2 & fillin[1] \ hline
          Jumper & 17.50 & fillin[15] \ hline
          Suit & 120 & fillin[100] \ hline
          end{tabular}

          end{questions}
          end{document}


          enter image description here



          enter image description here






          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%2f476345%2fprint-answers-as-a-table-with-the-exam-class%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









            2














            There is the fillin command which do what you need



            documentclass[answers]{exam}
            usepackage{xcolor}

            CorrectChoiceEmphasis{color{red}}

            setlengthfillinlinelength{1cm}

            setlengthanswerclearance{0.5ex}

            begin{document}
            begin{questions}
            question

            Fill in the table

            centering
            begin{tabular}{|l|l|c|}
            hline
            textbf{Item } & textbf{Full Price (£)} & textbf{Sale Price (£)} \ hline
            Shoes & 25 & fillin[20] \ hline
            Jeans & 40 & fillin[30] \ hline
            Socks & 2 & fillin[1] \ hline
            Jumper & 17.50 & fillin[15] \ hline
            Suit & 120 & fillin[100] \ hline
            end{tabular}

            end{questions}
            end{document}


            enter image description here



            enter image description here






            share|improve this answer






























              2














              There is the fillin command which do what you need



              documentclass[answers]{exam}
              usepackage{xcolor}

              CorrectChoiceEmphasis{color{red}}

              setlengthfillinlinelength{1cm}

              setlengthanswerclearance{0.5ex}

              begin{document}
              begin{questions}
              question

              Fill in the table

              centering
              begin{tabular}{|l|l|c|}
              hline
              textbf{Item } & textbf{Full Price (£)} & textbf{Sale Price (£)} \ hline
              Shoes & 25 & fillin[20] \ hline
              Jeans & 40 & fillin[30] \ hline
              Socks & 2 & fillin[1] \ hline
              Jumper & 17.50 & fillin[15] \ hline
              Suit & 120 & fillin[100] \ hline
              end{tabular}

              end{questions}
              end{document}


              enter image description here



              enter image description here






              share|improve this answer




























                2












                2








                2







                There is the fillin command which do what you need



                documentclass[answers]{exam}
                usepackage{xcolor}

                CorrectChoiceEmphasis{color{red}}

                setlengthfillinlinelength{1cm}

                setlengthanswerclearance{0.5ex}

                begin{document}
                begin{questions}
                question

                Fill in the table

                centering
                begin{tabular}{|l|l|c|}
                hline
                textbf{Item } & textbf{Full Price (£)} & textbf{Sale Price (£)} \ hline
                Shoes & 25 & fillin[20] \ hline
                Jeans & 40 & fillin[30] \ hline
                Socks & 2 & fillin[1] \ hline
                Jumper & 17.50 & fillin[15] \ hline
                Suit & 120 & fillin[100] \ hline
                end{tabular}

                end{questions}
                end{document}


                enter image description here



                enter image description here






                share|improve this answer















                There is the fillin command which do what you need



                documentclass[answers]{exam}
                usepackage{xcolor}

                CorrectChoiceEmphasis{color{red}}

                setlengthfillinlinelength{1cm}

                setlengthanswerclearance{0.5ex}

                begin{document}
                begin{questions}
                question

                Fill in the table

                centering
                begin{tabular}{|l|l|c|}
                hline
                textbf{Item } & textbf{Full Price (£)} & textbf{Sale Price (£)} \ hline
                Shoes & 25 & fillin[20] \ hline
                Jeans & 40 & fillin[30] \ hline
                Socks & 2 & fillin[1] \ hline
                Jumper & 17.50 & fillin[15] \ hline
                Suit & 120 & fillin[100] \ hline
                end{tabular}

                end{questions}
                end{document}


                enter image description here



                enter image description here







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Feb 23 at 16:45

























                answered Feb 23 at 16:22









                Hafid BoukhouldaHafid Boukhoulda

                4,3721624




                4,3721624






























                    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%2f476345%2fprint-answers-as-a-table-with-the-exam-class%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 change which sound is reproduced for terminal bell?

                    Can I use Tabulator js library in my java Spring + Thymeleaf project?

                    Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents