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










0















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.enter image description here



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








share


























    0















    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.enter image description here



    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








    share
























      0












      0








      0








      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.enter image description here



      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








      share














      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.enter image description here



      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





      share












      share










      share



      share










      asked 5 mins ago









      thatguy14thatguy14

      203




      203




















          0






          active

          oldest

          votes












          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%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















          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%2f482669%2fvertical-centering-with-multirow-and-tables%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 should I use the fbox command correctly to avoid producing a Bad Box message?How to put a long piece of text in a box?How to specify height and width of fboxIs there an arrayrulecolor-like command to change the rule color of fbox?What is the command to highlight bad boxes in pdf?Why does fbox sometimes place the box *over* the graphic image?how to put the text in the boxHow to create command for a box where text inside the box can automatically adjust?how can I make an fbox like command with certain color, shape and width of border?how to use fbox in align modeFbox increase the spacing between the box and it content (inner margin)how to change the box height of an equationWhat is the use of the hbox in a newcommand command?

          152 Atala Notae | Nexus externi | Tabula navigationis"Discovery Circumstances: Numbered Minor Planets"2000152Small-Body Database

          Doxepinum Nexus interni Notae | Tabula navigationis3158DB01142WHOa682390"Structural Analysis of the Histamine H1 Receptor""Transdermal and Topical Drug Administration in the Treatment of Pain""Antidepressants as antipruritic agents: A review"