Vertical centering with multirow and tables The Next CEO of Stack OverflowVertical centering in multirow table cellsColor and rules in tables with multirowVertical alignment in tables without multirowNot vertical centering in multirow at newlineVertical centering with multirowTable with multirow vertical arrow and textHelp with tables and multirowTop Vertical Alignment with MultirowCentering columns in xtabular with multicolumn and multirowVertical Centering in Tables
Planeswalker Ability and Death Timing
MT "will strike" & LXX "will watch carefully" (Gen 3:15)?
Free fall ellipse or parabola?
Is the offspring between a demon and a celestial possible? If so what is it called and is it in a book somewhere?
Is it OK to decorate a log book cover?
Compilation of a 2d array and a 1d array
How to pronounce fünf in 45
Can Sri Krishna be called 'a person'?
Creating a script with console commands
The sum of any ten consecutive numbers from a fibonacci sequence is divisible by 11
What is the difference between 'contrib' and 'non-free' packages repositories?
What day is it again?
Incomplete cube
Can you teleport closer to a creature you are Frightened of?
What happens if you break a law in another country outside of that country?
Is it correct to say moon starry nights?
How does a dynamic QR code work?
Variance of Monte Carlo integration with importance sampling
Is it okay to majorly distort historical facts while writing a fiction story?
Find a path from s to t using as few red nodes as possible
Does the Idaho Potato Commission associate potato skins with healthy eating?
Why do we say “un seul M” and not “une seule M” even though M is a “consonne”?
How do I keep Mac Emacs from trapping M-`?
My ex-girlfriend uses my Apple ID to login to her iPad, do I have to give her my Apple ID password to reset it?
Vertical centering with multirow and tables
The Next CEO of Stack OverflowVertical centering in multirow table cellsColor and rules in tables with multirowVertical alignment in tables without multirowNot vertical centering in multirow at newlineVertical centering with multirowTable with multirow vertical arrow and textHelp with tables and multirowTop Vertical Alignment with MultirowCentering columns in xtabular with multicolumn and multirowVertical Centering in Tables
I am trying to figure something out that I can't find the answer to.
I am trying to create a table where some cells in a row need to have multiple rows. I thought "multirow" would allow me to do this, which it does, but it incorrectly vertically centers the data that spans multiple rows. See the attached figure - it ends up being too high.
I realize that in the example I sent, I can just use 3 rows with the top and bottom being empty but in the case of having an even number of split rows, that method isn't possible. I also looked at the documentation for multirow and they specify that there is a finetuning parameter where you can adjust its height manually. I do not want to do this because if I am off even by a little bit it won't line up. Plus I figured there would be a better way.
Here is a MWE
documentclass[12pt,a4paper,twoside]report
%usepackage[latin1]inputenc % shouldn't you be using 'utf8'?
usepackageamsmath
%%%usepackageamsfonts % is loaded automatically by 'amssymb'
usepackageamssymb
usepackagegraphicx
usepackagemultirow
usepackagearray
newcolumntypeM[1]>centeringarraybackslashm#1textwidth
setlengthtextheight9in % Height of the main body of the text
setlengthtopmargin-.5in % .5" margin on top of page
setlengthheadsep.5in % space between header and top of body
addtolengthheadsep-headheight % See The LaTeX Companion, p 85
setlengthfootskip.5in % space between footer and bottom of body
setlengthtextwidth6.25in % width of the body of the text
setlengthoddsidemargin.25in % 1.25" margin on the left for odd pages
setlengthevensidemargin0in % 1.25" margin on the right for even pages
% Marginal notes
setlengthmarginparwidth.75in % width of marginal notes
setlengthmarginparsep.125in % space between marginal notes and text
usepackagebooktabs
begindocument
begintable[ht]
renewcommandarraystretch1.5
setlengthtabcolsep0pt
caption[A caption]A caption
labeltab-brachy-review
footnotesize
begintabular*textwidth@extracolsepfill%
M0.1M0.14M0.13M0.15M0.13M0.14M0.085M0.125
Refs & Site & Method & Sample Size & fractions & Delay (days) & BF and Perm & test \ midrule
Janssen & Te & 1 & 23 & 25 / 5 & Day 5textsuperscripta & Increase & NSC \ midrule
multirow3*Coolens & multirow3*Li & multirow3*2 & multirow3*6 & multirow3*30-54 / 6 & Day 3textsuperscripta & Increase & Increase \ cmidrule6-8
& & & & & 30 & Decrease & NSC \ cmidrule6-8
& & & & & 60 & Decrease & NSC \ cmidrule6-8
Janssen & Te & 1 & 23 & 25 / 5 & Day 5textsuperscripta & Increase & NSC \ bottomrule
endtabular*
endtable
enddocument
tables multirow
add a comment |
I am trying to figure something out that I can't find the answer to.
I am trying to create a table where some cells in a row need to have multiple rows. I thought "multirow" would allow me to do this, which it does, but it incorrectly vertically centers the data that spans multiple rows. See the attached figure - it ends up being too high.
I realize that in the example I sent, I can just use 3 rows with the top and bottom being empty but in the case of having an even number of split rows, that method isn't possible. I also looked at the documentation for multirow and they specify that there is a finetuning parameter where you can adjust its height manually. I do not want to do this because if I am off even by a little bit it won't line up. Plus I figured there would be a better way.
Here is a MWE
documentclass[12pt,a4paper,twoside]report
%usepackage[latin1]inputenc % shouldn't you be using 'utf8'?
usepackageamsmath
%%%usepackageamsfonts % is loaded automatically by 'amssymb'
usepackageamssymb
usepackagegraphicx
usepackagemultirow
usepackagearray
newcolumntypeM[1]>centeringarraybackslashm#1textwidth
setlengthtextheight9in % Height of the main body of the text
setlengthtopmargin-.5in % .5" margin on top of page
setlengthheadsep.5in % space between header and top of body
addtolengthheadsep-headheight % See The LaTeX Companion, p 85
setlengthfootskip.5in % space between footer and bottom of body
setlengthtextwidth6.25in % width of the body of the text
setlengthoddsidemargin.25in % 1.25" margin on the left for odd pages
setlengthevensidemargin0in % 1.25" margin on the right for even pages
% Marginal notes
setlengthmarginparwidth.75in % width of marginal notes
setlengthmarginparsep.125in % space between marginal notes and text
usepackagebooktabs
begindocument
begintable[ht]
renewcommandarraystretch1.5
setlengthtabcolsep0pt
caption[A caption]A caption
labeltab-brachy-review
footnotesize
begintabular*textwidth@extracolsepfill%
M0.1M0.14M0.13M0.15M0.13M0.14M0.085M0.125
Refs & Site & Method & Sample Size & fractions & Delay (days) & BF and Perm & test \ midrule
Janssen & Te & 1 & 23 & 25 / 5 & Day 5textsuperscripta & Increase & NSC \ midrule
multirow3*Coolens & multirow3*Li & multirow3*2 & multirow3*6 & multirow3*30-54 / 6 & Day 3textsuperscripta & Increase & Increase \ cmidrule6-8
& & & & & 30 & Decrease & NSC \ cmidrule6-8
& & & & & 60 & Decrease & NSC \ cmidrule6-8
Janssen & Te & 1 & 23 & 25 / 5 & Day 5textsuperscripta & Increase & NSC \ bottomrule
endtabular*
endtable
enddocument
tables multirow
add a comment |
I am trying to figure something out that I can't find the answer to.
I am trying to create a table where some cells in a row need to have multiple rows. I thought "multirow" would allow me to do this, which it does, but it incorrectly vertically centers the data that spans multiple rows. See the attached figure - it ends up being too high.
I realize that in the example I sent, I can just use 3 rows with the top and bottom being empty but in the case of having an even number of split rows, that method isn't possible. I also looked at the documentation for multirow and they specify that there is a finetuning parameter where you can adjust its height manually. I do not want to do this because if I am off even by a little bit it won't line up. Plus I figured there would be a better way.
Here is a MWE
documentclass[12pt,a4paper,twoside]report
%usepackage[latin1]inputenc % shouldn't you be using 'utf8'?
usepackageamsmath
%%%usepackageamsfonts % is loaded automatically by 'amssymb'
usepackageamssymb
usepackagegraphicx
usepackagemultirow
usepackagearray
newcolumntypeM[1]>centeringarraybackslashm#1textwidth
setlengthtextheight9in % Height of the main body of the text
setlengthtopmargin-.5in % .5" margin on top of page
setlengthheadsep.5in % space between header and top of body
addtolengthheadsep-headheight % See The LaTeX Companion, p 85
setlengthfootskip.5in % space between footer and bottom of body
setlengthtextwidth6.25in % width of the body of the text
setlengthoddsidemargin.25in % 1.25" margin on the left for odd pages
setlengthevensidemargin0in % 1.25" margin on the right for even pages
% Marginal notes
setlengthmarginparwidth.75in % width of marginal notes
setlengthmarginparsep.125in % space between marginal notes and text
usepackagebooktabs
begindocument
begintable[ht]
renewcommandarraystretch1.5
setlengthtabcolsep0pt
caption[A caption]A caption
labeltab-brachy-review
footnotesize
begintabular*textwidth@extracolsepfill%
M0.1M0.14M0.13M0.15M0.13M0.14M0.085M0.125
Refs & Site & Method & Sample Size & fractions & Delay (days) & BF and Perm & test \ midrule
Janssen & Te & 1 & 23 & 25 / 5 & Day 5textsuperscripta & Increase & NSC \ midrule
multirow3*Coolens & multirow3*Li & multirow3*2 & multirow3*6 & multirow3*30-54 / 6 & Day 3textsuperscripta & Increase & Increase \ cmidrule6-8
& & & & & 30 & Decrease & NSC \ cmidrule6-8
& & & & & 60 & Decrease & NSC \ cmidrule6-8
Janssen & Te & 1 & 23 & 25 / 5 & Day 5textsuperscripta & Increase & NSC \ bottomrule
endtabular*
endtable
enddocument
tables multirow
I am trying to figure something out that I can't find the answer to.
I am trying to create a table where some cells in a row need to have multiple rows. I thought "multirow" would allow me to do this, which it does, but it incorrectly vertically centers the data that spans multiple rows. See the attached figure - it ends up being too high.
I realize that in the example I sent, I can just use 3 rows with the top and bottom being empty but in the case of having an even number of split rows, that method isn't possible. I also looked at the documentation for multirow and they specify that there is a finetuning parameter where you can adjust its height manually. I do not want to do this because if I am off even by a little bit it won't line up. Plus I figured there would be a better way.
Here is a MWE
documentclass[12pt,a4paper,twoside]report
%usepackage[latin1]inputenc % shouldn't you be using 'utf8'?
usepackageamsmath
%%%usepackageamsfonts % is loaded automatically by 'amssymb'
usepackageamssymb
usepackagegraphicx
usepackagemultirow
usepackagearray
newcolumntypeM[1]>centeringarraybackslashm#1textwidth
setlengthtextheight9in % Height of the main body of the text
setlengthtopmargin-.5in % .5" margin on top of page
setlengthheadsep.5in % space between header and top of body
addtolengthheadsep-headheight % See The LaTeX Companion, p 85
setlengthfootskip.5in % space between footer and bottom of body
setlengthtextwidth6.25in % width of the body of the text
setlengthoddsidemargin.25in % 1.25" margin on the left for odd pages
setlengthevensidemargin0in % 1.25" margin on the right for even pages
% Marginal notes
setlengthmarginparwidth.75in % width of marginal notes
setlengthmarginparsep.125in % space between marginal notes and text
usepackagebooktabs
begindocument
begintable[ht]
renewcommandarraystretch1.5
setlengthtabcolsep0pt
caption[A caption]A caption
labeltab-brachy-review
footnotesize
begintabular*textwidth@extracolsepfill%
M0.1M0.14M0.13M0.15M0.13M0.14M0.085M0.125
Refs & Site & Method & Sample Size & fractions & Delay (days) & BF and Perm & test \ midrule
Janssen & Te & 1 & 23 & 25 / 5 & Day 5textsuperscripta & Increase & NSC \ midrule
multirow3*Coolens & multirow3*Li & multirow3*2 & multirow3*6 & multirow3*30-54 / 6 & Day 3textsuperscripta & Increase & Increase \ cmidrule6-8
& & & & & 30 & Decrease & NSC \ cmidrule6-8
& & & & & 60 & Decrease & NSC \ cmidrule6-8
Janssen & Te & 1 & 23 & 25 / 5 & Day 5textsuperscripta & Increase & NSC \ bottomrule
endtabular*
endtable
enddocument
tables multirow
tables multirow
asked 5 mins ago
thatguy14thatguy14
203
203
add a comment |
add a comment |
0
active
oldest
votes
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%2f482669%2fvertical-centering-with-multirow-and-tables%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
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%2f482669%2fvertical-centering-with-multirow-and-tables%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