Why there is no space left after the answer header?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












4















I redefined the exercise and the answer headers of exercise package in the same way.



After the exercise header there is correctly some space left, after the answer header no.



Of course, I can put it manually in the definition of the answer header, but I'm wondering if it is a bug of the package or something I did wrong.



documentclassbook
usepackageamsmath
usepackage[lastexercise]exercise
setlengthExerciseSkipBeforebaselineskip
setlengthExerciseSkipAfter1baselineskip
setlengthAnswerSkipBefore0baselineskip
setlengthAnswerSkipAfter1.2baselineskip
renewcounterExercise[chapter]
renewcommandExerciseHeadernoindentbfseriesExerciseName thechapter.ExerciseHeaderNB.
renewcommandAnswerNameSolution
renewcommandAnswerHeadernoindentbfseriesAnswerName thechapter.ExerciseHeaderNB.

begindocument
chapterMy first chapter
sectionProblems
beginExercise
Text of the 1st problem
endExercise
beginAnswer
Text of the solution of the 1st problem
endAnswer
beginExercise
Text of the 2nd problem
endExercise
beginAnswer
Text of the solution of the 2nd problem
endAnswer
beginExercise
Text of the 3rd problem
endExercise
beginAnswer
Text of the solution of the 3rd problem
endAnswer
enddocument


enter image description here










