How to get baselineskip instead of lineskip when using a stored box?Get a box with zero depth including some textHow to keep a constant baselineskip when using minipages (or parboxes)?Shift page up slightly. Can't get enlargethispage*-2baselineskip to workBox with same vertical height, even when emptyHow to get box dimensions within lualatexHow to get a centered colored boxReplicate a box using fancyboxBaselineskip varies when using linguex.sty usesHow can I get all box of a vertical list?Spacing difference when using boxes

Is there a page on which I can view all Sitecore jobs running?

Find a point shared by maximum segments

Why do Radio Buttons not fill the entire outer circle?

What is it called when someone votes for an option that's not their first choice?

Derivative of an interpolated function

New Order #2: Turn My Way

Why would five hundred and five same as one?

What is the tangent at a sharp point on a curve?

python displays `n` instead of breaking a line

Can creatures abilities target that creature itself?

Comic-book: Kids find a dead female superhero in the woods

Did I make a mistake by ccing email to boss to others?

Trouble reading roman numeral notation with flats

Why is participating in the European Parliamentary elections used as a threat?

Air travel with refrigerated insulin

is this saw blade faulty?

Is there a distance limit for minecart tracks?

"Oh no!" in Latin

Do native speakers use "ultima" and "proxima" frequently in spoken English?

I keep switching characters, how do I stop?

categorizing a variable turns it from insignificant to significant

Why doesn't Gödel's incompleteness theorem apply to false statements?

How do I lift the insulation blower into the attic?

Are hand made posters acceptable in Academia?



How to get baselineskip instead of lineskip when using a stored box?


Get a box with zero depth including some textHow to keep a constant baselineskip when using minipages (or parboxes)?Shift page up slightly. Can't get enlargethispage*-2baselineskip to workBox with same vertical height, even when emptyHow to get box dimensions within lualatexHow to get a centered colored boxReplicate a box using fancyboxBaselineskip varies when using linguex.sty usesHow can I get all box of a vertical list?Spacing difference when using boxes













1















Consider this code:



documentclassarticle
begindocument
pagestyleempty

defcontents%
parindent = 0pt
LARGE
strut
raisebaselineskip
vtop
%
LargesmashChapterpar%
titlepar
%
par

newboxtempbox

loggingoutput

vspace*20pt%
begingroup
contents
endgroup

clearpage

vspace*20pt%
setboxtempboxvbox
bgroup
contents
egroup
noindent box tempbox

enddocument


The contents are supposed to be the a chapter heading, with Chapter written in one line and the chapter title in the line below.



I use that raisebaselineskipvtop... contraption to allow me to remove the Chapter text from starred chapters but still have the chapter titles in the same vertical position of the page.



All was fine until I needed to set this chapter head in a box before putting it on the output page. I thought that simply enclosing the whole thing in a vbox to use later with box would work, but I wouldn't be asking here if it did :)



The log shows this for the first page:



...glue 20.0
...glue 0.0
...glue(parskip) 0.0 plus 1.0
...glue(baselineskip) 0.0
...hbox(22.0+6.60007)x345.0


and this for the second:



...glue 20.0
...glue 0.0
...glue(parskip) 0.0 plus 1.0
...glue(lineskip) 1.0
...hbox(22.0+6.60007)x345.0


the only difference being that in the first one TeX inserts baselineskip before the contents and in the second it inserts a lineskip.



Why does it do that? And how to do otherwise?










