从 latex 加载 pdf 时出现 Pgf 错误

从 latex 加载 pdf 时出现 Pgf 错误

大家好,如果有人能帮助我。我在乳胶中撰写研究论文,当我在乳胶中编译我的 pdf 时,它运行良好,但当我通过转换章节中的每个部分以论文格式编译它时,我收到此错误软件包 pgfkeys 错误:我不知道密钥“/tikz/drop shadow”,我将忽略它。也许你拼错了。。如果有人能帮忙的话。下面是我正在使用的包,我不知道哪个包是做什么用的,但我正在使用它。

\input preambles.tex
\usepackage{caption}
%\usepackage{amsmath}% for \new@ifnextchar
\usepackage{calc}
\usepackage{caption}
\captionsetup[table]{position=bottom}
%\usepackage{amsmath,amsfonts}
%\usepackage{latexsym}
\usepackage{float}
\restylefloat{table}



%\newtheorem{thm}{Theorem}
\usepackage{multirow}
\usepackage{pgf}

\usepackage{tikz}
\usetikzlibrary{shapes.geometric, arrows}
%\usepackage[hidelinks]{hyperref}
\usepackage{epsfig}
\usepackage{amssymb}
%\usepackage{graphicx} 
\usepackage{adjustbox}


%\newtheorem{lm}[thm]{Lemma}
%\newtheorem{cor}[thm]{Corollary}
\usepackage{amsmath,amsfonts}
\usepackage{latexsym}
\usepackage{epic,eepic}
\usepackage{multicol}
\usepackage{lipsum}% for dummy text
\usepackage{graphicx}
\usepackage{epic,eepic}
\usepackage{lipsum}% for dummy text
\usepackage{graphicx}
%\usepackage{setspace}
\usepackage[hidelinks]{hyperref}
\usepackage{hyperref}
\usepackage{indentfirst}
\usepackage{xcolor}
\usepackage[utf8]{inputenc} % Required for inputting international characters
\usepackage[T1]{fontenc} % Output font encoding for international characters

\usepackage{mathpazo} % Palatino font


