Lack of spacing in a complex table structure












1















Following this post, I have another table in latex:



documentclass{article}
usepackage[utf8]{inputenc}

usepackage{mathtools}
usepackage{tabularx}
usepackage[math]{cellspace}
setlength{cellspacetoplimit}{3pt}
setlength{cellspacebottomlimit}{3pt}
newcolumntype{?}{!{vrule width 3pt}}
usepackage{makecell}

begin{document}

begin{table*}[!t]
footnotesize
centering
caption{Example of a table}
label{sth}
begin{tabular}{>{$}Sc<{$}|>{$}Sc<{$}|>{$}Sc<{$}|>{$}Sc<{$}|>{$}Sc<{$}|>{$}Sc<{$}?>{$}Sc<{$}|>{$}Sc<{$}|>{$}Sc<{$}|>{$}Sc<{$}|>{$}Sc<{$}|}
cline{2-11}
& multicolumn{5}{c?}{X^{tr} (mathrm{english text})} & multicolumn{5}{c|}{Y^{yu} (mathrm{english text})} \ cline{2-11}
multirow{-2}{*}{} & mathscr{A}_1 & mathscr{A}_2 & mathscr{A}_3 & mathscr{A}_4 & mathscr{A}_5 & mathscr{A}_1 & mathscr{A}_2 & mathscr{A}_3 & mathscr{A}_4 & mathscr{A}_5 \ hline
multicolumn{1}{|c|}{1} & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 \ hline
multicolumn{1}{|c|}{2} & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 \ hline
end{tabular}
end{table*}

end{document}


enter image description here



I have multiple problems with my effort.




  1. why does -2* appear in the first column?

  2. I tried to get rid of vertical and horizontal lines but I need to retain a bold black divider in the middle. so, I don't know which lines to delete.

  3. the formulas are blurring into the lines so should I remove lines. I tried to give an extra gap around each box. is there a better way? my method does not seem to work for the first row at the top.

  4. The "english text" does not appear in the second row as it should with space in between. what I tried is to write everything in the table as a math formula but this is generating errors. can someone sort this out?

  5. In the second row, the A should appear as a script capital. That is not happening.


Mainly I need help to make this table more readable and resolve the error messages that are generated. Please suggest changes.










share|improve this question

























  • The multirow{-2}{*}{} directive appears to be at fault. What exactly is it supposed to do?

    – Mico
    Mar 14 at 0:31
















1















Following this post, I have another table in latex:



documentclass{article}
usepackage[utf8]{inputenc}

usepackage{mathtools}
usepackage{tabularx}
usepackage[math]{cellspace}
setlength{cellspacetoplimit}{3pt}
setlength{cellspacebottomlimit}{3pt}
newcolumntype{?}{!{vrule width 3pt}}
usepackage{makecell}

begin{document}

begin{table*}[!t]
footnotesize
centering
caption{Example of a table}
label{sth}
begin{tabular}{>{$}Sc<{$}|>{$}Sc<{$}|>{$}Sc<{$}|>{$}Sc<{$}|>{$}Sc<{$}|>{$}Sc<{$}?>{$}Sc<{$}|>{$}Sc<{$}|>{$}Sc<{$}|>{$}Sc<{$}|>{$}Sc<{$}|}
cline{2-11}
& multicolumn{5}{c?}{X^{tr} (mathrm{english text})} & multicolumn{5}{c|}{Y^{yu} (mathrm{english text})} \ cline{2-11}
multirow{-2}{*}{} & mathscr{A}_1 & mathscr{A}_2 & mathscr{A}_3 & mathscr{A}_4 & mathscr{A}_5 & mathscr{A}_1 & mathscr{A}_2 & mathscr{A}_3 & mathscr{A}_4 & mathscr{A}_5 \ hline
multicolumn{1}{|c|}{1} & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 \ hline
multicolumn{1}{|c|}{2} & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 \ hline
end{tabular}
end{table*}

end{document}


enter image description here



I have multiple problems with my effort.




  1. why does -2* appear in the first column?

  2. I tried to get rid of vertical and horizontal lines but I need to retain a bold black divider in the middle. so, I don't know which lines to delete.

  3. the formulas are blurring into the lines so should I remove lines. I tried to give an extra gap around each box. is there a better way? my method does not seem to work for the first row at the top.

  4. The "english text" does not appear in the second row as it should with space in between. what I tried is to write everything in the table as a math formula but this is generating errors. can someone sort this out?

  5. In the second row, the A should appear as a script capital. That is not happening.


