TransWikia.com

Pgf error when loading pdf from latex

TeX - LaTeX Asked by Kiran Raoo on July 31, 2021

Hi All if any one can help me. I am writing my research article in latex when I compile my pdf in latex it works fine but when i compiled it in thesis format by converting each section in chapters I am getting this error Package pgfkeys Error: I do not know the key ‘/tikz/drop shadow’ and I am going to ignore it. Perhaps you misspelled it.. If any one can help. Below are the packages that I am using I don’t know what package is for what but I am using it.

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}
defaky{empty}
pagestyle{empty}
%pagenumbering{roman}
%include{Titlepage1}
%include{Page}
include{Titlepage}
%include{dedication}
include{abstract}
include{ACK}
%include{ABS}

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] {COVIDtextbackslash 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] {COVIDtextbackslash 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}

One Answer

You only need to call the shadows library.

I made your example (almost) minimal: you should clean all these packages (some being called twice) and working: remove the input, add documentclass and 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] {COVIDtextbackslash 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] {COVIDtextbackslash 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}

enter image description here

Answered by NBur on July 31, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP