Annotating a table with arrowsHow to get multiple multirows in a table?Paragraph column in tabular working...

Why did Gandalf use a sword against the Balrog?

Generate Brainfuck for the numbers 1–255

Visa National - No Exit Stamp From France on Return to the UK

Not going forward with internship interview process

Bitcoin successfully deducted on sender wallet but did not reach receiver wallet

Can a PC use the Levitate spell to avoid movement speed reduction from exhaustion?

Is this n-speak?

0xF1 opcode-prefix on i80286

Heating Margarine in Pan = loss of calories?

How can Radagast come across Gandalf and Thorin's company?

Normalization constant of a planar wave

What is this "Table of astronomy" about?

Am I overreacting to my team leader's unethical requests?

What happens when electrons reach the battery?

Is there a standardised way to check fake news?

Loading military units into ships optimally, using backtracking

On math looking obvious in retrospect

What are the process and practices of requesting for pre-submission peer review from field experts?

Google - OR tools for workforce scheduling problems

Can "être sur" mean "to be about" ?

What are the uses and limitations of Persuasion, Insight, and Deception against other PCs?

Why is the result of ('b'+'a'+ + 'a' + 'a').toLowerCase() 'banana'?

How to remove threat that antivirus program indicates has to be manually deleted?

Can I not use QM-AM inequality to solve this?



Annotating a table with arrows


How to get multiple multirows in a table?Paragraph column in tabular working only in the first columnTabular and grid typesettingWhy do I get an extra white page before my TikZ picture?tabu package - gaps in vertical linesHow to draw a square and its diagonals with arrows?Adding 3 multi-columns upside in a table“Undefined control sequence” Regression table from StataTable error: Missing number treated as zero






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







5















I want to recreate the following table on latex



enter image description here



Here is my MWE



documentclass{article} 
usepackage{colortbl}

begin{document}
begin{table}[h]
begin{tabular}{|>{columncolor[gray]{.8}}c|m{1cm}|m{1cm}|m{1cm}|m{1cm}|m{1cm}|m{1cm}|m{1cm}|}
hline
footnotesize{ $x$ } & 0.900 & 0.990 & 0.999 & 1.000 & 1.001 & 1.010 & 1.100 \ hline
footnotesize{ $f(x)$} & 1.810 & 1.980 & 1.998 & 2.000 & 2.002 & 2.020 & 2.210 \ hline
end{tabular}
end{table}
end{document}









