3

enter image description here

I know the tikz package is recommended. But I have no idea how to start it.

If there is any example similar to that of mine, I might refer to the example.

I made it using "draw.io" and "geogebra". I drew the diagram (rectangles, rhombuses and arrays) by using "draw.io" and typed the equations like ax+by+c=0 by using "geogebra". So it's just a png file and I just used \includegraphics.

But I don't like the font of something like 'coincide', it doesn't match the font of the original document. (In fact, the word 'coincide' should be '평행', which is korean, yet I don't like the font)

Between "tikz" and "draw.io+geogebra", which is less complicated and looks good in making such diagrams?

Sorry for bad English.

shyzealot
  • 117

1 Answers1

5

There is no way I can claim any option is the best, but I would like to argue that it is at least very advantageous to have a code that produces vector graphics pdf files. One possibility is to use forest and get some fair amount of inspiration from some of @cfr's answers like this one.

\documentclass{article}
\usepackage{forest}
\usetikzlibrary{shapes.geometric,arrows.meta,calc}
\begin{document}
\begin{forest}
  for tree={grow'=east,calign = first,
    font=\sffamily\bfseries,
    child anchor=west,
    l sep=10mm,
    s sep=5mm,
    anchor=east,
    align=center,draw,
    child anchor=parent,
    parent anchor=children,
    where level={1}{rounded corners}{},
    where level={2}{rounded corners}{},
    where level={3}{diamond,minimum width=3cm}{},
    edge+={rounded corners=5pt, -{Stealth[length=10pt]}, line width=1pt},
  },
[{$ax+by+c=0$}\\
{$a'x+b'y+c'=0$},
  [{$\displaystyle\frac{a}{b}=\frac{a'}{b'}$}
    [{$\displaystyle\frac{b}{b'}=\frac{c}{c'}$}
      [coincide,tier=word]
    ]
    [{$\displaystyle\frac{b}{b'}\ne\frac{c}{c'}$},
    edge path={\noexpand\path[\forestoption{edge}] (!u.parent anchor) --+(5mm,0)
    |-(.child anchor)\forestoption{edge label};}
     [parallel,tier=word]]
    ]
  [{$\displaystyle\frac{a}{b}\ne\frac{a'}{b'}$},
    edge path={\noexpand\path[\forestoption{edge}] (!u.parent anchor) --+(5mm,0)
    |-(.child anchor)\forestoption{edge label};}
    [{intersect at\\ one point},tier=word,diamond,minimum width=3cm,rounded
    corners=0pt]
  ]
]
\end{forest}
\end{document}

enter image description here

  • Thanks a lot!! I see it is the 'forest', with tree that grows east. Perhaps I can use this sample to produce many applications. Thanks. – shyzealot Jul 03 '18 at 04:26
  • Sure. It's my first question here. Does it work? I clicked the checkmark. – shyzealot Jul 03 '18 at 16:44