marginnote adds spacing before paragraph












2















Unwanted spacing



The marginnote package introduces some extra spacing between the section header and the start of a paragraph (this is unwanted). How can this be corrected?



Example



enter image description hereenter image description here



MWE



documentclass{extarticle}

usepackage{lipsum}
usepackage{marginnote}
usepackage{titlesec}

% Shorten the spacing after section headings
titlespacingsubsection{0pt}{12pt plus 4pt minus 2pt}{0pt plus 2pt minus 2pt}

begin{document}
subsection{Normal spacing}
lipsum[1-4]
subsection{Unwanted spacing}
marginnote{Something very long and interesting. Something very long and interesting.}
lipsum[1]
end{document}









share|improve this question



























    2















    Unwanted spacing



    The marginnote package introduces some extra spacing between the section header and the start of a paragraph (this is unwanted). How can this be corrected?



    Example



    enter image description hereenter image description here



    MWE



    documentclass{extarticle}

    usepackage{lipsum}
    usepackage{marginnote}
    usepackage{titlesec}

    % Shorten the spacing after section headings
    titlespacingsubsection{0pt}{12pt plus 4pt minus 2pt}{0pt plus 2pt minus 2pt}

    begin{document}
    subsection{Normal spacing}
    lipsum[1-4]
    subsection{Unwanted spacing}
    marginnote{Something very long and interesting. Something very long and interesting.}
    lipsum[1]
    end{document}









    share|improve this question

























      2












      2








      2








      Unwanted spacing



      The marginnote package introduces some extra spacing between the section header and the start of a paragraph (this is unwanted). How can this be corrected?



      Example



      enter image description hereenter image description here



      MWE



      documentclass{extarticle}

      usepackage{lipsum}
      usepackage{marginnote}
      usepackage{titlesec}

      % Shorten the spacing after section headings
      titlespacingsubsection{0pt}{12pt plus 4pt minus 2pt}{0pt plus 2pt minus 2pt}

      begin{document}
      subsection{Normal spacing}
      lipsum[1-4]
      subsection{Unwanted spacing}
      marginnote{Something very long and interesting. Something very long and interesting.}
      lipsum[1]
      end{document}









      share|improve this question














      Unwanted spacing



      The marginnote package introduces some extra spacing between the section header and the start of a paragraph (this is unwanted). How can this be corrected?



      Example



      enter image description hereenter image description here



      MWE



      documentclass{extarticle}

      usepackage{lipsum}
      usepackage{marginnote}
      usepackage{titlesec}

      % Shorten the spacing after section headings
      titlespacingsubsection{0pt}{12pt plus 4pt minus 2pt}{0pt plus 2pt minus 2pt}

      begin{document}
      subsection{Normal spacing}
      lipsum[1-4]
      subsection{Unwanted spacing}
      marginnote{Something very long and interesting. Something very long and interesting.}
      lipsum[1]
      end{document}






      spacing marginnote






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jan 25 at 17:19









      oliversmoliversm

      442312




      442312






















          2 Answers
          2






          active

          oldest

          votes


















          3














          This code with a simple marginpar seems to improve the layout:



          documentclass{extarticle}

          usepackage{lipsum}
          usepackage{titlesec}

          % Shorten the spacing after section headings
          titlespacingsubsection{0pt}{12pt plus 4pt minus 2pt}{0pt plus 2pt minus 2pt}

          begin{document}

          subsection{Normal spacing}
          lipsum[1-4]
          subsection{Unwanted spacing}
          leavevmodemarginpar{raggedright Something very long and interesting. Something very long and interesting.}
          lipsum[1]

          end{document}


          enter image description here






          share|improve this answer


























          • If I add a leavevmode it adds a small indent at the start of the paragraph. (My real document uses setlength{parindent}{0mm}, and hence why I've noticed it). Can this side effect be resolved as well?

            – oliversm
            Jan 29 at 14:58











          • It probably adds an interword space. See if adding hspace*{-fontdimen2font (just after leavevmode) solves your problem.

            – Bernard
            Jan 29 at 19:44



















          0














          Adding the hrule makes the spacing more obvious. Evidently marginnote adds a strut at the beginning instead of a simple leavevmode.



          documentclass{extarticle}

          usepackage{lipsum}
          usepackage{marginnote}
          usepackage{titlesec}

          % Shorten the spacing after section headings
          titlespacingsubsection{0pt}{12pt plus 4pt minus 2pt}{0pt plus 2pt minus 2pt}

          begin{document}
          subsection{Normal spacing}
          lipsum[1-4]
          subsection{Unwanted spacing}
          %hrule
          smash{marginnote{Something very long and interesting. Something very long and interesting.}}%
          lipsum[1]
          end{document}





          share|improve this answer
























          • This adds in the space for an entire line and gets rid of the vertical alignment.

            – oliversm
            Jan 29 at 15:02











          • Did you run it twice? marginnote gets its vertical position from the previous run.

            – John Kormylo
            Jan 29 at 17:35











          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%2f471867%2fmarginnote-adds-spacing-before-paragraph%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














          This code with a simple marginpar seems to improve the layout:



          documentclass{extarticle}

          usepackage{lipsum}
          usepackage{titlesec}

          % Shorten the spacing after section headings
          titlespacingsubsection{0pt}{12pt plus 4pt minus 2pt}{0pt plus 2pt minus 2pt}

          begin{document}

          subsection{Normal spacing}
          lipsum[1-4]
          subsection{Unwanted spacing}
          leavevmodemarginpar{raggedright Something very long and interesting. Something very long and interesting.}
          lipsum[1]

          end{document}


          enter image description here






          share|improve this answer


























          • If I add a leavevmode it adds a small indent at the start of the paragraph. (My real document uses setlength{parindent}{0mm}, and hence why I've noticed it). Can this side effect be resolved as well?

            – oliversm
            Jan 29 at 14:58











          • It probably adds an interword space. See if adding hspace*{-fontdimen2font (just after leavevmode) solves your problem.

            – Bernard
            Jan 29 at 19:44
















          3














          This code with a simple marginpar seems to improve the layout:



          documentclass{extarticle}

          usepackage{lipsum}
          usepackage{titlesec}

          % Shorten the spacing after section headings
          titlespacingsubsection{0pt}{12pt plus 4pt minus 2pt}{0pt plus 2pt minus 2pt}

          begin{document}

          subsection{Normal spacing}
          lipsum[1-4]
          subsection{Unwanted spacing}
          leavevmodemarginpar{raggedright Something very long and interesting. Something very long and interesting.}
          lipsum[1]

          end{document}


          enter image description here






          share|improve this answer


























          • If I add a leavevmode it adds a small indent at the start of the paragraph. (My real document uses setlength{parindent}{0mm}, and hence why I've noticed it). Can this side effect be resolved as well?

            – oliversm
            Jan 29 at 14:58











          • It probably adds an interword space. See if adding hspace*{-fontdimen2font (just after leavevmode) solves your problem.

            – Bernard
            Jan 29 at 19:44














          3












          3








          3







          This code with a simple marginpar seems to improve the layout:



          documentclass{extarticle}

          usepackage{lipsum}
          usepackage{titlesec}

          % Shorten the spacing after section headings
          titlespacingsubsection{0pt}{12pt plus 4pt minus 2pt}{0pt plus 2pt minus 2pt}

          begin{document}

          subsection{Normal spacing}
          lipsum[1-4]
          subsection{Unwanted spacing}
          leavevmodemarginpar{raggedright Something very long and interesting. Something very long and interesting.}
          lipsum[1]

          end{document}


          enter image description here






          share|improve this answer















          This code with a simple marginpar seems to improve the layout:



          documentclass{extarticle}

          usepackage{lipsum}
          usepackage{titlesec}

          % Shorten the spacing after section headings
          titlespacingsubsection{0pt}{12pt plus 4pt minus 2pt}{0pt plus 2pt minus 2pt}

          begin{document}

          subsection{Normal spacing}
          lipsum[1-4]
          subsection{Unwanted spacing}
          leavevmodemarginpar{raggedright Something very long and interesting. Something very long and interesting.}
          lipsum[1]

          end{document}


          enter image description here







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Jan 26 at 0:51

























          answered Jan 25 at 20:20









          BernardBernard

          168k772197




          168k772197













          • If I add a leavevmode it adds a small indent at the start of the paragraph. (My real document uses setlength{parindent}{0mm}, and hence why I've noticed it). Can this side effect be resolved as well?

            – oliversm
            Jan 29 at 14:58











          • It probably adds an interword space. See if adding hspace*{-fontdimen2font (just after leavevmode) solves your problem.

            – Bernard
            Jan 29 at 19:44



















          • If I add a leavevmode it adds a small indent at the start of the paragraph. (My real document uses setlength{parindent}{0mm}, and hence why I've noticed it). Can this side effect be resolved as well?

            – oliversm
            Jan 29 at 14:58











          • It probably adds an interword space. See if adding hspace*{-fontdimen2font (just after leavevmode) solves your problem.

            – Bernard
            Jan 29 at 19:44

















          If I add a leavevmode it adds a small indent at the start of the paragraph. (My real document uses setlength{parindent}{0mm}, and hence why I've noticed it). Can this side effect be resolved as well?

          – oliversm
          Jan 29 at 14:58





          If I add a leavevmode it adds a small indent at the start of the paragraph. (My real document uses setlength{parindent}{0mm}, and hence why I've noticed it). Can this side effect be resolved as well?

          – oliversm
          Jan 29 at 14:58













          It probably adds an interword space. See if adding hspace*{-fontdimen2font (just after leavevmode) solves your problem.

          – Bernard
          Jan 29 at 19:44





          It probably adds an interword space. See if adding hspace*{-fontdimen2font (just after leavevmode) solves your problem.

          – Bernard
          Jan 29 at 19:44











          0














          Adding the hrule makes the spacing more obvious. Evidently marginnote adds a strut at the beginning instead of a simple leavevmode.



          documentclass{extarticle}

          usepackage{lipsum}
          usepackage{marginnote}
          usepackage{titlesec}

          % Shorten the spacing after section headings
          titlespacingsubsection{0pt}{12pt plus 4pt minus 2pt}{0pt plus 2pt minus 2pt}

          begin{document}
          subsection{Normal spacing}
          lipsum[1-4]
          subsection{Unwanted spacing}
          %hrule
          smash{marginnote{Something very long and interesting. Something very long and interesting.}}%
          lipsum[1]
          end{document}





          share|improve this answer
























          • This adds in the space for an entire line and gets rid of the vertical alignment.

            – oliversm
            Jan 29 at 15:02











          • Did you run it twice? marginnote gets its vertical position from the previous run.

            – John Kormylo
            Jan 29 at 17:35
















          0














          Adding the hrule makes the spacing more obvious. Evidently marginnote adds a strut at the beginning instead of a simple leavevmode.



          documentclass{extarticle}

          usepackage{lipsum}
          usepackage{marginnote}
          usepackage{titlesec}

          % Shorten the spacing after section headings
          titlespacingsubsection{0pt}{12pt plus 4pt minus 2pt}{0pt plus 2pt minus 2pt}

          begin{document}
          subsection{Normal spacing}
          lipsum[1-4]
          subsection{Unwanted spacing}
          %hrule
          smash{marginnote{Something very long and interesting. Something very long and interesting.}}%
          lipsum[1]
          end{document}





          share|improve this answer
























          • This adds in the space for an entire line and gets rid of the vertical alignment.

            – oliversm
            Jan 29 at 15:02











          • Did you run it twice? marginnote gets its vertical position from the previous run.

            – John Kormylo
            Jan 29 at 17:35














          0












          0








          0







          Adding the hrule makes the spacing more obvious. Evidently marginnote adds a strut at the beginning instead of a simple leavevmode.



          documentclass{extarticle}

          usepackage{lipsum}
          usepackage{marginnote}
          usepackage{titlesec}

          % Shorten the spacing after section headings
          titlespacingsubsection{0pt}{12pt plus 4pt minus 2pt}{0pt plus 2pt minus 2pt}

          begin{document}
          subsection{Normal spacing}
          lipsum[1-4]
          subsection{Unwanted spacing}
          %hrule
          smash{marginnote{Something very long and interesting. Something very long and interesting.}}%
          lipsum[1]
          end{document}





          share|improve this answer













          Adding the hrule makes the spacing more obvious. Evidently marginnote adds a strut at the beginning instead of a simple leavevmode.



          documentclass{extarticle}

          usepackage{lipsum}
          usepackage{marginnote}
          usepackage{titlesec}

          % Shorten the spacing after section headings
          titlespacingsubsection{0pt}{12pt plus 4pt minus 2pt}{0pt plus 2pt minus 2pt}

          begin{document}
          subsection{Normal spacing}
          lipsum[1-4]
          subsection{Unwanted spacing}
          %hrule
          smash{marginnote{Something very long and interesting. Something very long and interesting.}}%
          lipsum[1]
          end{document}






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jan 26 at 16:36









          John KormyloJohn Kormylo

          44.2k12568




          44.2k12568













          • This adds in the space for an entire line and gets rid of the vertical alignment.

            – oliversm
            Jan 29 at 15:02











          • Did you run it twice? marginnote gets its vertical position from the previous run.

            – John Kormylo
            Jan 29 at 17:35



















          • This adds in the space for an entire line and gets rid of the vertical alignment.

            – oliversm
            Jan 29 at 15:02











          • Did you run it twice? marginnote gets its vertical position from the previous run.

            – John Kormylo
            Jan 29 at 17:35

















          This adds in the space for an entire line and gets rid of the vertical alignment.

          – oliversm
          Jan 29 at 15:02





          This adds in the space for an entire line and gets rid of the vertical alignment.

          – oliversm
          Jan 29 at 15:02













          Did you run it twice? marginnote gets its vertical position from the previous run.

          – John Kormylo
          Jan 29 at 17:35





          Did you run it twice? marginnote gets its vertical position from the previous run.

          – John Kormylo
          Jan 29 at 17:35


















          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%2f471867%2fmarginnote-adds-spacing-before-paragraph%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?