Mainly I need help to make this table more readable and resolve the error messages that are generated. Please suggest changes.










share|improve this question

























  • The multirow{-2}{*}{} directive appears to be at fault. What exactly is it supposed to do?

    – Mico
    Mar 14 at 0:31














1












1








1








Following this post, I have another table in latex:



documentclass{article}
usepackage[utf8]{inputenc}

usepackage{mathtools}
usepackage{tabularx}
usepackage[math]{cellspace}
setlength{cellspacetoplimit}{3pt}
setlength{cellspacebottomlimit}{3pt}
newcolumntype{?}{!{vrule width 3pt}}
usepackage{makecell}

begin{document}

begin{table*}[!t]
footnotesize
centering
caption{Example of a table}
label{sth}
begin{tabular}{>{$}Sc<{$}|>{$}Sc<{$}|>{$}Sc<{$}|>{$}Sc<{$}|>{$}Sc<{$}|>{$}Sc<{$}?>{$}Sc<{$}|>{$}Sc<{$}|>{$}Sc<{$}|>{$}Sc<{$}|>{$}Sc<{$}|}
cline{2-11}
& multicolumn{5}{c?}{X^{tr} (mathrm{english text})} & multicolumn{5}{c|}{Y^{yu} (mathrm{english text})} \ cline{2-11}
multirow{-2}{*}{} & mathscr{A}_1 & mathscr{A}_2 & mathscr{A}_3 & mathscr{A}_4 & mathscr{A}_5 & mathscr{A}_1 & mathscr{A}_2 & mathscr{A}_3 & mathscr{A}_4 & mathscr{A}_5 \ hline
multicolumn{1}{|c|}{1} & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 \ hline
multicolumn{1}{|c|}{2} & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 \ hline
end{tabular}
end{table*}

end{document}


enter image description here



I have multiple problems with my effort.




  1. why does -2* appear in the first column?

  2. I tried to get rid of vertical and horizontal lines but I need to retain a bold black divider in the middle. so, I don't know which lines to delete.

  3. the formulas are blurring into the lines so should I remove lines. I tried to give an extra gap around each box. is there a better way? my method does not seem to work for the first row at the top.

  4. The "english text" does not appear in the second row as it should with space in between. what I tried is to write everything in the table as a math formula but this is generating errors. can someone sort this out?

  5. In the second row, the A should appear as a script capital. That is not happening.


Mainly I need help to make this table more readable and resolve the error messages that are generated. Please suggest changes.










share|improve this question
















Following this post, I have another table in latex:



documentclass{article}
usepackage[utf8]{inputenc}

usepackage{mathtools}
usepackage{tabularx}
usepackage[math]{cellspace}
setlength{cellspacetoplimit}{3pt}
setlength{cellspacebottomlimit}{3pt}
newcolumntype{?}{!{vrule width 3pt}}
usepackage{makecell}

begin{document}

begin{table*}[!t]
footnotesize
centering
caption{Example of a table}
label{sth}
begin{tabular}{>{$}Sc<{$}|>{$}Sc<{$}|>{$}Sc<{$}|>{$}Sc<{$}|>{$}Sc<{$}|>{$}Sc<{$}?>{$}Sc<{$}|>{$}Sc<{$}|>{$}Sc<{$}|>{$}Sc<{$}|>{$}Sc<{$}|}
cline{2-11}
& multicolumn{5}{c?}{X^{tr} (mathrm{english text})} & multicolumn{5}{c|}{Y^{yu} (mathrm{english text})} \ cline{2-11}
multirow{-2}{*}{} & mathscr{A}_1 & mathscr{A}_2 & mathscr{A}_3 & mathscr{A}_4 & mathscr{A}_5 & mathscr{A}_1 & mathscr{A}_2 & mathscr{A}_3 & mathscr{A}_4 & mathscr{A}_5 \ hline
multicolumn{1}{|c|}{1} & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 \ hline
multicolumn{1}{|c|}{2} & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 \ hline
end{tabular}
end{table*}

end{document}


enter image description here