share|improve this question


























    1















    Consider this code:



    documentclassarticle
    begindocument
    pagestyleempty

    defcontents%
    parindent = 0pt
    LARGE
    strut
    raisebaselineskip
    vtop
    %
    LargesmashChapterpar%
    titlepar
    %
    par

    newboxtempbox

    loggingoutput

    vspace*20pt%
    begingroup
    contents
    endgroup

    clearpage

    vspace*20pt%
    setboxtempboxvbox
    bgroup
    contents
    egroup
    noindent box tempbox

    enddocument


    The contents are supposed to be the a chapter heading, with Chapter written in one line and the chapter title in the line below.



    I use that raisebaselineskipvtop... contraption to allow me to remove the Chapter text from starred chapters but still have the chapter titles in the same vertical position of the page.



    All was fine until I needed to set this chapter head in a box before putting it on the output page. I thought that simply enclosing the whole thing in a vbox to use later with box would work, but I wouldn't be asking here if it did :)



    The log shows this for the first page:



    ...glue 20.0
    ...glue 0.0
    ...glue(parskip) 0.0 plus 1.0
    ...glue(baselineskip) 0.0
    ...hbox(22.0+6.60007)x345.0


    and this for the second:



    ...glue 20.0
    ...glue 0.0
    ...glue(parskip) 0.0 plus 1.0
    ...glue(lineskip) 1.0
    ...hbox(22.0+6.60007)x345.0


    the only difference being that in the first one TeX inserts baselineskip before the contents and in the second it inserts a lineskip.



    Why does it do that? And how to do otherwise?










    share|improve this question
























      1












      1








      1


      1






      Consider this code:



      documentclassarticle
      begindocument
      pagestyleempty

      defcontents%
      parindent = 0pt
      LARGE
      strut
      raisebaselineskip
      vtop
      %
      LargesmashChapterpar%
      titlepar
      %
      par

      newboxtempbox

      loggingoutput

      vspace*20pt%
      begingroup
      contents
      endgroup

      clearpage

      vspace*20pt%
      setboxtempboxvbox
      bgroup
      contents
      egroup
      noindent box tempbox

      enddocument


      The contents are supposed to be the a chapter heading, with Chapter written in one line and the chapter title in the line below.



      I use that raisebaselineskipvtop... contraption to allow me to remove the Chapter text from starred chapters but still have the chapter titles in the same vertical position of the page.



      All was fine until I needed to set this chapter head in a box before putting it on the output page. I thought that simply enclosing the whole thing in a vbox to use later with box would work, but I wouldn't be asking here if it did :)



      The log shows this for the first page:



      ...glue 20.0
      ...glue 0.0
      ...glue(parskip) 0.0 plus 1.0
      ...glue(baselineskip) 0.0
      ...hbox(22.0+6.60007)x345.0


      and this for the second:



      ...glue 20.0
      ...glue 0.0
      ...glue(parskip) 0.0 plus 1.0
      ...glue(lineskip) 1.0
      ...hbox(22.0+6.60007)x345.0


      the only difference being that in the first one TeX inserts baselineskip before the contents and in the second it inserts a lineskip.



      Why does it do that? And how to do otherwise?










      share|improve this question














      Consider this code:



      documentclassarticle
      begindocument
      pagestyleempty

      defcontents%
      parindent = 0pt
      LARGE
      strut
      raisebaselineskip
      vtop
      %
      LargesmashChapterpar%
      titlepar
      %
      par

      newboxtempbox

      loggingoutput

      vspace*20pt%
      begingroup
      contents
      endgroup

      clearpage

      vspace*20pt%
      setboxtempboxvbox
      bgroup
      contents
      egroup
      noindent box tempbox

      enddocument


      The contents are supposed to be the a chapter heading, with Chapter written in one line and the chapter title in the line below.



      I use that raisebaselineskipvtop... contraption to allow me to remove the Chapter text from starred chapters but still have the chapter titles in the same vertical position of the page.



      All was fine until I needed to set this chapter head in a box before putting it on the output page. I thought that simply enclosing the whole thing in a vbox to use later with box would work, but I wouldn't be asking here if it did :)



      The log shows this for the first page:



      ...glue 20.0
      ...glue 0.0
      ...glue(parskip) 0.0 plus 1.0
      ...glue(baselineskip) 0.0
      ...hbox(22.0+6.60007)x345.0


      and this for the second:



      ...glue 20.0
      ...glue 0.0
      ...glue(parskip) 0.0 plus 1.0
      ...glue(lineskip) 1.0
      ...hbox(22.0+6.60007)x345.0


      the only difference being that in the first one TeX inserts baselineskip before the contents and in the second it inserts a lineskip.



      Why does it do that? And how to do otherwise?







      spacing vertical-alignment tex-core boxes






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 21 mins ago









      Phelype OleinikPhelype Oleinik

      24.4k54688




      24.4k54688




















          1 Answer
          1






          active

          oldest

          votes


















          0














          You have used a vbox so the reference point is at the bottom line so the box has height 22pt, as this is already more than baselineskip tex can not ensure baselineskip space between the reference point of the previous node and that of the box being added so it inserts lineskip instead. You could use a vtop instead, which makes it easier to get the correct space at the start (and harder to get the correct space after)





          share






















            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%2f480365%2fhow-to-get-baselineskip-instead-of-lineskip-when-using-a-stored-box%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









            0














            You have used a vbox so the reference point is at the bottom line so the box has height 22pt, as this is already more than baselineskip tex can not ensure baselineskip space between the reference point of the previous node and that of the box being added so it inserts lineskip instead. You could use a vtop instead, which makes it easier to get the correct space at the start (and harder to get the correct space after)





            share



























              0














              You have used a vbox so the reference point is at the bottom line so the box has height 22pt, as this is already more than baselineskip tex can not ensure baselineskip space between the reference point of the previous node and that of the box being added so it inserts lineskip instead. You could use a vtop instead, which makes it easier to get the correct space at the start (and harder to get the correct space after)





              share

























                0












                0








                0







                You have used a vbox so the reference point is at the bottom line so the box has height 22pt, as this is already more than baselineskip tex can not ensure baselineskip space between the reference point of the previous node and that of the box being added so it inserts lineskip instead. You could use a vtop instead, which makes it easier to get the correct space at the start (and harder to get the correct space after)





                share













                You have used a vbox so the reference point is at the bottom line so the box has height 22pt, as this is already more than baselineskip tex can not ensure baselineskip space between the reference point of the previous node and that of the box being added so it inserts lineskip instead. You could use a vtop instead, which makes it easier to get the correct space at the start (and harder to get the correct space after)






                share











                share


                share










                answered 3 mins ago









                David CarlisleDavid Carlisle

                495k4111381886




                495k4111381886



























                    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%2f480365%2fhow-to-get-baselineskip-instead-of-lineskip-when-using-a-stored-box%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

                    acmart: Multiple authors: all with same affiliation, one author an additional affiliationHow to Write Names of Multiple Authors with Shared Affiliation in ACM 2017 Template?Multiple authors with different primary affiliation, but same additional affiliationSame affiliation for all authors without extra packagesIOS-Book-Article.cls: one author with multiple affiliationacmart: Shared Author AffiliationMultiple authors with different primary affiliation, but same additional affiliationAuthor affiliation with only 1 authorAdding Multiple Authors with Different Affiliation in LaTeX ArticleLaTeX: Multiple authors stays on same lineHow to Label Multiple Authors with Same DescriptionHow to make two authors use the same affiliationTwo authors with same affiliation on finished front page

                    How to write “ä” and other umlauts and accented letters in bibliography?Accents in BibTeXSorting references with special characters alphabeticallyUse ae ligature in bibliographyEastern European nameInverted circumflex in BibTexBibTex, non-ascii initials and nameptr fproblems with accent in LatexHow to add a Ø to my bibliography from Jabref?References without accentsTroubles when trying to cite St“omer-Verlet in ”title" field of a bib entryComprehensive list of accented charactersHow to type the letter “i” with two dots (diaeresis) in math mode?Problem with glossary text and accented lettersSpecial character in bibliographyAccented letters, Unicode and LaTeX accentsHow to stop natbib from modifying bibliography styleCitation of a paper with non-standard characters by BibtexWrite accented characters to file using writeHow to group the bibliography alphabetically, if some surnames start with “accented” characters?How can I automatically capitalize significant words in my bibliography?

                    Problem using RevTeX4-1 with “! Undefined control sequence. @bibitemShut”