I have 2 questions.

1- How to use a diagonal seperator for the table hearders n and k in a good way.

2- How to align the back of the arrow to the rightand the head to the left of the numbers?




      \matrix[matrix of math nodes,column sep=1em,row sep=0ex] (ex5mx) {
        n\backslash{}k & 0 & 1 & 2 \\
        0 & -0.3887696362 & ~ & ~ \\
        1 & -0.3892561049 & -0.3894182612 & ~ \\
        2 & -0.3893777792 & -0.3894183372 & -0.3894183423 \\

      %\draw[thin,black] ([xshift=0em,yshift=0em]ex5mx-1-1.north west) -- ([xshift=0em,yshift=0em]ex5mx-1-1.south east); %\drule
      \draw[thin,black] ([xshift=0.5em,yshift=0em]ex5mx-1-1.north east) |- ([xshift=1.058em,yshift=0em]ex5mx-4-1.south east); %\vrule
      \draw[thin,black] ([xshift=-0.5em,yshift=0.25em]ex5mx-1-1.south west) |- ([xshift=3em,yshift=0em]ex5mx-1-4.south east); %\hrule

      %1st rows
      {[start chain,every on chain/.style={join={by <-*, blue!30}}]
        \chainin (ex5mx-3-3);
        {[start branch] \chainin (ex5mx-2-2); }
        {[start branch] \chainin (ex5mx-3-2); }

      {[start chain,every on chain/.style={join={by <-*, blue!30}}]
        \chainin (ex5mx-4-3);
        {[start branch] \chainin (ex5mx-3-2); }
        {[start branch] \chainin (ex5mx-4-2); }

      %2nd rows
      {[start chain,every on chain/.style={join={by <-*, blue!40}}]
        \chainin (ex5mx-4-4);
        {[start branch] \chainin (ex5mx-3-3); }
        {[start branch] \chainin (ex5mx-4-3); }

  • Re 1: What specifies a “good way”? Why is this a bad way? Re 2: I don’t see the point of using chains here. You can simply say \path[<-*, blue!30] (ex5mx-3-3) edge (ex5mx-3-2) edge (ex5mx-2-2);. If needed, you can specify anchors where the arrows should start/end specifically: \path[<-*, blue!30] (ex5mx-3-3.west) edge (ex5mx-3-2.east) edge (ex5mx-2-2.east); – Qrrbrbirlbel Jun 26 '13 at 4:08
  • @Qrrbrbirlbel: Thank you for your answer in Re 2. This was creadted when I first started using such tables. Later I decided/learned to use \draw[red!70,*->] and directions such as west/east. About Re 1, it is bad now, the slash is made by using text, I want to use a diagonal separator line, which starts from the top-left corner of the table and reaches to the intersection of the table lines. – bkarpuz Jun 29 '13 at 10:32
  • Our format works best for one issue per question. Your first issue has been covered before, so I've marked as a dupe. Please ask a separate, focussed, question on the second issue. – Joseph Wright Aug 10 '13 at 9:17

Browse other questions tagged or ask your own question.