share|improve this question


























    4















    I redefined the exercise and the answer headers of exercise package in the same way.



    After the exercise header there is correctly some space left, after the answer header no.



    Of course, I can put it manually in the definition of the answer header, but I'm wondering if it is a bug of the package or something I did wrong.



    documentclassbook
    usepackageamsmath
    usepackage[lastexercise]exercise
    setlengthExerciseSkipBeforebaselineskip
    setlengthExerciseSkipAfter1baselineskip
    setlengthAnswerSkipBefore0baselineskip
    setlengthAnswerSkipAfter1.2baselineskip
    renewcounterExercise[chapter]
    renewcommandExerciseHeadernoindentbfseriesExerciseName thechapter.ExerciseHeaderNB.
    renewcommandAnswerNameSolution
    renewcommandAnswerHeadernoindentbfseriesAnswerName thechapter.ExerciseHeaderNB.

    begindocument
    chapterMy first chapter
    sectionProblems
    beginExercise
    Text of the 1st problem
    endExercise
    beginAnswer
    Text of the solution of the 1st problem
    endAnswer
    beginExercise
    Text of the 2nd problem
    endExercise
    beginAnswer
    Text of the solution of the 2nd problem
    endAnswer
    beginExercise
    Text of the 3rd problem
    endExercise
    beginAnswer
    Text of the solution of the 3rd problem
    endAnswer
    enddocument


    enter image description here










    share|improve this question
























      4












      4








      4


      1






      I redefined the exercise and the answer headers of exercise package in the same way.



      After the exercise header there is correctly some space left, after the answer header no.



      Of course, I can put it manually in the definition of the answer header, but I'm wondering if it is a bug of the package or something I did wrong.



      documentclassbook
      usepackageamsmath
      usepackage[lastexercise]exercise
      setlengthExerciseSkipBeforebaselineskip
      setlengthExerciseSkipAfter1baselineskip
      setlengthAnswerSkipBefore0baselineskip
      setlengthAnswerSkipAfter1.2baselineskip
      renewcounterExercise[chapter]
      renewcommandExerciseHeadernoindentbfseriesExerciseName thechapter.ExerciseHeaderNB.
      renewcommandAnswerNameSolution
      renewcommandAnswerHeadernoindentbfseriesAnswerName thechapter.ExerciseHeaderNB.

      begindocument
      chapterMy first chapter
      sectionProblems
      beginExercise
      Text of the 1st problem
      endExercise
      beginAnswer
      Text of the solution of the 1st problem
      endAnswer
      beginExercise
      Text of the 2nd problem
      endExercise
      beginAnswer
      Text of the solution of the 2nd problem
      endAnswer
      beginExercise
      Text of the 3rd problem
      endExercise
      beginAnswer
      Text of the solution of the 3rd problem
      endAnswer
      enddocument


      enter image description here










      share|improve this question














      I redefined the exercise and the answer headers of exercise package in the same way.



      After the exercise header there is correctly some space left, after the answer header no.



      Of course, I can put it manually in the definition of the answer header, but I'm wondering if it is a bug of the package or something I did wrong.



      documentclassbook
      usepackageamsmath
      usepackage[lastexercise]exercise
      setlengthExerciseSkipBeforebaselineskip
      setlengthExerciseSkipAfter1baselineskip
      setlengthAnswerSkipBefore0baselineskip
      setlengthAnswerSkipAfter1.2baselineskip
      renewcounterExercise[chapter]
      renewcommandExerciseHeadernoindentbfseriesExerciseName thechapter.ExerciseHeaderNB.
      renewcommandAnswerNameSolution
      renewcommandAnswerHeadernoindentbfseriesAnswerName thechapter.ExerciseHeaderNB.

      begindocument
      chapterMy first chapter
      sectionProblems
      beginExercise
      Text of the 1st problem
      endExercise
      beginAnswer
      Text of the solution of the 1st problem
      endAnswer
      beginExercise
      Text of the 2nd problem
      endExercise
      beginAnswer
      Text of the solution of the 2nd problem
      endAnswer
      beginExercise
      Text of the 3rd problem
      endExercise
      beginAnswer
      Text of the solution of the 3rd problem
      endAnswer
      enddocument


      enter image description here







      horizontal-alignment exercises






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Feb 27 at 6:37









      CarLaTeXCarLaTeX

      34k551140




      34k551140




















          2 Answers
          2






          active

          oldest

          votes


















          3














          The answer is in the definitions of @@@ExeEnv and @@@AnswerEnv



          % exercise.sty, line 365:
          newcommand@@@ExeEnv%
          pagebreak[1]vskipExerciseSkipBefore
          @QuestionLevel1
          refstepExecounter
          begingroup@getExerciseInfoExerciseHeader
          addcontentslineext@exercisetoc@exerciseExerciseName
          theExercise expandafteritshape ExerciseTitlehspace.66em
          endgroupAtBeginExercise

          % exercise.sty, line 656:
          newcommand@@@AnswerEnv%
          pagebreak[1]vskipAnswerSkipBefore@QuestionLevel1
          begingroup@getAnswerInfoAnswerHeaderendgroupAtBeginAnswer


          As you can see, there is an unprotected end-of-line on line 371, which is what produces the space after “Exercise 1.1”.



          documentclassbook
          usepackageamsmath
          usepackage[lastexercise]exercise
          usepackageetoolbox

          makeatletter
          patchcmd@@@ExeEnv endgroupendgroup % remove the wrong space
          makeatother

          setlengthExerciseSkipBeforebaselineskip
          setlengthExerciseSkipAfter1baselineskip
          setlengthAnswerSkipBefore0baselineskip
          setlengthAnswerSkipAfter1.2baselineskip
          renewcounterExercise[chapter]

          renewcommandExerciseHeader%
          noindentbfseriesExerciseName thechapter.ExerciseHeaderNB. %

          renewcommandAnswerNameSolution
          renewcommandAnswerHeader%
          noindentbfseriesAnswerName thechapter.ExerciseHeaderNB. %


          begindocument

          chapterMy first chapter
          sectionProblems
          beginExercise
          Text of the 1st problem
          endExercise
          beginAnswer
          Text of the solution of the 1st problem
          endAnswer
          beginExercise
          Text of the 2nd problem
          endExercise
          beginAnswer
          Text of the solution of the 2nd problem
          endAnswer
          beginExercise
          Text of the 3rd problem
          endExercise
          beginAnswer
          Text of the solution of the 3rd problem
          endAnswer
          enddocument


          enter image description here






          share|improve this answer























          • I'll report the bug :)

            – CarLaTeX
            Feb 27 at 16:42


















          2














          Seems to be a bug for me. Adding an space at the end of definition



          renewcommandAnswerHeadernoindentbfseriesAnswerName thechapter.ExerciseHeaderNB. 
          % ^^^


          solves the issue as workaround. For me it seems there is a xspace missing in the definition for the solution header text in the package ...



          In the documentation you can find



          newcommandAnswerHeadermedskipcenterlinetextbfAnswer of ExerciseName ExerciseHeaderNBsmallskip


          astonishing for me with an smallskip at its end.



          MWE:



          documentclassbook

          usepackageamsmath
          usepackage[lastexercise]exercise
          setlengthExerciseSkipBeforebaselineskip
          setlengthExerciseSkipAfter1baselineskip
          setlengthAnswerSkipBefore0baselineskip
          setlengthAnswerSkipAfter1.2baselineskip
          renewcounterExercise[chapter]
          renewcommandExerciseHeadernoindentbfseriesExerciseName thechapter.ExerciseHeaderNB.
          renewcommandAnswerNameSolution
          renewcommandAnswerHeadernoindentbfseriesAnswerName thechapter.ExerciseHeaderNB.

          begindocument
          chapterMy first chapter
          sectionProblems
          beginExercise
          Text of the 1st problem
          endExercise
          beginAnswer
          Text of the solution of the 1st problem
          endAnswer
          beginExercise
          Text of the 2nd problem
          endExercise
          beginAnswer
          Text of the solution of the 2nd problem
          endAnswer
          beginExercise
          Text of the 3rd problem
          endExercise
          beginAnswer
          Text of the solution of the 3rd problem
          endAnswer
          enddocument


          result:



          resulting pdf






          share|improve this answer

























          • Probably there is a smallskip because the standard answer header of the package is a centered title. Thanks!

            – CarLaTeX
            Feb 27 at 8:09











          • Not at all astonishing: smallskip ends the current paragraph and adds a small vertical skip.

            – egreg
            Feb 27 at 11:52










          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%2f476878%2fwhy-there-is-no-space-left-after-the-answer-header%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          2 Answers
          2






          active

          oldest

          votes








          2 Answers
          2






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          3














          The answer is in the definitions of @@@ExeEnv and @@@AnswerEnv



          % exercise.sty, line 365:
          newcommand@@@ExeEnv%
          pagebreak[1]vskipExerciseSkipBefore
          @QuestionLevel1
          refstepExecounter
          begingroup@getExerciseInfoExerciseHeader
          addcontentslineext@exercisetoc@exerciseExerciseName
          theExercise expandafteritshape ExerciseTitlehspace.66em
          endgroupAtBeginExercise

          % exercise.sty, line 656:
          newcommand@@@AnswerEnv%
          pagebreak[1]vskipAnswerSkipBefore@QuestionLevel1
          begingroup@getAnswerInfoAnswerHeaderendgroupAtBeginAnswer


          As you can see, there is an unprotected end-of-line on line 371, which is what produces the space after “Exercise 1.1”.



          documentclassbook
          usepackageamsmath
          usepackage[lastexercise]exercise
          usepackageetoolbox

          makeatletter
          patchcmd@@@ExeEnv endgroupendgroup % remove the wrong space
          makeatother

          setlengthExerciseSkipBeforebaselineskip
          setlengthExerciseSkipAfter1baselineskip
          setlengthAnswerSkipBefore0baselineskip
          setlengthAnswerSkipAfter1.2baselineskip
          renewcounterExercise[chapter]

          renewcommandExerciseHeader%
          noindentbfseriesExerciseName thechapter.ExerciseHeaderNB. %

          renewcommandAnswerNameSolution
          renewcommandAnswerHeader%
          noindentbfseriesAnswerName thechapter.ExerciseHeaderNB. %


          begindocument

          chapterMy first chapter
          sectionProblems
          beginExercise
          Text of the 1st problem
          endExercise
          beginAnswer
          Text of the solution of the 1st problem
          endAnswer
          beginExercise
          Text of the 2nd problem
          endExercise
          beginAnswer
          Text of the solution of the 2nd problem
          endAnswer
          beginExercise
          Text of the 3rd problem
          endExercise
          beginAnswer
          Text of the solution of the 3rd problem
          endAnswer
          enddocument


          enter image description here






          share|improve this answer























          • I'll report the bug :)

            – CarLaTeX
            Feb 27 at 16:42















          3














          The answer is in the definitions of @@@ExeEnv and @@@AnswerEnv



          % exercise.sty, line 365:
          newcommand@@@ExeEnv%
          pagebreak[1]vskipExerciseSkipBefore
          @QuestionLevel1
          refstepExecounter
          begingroup@getExerciseInfoExerciseHeader
          addcontentslineext@exercisetoc@exerciseExerciseName
          theExercise expandafteritshape ExerciseTitlehspace.66em
          endgroupAtBeginExercise

          % exercise.sty, line 656:
          newcommand@@@AnswerEnv%
          pagebreak[1]vskipAnswerSkipBefore@QuestionLevel1
          begingroup@getAnswerInfoAnswerHeaderendgroupAtBeginAnswer


          As you can see, there is an unprotected end-of-line on line 371, which is what produces the space after “Exercise 1.1”.



          documentclassbook
          usepackageamsmath
          usepackage[lastexercise]exercise
          usepackageetoolbox

          makeatletter
          patchcmd@@@ExeEnv endgroupendgroup % remove the wrong space
          makeatother

          setlengthExerciseSkipBeforebaselineskip
          setlengthExerciseSkipAfter1baselineskip
          setlengthAnswerSkipBefore0baselineskip
          setlengthAnswerSkipAfter1.2baselineskip
          renewcounterExercise[chapter]

          renewcommandExerciseHeader%
          noindentbfseriesExerciseName thechapter.ExerciseHeaderNB. %

          renewcommandAnswerNameSolution
          renewcommandAnswerHeader%
          noindentbfseriesAnswerName thechapter.ExerciseHeaderNB. %


          begindocument

          chapterMy first chapter
          sectionProblems
          beginExercise
          Text of the 1st problem
          endExercise
          beginAnswer
          Text of the solution of the 1st problem
          endAnswer
          beginExercise
          Text of the 2nd problem
          endExercise
          beginAnswer
          Text of the solution of the 2nd problem
          endAnswer
          beginExercise
          Text of the 3rd problem
          endExercise
          beginAnswer
          Text of the solution of the 3rd problem
          endAnswer
          enddocument


          enter image description here






          share|improve this answer























          • I'll report the bug :)

            – CarLaTeX
            Feb 27 at 16:42













          3












          3








          3







          The answer is in the definitions of @@@ExeEnv and @@@AnswerEnv



          % exercise.sty, line 365:
          newcommand@@@ExeEnv%
          pagebreak[1]vskipExerciseSkipBefore
          @QuestionLevel1
          refstepExecounter
          begingroup@getExerciseInfoExerciseHeader
          addcontentslineext@exercisetoc@exerciseExerciseName
          theExercise expandafteritshape ExerciseTitlehspace.66em
          endgroupAtBeginExercise

          % exercise.sty, line 656:
          newcommand@@@AnswerEnv%
          pagebreak[1]vskipAnswerSkipBefore@QuestionLevel1
          begingroup@getAnswerInfoAnswerHeaderendgroupAtBeginAnswer


          As you can see, there is an unprotected end-of-line on line 371, which is what produces the space after “Exercise 1.1”.



          documentclassbook
          usepackageamsmath
          usepackage[lastexercise]exercise
          usepackageetoolbox

          makeatletter
          patchcmd@@@ExeEnv endgroupendgroup % remove the wrong space
          makeatother

          setlengthExerciseSkipBeforebaselineskip
          setlengthExerciseSkipAfter1baselineskip
          setlengthAnswerSkipBefore0baselineskip
          setlengthAnswerSkipAfter1.2baselineskip
          renewcounterExercise[chapter]

          renewcommandExerciseHeader%
          noindentbfseriesExerciseName thechapter.ExerciseHeaderNB. %

          renewcommandAnswerNameSolution
          renewcommandAnswerHeader%
          noindentbfseriesAnswerName thechapter.ExerciseHeaderNB. %


          begindocument

          chapterMy first chapter
          sectionProblems
          beginExercise
          Text of the 1st problem
          endExercise
          beginAnswer
          Text of the solution of the 1st problem
          endAnswer
          beginExercise
          Text of the 2nd problem
          endExercise
          beginAnswer
          Text of the solution of the 2nd problem
          endAnswer
          beginExercise
          Text of the 3rd problem
          endExercise
          beginAnswer
          Text of the solution of the 3rd problem
          endAnswer
          enddocument


          enter image description here






          share|improve this answer













          The answer is in the definitions of @@@ExeEnv and @@@AnswerEnv



          % exercise.sty, line 365:
          newcommand@@@ExeEnv%
          pagebreak[1]vskipExerciseSkipBefore
          @QuestionLevel1
          refstepExecounter
          begingroup@getExerciseInfoExerciseHeader
          addcontentslineext@exercisetoc@exerciseExerciseName
          theExercise expandafteritshape ExerciseTitlehspace.66em
          endgroupAtBeginExercise

          % exercise.sty, line 656:
          newcommand@@@AnswerEnv%
          pagebreak[1]vskipAnswerSkipBefore@QuestionLevel1
          begingroup@getAnswerInfoAnswerHeaderendgroupAtBeginAnswer


          As you can see, there is an unprotected end-of-line on line 371, which is what produces the space after “Exercise 1.1”.



          documentclassbook
          usepackageamsmath
          usepackage[lastexercise]exercise
          usepackageetoolbox

          makeatletter
          patchcmd@@@ExeEnv endgroupendgroup % remove the wrong space
          makeatother

          setlengthExerciseSkipBeforebaselineskip
          setlengthExerciseSkipAfter1baselineskip
          setlengthAnswerSkipBefore0baselineskip
          setlengthAnswerSkipAfter1.2baselineskip
          renewcounterExercise[chapter]

          renewcommandExerciseHeader%
          noindentbfseriesExerciseName thechapter.ExerciseHeaderNB. %

          renewcommandAnswerNameSolution
          renewcommandAnswerHeader%
          noindentbfseriesAnswerName thechapter.ExerciseHeaderNB. %


          begindocument

          chapterMy first chapter
          sectionProblems
          beginExercise
          Text of the 1st problem
          endExercise
          beginAnswer
          Text of the solution of the 1st problem
          endAnswer
          beginExercise
          Text of the 2nd problem
          endExercise
          beginAnswer
          Text of the solution of the 2nd problem
          endAnswer
          beginExercise
          Text of the 3rd problem
          endExercise
          beginAnswer
          Text of the solution of the 3rd problem
          endAnswer
          enddocument


          enter image description here







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Feb 27 at 11:24









          egregegreg

          729k8819263236




          729k8819263236












          • I'll report the bug :)

            – CarLaTeX
            Feb 27 at 16:42

















          • I'll report the bug :)

            – CarLaTeX
            Feb 27 at 16:42
















          I'll report the bug :)

          – CarLaTeX
          Feb 27 at 16:42





          I'll report the bug :)

          – CarLaTeX
          Feb 27 at 16:42











          2














          Seems to be a bug for me. Adding an space at the end of definition



          renewcommandAnswerHeadernoindentbfseriesAnswerName thechapter.ExerciseHeaderNB. 
          % ^^^


          solves the issue as workaround. For me it seems there is a xspace missing in the definition for the solution header text in the package ...



          In the documentation you can find



          newcommandAnswerHeadermedskipcenterlinetextbfAnswer of ExerciseName ExerciseHeaderNBsmallskip


          astonishing for me with an smallskip at its end.



          MWE:



          documentclassbook

          usepackageamsmath
          usepackage[lastexercise]exercise
          setlengthExerciseSkipBeforebaselineskip
          setlengthExerciseSkipAfter1baselineskip
          setlengthAnswerSkipBefore0baselineskip
          setlengthAnswerSkipAfter1.2baselineskip
          renewcounterExercise[chapter]
          renewcommandExerciseHeadernoindentbfseriesExerciseName thechapter.ExerciseHeaderNB.
          renewcommandAnswerNameSolution
          renewcommandAnswerHeadernoindentbfseriesAnswerName thechapter.ExerciseHeaderNB.

          begindocument
          chapterMy first chapter
          sectionProblems
          beginExercise
          Text of the 1st problem
          endExercise
          beginAnswer
          Text of the solution of the 1st problem
          endAnswer
          beginExercise
          Text of the 2nd problem
          endExercise
          beginAnswer
          Text of the solution of the 2nd problem
          endAnswer
          beginExercise
          Text of the 3rd problem
          endExercise
          beginAnswer
          Text of the solution of the 3rd problem
          endAnswer
          enddocument


          result:



          resulting pdf






          share|improve this answer

























          • Probably there is a smallskip because the standard answer header of the package is a centered title. Thanks!

            – CarLaTeX
            Feb 27 at 8:09











          • Not at all astonishing: smallskip ends the current paragraph and adds a small vertical skip.

            – egreg
            Feb 27 at 11:52















          2














          Seems to be a bug for me. Adding an space at the end of definition



          renewcommandAnswerHeadernoindentbfseriesAnswerName thechapter.ExerciseHeaderNB. 
          % ^^^


          solves the issue as workaround. For me it seems there is a xspace missing in the definition for the solution header text in the package ...



          In the documentation you can find



          newcommandAnswerHeadermedskipcenterlinetextbfAnswer of ExerciseName ExerciseHeaderNBsmallskip


          astonishing for me with an smallskip at its end.



          MWE:



          documentclassbook

          usepackageamsmath
          usepackage[lastexercise]exercise
          setlengthExerciseSkipBeforebaselineskip
          setlengthExerciseSkipAfter1baselineskip
          setlengthAnswerSkipBefore0baselineskip
          setlengthAnswerSkipAfter1.2baselineskip
          renewcounterExercise[chapter]
          renewcommandExerciseHeadernoindentbfseriesExerciseName thechapter.ExerciseHeaderNB.
          renewcommandAnswerNameSolution
          renewcommandAnswerHeadernoindentbfseriesAnswerName thechapter.ExerciseHeaderNB.

          begindocument
          chapterMy first chapter
          sectionProblems
          beginExercise
          Text of the 1st problem
          endExercise
          beginAnswer
          Text of the solution of the 1st problem
          endAnswer
          beginExercise
          Text of the 2nd problem
          endExercise
          beginAnswer
          Text of the solution of the 2nd problem
          endAnswer
          beginExercise
          Text of the 3rd problem
          endExercise
          beginAnswer
          Text of the solution of the 3rd problem
          endAnswer
          enddocument


          result:



          resulting pdf






          share|improve this answer

























          • Probably there is a smallskip because the standard answer header of the package is a centered title. Thanks!

            – CarLaTeX
            Feb 27 at 8:09











          • Not at all astonishing: smallskip ends the current paragraph and adds a small vertical skip.

            – egreg
            Feb 27 at 11:52













          2












          2








          2







          Seems to be a bug for me. Adding an space at the end of definition



          renewcommandAnswerHeadernoindentbfseriesAnswerName thechapter.ExerciseHeaderNB. 
          % ^^^


          solves the issue as workaround. For me it seems there is a xspace missing in the definition for the solution header text in the package ...



          In the documentation you can find



          newcommandAnswerHeadermedskipcenterlinetextbfAnswer of ExerciseName ExerciseHeaderNBsmallskip


          astonishing for me with an smallskip at its end.



          MWE:



          documentclassbook

          usepackageamsmath
          usepackage[lastexercise]exercise
          setlengthExerciseSkipBeforebaselineskip
          setlengthExerciseSkipAfter1baselineskip
          setlengthAnswerSkipBefore0baselineskip
          setlengthAnswerSkipAfter1.2baselineskip
          renewcounterExercise[chapter]
          renewcommandExerciseHeadernoindentbfseriesExerciseName thechapter.ExerciseHeaderNB.
          renewcommandAnswerNameSolution
          renewcommandAnswerHeadernoindentbfseriesAnswerName thechapter.ExerciseHeaderNB.

          begindocument
          chapterMy first chapter
          sectionProblems
          beginExercise
          Text of the 1st problem
          endExercise
          beginAnswer
          Text of the solution of the 1st problem
          endAnswer
          beginExercise
          Text of the 2nd problem
          endExercise
          beginAnswer
          Text of the solution of the 2nd problem
          endAnswer
          beginExercise
          Text of the 3rd problem
          endExercise
          beginAnswer
          Text of the solution of the 3rd problem
          endAnswer
          enddocument


          result:



          resulting pdf






          share|improve this answer















          Seems to be a bug for me. Adding an space at the end of definition



          renewcommandAnswerHeadernoindentbfseriesAnswerName thechapter.ExerciseHeaderNB. 
          % ^^^


          solves the issue as workaround. For me it seems there is a xspace missing in the definition for the solution header text in the package ...



          In the documentation you can find



          newcommandAnswerHeadermedskipcenterlinetextbfAnswer of ExerciseName ExerciseHeaderNBsmallskip


          astonishing for me with an smallskip at its end.



          MWE:



          documentclassbook

          usepackageamsmath
          usepackage[lastexercise]exercise
          setlengthExerciseSkipBeforebaselineskip
          setlengthExerciseSkipAfter1baselineskip
          setlengthAnswerSkipBefore0baselineskip
          setlengthAnswerSkipAfter1.2baselineskip
          renewcounterExercise[chapter]
          renewcommandExerciseHeadernoindentbfseriesExerciseName thechapter.ExerciseHeaderNB.
          renewcommandAnswerNameSolution
          renewcommandAnswerHeadernoindentbfseriesAnswerName thechapter.ExerciseHeaderNB.

          begindocument
          chapterMy first chapter
          sectionProblems
          beginExercise
          Text of the 1st problem
          endExercise
          beginAnswer
          Text of the solution of the 1st problem
          endAnswer
          beginExercise
          Text of the 2nd problem
          endExercise
          beginAnswer
          Text of the solution of the 2nd problem
          endAnswer
          beginExercise
          Text of the 3rd problem
          endExercise
          beginAnswer
          Text of the solution of the 3rd problem
          endAnswer
          enddocument


          result:



          resulting pdf







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Feb 27 at 7:46

























          answered Feb 27 at 7:39









          KurtKurt

          39.9k850164




          39.9k850164












          • Probably there is a smallskip because the standard answer header of the package is a centered title. Thanks!

            – CarLaTeX
            Feb 27 at 8:09











          • Not at all astonishing: smallskip ends the current paragraph and adds a small vertical skip.

            – egreg
            Feb 27 at 11:52

















          • Probably there is a smallskip because the standard answer header of the package is a centered title. Thanks!

            – CarLaTeX
            Feb 27 at 8:09











          • Not at all astonishing: smallskip ends the current paragraph and adds a small vertical skip.

            – egreg
            Feb 27 at 11:52
















          Probably there is a smallskip because the standard answer header of the package is a centered title. Thanks!

          – CarLaTeX
          Feb 27 at 8:09





          Probably there is a smallskip because the standard answer header of the package is a centered title. Thanks!

          – CarLaTeX
          Feb 27 at 8:09













          Not at all astonishing: smallskip ends the current paragraph and adds a small vertical skip.

          – egreg
          Feb 27 at 11:52





          Not at all astonishing: smallskip ends the current paragraph and adds a small vertical skip.

          – egreg
          Feb 27 at 11:52

















          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%2f476878%2fwhy-there-is-no-space-left-after-the-answer-header%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 check contact read email or not when send email to Individual?

          Displaying single band from multi-band raster using QGIS

          How many registers does an x86_64 CPU actually have?