如何让文件正确编译。Latex返回*geometry*驱动:自动检测。

问题描述 投票:0回答:1
\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图。当我启动第二个实体和属性时,遇到编译错误。

compilation geometry latex
1个回答
0
投票

(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

© www.soinside.com 2019 - 2024. All rights reserved.