share|improve this question































    5















    I want to recreate the following table on latex



    enter image description here



    Here is my MWE



    documentclass{article} 
    usepackage{colortbl}

    begin{document}
    begin{table}[h]
    begin{tabular}{|>{columncolor[gray]{.8}}c|m{1cm}|m{1cm}|m{1cm}|m{1cm}|m{1cm}|m{1cm}|m{1cm}|}
    hline
    footnotesize{ $x$ } & 0.900 & 0.990 & 0.999 & 1.000 & 1.001 & 1.010 & 1.100 \ hline
    footnotesize{ $f(x)$} & 1.810 & 1.980 & 1.998 & 2.000 & 2.002 & 2.020 & 2.210 \ hline
    end{tabular}
    end{table}
    end{document}









    share|improve this question



























      5












      5








      5


      1






      I want to recreate the following table on latex



      enter image description here



      Here is my MWE



      documentclass{article} 
      usepackage{colortbl}

      begin{document}
      begin{table}[h]
      begin{tabular}{|>{columncolor[gray]{.8}}c|m{1cm}|m{1cm}|m{1cm}|m{1cm}|m{1cm}|m{1cm}|m{1cm}|}
      hline
      footnotesize{ $x$ } & 0.900 & 0.990 & 0.999 & 1.000 & 1.001 & 1.010 & 1.100 \ hline
      footnotesize{ $f(x)$} & 1.810 & 1.980 & 1.998 & 2.000 & 2.002 & 2.020 & 2.210 \ hline
      end{tabular}
      end{table}
      end{document}









      share|improve this question














      I want to recreate the following table on latex



      enter image description here



      Here is my MWE



      documentclass{article} 
      usepackage{colortbl}

      begin{document}
      begin{table}[h]
      begin{tabular}{|>{columncolor[gray]{.8}}c|m{1cm}|m{1cm}|m{1cm}|m{1cm}|m{1cm}|m{1cm}|m{1cm}|}
      hline
      footnotesize{ $x$ } & 0.900 & 0.990 & 0.999 & 1.000 & 1.001 & 1.010 & 1.100 \ hline
      footnotesize{ $f(x)$} & 1.810 & 1.980 & 1.998 & 2.000 & 2.002 & 2.020 & 2.210 \ hline
      end{tabular}
      end{table}
      end{document}






      tikz-pgf tables highlighting






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 12 hours ago









      maryamarya

      1,5503 gold badges10 silver badges27 bronze badges




      1,5503 gold badges10 silver badges27 bronze badges

























          3 Answers
          3






          active

          oldest

          votes


















          7














          You can draw with TikZ.



          enter image description here



          documentclass[tikz,border=5mm]{standalone}
          % put a row of 8 elements
          newcommand{putrow}[9]{
          path (0,#1) node{#2}
          ++(0:1) node{#3} ++(0:1) node{#4}
          ++(0:1) node{#5} ++(0:1) node{#6}
          ++(0:1) node{#7} ++(0:1) node{#8} ++(0:1) node{#9};
          }

          begin{document}
          begin{tikzpicture}[xscale=1.4,yscale=.6]
          begin{scope}[shift={(-.5,.5)}]
          fill[cyan!30] (0,0) rectangle +(1,-2);
          draw (0,0) grid (8,-2);
          end{scope}
          begin{scope}[-stealth,magenta,shorten >=.5pt,
          every node/.style={midway,scale=.8}]
          draw[shift={(90:1)}] (1,0)--(4,0) node[above]{$x$ approaches $1$};
          draw[shift={(90:1)}] (7,0)--(4,0) node[above]{$x$ approaches $1$};
          draw[shift={(-90:2)}] (1,0)--(4,0) node[below]{$f(x)$ approaches $2$};
          draw[shift={(-90:2)}] (7,0)--(4,0) node[below]{$f(x)$ approaches $2$};
          end{scope}

          putrow{0}{$x$}{0.900}{0.990}{0.999}{1.000}{1.001}{1.010}{1.100}
          putrow{-1}{$f(x)$}{1.810}{1.980}{1.998}{2.000}{2.002}{2.020}{2.210}
          end{tikzpicture}
          end{document}





          share|improve this answer





















          • 1





            Very nice and perfect. I have appreciated it very much.

            – Sebastiano
            9 hours ago





















          4














          Also with tikz, but now with use of the matrix library. For arrows, edge labels are employed arrows.meta and quoted libraries:



          documentclass[tikz,border=5mm]{standalone}
          usetikzlibrary{arrows.meta,
          matrix,
          quotes
          }

          begin{document}
          begin{tikzpicture}[
          every edge/.style = {draw, purple, -{Straight Barb[angle=60:2pt 3]}, semithick}, shorten >=1pt,
          every edge quoetes/.style = {font=footnotesize}
          ]
          matrix (m) [matrix of math nodes,
          nodes = {draw, minimum height=4ex, minimum width=3.3em,
          inner sep=0pt, outer sep=0pt, anchor=center},
          column sep=-pgflinewidth,
          row sep=-pgflinewidth,
          column 1/.append style = {nodes={fill=cyan!30}}
          ]
          {
          x & 0.900 & 0.990 & 0.999 & 1.000 & 1.001 & 1.010 & 1.100 \
          f(x) & 1.810 & 1.980 & 1.998 & 2.000 & 2.002 & 2.020 & 2.210 \
          };
          draw (m-1-2.north |- m.north) edge["$x$ approaches $1$"] (m-1-5.north |- m.north)
          (m-1-8.north |- m.north) edge["$f(x)$ approaches $1$" '] (m-1-5.north |- m.north)
          (m-1-2.south |- m.south) edge["$x$ approaches $2$" '] (m-1-5.north |- m.south)
          (m-1-8.south |- m.south) edge["$f(x)$ approaches $2$"] (m-1-5.north |- m.south);
          end{tikzpicture}
          end{document}


          enter image description here






          share|improve this answer

































            0














            I wrote two macros that automatically place the text above or below depending on whether the path goes from left to right or not. valeur and fromto



            Code and result (to be compile twice):



            screenshot



            documentclass{article} 
            usepackage{colortbl}
            usepackage{tikz}
            definecolor{myviolet}{RGB}{243,29,143}
            usetikzlibrary{calc,arrows.meta}

            newcommand{valeur}[2]{
            tikz[remember picture] node[inner sep=0pt,anchor=center](#1){#2};}
            newcommand{fromto}[4][]{
            tikz[remember picture,overlay,auto=left,>={Stealth[length=5pt, inset=1pt,sep]}]
            path[draw=myviolet,thick,#1]
            ($(#2.center)!5mm!90:(#3.center)$)--($(#3.center)!5mm!-90:(#2.center)$)node[midway,myviolet,font=bf]{#4};}

            begin{document}
            begin{table}[h]
            begin{tabular}{|>{columncolor[gray]{.8}}c|m{1cm}|m{1cm}|m{1cm}|m{1cm}|m{1cm}|m{1cm}|m{1cm}|}
            hline
            footnotesize{ $x$ } & valeur{a1}{0.900} & 0.990 & 0.999 & valeur{b1}{1.000} & 1.001 & 1.010 & valeur{c1}{1.100} \ hline
            footnotesize{ $f(x)$} & valeur{a2}{1.810} & 1.980 & 1.998 & valeur{b2}{2.000} & 2.002 & 2.020 & valeur{c2}{2.210} \ hline
            end{tabular}
            end{table}

            fromto[->] {a1}{b1}{$x$ approaches 1.}
            fromto[<-] {b1}{c1}{$x$ approaches 1.}
            fromto[<-] {b2}{a2}{$f(x)$ approaches 2.}
            fromto[->] {c2}{b2}{$f(x)$ approaches 2.}

            end{document}


            The two macros:





            1. The first called valeur place is a TikZ node centered on the number from which you want to start or arrive the arrow;



              newcommand{valeur}[2]{
              tikz[remember picture] node[inner sep=0pt,anchor=center](#1){#2};}


              It has two arguments:




              • the first #1 is the name we give to the node

              • the second #2 is the value of this node.




            2. the second one called fromto draw a line and automatically places the text above or below the line (it could be an arrow).



              The principle is the following if the path goes from left to right, the text is placed above the path, otherwise it is placed below.




              newcommand{fromto}[4][]{
              tikz[remember picture,overlay,auto=left,>={Stealth[length=5pt, inset=1pt,sep]}]
              path[draw=myviolet,thick,#1]
              ($(#2.center)!5mm!90:(#3.center)$)--($(#3.center)!5mm!-90:(#2.center)$)node[midway,myviolet,font=bf]{#4};}

              This macro has 4 arguments:


              • the first one #1 is optional and allows to transmit options to the path

              • the second #2 is the starting point

              • the third #3 is the arrival point

              • the fourth #4 is the text to be positioned




            For example these code produce:



            documentclass{article} 
            usepackage{tikz}
            usetikzlibrary{calc,arrows.meta}

            newcommand{valeur}[2]{
            tikz[remember picture] node[inner sep=0pt,anchor=center](#1){#2};}
            newcommand{fromto}[4][]{
            tikz[remember picture,overlay,auto=left,>={Stealth[length=5pt, inset=1pt,sep]}]
            path[draw=black,thick,#1]($(#2.center)!5mm!90:(#3.center)$)--($(#3.center)!5mm!-90:(#2.center)$)node[midway,blue,font=bf]{#4};}

            begin{document}

            begin{tikzpicture}[remember picture]
            node[draw,circle] (A)at(0,0){A};
            node[draw,circle] (B) at (7,0){B};
            end{tikzpicture}

            fromto[] {A}{B}{from A to B: text is above}
            fromto[] {B}{A}{from B to A: text is below}

            end{document}


            example



            Translated with www.DeepL.com/Translator






            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%2f503855%2fannotating-a-table-with-arrows%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              3 Answers
              3






              active

              oldest

              votes








              3 Answers
              3






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              7














              You can draw with TikZ.



              enter image description here



              documentclass[tikz,border=5mm]{standalone}
              % put a row of 8 elements
              newcommand{putrow}[9]{
              path (0,#1) node{#2}
              ++(0:1) node{#3} ++(0:1) node{#4}
              ++(0:1) node{#5} ++(0:1) node{#6}
              ++(0:1) node{#7} ++(0:1) node{#8} ++(0:1) node{#9};
              }

              begin{document}
              begin{tikzpicture}[xscale=1.4,yscale=.6]
              begin{scope}[shift={(-.5,.5)}]
              fill[cyan!30] (0,0) rectangle +(1,-2);
              draw (0,0) grid (8,-2);
              end{scope}
              begin{scope}[-stealth,magenta,shorten >=.5pt,
              every node/.style={midway,scale=.8}]
              draw[shift={(90:1)}] (1,0)--(4,0) node[above]{$x$ approaches $1$};
              draw[shift={(90:1)}] (7,0)--(4,0) node[above]{$x$ approaches $1$};
              draw[shift={(-90:2)}] (1,0)--(4,0) node[below]{$f(x)$ approaches $2$};
              draw[shift={(-90:2)}] (7,0)--(4,0) node[below]{$f(x)$ approaches $2$};
              end{scope}

              putrow{0}{$x$}{0.900}{0.990}{0.999}{1.000}{1.001}{1.010}{1.100}
              putrow{-1}{$f(x)$}{1.810}{1.980}{1.998}{2.000}{2.002}{2.020}{2.210}
              end{tikzpicture}
              end{document}





              share|improve this answer





















              • 1





                Very nice and perfect. I have appreciated it very much.

                – Sebastiano
                9 hours ago


















              7














              You can draw with TikZ.



              enter image description here



              documentclass[tikz,border=5mm]{standalone}
              % put a row of 8 elements
              newcommand{putrow}[9]{
              path (0,#1) node{#2}
              ++(0:1) node{#3} ++(0:1) node{#4}
              ++(0:1) node{#5} ++(0:1) node{#6}
              ++(0:1) node{#7} ++(0:1) node{#8} ++(0:1) node{#9};
              }

              begin{document}
              begin{tikzpicture}[xscale=1.4,yscale=.6]
              begin{scope}[shift={(-.5,.5)}]
              fill[cyan!30] (0,0) rectangle +(1,-2);
              draw (0,0) grid (8,-2);
              end{scope}
              begin{scope}[-stealth,magenta,shorten >=.5pt,
              every node/.style={midway,scale=.8}]
              draw[shift={(90:1)}] (1,0)--(4,0) node[above]{$x$ approaches $1$};
              draw[shift={(90:1)}] (7,0)--(4,0) node[above]{$x$ approaches $1$};
              draw[shift={(-90:2)}] (1,0)--(4,0) node[below]{$f(x)$ approaches $2$};
              draw[shift={(-90:2)}] (7,0)--(4,0) node[below]{$f(x)$ approaches $2$};
              end{scope}

              putrow{0}{$x$}{0.900}{0.990}{0.999}{1.000}{1.001}{1.010}{1.100}
              putrow{-1}{$f(x)$}{1.810}{1.980}{1.998}{2.000}{2.002}{2.020}{2.210}
              end{tikzpicture}
              end{document}





              share|improve this answer





















              • 1





                Very nice and perfect. I have appreciated it very much.

                – Sebastiano
                9 hours ago
















              7












              7








              7







              You can draw with TikZ.



              enter image description here



              documentclass[tikz,border=5mm]{standalone}
              % put a row of 8 elements
              newcommand{putrow}[9]{
              path (0,#1) node{#2}
              ++(0:1) node{#3} ++(0:1) node{#4}
              ++(0:1) node{#5} ++(0:1) node{#6}
              ++(0:1) node{#7} ++(0:1) node{#8} ++(0:1) node{#9};
              }

              begin{document}
              begin{tikzpicture}[xscale=1.4,yscale=.6]
              begin{scope}[shift={(-.5,.5)}]
              fill[cyan!30] (0,0) rectangle +(1,-2);
              draw (0,0) grid (8,-2);
              end{scope}
              begin{scope}[-stealth,magenta,shorten >=.5pt,
              every node/.style={midway,scale=.8}]
              draw[shift={(90:1)}] (1,0)--(4,0) node[above]{$x$ approaches $1$};
              draw[shift={(90:1)}] (7,0)--(4,0) node[above]{$x$ approaches $1$};
              draw[shift={(-90:2)}] (1,0)--(4,0) node[below]{$f(x)$ approaches $2$};
              draw[shift={(-90:2)}] (7,0)--(4,0) node[below]{$f(x)$ approaches $2$};
              end{scope}

              putrow{0}{$x$}{0.900}{0.990}{0.999}{1.000}{1.001}{1.010}{1.100}
              putrow{-1}{$f(x)$}{1.810}{1.980}{1.998}{2.000}{2.002}{2.020}{2.210}
              end{tikzpicture}
              end{document}





              share|improve this answer













              You can draw with TikZ.



              enter image description here



              documentclass[tikz,border=5mm]{standalone}
              % put a row of 8 elements
              newcommand{putrow}[9]{
              path (0,#1) node{#2}
              ++(0:1) node{#3} ++(0:1) node{#4}
              ++(0:1) node{#5} ++(0:1) node{#6}
              ++(0:1) node{#7} ++(0:1) node{#8} ++(0:1) node{#9};
              }

              begin{document}
              begin{tikzpicture}[xscale=1.4,yscale=.6]
              begin{scope}[shift={(-.5,.5)}]
              fill[cyan!30] (0,0) rectangle +(1,-2);
              draw (0,0) grid (8,-2);
              end{scope}
              begin{scope}[-stealth,magenta,shorten >=.5pt,
              every node/.style={midway,scale=.8}]
              draw[shift={(90:1)}] (1,0)--(4,0) node[above]{$x$ approaches $1$};
              draw[shift={(90:1)}] (7,0)--(4,0) node[above]{$x$ approaches $1$};
              draw[shift={(-90:2)}] (1,0)--(4,0) node[below]{$f(x)$ approaches $2$};
              draw[shift={(-90:2)}] (7,0)--(4,0) node[below]{$f(x)$ approaches $2$};
              end{scope}

              putrow{0}{$x$}{0.900}{0.990}{0.999}{1.000}{1.001}{1.010}{1.100}
              putrow{-1}{$f(x)$}{1.810}{1.980}{1.998}{2.000}{2.002}{2.020}{2.210}
              end{tikzpicture}
              end{document}






              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered 12 hours ago









              Black MildBlack Mild

              1,7548 silver badges14 bronze badges




              1,7548 silver badges14 bronze badges











              • 1





                Very nice and perfect. I have appreciated it very much.

                – Sebastiano
                9 hours ago
















              • 1





                Very nice and perfect. I have appreciated it very much.

                – Sebastiano
                9 hours ago










              1




              1





              Very nice and perfect. I have appreciated it very much.

              – Sebastiano
              9 hours ago







              Very nice and perfect. I have appreciated it very much.

              – Sebastiano
              9 hours ago















              4














              Also with tikz, but now with use of the matrix library. For arrows, edge labels are employed arrows.meta and quoted libraries:



              documentclass[tikz,border=5mm]{standalone}
              usetikzlibrary{arrows.meta,
              matrix,
              quotes
              }

              begin{document}
              begin{tikzpicture}[
              every edge/.style = {draw, purple, -{Straight Barb[angle=60:2pt 3]}, semithick}, shorten >=1pt,
              every edge quoetes/.style = {font=footnotesize}
              ]
              matrix (m) [matrix of math nodes,
              nodes = {draw, minimum height=4ex, minimum width=3.3em,
              inner sep=0pt, outer sep=0pt, anchor=center},
              column sep=-pgflinewidth,
              row sep=-pgflinewidth,
              column 1/.append style = {nodes={fill=cyan!30}}
              ]
              {
              x & 0.900 & 0.990 & 0.999 & 1.000 & 1.001 & 1.010 & 1.100 \
              f(x) & 1.810 & 1.980 & 1.998 & 2.000 & 2.002 & 2.020 & 2.210 \
              };
              draw (m-1-2.north |- m.north) edge["$x$ approaches $1$"] (m-1-5.north |- m.north)
              (m-1-8.north |- m.north) edge["$f(x)$ approaches $1$" '] (m-1-5.north |- m.north)
              (m-1-2.south |- m.south) edge["$x$ approaches $2$" '] (m-1-5.north |- m.south)
              (m-1-8.south |- m.south) edge["$f(x)$ approaches $2$"] (m-1-5.north |- m.south);
              end{tikzpicture}
              end{document}


              enter image description here






              share|improve this answer






























                4














                Also with tikz, but now with use of the matrix library. For arrows, edge labels are employed arrows.meta and quoted libraries:



                documentclass[tikz,border=5mm]{standalone}
                usetikzlibrary{arrows.meta,
                matrix,
                quotes
                }

                begin{document}
                begin{tikzpicture}[
                every edge/.style = {draw, purple, -{Straight Barb[angle=60:2pt 3]}, semithick}, shorten >=1pt,
                every edge quoetes/.style = {font=footnotesize}
                ]
                matrix (m) [matrix of math nodes,
                nodes = {draw, minimum height=4ex, minimum width=3.3em,
                inner sep=0pt, outer sep=0pt, anchor=center},
                column sep=-pgflinewidth,
                row sep=-pgflinewidth,
                column 1/.append style = {nodes={fill=cyan!30}}
                ]
                {
                x & 0.900 & 0.990 & 0.999 & 1.000 & 1.001 & 1.010 & 1.100 \
                f(x) & 1.810 & 1.980 & 1.998 & 2.000 & 2.002 & 2.020 & 2.210 \
                };
                draw (m-1-2.north |- m.north) edge["$x$ approaches $1$"] (m-1-5.north |- m.north)
                (m-1-8.north |- m.north) edge["$f(x)$ approaches $1$" '] (m-1-5.north |- m.north)
                (m-1-2.south |- m.south) edge["$x$ approaches $2$" '] (m-1-5.north |- m.south)
                (m-1-8.south |- m.south) edge["$f(x)$ approaches $2$"] (m-1-5.north |- m.south);
                end{tikzpicture}
                end{document}


                enter image description here






                share|improve this answer




























                  4












                  4








                  4







                  Also with tikz, but now with use of the matrix library. For arrows, edge labels are employed arrows.meta and quoted libraries:



                  documentclass[tikz,border=5mm]{standalone}
                  usetikzlibrary{arrows.meta,
                  matrix,
                  quotes
                  }

                  begin{document}
                  begin{tikzpicture}[
                  every edge/.style = {draw, purple, -{Straight Barb[angle=60:2pt 3]}, semithick}, shorten >=1pt,
                  every edge quoetes/.style = {font=footnotesize}
                  ]
                  matrix (m) [matrix of math nodes,
                  nodes = {draw, minimum height=4ex, minimum width=3.3em,
                  inner sep=0pt, outer sep=0pt, anchor=center},
                  column sep=-pgflinewidth,
                  row sep=-pgflinewidth,
                  column 1/.append style = {nodes={fill=cyan!30}}
                  ]
                  {
                  x & 0.900 & 0.990 & 0.999 & 1.000 & 1.001 & 1.010 & 1.100 \
                  f(x) & 1.810 & 1.980 & 1.998 & 2.000 & 2.002 & 2.020 & 2.210 \
                  };
                  draw (m-1-2.north |- m.north) edge["$x$ approaches $1$"] (m-1-5.north |- m.north)
                  (m-1-8.north |- m.north) edge["$f(x)$ approaches $1$" '] (m-1-5.north |- m.north)
                  (m-1-2.south |- m.south) edge["$x$ approaches $2$" '] (m-1-5.north |- m.south)
                  (m-1-8.south |- m.south) edge["$f(x)$ approaches $2$"] (m-1-5.north |- m.south);
                  end{tikzpicture}
                  end{document}


                  enter image description here






                  share|improve this answer













                  Also with tikz, but now with use of the matrix library. For arrows, edge labels are employed arrows.meta and quoted libraries:



                  documentclass[tikz,border=5mm]{standalone}
                  usetikzlibrary{arrows.meta,
                  matrix,
                  quotes
                  }

                  begin{document}
                  begin{tikzpicture}[
                  every edge/.style = {draw, purple, -{Straight Barb[angle=60:2pt 3]}, semithick}, shorten >=1pt,
                  every edge quoetes/.style = {font=footnotesize}
                  ]
                  matrix (m) [matrix of math nodes,
                  nodes = {draw, minimum height=4ex, minimum width=3.3em,
                  inner sep=0pt, outer sep=0pt, anchor=center},
                  column sep=-pgflinewidth,
                  row sep=-pgflinewidth,
                  column 1/.append style = {nodes={fill=cyan!30}}
                  ]
                  {
                  x & 0.900 & 0.990 & 0.999 & 1.000 & 1.001 & 1.010 & 1.100 \
                  f(x) & 1.810 & 1.980 & 1.998 & 2.000 & 2.002 & 2.020 & 2.210 \
                  };
                  draw (m-1-2.north |- m.north) edge["$x$ approaches $1$"] (m-1-5.north |- m.north)
                  (m-1-8.north |- m.north) edge["$f(x)$ approaches $1$" '] (m-1-5.north |- m.north)
                  (m-1-2.south |- m.south) edge["$x$ approaches $2$" '] (m-1-5.north |- m.south)
                  (m-1-8.south |- m.south) edge["$f(x)$ approaches $2$"] (m-1-5.north |- m.south);
                  end{tikzpicture}
                  end{document}


                  enter image description here







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered 7 hours ago









                  ZarkoZarko

                  143k8 gold badges79 silver badges192 bronze badges




                  143k8 gold badges79 silver badges192 bronze badges


























                      0














                      I wrote two macros that automatically place the text above or below depending on whether the path goes from left to right or not. valeur and fromto



                      Code and result (to be compile twice):



                      screenshot



                      documentclass{article} 
                      usepackage{colortbl}
                      usepackage{tikz}
                      definecolor{myviolet}{RGB}{243,29,143}
                      usetikzlibrary{calc,arrows.meta}

                      newcommand{valeur}[2]{
                      tikz[remember picture] node[inner sep=0pt,anchor=center](#1){#2};}
                      newcommand{fromto}[4][]{
                      tikz[remember picture,overlay,auto=left,>={Stealth[length=5pt, inset=1pt,sep]}]
                      path[draw=myviolet,thick,#1]
                      ($(#2.center)!5mm!90:(#3.center)$)--($(#3.center)!5mm!-90:(#2.center)$)node[midway,myviolet,font=bf]{#4};}

                      begin{document}
                      begin{table}[h]
                      begin{tabular}{|>{columncolor[gray]{.8}}c|m{1cm}|m{1cm}|m{1cm}|m{1cm}|m{1cm}|m{1cm}|m{1cm}|}
                      hline
                      footnotesize{ $x$ } & valeur{a1}{0.900} & 0.990 & 0.999 & valeur{b1}{1.000} & 1.001 & 1.010 & valeur{c1}{1.100} \ hline
                      footnotesize{ $f(x)$} & valeur{a2}{1.810} & 1.980 & 1.998 & valeur{b2}{2.000} & 2.002 & 2.020 & valeur{c2}{2.210} \ hline
                      end{tabular}
                      end{table}

                      fromto[->] {a1}{b1}{$x$ approaches 1.}
                      fromto[<-] {b1}{c1}{$x$ approaches 1.}
                      fromto[<-] {b2}{a2}{$f(x)$ approaches 2.}
                      fromto[->] {c2}{b2}{$f(x)$ approaches 2.}

                      end{document}


                      The two macros:





                      1. The first called valeur place is a TikZ node centered on the number from which you want to start or arrive the arrow;



                        newcommand{valeur}[2]{
                        tikz[remember picture] node[inner sep=0pt,anchor=center](#1){#2};}


                        It has two arguments:




                        • the first #1 is the name we give to the node

                        • the second #2 is the value of this node.




                      2. the second one called fromto draw a line and automatically places the text above or below the line (it could be an arrow).



                        The principle is the following if the path goes from left to right, the text is placed above the path, otherwise it is placed below.




                        newcommand{fromto}[4][]{
                        tikz[remember picture,overlay,auto=left,>={Stealth[length=5pt, inset=1pt,sep]}]
                        path[draw=myviolet,thick,#1]
                        ($(#2.center)!5mm!90:(#3.center)$)--($(#3.center)!5mm!-90:(#2.center)$)node[midway,myviolet,font=bf]{#4};}

                        This macro has 4 arguments:


                        • the first one #1 is optional and allows to transmit options to the path

                        • the second #2 is the starting point

                        • the third #3 is the arrival point

                        • the fourth #4 is the text to be positioned




                      For example these code produce:



                      documentclass{article} 
                      usepackage{tikz}
                      usetikzlibrary{calc,arrows.meta}

                      newcommand{valeur}[2]{
                      tikz[remember picture] node[inner sep=0pt,anchor=center](#1){#2};}
                      newcommand{fromto}[4][]{
                      tikz[remember picture,overlay,auto=left,>={Stealth[length=5pt, inset=1pt,sep]}]
                      path[draw=black,thick,#1]($(#2.center)!5mm!90:(#3.center)$)--($(#3.center)!5mm!-90:(#2.center)$)node[midway,blue,font=bf]{#4};}

                      begin{document}

                      begin{tikzpicture}[remember picture]
                      node[draw,circle] (A)at(0,0){A};
                      node[draw,circle] (B) at (7,0){B};
                      end{tikzpicture}

                      fromto[] {A}{B}{from A to B: text is above}
                      fromto[] {B}{A}{from B to A: text is below}

                      end{document}


                      example



                      Translated with www.DeepL.com/Translator






                      share|improve this answer






























                        0














                        I wrote two macros that automatically place the text above or below depending on whether the path goes from left to right or not. valeur and fromto



                        Code and result (to be compile twice):



                        screenshot



                        documentclass{article} 
                        usepackage{colortbl}
                        usepackage{tikz}
                        definecolor{myviolet}{RGB}{243,29,143}
                        usetikzlibrary{calc,arrows.meta}

                        newcommand{valeur}[2]{
                        tikz[remember picture] node[inner sep=0pt,anchor=center](#1){#2};}
                        newcommand{fromto}[4][]{
                        tikz[remember picture,overlay,auto=left,>={Stealth[length=5pt, inset=1pt,sep]}]
                        path[draw=myviolet,thick,#1]
                        ($(#2.center)!5mm!90:(#3.center)$)--($(#3.center)!5mm!-90:(#2.center)$)node[midway,myviolet,font=bf]{#4};}

                        begin{document}
                        begin{table}[h]
                        begin{tabular}{|>{columncolor[gray]{.8}}c|m{1cm}|m{1cm}|m{1cm}|m{1cm}|m{1cm}|m{1cm}|m{1cm}|}
                        hline
                        footnotesize{ $x$ } & valeur{a1}{0.900} & 0.990 & 0.999 & valeur{b1}{1.000} & 1.001 & 1.010 & valeur{c1}{1.100} \ hline
                        footnotesize{ $f(x)$} & valeur{a2}{1.810} & 1.980 & 1.998 & valeur{b2}{2.000} & 2.002 & 2.020 & valeur{c2}{2.210} \ hline
                        end{tabular}
                        end{table}

                        fromto[->] {a1}{b1}{$x$ approaches 1.}
                        fromto[<-] {b1}{c1}{$x$ approaches 1.}
                        fromto[<-] {b2}{a2}{$f(x)$ approaches 2.}
                        fromto[->] {c2}{b2}{$f(x)$ approaches 2.}

                        end{document}


                        The two macros:





                        1. The first called valeur place is a TikZ node centered on the number from which you want to start or arrive the arrow;



                          newcommand{valeur}[2]{
                          tikz[remember picture] node[inner sep=0pt,anchor=center](#1){#2};}


                          It has two arguments:




                          • the first #1 is the name we give to the node

                          • the second #2 is the value of this node.




                        2. the second one called fromto draw a line and automatically places the text above or below the line (it could be an arrow).



                          The principle is the following if the path goes from left to right, the text is placed above the path, otherwise it is placed below.




                          newcommand{fromto}[4][]{
                          tikz[remember picture,overlay,auto=left,>={Stealth[length=5pt, inset=1pt,sep]}]
                          path[draw=myviolet,thick,#1]
                          ($(#2.center)!5mm!90:(#3.center)$)--($(#3.center)!5mm!-90:(#2.center)$)node[midway,myviolet,font=bf]{#4};}

                          This macro has 4 arguments:


                          • the first one #1 is optional and allows to transmit options to the path

                          • the second #2 is the starting point

                          • the third #3 is the arrival point

                          • the fourth #4 is the text to be positioned




                        For example these code produce:



                        documentclass{article} 
                        usepackage{tikz}
                        usetikzlibrary{calc,arrows.meta}

                        newcommand{valeur}[2]{
                        tikz[remember picture] node[inner sep=0pt,anchor=center](#1){#2};}
                        newcommand{fromto}[4][]{
                        tikz[remember picture,overlay,auto=left,>={Stealth[length=5pt, inset=1pt,sep]}]
                        path[draw=black,thick,#1]($(#2.center)!5mm!90:(#3.center)$)--($(#3.center)!5mm!-90:(#2.center)$)node[midway,blue,font=bf]{#4};}

                        begin{document}

                        begin{tikzpicture}[remember picture]
                        node[draw,circle] (A)at(0,0){A};
                        node[draw,circle] (B) at (7,0){B};
                        end{tikzpicture}

                        fromto[] {A}{B}{from A to B: text is above}
                        fromto[] {B}{A}{from B to A: text is below}

                        end{document}


                        example



                        Translated with www.DeepL.com/Translator






                        share|improve this answer




























                          0












                          0








                          0







                          I wrote two macros that automatically place the text above or below depending on whether the path goes from left to right or not. valeur and fromto



                          Code and result (to be compile twice):



                          screenshot



                          documentclass{article} 
                          usepackage{colortbl}
                          usepackage{tikz}
                          definecolor{myviolet}{RGB}{243,29,143}
                          usetikzlibrary{calc,arrows.meta}

                          newcommand{valeur}[2]{
                          tikz[remember picture] node[inner sep=0pt,anchor=center](#1){#2};}
                          newcommand{fromto}[4][]{
                          tikz[remember picture,overlay,auto=left,>={Stealth[length=5pt, inset=1pt,sep]}]
                          path[draw=myviolet,thick,#1]
                          ($(#2.center)!5mm!90:(#3.center)$)--($(#3.center)!5mm!-90:(#2.center)$)node[midway,myviolet,font=bf]{#4};}

                          begin{document}
                          begin{table}[h]
                          begin{tabular}{|>{columncolor[gray]{.8}}c|m{1cm}|m{1cm}|m{1cm}|m{1cm}|m{1cm}|m{1cm}|m{1cm}|}
                          hline
                          footnotesize{ $x$ } & valeur{a1}{0.900} & 0.990 & 0.999 & valeur{b1}{1.000} & 1.001 & 1.010 & valeur{c1}{1.100} \ hline
                          footnotesize{ $f(x)$} & valeur{a2}{1.810} & 1.980 & 1.998 & valeur{b2}{2.000} & 2.002 & 2.020 & valeur{c2}{2.210} \ hline
                          end{tabular}
                          end{table}

                          fromto[->] {a1}{b1}{$x$ approaches 1.}
                          fromto[<-] {b1}{c1}{$x$ approaches 1.}
                          fromto[<-] {b2}{a2}{$f(x)$ approaches 2.}
                          fromto[->] {c2}{b2}{$f(x)$ approaches 2.}

                          end{document}


                          The two macros:





                          1. The first called valeur place is a TikZ node centered on the number from which you want to start or arrive the arrow;



                            newcommand{valeur}[2]{
                            tikz[remember picture] node[inner sep=0pt,anchor=center](#1){#2};}


                            It has two arguments:




                            • the first #1 is the name we give to the node

                            • the second #2 is the value of this node.




                          2. the second one called fromto draw a line and automatically places the text above or below the line (it could be an arrow).



                            The principle is the following if the path goes from left to right, the text is placed above the path, otherwise it is placed below.




                            newcommand{fromto}[4][]{
                            tikz[remember picture,overlay,auto=left,>={Stealth[length=5pt, inset=1pt,sep]}]
                            path[draw=myviolet,thick,#1]
                            ($(#2.center)!5mm!90:(#3.center)$)--($(#3.center)!5mm!-90:(#2.center)$)node[midway,myviolet,font=bf]{#4};}

                            This macro has 4 arguments:


                            • the first one #1 is optional and allows to transmit options to the path

                            • the second #2 is the starting point

                            • the third #3 is the arrival point

                            • the fourth #4 is the text to be positioned




                          For example these code produce:



                          documentclass{article} 
                          usepackage{tikz}
                          usetikzlibrary{calc,arrows.meta}

                          newcommand{valeur}[2]{
                          tikz[remember picture] node[inner sep=0pt,anchor=center](#1){#2};}
                          newcommand{fromto}[4][]{
                          tikz[remember picture,overlay,auto=left,>={Stealth[length=5pt, inset=1pt,sep]}]
                          path[draw=black,thick,#1]($(#2.center)!5mm!90:(#3.center)$)--($(#3.center)!5mm!-90:(#2.center)$)node[midway,blue,font=bf]{#4};}

                          begin{document}

                          begin{tikzpicture}[remember picture]
                          node[draw,circle] (A)at(0,0){A};
                          node[draw,circle] (B) at (7,0){B};
                          end{tikzpicture}

                          fromto[] {A}{B}{from A to B: text is above}
                          fromto[] {B}{A}{from B to A: text is below}

                          end{document}


                          example



                          Translated with www.DeepL.com/Translator






                          share|improve this answer













                          I wrote two macros that automatically place the text above or below depending on whether the path goes from left to right or not. valeur and fromto



                          Code and result (to be compile twice):



                          screenshot



                          documentclass{article} 
                          usepackage{colortbl}
                          usepackage{tikz}
                          definecolor{myviolet}{RGB}{243,29,143}
                          usetikzlibrary{calc,arrows.meta}

                          newcommand{valeur}[2]{
                          tikz[remember picture] node[inner sep=0pt,anchor=center](#1){#2};}
                          newcommand{fromto}[4][]{
                          tikz[remember picture,overlay,auto=left,>={Stealth[length=5pt, inset=1pt,sep]}]
                          path[draw=myviolet,thick,#1]
                          ($(#2.center)!5mm!90:(#3.center)$)--($(#3.center)!5mm!-90:(#2.center)$)node[midway,myviolet,font=bf]{#4};}

                          begin{document}
                          begin{table}[h]
                          begin{tabular}{|>{columncolor[gray]{.8}}c|m{1cm}|m{1cm}|m{1cm}|m{1cm}|m{1cm}|m{1cm}|m{1cm}|}
                          hline
                          footnotesize{ $x$ } & valeur{a1}{0.900} & 0.990 & 0.999 & valeur{b1}{1.000} & 1.001 & 1.010 & valeur{c1}{1.100} \ hline
                          footnotesize{ $f(x)$} & valeur{a2}{1.810} & 1.980 & 1.998 & valeur{b2}{2.000} & 2.002 & 2.020 & valeur{c2}{2.210} \ hline
                          end{tabular}
                          end{table}

                          fromto[->] {a1}{b1}{$x$ approaches 1.}
                          fromto[<-] {b1}{c1}{$x$ approaches 1.}
                          fromto[<-] {b2}{a2}{$f(x)$ approaches 2.}
                          fromto[->] {c2}{b2}{$f(x)$ approaches 2.}

                          end{document}


                          The two macros:





                          1. The first called valeur place is a TikZ node centered on the number from which you want to start or arrive the arrow;



                            newcommand{valeur}[2]{
                            tikz[remember picture] node[inner sep=0pt,anchor=center](#1){#2};}


                            It has two arguments:




                            • the first #1 is the name we give to the node

                            • the second #2 is the value of this node.




                          2. the second one called fromto draw a line and automatically places the text above or below the line (it could be an arrow).



                            The principle is the following if the path goes from left to right, the text is placed above the path, otherwise it is placed below.




                            newcommand{fromto}[4][]{
                            tikz[remember picture,overlay,auto=left,>={Stealth[length=5pt, inset=1pt,sep]}]
                            path[draw=myviolet,thick,#1]
                            ($(#2.center)!5mm!90:(#3.center)$)--($(#3.center)!5mm!-90:(#2.center)$)node[midway,myviolet,font=bf]{#4};}

                            This macro has 4 arguments:


                            • the first one #1 is optional and allows to transmit options to the path

                            • the second #2 is the starting point

                            • the third #3 is the arrival point

                            • the fourth #4 is the text to be positioned




                          For example these code produce:



                          documentclass{article} 
                          usepackage{tikz}
                          usetikzlibrary{calc,arrows.meta}

                          newcommand{valeur}[2]{
                          tikz[remember picture] node[inner sep=0pt,anchor=center](#1){#2};}
                          newcommand{fromto}[4][]{
                          tikz[remember picture,overlay,auto=left,>={Stealth[length=5pt, inset=1pt,sep]}]
                          path[draw=black,thick,#1]($(#2.center)!5mm!90:(#3.center)$)--($(#3.center)!5mm!-90:(#2.center)$)node[midway,blue,font=bf]{#4};}

                          begin{document}

                          begin{tikzpicture}[remember picture]
                          node[draw,circle] (A)at(0,0){A};
                          node[draw,circle] (B) at (7,0){B};
                          end{tikzpicture}

                          fromto[] {A}{B}{from A to B: text is above}
                          fromto[] {B}{A}{from B to A: text is below}

                          end{document}


                          example



                          Translated with www.DeepL.com/Translator







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered 36 mins ago









                          AndréCAndréC

                          12.2k2 gold badges17 silver badges53 bronze badges




                          12.2k2 gold badges17 silver badges53 bronze badges

































                              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%2f503855%2fannotating-a-table-with-arrows%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

                              Taj Mahal Inhaltsverzeichnis Aufbau | Geschichte | 350-Jahr-Feier | Heutige Bedeutung | Siehe auch |...

                              Baia Sprie Cuprins Etimologie | Istorie | Demografie | Politică și administrație | Arii naturale...

                              Nicolae Petrescu-Găină Cuprins Biografie | Opera | In memoriam | Varia | Controverse, incertitudini...