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
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
add a comment |
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
add a comment |
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
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
spacing vertical-alignment tex-core boxes
asked 21 mins ago
Phelype OleinikPhelype Oleinik
24.4k54688
24.4k54688
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
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)
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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)
add a comment |
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)
add a comment |
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)
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)
answered 3 mins ago
David CarlisleDavid Carlisle
495k4111381886
495k4111381886
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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