How to place 2 aligned equations next to a single graph in a table?












2















I want to make a table with two columns:




  • on the left side, I want to put 2 aligned equations

  • on the right side, I want to put a graph.


In the following MCVE, the 2 equations are on the left side but with a huge unused space between them. I want to place those 2 equation just next to the graph



image



documentclass[a4paper, 12pt]{book}
usepackage{pgfplots, tikz}
begin{document}
begin{tabular}{cc}
$
frac{u_{i+1,j} - u_{i,j}}{Delta t} = kappa frac{u_{i,j-1} - 2u_{i,j} + u_{i,j+1}}{(Delta x)^2}$ \
$u_{i+1,j} = u_{i,j} + frac{kappa Delta t}{(Delta x)^2}(u_{i,j-1} - 2u_{i,j} + u_{i,j+1})
$
&
begin{tikzpicture}
[scale = 0.7]
%[scale = 0.7, every node/.style={scale = 0.7}]
% Draw axes
draw [<->,thick] (0,5) node (yaxis) [above] {$y$}
|- (5,0) node (xaxis) [right] {$x$};

coordinate (c) at (2,2);
fill[red] (c) circle (3pt);
draw[dashed] (yaxis |- c) node[left] {$scriptstyle{i}$}
-| (xaxis -| c) node[below] {$scriptstyle{j-1}$};

coordinate (d) at (3,2);
fill[red] (d) circle (3pt);
draw[dashed] (yaxis |- d) node[left] {$scriptstyle{i}$}
-| (xaxis -| d) node[below] {$scriptstyle{j}$};

coordinate (d) at (3,3);
fill[red] (d) circle (3pt);
draw[dashed] (yaxis |- d) node[left] {$scriptstyle{i+1}$}
-| (xaxis -| d) node[below] {$scriptstyle{j}$};

coordinate (d) at (4,2);
fill[red] (d) circle (3pt);
draw[dashed] (yaxis |- d) node[left] {$scriptstyle{i}$}
-| (xaxis -| d) node[below] {$scriptstyle{j+1}$};

draw [thin, gray] (0,0) grid (5,5);
end{tikzpicture}\
end{tabular}
end{document}









share|improve this question



























    2















    I want to make a table with two columns:




    • on the left side, I want to put 2 aligned equations

    • on the right side, I want to put a graph.


    In the following MCVE, the 2 equations are on the left side but with a huge unused space between them. I want to place those 2 equation just next to the graph



    image



    documentclass[a4paper, 12pt]{book}
    usepackage{pgfplots, tikz}
    begin{document}
    begin{tabular}{cc}
    $
    frac{u_{i+1,j} - u_{i,j}}{Delta t} = kappa frac{u_{i,j-1} - 2u_{i,j} + u_{i,j+1}}{(Delta x)^2}$ \
    $u_{i+1,j} = u_{i,j} + frac{kappa Delta t}{(Delta x)^2}(u_{i,j-1} - 2u_{i,j} + u_{i,j+1})
    $
    &
    begin{tikzpicture}
    [scale = 0.7]
    %[scale = 0.7, every node/.style={scale = 0.7}]
    % Draw axes
    draw [<->,thick] (0,5) node (yaxis) [above] {$y$}
    |- (5,0) node (xaxis) [right] {$x$};

    coordinate (c) at (2,2);
    fill[red] (c) circle (3pt);
    draw[dashed] (yaxis |- c) node[left] {$scriptstyle{i}$}
    -| (xaxis -| c) node[below] {$scriptstyle{j-1}$};

    coordinate (d) at (3,2);
    fill[red] (d) circle (3pt);
    draw[dashed] (yaxis |- d) node[left] {$scriptstyle{i}$}
    -| (xaxis -| d) node[below] {$scriptstyle{j}$};

    coordinate (d) at (3,3);
    fill[red] (d) circle (3pt);
    draw[dashed] (yaxis |- d) node[left] {$scriptstyle{i+1}$}
    -| (xaxis -| d) node[below] {$scriptstyle{j}$};

    coordinate (d) at (4,2);
    fill[red] (d) circle (3pt);
    draw[dashed] (yaxis |- d) node[left] {$scriptstyle{i}$}
    -| (xaxis -| d) node[below] {$scriptstyle{j+1}$};

    draw [thin, gray] (0,0) grid (5,5);
    end{tikzpicture}\
    end{tabular}
    end{document}









    share|improve this question

























      2












      2








      2








      I want to make a table with two columns:




      • on the left side, I want to put 2 aligned equations

      • on the right side, I want to put a graph.


      In the following MCVE, the 2 equations are on the left side but with a huge unused space between them. I want to place those 2 equation just next to the graph



      image



      documentclass[a4paper, 12pt]{book}
      usepackage{pgfplots, tikz}
      begin{document}
      begin{tabular}{cc}
      $
      frac{u_{i+1,j} - u_{i,j}}{Delta t} = kappa frac{u_{i,j-1} - 2u_{i,j} + u_{i,j+1}}{(Delta x)^2}$ \
      $u_{i+1,j} = u_{i,j} + frac{kappa Delta t}{(Delta x)^2}(u_{i,j-1} - 2u_{i,j} + u_{i,j+1})
      $
      &
      begin{tikzpicture}
      [scale = 0.7]
      %[scale = 0.7, every node/.style={scale = 0.7}]
      % Draw axes
      draw [<->,thick] (0,5) node (yaxis) [above] {$y$}
      |- (5,0) node (xaxis) [right] {$x$};

      coordinate (c) at (2,2);
      fill[red] (c) circle (3pt);
      draw[dashed] (yaxis |- c) node[left] {$scriptstyle{i}$}
      -| (xaxis -| c) node[below] {$scriptstyle{j-1}$};

      coordinate (d) at (3,2);
      fill[red] (d) circle (3pt);
      draw[dashed] (yaxis |- d) node[left] {$scriptstyle{i}$}
      -| (xaxis -| d) node[below] {$scriptstyle{j}$};

      coordinate (d) at (3,3);
      fill[red] (d) circle (3pt);
      draw[dashed] (yaxis |- d) node[left] {$scriptstyle{i+1}$}
      -| (xaxis -| d) node[below] {$scriptstyle{j}$};

      coordinate (d) at (4,2);
      fill[red] (d) circle (3pt);
      draw[dashed] (yaxis |- d) node[left] {$scriptstyle{i}$}
      -| (xaxis -| d) node[below] {$scriptstyle{j+1}$};

      draw [thin, gray] (0,0) grid (5,5);
      end{tikzpicture}\
      end{tabular}
      end{document}









      share|improve this question














      I want to make a table with two columns:




      • on the left side, I want to put 2 aligned equations

      • on the right side, I want to put a graph.


      In the following MCVE, the 2 equations are on the left side but with a huge unused space between them. I want to place those 2 equation just next to the graph



      image



      documentclass[a4paper, 12pt]{book}
      usepackage{pgfplots, tikz}
      begin{document}
      begin{tabular}{cc}
      $
      frac{u_{i+1,j} - u_{i,j}}{Delta t} = kappa frac{u_{i,j-1} - 2u_{i,j} + u_{i,j+1}}{(Delta x)^2}$ \
      $u_{i+1,j} = u_{i,j} + frac{kappa Delta t}{(Delta x)^2}(u_{i,j-1} - 2u_{i,j} + u_{i,j+1})
      $
      &
      begin{tikzpicture}
      [scale = 0.7]
      %[scale = 0.7, every node/.style={scale = 0.7}]
      % Draw axes
      draw [<->,thick] (0,5) node (yaxis) [above] {$y$}
      |- (5,0) node (xaxis) [right] {$x$};

      coordinate (c) at (2,2);
      fill[red] (c) circle (3pt);
      draw[dashed] (yaxis |- c) node[left] {$scriptstyle{i}$}
      -| (xaxis -| c) node[below] {$scriptstyle{j-1}$};

      coordinate (d) at (3,2);
      fill[red] (d) circle (3pt);
      draw[dashed] (yaxis |- d) node[left] {$scriptstyle{i}$}
      -| (xaxis -| d) node[below] {$scriptstyle{j}$};

      coordinate (d) at (3,3);
      fill[red] (d) circle (3pt);
      draw[dashed] (yaxis |- d) node[left] {$scriptstyle{i+1}$}
      -| (xaxis -| d) node[below] {$scriptstyle{j}$};

      coordinate (d) at (4,2);
      fill[red] (d) circle (3pt);
      draw[dashed] (yaxis |- d) node[left] {$scriptstyle{i}$}
      -| (xaxis -| d) node[below] {$scriptstyle{j+1}$};

      draw [thin, gray] (0,0) grid (5,5);
      end{tikzpicture}\
      end{tabular}
      end{document}






      tables horizontal-alignment pdftex






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jan 1 at 15:27









      ecjbecjb

      3276




      3276






















          1 Answer
          1






          active

          oldest

          votes


















          4














          I propose this somution with the equations inserted in a gathered environment,, and a raisebox for the graph:



          documentclass[a4paper, 12pt]{book}
          usepackage{pgfplots, tikz}
          usepackage{mathtools }

          begin{document}

          begin{tabular}{cc}
          leavevmode $ begin{gathered}
          frac{u_{i+1,j} - u_{i,j}}{Delta t} = kappa frac{u_{i,j-1} - 2u_{i,j} + u_{i,j+1}}{(Delta x)^2} \
          u_{i+1,j} = u_{i,j} + frac{kappa Delta t}{(Delta x)^2}(u_{i,j-1} - 2u_{i,j} + u_{i,j+1})
          end{gathered} $
          &
          raisebox{-0.5height}{begin{tikzpicture}
          [scale = 0.7]
          %[scale = 0.7, every node/.style={scale = 0.7}]
          % Draw axes
          draw [<->,thick] (0,5) node (yaxis) [above] {$y$}
          |- (5,0) node (xaxis) [right] {$x$};

          coordinate (c) at (2,2);
          fill[red] (c) circle (3pt);
          draw[dashed] (yaxis |- c) node[left] {$scriptstyle{i}$}
          -| (xaxis -| c) node[below] {$scriptstyle{j-1}$};

          coordinate (d) at (3,2);
          fill[red] (d) circle (3pt);
          draw[dashed] (yaxis |- d) node[left] {$scriptstyle{i}$}
          -| (xaxis -| d) node[below] {$scriptstyle{j}$};

          coordinate (d) at (3,3);
          fill[red] (d) circle (3pt);
          draw[dashed] (yaxis |- d) node[left] {$scriptstyle{i+1}$}
          -| (xaxis -| d) node[below] {$scriptstyle{j}$};

          coordinate (d) at (4,2);
          fill[red] (d) circle (3pt);
          draw[dashed] (yaxis |- d) node[left] {$scriptstyle{i}$}
          -| (xaxis -| d) node[below] {$scriptstyle{j+1}$};

          draw [thin, gray] (0,0) grid (5,5);
          end{tikzpicture}}\
          end{tabular}

          end{document}


          enter image description here






          share|improve this answer
























          • Many thanks @Bernard. Is it possible to alignt the 2 equations?

            – ecjb
            Jan 1 at 16:54











          • Yes: replace gathered with aligned and add the ampersands for the alignment points. Personally I find it better-looking with gathered. Or maybe aligned on the left?

            – Bernard
            Jan 1 at 17:00














          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%2f468136%2fhow-to-place-2-aligned-equations-next-to-a-single-graph-in-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









          4














          I propose this somution with the equations inserted in a gathered environment,, and a raisebox for the graph:



          documentclass[a4paper, 12pt]{book}
          usepackage{pgfplots, tikz}
          usepackage{mathtools }

          begin{document}

          begin{tabular}{cc}
          leavevmode $ begin{gathered}
          frac{u_{i+1,j} - u_{i,j}}{Delta t} = kappa frac{u_{i,j-1} - 2u_{i,j} + u_{i,j+1}}{(Delta x)^2} \
          u_{i+1,j} = u_{i,j} + frac{kappa Delta t}{(Delta x)^2}(u_{i,j-1} - 2u_{i,j} + u_{i,j+1})
          end{gathered} $
          &
          raisebox{-0.5height}{begin{tikzpicture}
          [scale = 0.7]
          %[scale = 0.7, every node/.style={scale = 0.7}]
          % Draw axes
          draw [<->,thick] (0,5) node (yaxis) [above] {$y$}
          |- (5,0) node (xaxis) [right] {$x$};

          coordinate (c) at (2,2);
          fill[red] (c) circle (3pt);
          draw[dashed] (yaxis |- c) node[left] {$scriptstyle{i}$}
          -| (xaxis -| c) node[below] {$scriptstyle{j-1}$};

          coordinate (d) at (3,2);
          fill[red] (d) circle (3pt);
          draw[dashed] (yaxis |- d) node[left] {$scriptstyle{i}$}
          -| (xaxis -| d) node[below] {$scriptstyle{j}$};

          coordinate (d) at (3,3);
          fill[red] (d) circle (3pt);
          draw[dashed] (yaxis |- d) node[left] {$scriptstyle{i+1}$}
          -| (xaxis -| d) node[below] {$scriptstyle{j}$};

          coordinate (d) at (4,2);
          fill[red] (d) circle (3pt);
          draw[dashed] (yaxis |- d) node[left] {$scriptstyle{i}$}
          -| (xaxis -| d) node[below] {$scriptstyle{j+1}$};

          draw [thin, gray] (0,0) grid (5,5);
          end{tikzpicture}}\
          end{tabular}

          end{document}


          enter image description here






          share|improve this answer
























          • Many thanks @Bernard. Is it possible to alignt the 2 equations?

            – ecjb
            Jan 1 at 16:54











          • Yes: replace gathered with aligned and add the ampersands for the alignment points. Personally I find it better-looking with gathered. Or maybe aligned on the left?

            – Bernard
            Jan 1 at 17:00


















          4














          I propose this somution with the equations inserted in a gathered environment,, and a raisebox for the graph:



          documentclass[a4paper, 12pt]{book}
          usepackage{pgfplots, tikz}
          usepackage{mathtools }

          begin{document}

          begin{tabular}{cc}
          leavevmode $ begin{gathered}
          frac{u_{i+1,j} - u_{i,j}}{Delta t} = kappa frac{u_{i,j-1} - 2u_{i,j} + u_{i,j+1}}{(Delta x)^2} \
          u_{i+1,j} = u_{i,j} + frac{kappa Delta t}{(Delta x)^2}(u_{i,j-1} - 2u_{i,j} + u_{i,j+1})
          end{gathered} $
          &
          raisebox{-0.5height}{begin{tikzpicture}
          [scale = 0.7]
          %[scale = 0.7, every node/.style={scale = 0.7}]
          % Draw axes
          draw [<->,thick] (0,5) node (yaxis) [above] {$y$}
          |- (5,0) node (xaxis) [right] {$x$};

          coordinate (c) at (2,2);
          fill[red] (c) circle (3pt);
          draw[dashed] (yaxis |- c) node[left] {$scriptstyle{i}$}
          -| (xaxis -| c) node[below] {$scriptstyle{j-1}$};

          coordinate (d) at (3,2);
          fill[red] (d) circle (3pt);
          draw[dashed] (yaxis |- d) node[left] {$scriptstyle{i}$}
          -| (xaxis -| d) node[below] {$scriptstyle{j}$};

          coordinate (d) at (3,3);
          fill[red] (d) circle (3pt);
          draw[dashed] (yaxis |- d) node[left] {$scriptstyle{i+1}$}
          -| (xaxis -| d) node[below] {$scriptstyle{j}$};

          coordinate (d) at (4,2);
          fill[red] (d) circle (3pt);
          draw[dashed] (yaxis |- d) node[left] {$scriptstyle{i}$}
          -| (xaxis -| d) node[below] {$scriptstyle{j+1}$};

          draw [thin, gray] (0,0) grid (5,5);
          end{tikzpicture}}\
          end{tabular}

          end{document}


          enter image description here






          share|improve this answer
























          • Many thanks @Bernard. Is it possible to alignt the 2 equations?

            – ecjb
            Jan 1 at 16:54











          • Yes: replace gathered with aligned and add the ampersands for the alignment points. Personally I find it better-looking with gathered. Or maybe aligned on the left?

            – Bernard
            Jan 1 at 17:00
















          4












          4








          4







          I propose this somution with the equations inserted in a gathered environment,, and a raisebox for the graph:



          documentclass[a4paper, 12pt]{book}
          usepackage{pgfplots, tikz}
          usepackage{mathtools }

          begin{document}

          begin{tabular}{cc}
          leavevmode $ begin{gathered}
          frac{u_{i+1,j} - u_{i,j}}{Delta t} = kappa frac{u_{i,j-1} - 2u_{i,j} + u_{i,j+1}}{(Delta x)^2} \
          u_{i+1,j} = u_{i,j} + frac{kappa Delta t}{(Delta x)^2}(u_{i,j-1} - 2u_{i,j} + u_{i,j+1})
          end{gathered} $
          &
          raisebox{-0.5height}{begin{tikzpicture}
          [scale = 0.7]
          %[scale = 0.7, every node/.style={scale = 0.7}]
          % Draw axes
          draw [<->,thick] (0,5) node (yaxis) [above] {$y$}
          |- (5,0) node (xaxis) [right] {$x$};

          coordinate (c) at (2,2);
          fill[red] (c) circle (3pt);
          draw[dashed] (yaxis |- c) node[left] {$scriptstyle{i}$}
          -| (xaxis -| c) node[below] {$scriptstyle{j-1}$};

          coordinate (d) at (3,2);
          fill[red] (d) circle (3pt);
          draw[dashed] (yaxis |- d) node[left] {$scriptstyle{i}$}
          -| (xaxis -| d) node[below] {$scriptstyle{j}$};

          coordinate (d) at (3,3);
          fill[red] (d) circle (3pt);
          draw[dashed] (yaxis |- d) node[left] {$scriptstyle{i+1}$}
          -| (xaxis -| d) node[below] {$scriptstyle{j}$};

          coordinate (d) at (4,2);
          fill[red] (d) circle (3pt);
          draw[dashed] (yaxis |- d) node[left] {$scriptstyle{i}$}
          -| (xaxis -| d) node[below] {$scriptstyle{j+1}$};

          draw [thin, gray] (0,0) grid (5,5);
          end{tikzpicture}}\
          end{tabular}

          end{document}


          enter image description here






          share|improve this answer













          I propose this somution with the equations inserted in a gathered environment,, and a raisebox for the graph:



          documentclass[a4paper, 12pt]{book}
          usepackage{pgfplots, tikz}
          usepackage{mathtools }

          begin{document}

          begin{tabular}{cc}
          leavevmode $ begin{gathered}
          frac{u_{i+1,j} - u_{i,j}}{Delta t} = kappa frac{u_{i,j-1} - 2u_{i,j} + u_{i,j+1}}{(Delta x)^2} \
          u_{i+1,j} = u_{i,j} + frac{kappa Delta t}{(Delta x)^2}(u_{i,j-1} - 2u_{i,j} + u_{i,j+1})
          end{gathered} $
          &
          raisebox{-0.5height}{begin{tikzpicture}
          [scale = 0.7]
          %[scale = 0.7, every node/.style={scale = 0.7}]
          % Draw axes
          draw [<->,thick] (0,5) node (yaxis) [above] {$y$}
          |- (5,0) node (xaxis) [right] {$x$};

          coordinate (c) at (2,2);
          fill[red] (c) circle (3pt);
          draw[dashed] (yaxis |- c) node[left] {$scriptstyle{i}$}
          -| (xaxis -| c) node[below] {$scriptstyle{j-1}$};

          coordinate (d) at (3,2);
          fill[red] (d) circle (3pt);
          draw[dashed] (yaxis |- d) node[left] {$scriptstyle{i}$}
          -| (xaxis -| d) node[below] {$scriptstyle{j}$};

          coordinate (d) at (3,3);
          fill[red] (d) circle (3pt);
          draw[dashed] (yaxis |- d) node[left] {$scriptstyle{i+1}$}
          -| (xaxis -| d) node[below] {$scriptstyle{j}$};

          coordinate (d) at (4,2);
          fill[red] (d) circle (3pt);
          draw[dashed] (yaxis |- d) node[left] {$scriptstyle{i}$}
          -| (xaxis -| d) node[below] {$scriptstyle{j+1}$};

          draw [thin, gray] (0,0) grid (5,5);
          end{tikzpicture}}\
          end{tabular}

          end{document}


          enter image description here







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jan 1 at 15:46









          BernardBernard

          174k776207




          174k776207













          • Many thanks @Bernard. Is it possible to alignt the 2 equations?

            – ecjb
            Jan 1 at 16:54











          • Yes: replace gathered with aligned and add the ampersands for the alignment points. Personally I find it better-looking with gathered. Or maybe aligned on the left?

            – Bernard
            Jan 1 at 17:00





















          • Many thanks @Bernard. Is it possible to alignt the 2 equations?

            – ecjb
            Jan 1 at 16:54











          • Yes: replace gathered with aligned and add the ampersands for the alignment points. Personally I find it better-looking with gathered. Or maybe aligned on the left?

            – Bernard
            Jan 1 at 17:00



















          Many thanks @Bernard. Is it possible to alignt the 2 equations?

          – ecjb
          Jan 1 at 16:54





          Many thanks @Bernard. Is it possible to alignt the 2 equations?

          – ecjb
          Jan 1 at 16:54













          Yes: replace gathered with aligned and add the ampersands for the alignment points. Personally I find it better-looking with gathered. Or maybe aligned on the left?

          – Bernard
          Jan 1 at 17:00







          Yes: replace gathered with aligned and add the ampersands for the alignment points. Personally I find it better-looking with gathered. Or maybe aligned on the left?

          – Bernard
          Jan 1 at 17:00




















          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%2f468136%2fhow-to-place-2-aligned-equations-next-to-a-single-graph-in-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

          Wiesbaden

          Marschland

          Dieringhausen