How to get symbols on the lines of a table












1














I want to generate a table like this with latex. Can you help?
I can write a normal table as below, but have no idea how to create those symbols on the lines.



begin{table}[htbp]
centering
caption{Add caption}
begin{tabular}{|l|l|l|}
toprule
& Scenario 1 & Scenario 2 \
midrule
Val 1 & x & y \
midrule
Val 2 & x & Z \
bottomrule
end{tabular}%
label{tab:addlabel}%
end{table}%


Table with symbols on the lines










share|improve this question









New contributor




mucalinda is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

























    1














    I want to generate a table like this with latex. Can you help?
    I can write a normal table as below, but have no idea how to create those symbols on the lines.



    begin{table}[htbp]
    centering
    caption{Add caption}
    begin{tabular}{|l|l|l|}
    toprule
    & Scenario 1 & Scenario 2 \
    midrule
    Val 1 & x & y \
    midrule
    Val 2 & x & Z \
    bottomrule
    end{tabular}%
    label{tab:addlabel}%
    end{table}%


    Table with symbols on the lines










    share|improve this question









    New contributor




    mucalinda is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.























      1












      1








      1


      0





      I want to generate a table like this with latex. Can you help?
      I can write a normal table as below, but have no idea how to create those symbols on the lines.



      begin{table}[htbp]
      centering
      caption{Add caption}
      begin{tabular}{|l|l|l|}
      toprule
      & Scenario 1 & Scenario 2 \
      midrule
      Val 1 & x & y \
      midrule
      Val 2 & x & Z \
      bottomrule
      end{tabular}%
      label{tab:addlabel}%
      end{table}%


      Table with symbols on the lines










      share|improve this question









      New contributor




      mucalinda is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      I want to generate a table like this with latex. Can you help?
      I can write a normal table as below, but have no idea how to create those symbols on the lines.



      begin{table}[htbp]
      centering
      caption{Add caption}
      begin{tabular}{|l|l|l|}
      toprule
      & Scenario 1 & Scenario 2 \
      midrule
      Val 1 & x & y \
      midrule
      Val 2 & x & Z \
      bottomrule
      end{tabular}%
      label{tab:addlabel}%
      end{table}%


      Table with symbols on the lines







      tables symbols






      share|improve this question









      New contributor




      mucalinda is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question









      New contributor




      mucalinda is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question








      edited 1 hour ago









      Raaja

      2,1722630




      2,1722630






      New contributor




      mucalinda is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 1 hour ago









      mucalinda

      61




      61




      New contributor




      mucalinda is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      mucalinda is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      mucalinda is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






















          1 Answer
          1






          active

          oldest

          votes


















          5














          This is a solution using tikz



          documentclass[tikz, border = 5pt]{standalone}

          usetikzlibrary{matrix}
          usetikzlibrary{calc}

          tikzset{
          table/.style={
          matrix of nodes,
          row sep=-pgflinewidth,
          column sep=-pgflinewidth,
          nodes={
          rectangle,
          draw,
          text width=6em,
          align=center
          },
          minimum height=1.2cm,
          text depth=0.5ex,
          text height=2ex,
          nodes in empty cells,
          row 1/.style={
          minimum height=0.5cm,
          },
          column 1/.style={
          nodes={
          text width=3em
          }
          }
          },
          circ/.style={
          draw=green,
          circle,
          fill=white,
          thick,
          minimum width=0.8cm
          }
          }


          begin{document}
          begin{tikzpicture}
          matrix (table) [ampersand replacement=&, table]
          {
          & Scenario 1 & Scenario 2 \
          Val 1 & $alpha + beta^2$ & $gamma + betadelta^2$ \
          Val 2 & $alpha + beta^2$ & $alpha + beta^2$ \
          };

          node[circ] (less) at ($(table-2-2)!0.5!(table-2-3)$){$<$};
          node[circ] (equals) at ($(table-2-2)!0.5!(table-3-2)$){$=$};
          node[circ] (question) at ($(table-3-2)!0.5!(table-3-3)$){$?$};
          node[circ, rotate = -90] (greater) at ($(table-2-3)!0.5!(table-3-3)$){$>$};

          end{tikzpicture}
          end{document}


          enter image description here






          share|improve this answer























          • Thank you so much. I was wondering if the cells can be of different sizes? column headers and row headers are of different size compared to value cells in the table.
            – mucalinda
            26 mins ago










          • @mucalinda Sure, how about now?
            – caverac
            8 mins ago











          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
          });


          }
          });






          mucalinda is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f468117%2fhow-to-get-symbols-on-the-lines-of-a-table%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









          5














          This is a solution using tikz



          documentclass[tikz, border = 5pt]{standalone}

          usetikzlibrary{matrix}
          usetikzlibrary{calc}

          tikzset{
          table/.style={
          matrix of nodes,
          row sep=-pgflinewidth,
          column sep=-pgflinewidth,
          nodes={
          rectangle,
          draw,
          text width=6em,
          align=center
          },
          minimum height=1.2cm,
          text depth=0.5ex,
          text height=2ex,
          nodes in empty cells,
          row 1/.style={
          minimum height=0.5cm,
          },
          column 1/.style={
          nodes={
          text width=3em
          }
          }
          },
          circ/.style={
          draw=green,
          circle,
          fill=white,
          thick,
          minimum width=0.8cm
          }
          }


          begin{document}
          begin{tikzpicture}
          matrix (table) [ampersand replacement=&, table]
          {
          & Scenario 1 & Scenario 2 \
          Val 1 & $alpha + beta^2$ & $gamma + betadelta^2$ \
          Val 2 & $alpha + beta^2$ & $alpha + beta^2$ \
          };

          node[circ] (less) at ($(table-2-2)!0.5!(table-2-3)$){$<$};
          node[circ] (equals) at ($(table-2-2)!0.5!(table-3-2)$){$=$};
          node[circ] (question) at ($(table-3-2)!0.5!(table-3-3)$){$?$};
          node[circ, rotate = -90] (greater) at ($(table-2-3)!0.5!(table-3-3)$){$>$};

          end{tikzpicture}
          end{document}


          enter image description here






          share|improve this answer























          • Thank you so much. I was wondering if the cells can be of different sizes? column headers and row headers are of different size compared to value cells in the table.
            – mucalinda
            26 mins ago










          • @mucalinda Sure, how about now?
            – caverac
            8 mins ago
















          5














          This is a solution using tikz



          documentclass[tikz, border = 5pt]{standalone}

          usetikzlibrary{matrix}
          usetikzlibrary{calc}

          tikzset{
          table/.style={
          matrix of nodes,
          row sep=-pgflinewidth,
          column sep=-pgflinewidth,
          nodes={
          rectangle,
          draw,
          text width=6em,
          align=center
          },
          minimum height=1.2cm,
          text depth=0.5ex,
          text height=2ex,
          nodes in empty cells,
          row 1/.style={
          minimum height=0.5cm,
          },
          column 1/.style={
          nodes={
          text width=3em
          }
          }
          },
          circ/.style={
          draw=green,
          circle,
          fill=white,
          thick,
          minimum width=0.8cm
          }
          }


          begin{document}
          begin{tikzpicture}
          matrix (table) [ampersand replacement=&, table]
          {
          & Scenario 1 & Scenario 2 \
          Val 1 & $alpha + beta^2$ & $gamma + betadelta^2$ \
          Val 2 & $alpha + beta^2$ & $alpha + beta^2$ \
          };

          node[circ] (less) at ($(table-2-2)!0.5!(table-2-3)$){$<$};
          node[circ] (equals) at ($(table-2-2)!0.5!(table-3-2)$){$=$};
          node[circ] (question) at ($(table-3-2)!0.5!(table-3-3)$){$?$};
          node[circ, rotate = -90] (greater) at ($(table-2-3)!0.5!(table-3-3)$){$>$};

          end{tikzpicture}
          end{document}


          enter image description here






          share|improve this answer























          • Thank you so much. I was wondering if the cells can be of different sizes? column headers and row headers are of different size compared to value cells in the table.
            – mucalinda
            26 mins ago










          • @mucalinda Sure, how about now?
            – caverac
            8 mins ago














          5












          5








          5






          This is a solution using tikz



          documentclass[tikz, border = 5pt]{standalone}

          usetikzlibrary{matrix}
          usetikzlibrary{calc}

          tikzset{
          table/.style={
          matrix of nodes,
          row sep=-pgflinewidth,
          column sep=-pgflinewidth,
          nodes={
          rectangle,
          draw,
          text width=6em,
          align=center
          },
          minimum height=1.2cm,
          text depth=0.5ex,
          text height=2ex,
          nodes in empty cells,
          row 1/.style={
          minimum height=0.5cm,
          },
          column 1/.style={
          nodes={
          text width=3em
          }
          }
          },
          circ/.style={
          draw=green,
          circle,
          fill=white,
          thick,
          minimum width=0.8cm
          }
          }


          begin{document}
          begin{tikzpicture}
          matrix (table) [ampersand replacement=&, table]
          {
          & Scenario 1 & Scenario 2 \
          Val 1 & $alpha + beta^2$ & $gamma + betadelta^2$ \
          Val 2 & $alpha + beta^2$ & $alpha + beta^2$ \
          };

          node[circ] (less) at ($(table-2-2)!0.5!(table-2-3)$){$<$};
          node[circ] (equals) at ($(table-2-2)!0.5!(table-3-2)$){$=$};
          node[circ] (question) at ($(table-3-2)!0.5!(table-3-3)$){$?$};
          node[circ, rotate = -90] (greater) at ($(table-2-3)!0.5!(table-3-3)$){$>$};

          end{tikzpicture}
          end{document}


          enter image description here






          share|improve this answer














          This is a solution using tikz



          documentclass[tikz, border = 5pt]{standalone}

          usetikzlibrary{matrix}
          usetikzlibrary{calc}

          tikzset{
          table/.style={
          matrix of nodes,
          row sep=-pgflinewidth,
          column sep=-pgflinewidth,
          nodes={
          rectangle,
          draw,
          text width=6em,
          align=center
          },
          minimum height=1.2cm,
          text depth=0.5ex,
          text height=2ex,
          nodes in empty cells,
          row 1/.style={
          minimum height=0.5cm,
          },
          column 1/.style={
          nodes={
          text width=3em
          }
          }
          },
          circ/.style={
          draw=green,
          circle,
          fill=white,
          thick,
          minimum width=0.8cm
          }
          }


          begin{document}
          begin{tikzpicture}
          matrix (table) [ampersand replacement=&, table]
          {
          & Scenario 1 & Scenario 2 \
          Val 1 & $alpha + beta^2$ & $gamma + betadelta^2$ \
          Val 2 & $alpha + beta^2$ & $alpha + beta^2$ \
          };

          node[circ] (less) at ($(table-2-2)!0.5!(table-2-3)$){$<$};
          node[circ] (equals) at ($(table-2-2)!0.5!(table-3-2)$){$=$};
          node[circ] (question) at ($(table-3-2)!0.5!(table-3-3)$){$?$};
          node[circ, rotate = -90] (greater) at ($(table-2-3)!0.5!(table-3-3)$){$>$};

          end{tikzpicture}
          end{document}


          enter image description here







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited 8 mins ago

























          answered 59 mins ago









          caverac

          5,6031522




          5,6031522












          • Thank you so much. I was wondering if the cells can be of different sizes? column headers and row headers are of different size compared to value cells in the table.
            – mucalinda
            26 mins ago










          • @mucalinda Sure, how about now?
            – caverac
            8 mins ago


















          • Thank you so much. I was wondering if the cells can be of different sizes? column headers and row headers are of different size compared to value cells in the table.
            – mucalinda
            26 mins ago










          • @mucalinda Sure, how about now?
            – caverac
            8 mins ago
















          Thank you so much. I was wondering if the cells can be of different sizes? column headers and row headers are of different size compared to value cells in the table.
          – mucalinda
          26 mins ago




          Thank you so much. I was wondering if the cells can be of different sizes? column headers and row headers are of different size compared to value cells in the table.
          – mucalinda
          26 mins ago












          @mucalinda Sure, how about now?
          – caverac
          8 mins ago




          @mucalinda Sure, how about now?
          – caverac
          8 mins ago










          mucalinda is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          mucalinda is a new contributor. Be nice, and check out our Code of Conduct.













          mucalinda is a new contributor. Be nice, and check out our Code of Conduct.












          mucalinda is a new contributor. Be nice, and check out our Code of Conduct.
















          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.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • 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%2f468117%2fhow-to-get-symbols-on-the-lines-of-a-table%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

          Eastern Orthodox Church

          Zagreb

          Understanding the information contained in the Deep Space Network XML data?