Как получить файл для правильной компиляции. Возвратный латекс * геометрия * драйвер: автоопределение - PullRequest
0 голосов
/ 04 мая 2020
\documentclass[12pt]{article}
\usepackage{tikz-er2}
\usepackage[landscape,margin=1cm]{geometry}
%\usepackage{lscape}
\usetikzlibrary{shadows,positioning}

\begin{document}
\tikzset{every entity/.style = {top color=purple,bottom color=yellow!30,draw=blue!50!black!100,drop shadow},
every attribute/.style = {top color=white, bottom color=yellow!20,draw=yellow, drop shadow},
every relationship/.style = {top color=white, bottom color=red!20,draw=red!50!black!100, drop shadow},
every edg/.style={link},
every isa/.style = {top color=white, bottom color=green!20,draw=green!50!black!100, drop shadow}
}
%\begin{landscape}


\resizebox{0.8\textwidth}{!}{%
\begin{tikzpicture}[scale=0.5];
    \node[entity] (Artist) {Artist};
    \node[attribute](AID)[above right= 1cm of Artist]{\key{Artist\_ID}};
    \node[attribute](Name)[below = 1cm of Artist]{Name};
    \node[attribute](Bplace)[above = 1cm of Artist]{Birthplace};
    \node[attribute](age)[left = 1cm of Artist]{age};

    \node[entity] (ArtFacts) [above right = 2em of Artist ] {ArtFacts} edge (Artist);
    \node[attribute](AI)[right= 1cm of Artist]{\key{Art\_ID}};
    \node[attribute](AID[below = 1cm of ArtFacts]{Artist\_ID};
    \node[derived attribute](year)[above = 1cm of ArtFacts]{Year Created};
    \node[attribute](title)[above left = 1cm of ArtFacts]{title};
    \node[attribute](Price)[right = 1cm of ArtFacts]{price};
    \node[attribute](medium)[below right = 1cm of ArtFacts]{medium};


\end{tikzpicture}
}
%\end{landscape}
\end{document}

Попытка создать диаграмму ER для проекта управления искусством. Встреча с ошибками компиляции, когда я запускаю 2-ю сущность и атрибуты. первая часть работает правильно

1 Ответ

0 голосов
/ 04 мая 2020

(AID отсутствует закрывающая скобка

\documentclass[12pt]{article}
\usepackage{tikz-er2}
\usepackage[landscape,margin=1cm]{geometry}
%\usepackage{lscape}
\usetikzlibrary{shadows,positioning}

\begin{document}
\tikzset{every entity/.style = {top color=purple,bottom color=yellow!30,draw=blue!50!black!100,drop shadow},
every attribute/.style = {top color=white, bottom color=yellow!20,draw=yellow, drop shadow},
every relationship/.style = {top color=white, bottom color=red!20,draw=red!50!black!100, drop shadow},
every edg/.style={link},
every isa/.style = {top color=white, bottom color=green!20,draw=green!50!black!100, drop shadow}
}
%\begin{landscape}


\resizebox{0.8\textwidth}{!}{%
\begin{tikzpicture}[scale=0.5];
    \node[entity] (Artist) {Artist};
    \node[attribute](AID)[above right= 1cm of Artist]{\key{Artist\_ID}};
    \node[attribute](Name)[below = 1cm of Artist]{Name};
    \node[attribute](Bplace)[above = 1cm of Artist]{Birthplace};
    \node[attribute](age)[left = 1cm of Artist]{age};

    \node[entity] (ArtFacts) [above right = 2em of Artist ] {ArtFacts} edge (Artist);
    \node[attribute](AI)[right= 1cm of Artist]{\key{Art\_ID}};
    \node[attribute](AID)[below = 1cm of ArtFacts]{Artist\_ID};
    \node[derived attribute](year)[above = 1cm of ArtFacts]{Year Created};
    \node[attribute](title)[above left = 1cm of ArtFacts]{title};
    \node[attribute](Price)[right = 1cm of ArtFacts]{price};
    \node[attribute](medium)[below right = 1cm of ArtFacts]{medium};


\end{tikzpicture}
}
%\end{landscape}
\end{document}

enter image description here

...