I have multiple problems with my effort.




  1. why does -2* appear in the first column?

  2. I tried to get rid of vertical and horizontal lines but I need to retain a bold black divider in the middle. so, I don't know which lines to delete.

  3. the formulas are blurring into the lines so should I remove lines. I tried to give an extra gap around each box. is there a better way? my method does not seem to work for the first row at the top.

  4. The "english text" does not appear in the second row as it should with space in between. what I tried is to write everything in the table as a math formula but this is generating errors. can someone sort this out?

  5. In the second row, the A should appear as a script capital. That is not happening.


Mainly I need help to make this table more readable and resolve the error messages that are generated. Please suggest changes.







tables






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 14 at 0:39









Mico

284k31388778




284k31388778










asked Mar 14 at 0:23









user_1_1_1user_1_1_1

1826




1826













  • The multirow{-2}{*}{} directive appears to be at fault. What exactly is it supposed to do?

    – Mico
    Mar 14 at 0:31



















  • The multirow{-2}{*}{} directive appears to be at fault. What exactly is it supposed to do?

    – Mico
    Mar 14 at 0:31

















The multirow{-2}{*}{} directive appears to be at fault. What exactly is it supposed to do?

– Mico
Mar 14 at 0:31





The multirow{-2}{*}{} directive appears to be at fault. What exactly is it supposed to do?

– Mico
Mar 14 at 0:31










2 Answers
2






active

oldest

votes


















2














