如何在 TeXstudio 上上传 tikz-uml 包

如何在 TeXstudio 上上传 tikz-uml 包

我无法运行我的代码。我一直收到此消息:

在此处输入图片描述

我尝试安装最新的tikz-uml软件包,但没有成功。

\documentclass[12pt,article]{memoir}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{mathpazo}
\linespread{1.05}
\usepackage{tikz}
\usepackage{tikz-uml} 
\usepackage{amsmath}
\usepackage{savetrees}
\begin{document}

\begin{figure}[h!]
\begin{tikzpicture}
\begin{umlsystem}{Schedule}
\umlusecase[x=-3]{Check Request}
\umlusecase[x=3]{Ask Constraints}
\umlusecase[x=-2,y=-2]{Deny Request}
\umlusecase[x=3, y=-2]{Collect Constraints}
\umlusecase[x=-3,y=-4]{Determine Schedule}
\umlusecase[x=3,y=-4]{Merge Constraints} 
\umlusecase[y=-6]{Resolve Conflicts}
\end{umlsystem}

\umlactor[x=-8]{Initiator}
\umlactor[x=-8,y=-6]{Participant A}
\umlactor[x=8]{Participant B}
\umlactor[x=8,y=-6]{Conflict Resolver} 

\umlassoc{Initiator}{usecase-1}
\umlassoc{Initiator}{usecase-3}
\umlassoc{Participant A}{usecase-5}
\umlassoc{Participant B}{usecase-2}
\umlassoc{Participant B}{usecase-4}
\umlassoc{Conflict Resolver}{usecase-7}

\umlextend{usecase-2}{usecase-3}
\umlinclude{usecase-5}{usecase-7}
\end{tikzpicture}
\caption{Example of Use case diagram using tikz-uml. Examlpe from the book Requirements Engineering by Axel van Lamsweerde.}
\end{figure}

\end{document}

相关内容