\newcommand*{\blanks}[1][4em]{\rule{#1}{.4pt}}
\newcommand*{\blank}[1]{\blanks[\widthof{#1}]}
\usepackage{listings}
\usepackage{color}
%\newcommand{\hiddensection}[1]{\stepcounter{section}}
%\usepackage{amsthm}

\begin{document}
\def\aky{empty}
\pagestyle{empty}
%\pagenumbering{roman}
%\include{Titlepage1}
%\include{Page}
\include{Titlepage}
%\include{dedication}
\include{abstract}
\include{ACK}
%\include{ABS}

这是我的代码

\begin{figure}[h!]\label{flow}
\centering
\tikzstyle{startstop} = [trapezium, rounded corners, minimum width=3cm, minimum height=1cm,text centered, draw=black, fill=red!30, drop shadow, trapezium stretches=true]
\tikzstyle{startstop} = [trapezium, rounded corners, minimum width=3cm, minimum height=1cm,text centered, draw=black, fill=red!30, drop shadow, trapezium stretches=true]

\tikzstyle{io} = [trapezium, trapezium left angle=70, trapezium right angle=110, minimum width=2cm, minimum height=1cm, text centered, draw=black, fill=blue!30,trapezium stretches=true]
\tikzstyle{process} = [rectangle, minimum width=3cm, minimum height=1cm, text centered, text width=3cm, draw=black, fill=orange!30]
\tikzstyle{decision} = [diamond, minimum width=3cm, minimum height=1cm, text centered, draw=black, fill=green!30]
\tikzstyle{arrow} = [thick,->,>=stealth]
\tikzstyle{line} = [draw, -latex']



\begin{tikzpicture}[node distance=2cm, auto]
\begin{scope}[local bounding box=left]

\node (start) [startstop] {COVID\textbackslash Non-COVID data};
\node (in1) [io, below of=start] {Image preprocessing};
\node (pro1) [process, below of=in1] {Feature Extraction};
\node (in3) [process, below of=pro1] {Feature Selection};

%\node (pro2b) [process, right of=dec1, xshift=2cm] {};
\node (out1) [io, below of=in3] {Classifier};
\node (stop) [startstop, below of=out1] {Results};

\draw [arrow] (start) -- (in1);
\draw [arrow] (in1) -- (pro1);
\draw [arrow] (pro1) -- (in3);

\draw [arrow] (in3) -- (out1);
\draw [arrow] (out1) -- (stop);

\end{scope}
\draw[color=gray,thick](left.south west) rectangle (left.north east);
\node[anchor=north,font=\bfseries] at ([yshift=-2em]left.south) {Stage 1};
\begin{scope}[local bounding box=right,xshift=6cm] 


\node (start) [startstop] {COVID\textbackslash Non-COVID data};
\node (in1) [io, below of=start] {Image preprocessing};
\node (pro1) [process, below of=in1] {Convert Images pixel values into CSV};
\node (in3) [process, below of=pro1] {Feature Selection};

%\node (pro2b) [process, right of=dec1, xshift=2cm] {};
\node (out1) [io, below of=in3] {Classifier};
\node (stop) [startstop, below of=out1] {Results};

\draw [arrow] (start) -- (in1);
\draw [arrow] (in1) -- (pro1);
\draw [arrow] (pro1) -- (in3);

\draw [arrow] (in3) -- (out1);
\draw [arrow] (out1) -- (stop);
 % % % % % % % % % % % % % % % %      
\end{scope}
\draw[color=gray,thick](right.south west) rectangle (right.north east);
\node[anchor=north,font=\bfseries] at ([yshift=-2em]right.south) {Stage 2 };

\end{tikzpicture}
        %\caption{Flowchart of proposed pipeline}

\end{figure}

答案1

只需要调用阴影库即可。

我把你的例子(几乎)简化了:你应该清理所有这些包(有些被调用了两次)并使其正常工作:删除\input,添加\documentclass\begin{document}

\documentclass{article}

\usepackage{tikz}
\usetikzlibrary{
    arrows,
    shadows,
    shapes.geometric,}

\begin{document}
    And this is my code
    
    \begin{figure}[h!]\label{flow}
        \centering
        \tikzstyle{startstop} = [trapezium, rounded corners, minimum width=3cm, minimum height=1cm,text centered, draw=black, fill=red!30, drop shadow, trapezium stretches=true]
        \tikzstyle{startstop} = [trapezium, rounded corners, minimum width=3cm, minimum height=1cm,text centered, draw=black, fill=red!30, drop shadow, trapezium stretches=true]
        
        \tikzstyle{io} = [trapezium, trapezium left angle=70, trapezium right angle=110, minimum width=2cm, minimum height=1cm, text centered, draw=black, fill=blue!30,trapezium stretches=true]
        \tikzstyle{process} = [rectangle, minimum width=3cm, minimum height=1cm, text centered, text width=3cm, draw=black, fill=orange!30]
        \tikzstyle{decision} = [diamond, minimum width=3cm, minimum height=1cm, text centered, draw=black, fill=green!30]
        \tikzstyle{arrow} = [thick,->,>=stealth]
        \tikzstyle{line} = [draw, -latex']
        
        
        
        \begin{tikzpicture}[node distance=2cm, auto]
        \begin{scope}[local bounding box=left]
        
        \node (start) [startstop] {COVID\textbackslash Non-COVID data};
        \node (in1) [io, below of=start] {Image preprocessing};
        \node (pro1) [process, below of=in1] {Feature Extraction};
        \node (in3) [process, below of=pro1] {Feature Selection};
        
        %\node (pro2b) [process, right of=dec1, xshift=2cm] {};
        \node (out1) [io, below of=in3] {Classifier};
        \node (stop) [startstop, below of=out1] {Results};
        
        \draw [arrow] (start) -- (in1);
        \draw [arrow] (in1) -- (pro1);
        \draw [arrow] (pro1) -- (in3);
        
        \draw [arrow] (in3) -- (out1);
        \draw [arrow] (out1) -- (stop);
        
        \end{scope}
        \draw[color=gray,thick](left.south west) rectangle (left.north east);
        \node[anchor=north,font=\bfseries] at ([yshift=-2em]left.south) {Stage 1};
        \begin{scope}[local bounding box=right,xshift=6cm] 
        
        
        \node (start) [startstop] {COVID\textbackslash Non-COVID data};
        \node (in1) [io, below of=start] {Image preprocessing};
        \node (pro1) [process, below of=in1] {Convert Images pixel values into CSV};
        \node (in3) [process, below of=pro1] {Feature Selection};
        
        %\node (pro2b) [process, right of=dec1, xshift=2cm] {};
        \node (out1) [io, below of=in3] {Classifier};
        \node (stop) [startstop, below of=out1] {Results};
        
        \draw [arrow] (start) -- (in1);
        \draw [arrow] (in1) -- (pro1);
        \draw [arrow] (pro1) -- (in3);
        
        \draw [arrow] (in3) -- (out1);
        \draw [arrow] (out1) -- (stop);
        % % % % % % % % % % % % % % % %      
        \end{scope}
        \draw[color=gray,thick](right.south west) rectangle (right.north east);
        \node[anchor=north,font=\bfseries] at ([yshift=-2em]right.south) {Stage 2 };
        
        \end{tikzpicture}
        %\caption{Flowchart of proposed pipeline}
        
    \end{figure}

\end{document}

在此处输入图片描述

相关内容