Some comments and observations:




  • Since virtually all of the table's material is supposed to be in math mode, use an array environment instead of a tabular environment.


  • The c column type would appear to be appropriate for all 11 columns. The cellspace package does have its uses. For the present table, though, to employ its machinery appears to be overkill.


  • To reduce the overall width of the table, change the value of arraycolsep (assuming you've followed my advice to use an array environment). The default value of this parameter is 5pt; in the example below, I set it to 2.5pt.


  • The "-2" string appears because of the multirow{-2}{*}{} directive. What is it supposed to achieve? The table does just fine without it.


  • Your table is ok without any vertical lines. Really. See below.


  • Use the line-drawing macros of the booktabs package instead of hline and cline.


  • Don't use mathrm; use either text{...} or textnormal{...}.


  • To make the mathscr macro behave as expected, load a package that provides a math-script math alphabet. Try the mathrsfs package.



enter image description here



documentclass{article}
usepackage[utf8]{inputenc}

usepackage{mathtools,array,mathrsfs,booktabs}
usepackage[skip=0.333baselineskip]{caption} % optional
newcommandmsA{mathscr{A}}
begin{document}

begin{table}[!t]
setlengtharraycolsep{2.5pt} % default value: 5pt
footnotesize
captionsetup{font=footnotesize} % optional
centering
caption{Example of a table}
label{sth}
$begin{array}{@{}*{11}{c}@{}}
toprule
& multicolumn{5}{c}{X^{tr} (textnormal{english text})}
& multicolumn{5}{c@{}}{Y^{yu} (text{english text})} \
cmidrule(lr){2-6} cmidrule(l){7-11}
& msA_1 & msA_2 & msA_3 & msA_4 & msA_5
& msA_1 & msA_2 & msA_3 & msA_4 & msA_5 \
midrule
1 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35
& 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 \
2 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35
& 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 \
bottomrule
end{array}$
end{table}

end{document}





share|improve this answer































    0














    Is this what you want?





    If it is here's the code:



    %!TEX TS-program = xelatex
    %!TEX encoding = UTF-8 Unicode

    documentclass{article}
    usepackage[utf8]{inputenc}

    usepackage{mathtools}
    usepackage{multirow}
    usepackage{tabularx}
    usepackage[math]{cellspace}
    usepackage{unicode-math}
    setmathfont{XITS Math}
    setmathfont[version=setB,StylisticSet=1]{XITS Math}
    setlength{cellspacetoplimit}{3pt}
    setlength{cellspacebottomlimit}{3pt}

    usepackage{makecell}

    begin{document}
    newcolumntype{?}{!{vrule width 3pt}}
    begin{table}[!t]
    footnotesize
    centering
    caption{Example of a table}
    label{sth}
    begin{tabular}{>{$}Sc<{$}>{$}Sc<{$}>{$}Sc<{$}>{$}Sc<{$}>{$}Sc<{$}>{$}Sc<{$}?>{$}Sc<{$}>{$}Sc<{$}>{$}Sc<{$}>{$}Sc<{$}>{$}Sc<{$}}
    & multicolumn{5}{c?}{$X^{tr} (mathrm{english text})$} & multicolumn{5}{c}{$Y^{yu} (mathrm{english text})$} \
    & mathscr{A}_1 & mathscr{A}_ 2 & mathscr{A}_3 & mathscr{A}_4 & mathscr{A}_5 & mathscr{A}_1 & mathscr{A}_2 & mathscr{A}_3 & mathscr{A}_4 & mathscr{A}_5 \
    multicolumn{1}{c}{1} & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 \
    multicolumn{1}{c}{2} & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 \
    end{tabular}
    end{table}

    end{document}



    1. Because of the multirow{-2}{*}{}. Your code wasn't compiling because you didn't had the package multirow.


    2. Delete all the |.


    3. Your choice


    4. It's because it's in math mode, so you need to manually add a space, using ,


    5. You hadn't defined the command to make the letters in script mode.







    share|improve this answer























      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%2f479381%2flack-of-spacing-in-a-complex-table-structure%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









      2














      Some comments and observations:




      • Since virtually all of the table's material is supposed to be in math mode, use an array environment instead of a tabular environment.


      • The c column type would appear to be appropriate for all 11 columns. The cellspace package does have its uses. For the present table, though, to employ its machinery appears to be overkill.


      • To reduce the overall width of the table, change the value of arraycolsep (assuming you've followed my advice to use an array environment). The default value of this parameter is 5pt; in the example below, I set it to 2.5pt.


      • The "-2" string appears because of the multirow{-2}{*}{} directive. What is it supposed to achieve? The table does just fine without it.


      • Your table is ok without any vertical lines. Really. See below.


      • Use the line-drawing macros of the booktabs package instead of hline and cline.


      • Don't use mathrm; use either text{...} or textnormal{...}.


      • To make the mathscr macro behave as expected, load a package that provides a math-script math alphabet. Try the mathrsfs package.



      enter image description here



      documentclass{article}
      usepackage[utf8]{inputenc}

      usepackage{mathtools,array,mathrsfs,booktabs}
      usepackage[skip=0.333baselineskip]{caption} % optional
      newcommandmsA{mathscr{A}}
      begin{document}

      begin{table}[!t]
      setlengtharraycolsep{2.5pt} % default value: 5pt
      footnotesize
      captionsetup{font=footnotesize} % optional
      centering
      caption{Example of a table}
      label{sth}
      $begin{array}{@{}*{11}{c}@{}}
      toprule
      & multicolumn{5}{c}{X^{tr} (textnormal{english text})}
      & multicolumn{5}{c@{}}{Y^{yu} (text{english text})} \
      cmidrule(lr){2-6} cmidrule(l){7-11}
      & msA_1 & msA_2 & msA_3 & msA_4 & msA_5
      & msA_1 & msA_2 & msA_3 & msA_4 & msA_5 \
      midrule
      1 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35
      & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 \
      2 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35
      & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 \
      bottomrule
      end{array}$
      end{table}

      end{document}





      share|improve this answer




























        2














        Some comments and observations:




        • Since virtually all of the table's material is supposed to be in math mode, use an array environment instead of a tabular environment.


        • The c column type would appear to be appropriate for all 11 columns. The cellspace package does have its uses. For the present table, though, to employ its machinery appears to be overkill.


        • To reduce the overall width of the table, change the value of arraycolsep (assuming you've followed my advice to use an array environment). The default value of this parameter is 5pt; in the example below, I set it to 2.5pt.


        • The "-2" string appears because of the multirow{-2}{*}{} directive. What is it supposed to achieve? The table does just fine without it.


        • Your table is ok without any vertical lines. Really. See below.


        • Use the line-drawing macros of the booktabs package instead of hline and cline.


        • Don't use mathrm; use either text{...} or textnormal{...}.


        • To make the mathscr macro behave as expected, load a package that provides a math-script math alphabet. Try the mathrsfs package.



        enter image description here



        documentclass{article}
        usepackage[utf8]{inputenc}

        usepackage{mathtools,array,mathrsfs,booktabs}
        usepackage[skip=0.333baselineskip]{caption} % optional
        newcommandmsA{mathscr{A}}
        begin{document}

        begin{table}[!t]
        setlengtharraycolsep{2.5pt} % default value: 5pt
        footnotesize
        captionsetup{font=footnotesize} % optional
        centering
        caption{Example of a table}
        label{sth}
        $begin{array}{@{}*{11}{c}@{}}
        toprule
        & multicolumn{5}{c}{X^{tr} (textnormal{english text})}
        & multicolumn{5}{c@{}}{Y^{yu} (text{english text})} \
        cmidrule(lr){2-6} cmidrule(l){7-11}
        & msA_1 & msA_2 & msA_3 & msA_4 & msA_5
        & msA_1 & msA_2 & msA_3 & msA_4 & msA_5 \
        midrule
        1 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35
        & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 \
        2 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35
        & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 \
        bottomrule
        end{array}$
        end{table}

        end{document}





        share|improve this answer


























          2












          2








          2







          Some comments and observations:




          • Since virtually all of the table's material is supposed to be in math mode, use an array environment instead of a tabular environment.


          • The c column type would appear to be appropriate for all 11 columns. The cellspace package does have its uses. For the present table, though, to employ its machinery appears to be overkill.


          • To reduce the overall width of the table, change the value of arraycolsep (assuming you've followed my advice to use an array environment). The default value of this parameter is 5pt; in the example below, I set it to 2.5pt.


          • The "-2" string appears because of the multirow{-2}{*}{} directive. What is it supposed to achieve? The table does just fine without it.


          • Your table is ok without any vertical lines. Really. See below.


          • Use the line-drawing macros of the booktabs package instead of hline and cline.


          • Don't use mathrm; use either text{...} or textnormal{...}.


          • To make the mathscr macro behave as expected, load a package that provides a math-script math alphabet. Try the mathrsfs package.



          enter image description here



          documentclass{article}
          usepackage[utf8]{inputenc}

          usepackage{mathtools,array,mathrsfs,booktabs}
          usepackage[skip=0.333baselineskip]{caption} % optional
          newcommandmsA{mathscr{A}}
          begin{document}

          begin{table}[!t]
          setlengtharraycolsep{2.5pt} % default value: 5pt
          footnotesize
          captionsetup{font=footnotesize} % optional
          centering
          caption{Example of a table}
          label{sth}
          $begin{array}{@{}*{11}{c}@{}}
          toprule
          & multicolumn{5}{c}{X^{tr} (textnormal{english text})}
          & multicolumn{5}{c@{}}{Y^{yu} (text{english text})} \
          cmidrule(lr){2-6} cmidrule(l){7-11}
          & msA_1 & msA_2 & msA_3 & msA_4 & msA_5
          & msA_1 & msA_2 & msA_3 & msA_4 & msA_5 \
          midrule
          1 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35
          & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 \
          2 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35
          & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 \
          bottomrule
          end{array}$
          end{table}

          end{document}





          share|improve this answer













          Some comments and observations:




          • Since virtually all of the table's material is supposed to be in math mode, use an array environment instead of a tabular environment.


          • The c column type would appear to be appropriate for all 11 columns. The cellspace package does have its uses. For the present table, though, to employ its machinery appears to be overkill.


          • To reduce the overall width of the table, change the value of arraycolsep (assuming you've followed my advice to use an array environment). The default value of this parameter is 5pt; in the example below, I set it to 2.5pt.


          • The "-2" string appears because of the multirow{-2}{*}{} directive. What is it supposed to achieve? The table does just fine without it.


          • Your table is ok without any vertical lines. Really. See below.


          • Use the line-drawing macros of the booktabs package instead of hline and cline.


          • Don't use mathrm; use either text{...} or textnormal{...}.


          • To make the mathscr macro behave as expected, load a package that provides a math-script math alphabet. Try the mathrsfs package.



          enter image description here



          documentclass{article}
          usepackage[utf8]{inputenc}

          usepackage{mathtools,array,mathrsfs,booktabs}
          usepackage[skip=0.333baselineskip]{caption} % optional
          newcommandmsA{mathscr{A}}
          begin{document}

          begin{table}[!t]
          setlengtharraycolsep{2.5pt} % default value: 5pt
          footnotesize
          captionsetup{font=footnotesize} % optional
          centering
          caption{Example of a table}
          label{sth}
          $begin{array}{@{}*{11}{c}@{}}
          toprule
          & multicolumn{5}{c}{X^{tr} (textnormal{english text})}
          & multicolumn{5}{c@{}}{Y^{yu} (text{english text})} \
          cmidrule(lr){2-6} cmidrule(l){7-11}
          & msA_1 & msA_2 & msA_3 & msA_4 & msA_5
          & msA_1 & msA_2 & msA_3 & msA_4 & msA_5 \
          midrule
          1 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35
          & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 \
          2 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35
          & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 \
          bottomrule
          end{array}$
          end{table}

          end{document}






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Mar 14 at 0:52









          MicoMico

          284k31388778




          284k31388778























              0














              Is this what you want?





              If it is here's the code:



              %!TEX TS-program = xelatex
              %!TEX encoding = UTF-8 Unicode

              documentclass{article}
              usepackage[utf8]{inputenc}

              usepackage{mathtools}
              usepackage{multirow}
              usepackage{tabularx}
              usepackage[math]{cellspace}
              usepackage{unicode-math}
              setmathfont{XITS Math}
              setmathfont[version=setB,StylisticSet=1]{XITS Math}
              setlength{cellspacetoplimit}{3pt}
              setlength{cellspacebottomlimit}{3pt}

              usepackage{makecell}

              begin{document}
              newcolumntype{?}{!{vrule width 3pt}}
              begin{table}[!t]
              footnotesize
              centering
              caption{Example of a table}
              label{sth}
              begin{tabular}{>{$}Sc<{$}>{$}Sc<{$}>{$}Sc<{$}>{$}Sc<{$}>{$}Sc<{$}>{$}Sc<{$}?>{$}Sc<{$}>{$}Sc<{$}>{$}Sc<{$}>{$}Sc<{$}>{$}Sc<{$}}
              & multicolumn{5}{c?}{$X^{tr} (mathrm{english text})$} & multicolumn{5}{c}{$Y^{yu} (mathrm{english text})$} \
              & mathscr{A}_1 & mathscr{A}_ 2 & mathscr{A}_3 & mathscr{A}_4 & mathscr{A}_5 & mathscr{A}_1 & mathscr{A}_2 & mathscr{A}_3 & mathscr{A}_4 & mathscr{A}_5 \
              multicolumn{1}{c}{1} & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 \
              multicolumn{1}{c}{2} & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 \
              end{tabular}
              end{table}

              end{document}



              1. Because of the multirow{-2}{*}{}. Your code wasn't compiling because you didn't had the package multirow.


              2. Delete all the |.


              3. Your choice


              4. It's because it's in math mode, so you need to manually add a space, using ,


              5. You hadn't defined the command to make the letters in script mode.







              share|improve this answer




























                0














                Is this what you want?





                If it is here's the code:



                %!TEX TS-program = xelatex
                %!TEX encoding = UTF-8 Unicode

                documentclass{article}
                usepackage[utf8]{inputenc}

                usepackage{mathtools}
                usepackage{multirow}
                usepackage{tabularx}
                usepackage[math]{cellspace}
                usepackage{unicode-math}
                setmathfont{XITS Math}
                setmathfont[version=setB,StylisticSet=1]{XITS Math}
                setlength{cellspacetoplimit}{3pt}
                setlength{cellspacebottomlimit}{3pt}

                usepackage{makecell}

                begin{document}
                newcolumntype{?}{!{vrule width 3pt}}
                begin{table}[!t]
                footnotesize
                centering
                caption{Example of a table}
                label{sth}
                begin{tabular}{>{$}Sc<{$}>{$}Sc<{$}>{$}Sc<{$}>{$}Sc<{$}>{$}Sc<{$}>{$}Sc<{$}?>{$}Sc<{$}>{$}Sc<{$}>{$}Sc<{$}>{$}Sc<{$}>{$}Sc<{$}}
                & multicolumn{5}{c?}{$X^{tr} (mathrm{english text})$} & multicolumn{5}{c}{$Y^{yu} (mathrm{english text})$} \
                & mathscr{A}_1 & mathscr{A}_ 2 & mathscr{A}_3 & mathscr{A}_4 & mathscr{A}_5 & mathscr{A}_1 & mathscr{A}_2 & mathscr{A}_3 & mathscr{A}_4 & mathscr{A}_5 \
                multicolumn{1}{c}{1} & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 \
                multicolumn{1}{c}{2} & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 \
                end{tabular}
                end{table}

                end{document}



                1. Because of the multirow{-2}{*}{}. Your code wasn't compiling because you didn't had the package multirow.


                2. Delete all the |.


                3. Your choice


                4. It's because it's in math mode, so you need to manually add a space, using ,


                5. You hadn't defined the command to make the letters in script mode.







                share|improve this answer


























                  0












                  0








                  0







                  Is this what you want?





                  If it is here's the code:



                  %!TEX TS-program = xelatex
                  %!TEX encoding = UTF-8 Unicode

                  documentclass{article}
                  usepackage[utf8]{inputenc}

                  usepackage{mathtools}
                  usepackage{multirow}
                  usepackage{tabularx}
                  usepackage[math]{cellspace}
                  usepackage{unicode-math}
                  setmathfont{XITS Math}
                  setmathfont[version=setB,StylisticSet=1]{XITS Math}
                  setlength{cellspacetoplimit}{3pt}
                  setlength{cellspacebottomlimit}{3pt}

                  usepackage{makecell}

                  begin{document}
                  newcolumntype{?}{!{vrule width 3pt}}
                  begin{table}[!t]
                  footnotesize
                  centering
                  caption{Example of a table}
                  label{sth}
                  begin{tabular}{>{$}Sc<{$}>{$}Sc<{$}>{$}Sc<{$}>{$}Sc<{$}>{$}Sc<{$}>{$}Sc<{$}?>{$}Sc<{$}>{$}Sc<{$}>{$}Sc<{$}>{$}Sc<{$}>{$}Sc<{$}}
                  & multicolumn{5}{c?}{$X^{tr} (mathrm{english text})$} & multicolumn{5}{c}{$Y^{yu} (mathrm{english text})$} \
                  & mathscr{A}_1 & mathscr{A}_ 2 & mathscr{A}_3 & mathscr{A}_4 & mathscr{A}_5 & mathscr{A}_1 & mathscr{A}_2 & mathscr{A}_3 & mathscr{A}_4 & mathscr{A}_5 \
                  multicolumn{1}{c}{1} & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 \
                  multicolumn{1}{c}{2} & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 \
                  end{tabular}
                  end{table}

                  end{document}



                  1. Because of the multirow{-2}{*}{}. Your code wasn't compiling because you didn't had the package multirow.


                  2. Delete all the |.


                  3. Your choice


                  4. It's because it's in math mode, so you need to manually add a space, using ,


                  5. You hadn't defined the command to make the letters in script mode.







                  share|improve this answer













                  Is this what you want?





                  If it is here's the code:



                  %!TEX TS-program = xelatex
                  %!TEX encoding = UTF-8 Unicode

                  documentclass{article}
                  usepackage[utf8]{inputenc}

                  usepackage{mathtools}
                  usepackage{multirow}
                  usepackage{tabularx}
                  usepackage[math]{cellspace}
                  usepackage{unicode-math}
                  setmathfont{XITS Math}
                  setmathfont[version=setB,StylisticSet=1]{XITS Math}
                  setlength{cellspacetoplimit}{3pt}
                  setlength{cellspacebottomlimit}{3pt}

                  usepackage{makecell}

                  begin{document}
                  newcolumntype{?}{!{vrule width 3pt}}
                  begin{table}[!t]
                  footnotesize
                  centering
                  caption{Example of a table}
                  label{sth}
                  begin{tabular}{>{$}Sc<{$}>{$}Sc<{$}>{$}Sc<{$}>{$}Sc<{$}>{$}Sc<{$}>{$}Sc<{$}?>{$}Sc<{$}>{$}Sc<{$}>{$}Sc<{$}>{$}Sc<{$}>{$}Sc<{$}}
                  & multicolumn{5}{c?}{$X^{tr} (mathrm{english text})$} & multicolumn{5}{c}{$Y^{yu} (mathrm{english text})$} \
                  & mathscr{A}_1 & mathscr{A}_ 2 & mathscr{A}_3 & mathscr{A}_4 & mathscr{A}_5 & mathscr{A}_1 & mathscr{A}_2 & mathscr{A}_3 & mathscr{A}_4 & mathscr{A}_5 \
                  multicolumn{1}{c}{1} & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 \
                  multicolumn{1}{c}{2} & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 & 5413.35 \
                  end{tabular}
                  end{table}

                  end{document}



                  1. Because of the multirow{-2}{*}{}. Your code wasn't compiling because you didn't had the package multirow.


                  2. Delete all the |.


                  3. Your choice


                  4. It's because it's in math mode, so you need to manually add a space, using ,


                  5. You hadn't defined the command to make the letters in script mode.








                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Mar 14 at 1:01









                  Vinccool96Vinccool96

                  35210




                  35210






























                      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%2f479381%2flack-of-spacing-in-a-complex-table-structure%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 change which sound is reproduced for terminal bell?

                      Can I use Tabulator js library in my java Spring + Thymeleaf project?

                      Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents