LaTex Tutorial 10: Advanced Networks and Diagrams

แชร์
ฝัง
  • เผยแพร่เมื่อ 18 ธ.ค. 2024

ความคิดเห็น • 4

  • @joshuarusitovski
    @joshuarusitovski ปีที่แล้ว

    how could you bold certain lines that you are drawing?

  • @mkkwan
    @mkkwan 4 ปีที่แล้ว

    Good vid, cheers.

  • @sebastiantapia3108
    @sebastiantapia3108 6 ปีที่แล้ว +1

    how could you put a specific node distance? For example, I just need 2cm between node 1 and 2, keeping 3cm to the others nodes ?
    Greetings from Chile.

    • @tjr1252
      @tjr1252  6 ปีที่แล้ว +2

      Hi Sebastian, you can control node distance in the following way:
      Step 1: add \usetikzlibrary{positioning} to the preamble (the part before \begin{document}).
      Step 2: When you make the first node using

      ode[draw] (n1) at (0,0) {};
      you can place a node 3cm next to that node by using the code

      ode[draw] (n2) [right=2cm of n1] {};
      I believe that this is the best solution to your problem whereby you would end up with a code like this
      \begin{tikzpicture} [node distance=1cm]

      ode[draw, shape=circle] (n1) at (0,0) {node 1};

      ode[draw, shape=circle] (n2) [right=2cm of n1] {node 2};

      ode[draw, shape=circle] (n3) [right=3cm of n2] {node 3};

      ode[draw, shape=circle] (n4) [below=3cm of n1] {node 4};
      \end{tikzpicture}
      You can further control the distance of all nodes by using the option in the above code [node distance=1cm].
      There are many other options to satisfy your request (that is the beauty of LaTex) but this I believe is the simplest. If you have further questions, don't hesitate to ask.