Drawing with TikZ
This page needs a recent browser (with SharedArrayBuffer support). Please update Chrome, Edge, Firefox or Safari to the latest version. · עמוד זה דורש דפדפן עדכני (תומך ב-SharedArrayBuffer). אנא עדכן את Chrome, Edge, Firefox או Safari לגרסה העדכנית ביותר.
English
Drawing inside LaTeX
- You can draw diagrams with code using the TikZ package — no image files needed.
- Load it once, then draw inside a
tikzpicture:
\draw (0,0) -- (2,1);draws a line from one point to another. Every command ends with;.
עברית
ציור בתוך LaTeX
- ניתן לצייר גרפים עם קוד באמצעות חבילת TikZ — אין צורך בקובצי תמונה.
- טענו אותה פעם אחת, ואז ציירו בתוך
tikzpicture:
\usepackage{tikz}
...
\begin{tikzpicture}
\draw (0,0) -- (2,1);
\end{tikzpicture}
\draw (0,0) -- (2,1);מצייר קו מנקודה אחת לאחרת. כל פקודת סיום מסתיים ב-;.
English
Shapes and paths
- Chain points with
--to make any shape;cyclereturns to the start:
עברית
צורות ומסלולים
- חברו נקודות עם
--ליצירת כל צורה;cycleמחזיר אתכם להתחלה:
\draw (0,0) -- (2,0) -- (1,1.5) -- cycle; % a triangle
\draw (0,0) circle (1); % a circle, radius 1
\draw (0,0) rectangle (3,2); % a box
English
Why code a drawing?
- It stays sharp at any size (it is vector graphics, not a photo).
- It is exact — perfect for geometry, graphs, and circuit diagrams.
- Now draw your own triangle in the task.
עברית
מדוע לבצע ציור באמצעות קוד?
- הוא נשאר חד בגודל כלשהו (מדובר בגרפיקה וקטורית ולא בתמונה).
- הוא מדויק — אידיאלי לגיאומטריה, גרפים ותרגילי מעגלים.
- כעת ציירו משולש משלכם במשימה.
English
Common mistakes
- Every
\drawcommand ends with a semicolon;. - Wrap the drawing in a
tikzpictureenvironment.
עברית
טעויות נפוצות
- כל פקודת
\drawמסתיימת בפסיק-ניקוד;. - עטפו את הציור בסביבת
tikzpicture.
Inside the tikzpicture, \draw a triangle: connect the points (0,0), (3,0) and (1.5,2) and close it with cycle. The tikz package is loaded for you.
Click Run to compile and preview the PDF. · לחץ הרצה כדי להרכיב ולהציג מראות את הקובץ.
Draw two shapes this time. Add a circle of radius 1 with \draw (0,0) circle (1); and a rectangle with \draw (2,-1) rectangle (4,1);.
Click Run to compile and preview the PDF. · לחץ הרצה כדי להרכיב ולהציג מראות את הקובץ.