1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
\documentclass[tikz]{standalone}
\usepackage{fontspec}
\setmainfont{Liberation Serif}
\setsansfont{Liberation Sans}
\begin{document}
\usetikzlibrary{er}
\usetikzlibrary{calc}
\begin{tikzpicture}
[
text depth=1pt,
every entity/.style={fill=blue!20,draw=blue,thick}
]
\node[entity] (group) at (-4,+2) {Группа};
\node[entity] (teacher) at (-4,-2) {Преподаватель};
\node[entity] (student) at (+0,+2) {Студент};
\node[entity] (lab) at (+0,+0) {Лабораторная работа};
\node[entity] (subject) at (+0,-2) {Предмет};
\draw (student.west) -- node[at start,above left ] {$\infty$} node[at end,above right] {$1$} (group.east);
\draw (student.south) -- node[at start,below right] {$\infty$} node[at end,above right] {$\infty$} (lab.north);
\draw (group.south) |- node[at start,below right] {$\infty$} node[at end,above left ] {$\infty$} (lab.west);
\draw (lab.south) -- node[at start,below right] {$\infty$} node[at end,above right] {$1$} (subject.north);
\draw (teacher.north) |- node[at start,above right] {$\infty$} node[at end,above left ] {$\infty$} (lab.west);
\end{tikzpicture}
\end{document}
%% Local Variables:
%% compile-command: "xelatex od.tex"
%% End:
|