1
運行MikTex和TexStudio並嘗試創建實體關係圖。我不斷收到找不到錯誤tikz-er2。運行Texworks中的代碼時出現同樣的錯誤。代碼生成錯誤的示例如下,但無論示例如何,我都會得到相同的錯誤。 MikTex Package Manager也找不到它。實體 - 關係圖錯誤:找不到tikz-er2
運行MikTex和TexStudio並嘗試創建實體關係圖。我不斷收到找不到錯誤tikz-er2。運行Texworks中的代碼時出現同樣的錯誤。代碼生成錯誤的示例如下,但無論示例如何,我都會得到相同的錯誤。 MikTex Package Manager也找不到它。實體 - 關係圖錯誤:找不到tikz-er2
在這個關於bitbucket的鏈接上,PávelCalado顯示了代碼。您必須將「tikz-er2.sty」複製到與您的代碼相同的文件夾中。 https://bitbucket.org/pavel_calado/tikz-er2/src/da9f9f7f1696?at=default
% The tikz-er2 package.
% Ver. 1.0
% (c) Pável Caldo
% January 2009
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{tikz-er2}[2009/01/31 Entity-relationship diagrams using the Tikz library]
\RequirePackage{tikz}
\RequirePackage[normalem]{ulem} % for the dashed underline
\usetikzlibrary{shapes.geometric}
\usetikzlibrary{arrows}
\usetikzlibrary{fit}
\tikzstyle{every entity} = []
\tikzstyle{every weak entity} = []
\tikzstyle{every attribute} = []
\tikzstyle{every relationship} = []
\tikzstyle{every link} = []
\tikzstyle{every isa} = []
\tikzstyle{link} = [>=triangle 60, draw, thick, every link]
\tikzstyle{total} = [link, double, double distance=3pt]
\tikzstyle{entity} = [rectangle, draw, black, very thick,
minimum width=6em, minimum height=3em,
every entity]
\tikzstyle{weak entity} = [entity, double, double distance=2pt,
every weak entity]
\tikzstyle{attribute} = [ellipse, draw, black, very thick,
minimum width=5em, minimum height=2em,
every attribute]
%\tikzstyle{key attribute} = [attribute, font=\bfseries]
\tikzstyle{multi attribute} = [attribute, double, double distance=2pt]
\tikzstyle{derived attribute} = [attribute, dashed]
%\tikzstyle{discriminator} = [attribute, font=\itshape]
\tikzstyle{relationship} = [diamond, draw, black, very thick,
minimum width=2em, aspect=1,
every relationship]
\tikzstyle{ident relationship} = [relationship, double, double distance=2pt]
\tikzstyle{isa} = [isosceles triangle, isosceles triangle apex angle=60,
shape border rotate=-90,
draw, black, very thick, minimum size=3em,
every isa]
% for text un key attributes
\newcommand{\key}[1]{\underline{#1}}
% for text in discriminator attributes
\def\discriminator{\bgroup
\ifdim\ULdepth=\maxdimen % Set depth based on font, if not set already
\settodepth\ULdepth{(j}\advance\ULdepth.4pt\fi
\markoverwith{\kern.15em
\vtop{\kern\ULdepth \hrule width .3em}%
\kern.15em}\ULon}
貝斯特,馬特烏斯。
代碼在哪裏? –