# Identifying a fix for an Undefined control sequence (\pgfdeclareplothandler) error [closed]

I would like to identify a fix for the following error:

"C:\Program Files\MiKTeX 2.9\tex\generic\pgf\libraries\pgflibraryplothandlers. code.tex" ! Undefined control sequence. l.24 \pgfdeclareplothandler {\pgfplothandlercurveto}{}{%

After some searching, this appears to be the most relevant thread. I recognize that my issue is also a candidate for being off-topic.

Please see the MWE .tex file:

\NeedsTeXFormat{LaTeX2e}
\documentclass[]{presentation}
\usepackage{graphicx}
\usepackage{booktabs}
\usepackage{subfigure}
\usepackage{cancel}
\title[]{Title}
\subtitle[]{Subtitle}
\author[short name]{Full name}
\date[short date]{\today}
\setbeamertemplate{caption}[numbered]
\begin{document}
\begin{frame}
\titlepage
\end{frame}
\section[Outline]{}
\begin{frame}
\tableofcontents[]
\end{frame}
\section{Introduction}
\begin{frame}
Frame content
\end{frame}
\end{document}


The .cls file:

\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{presentation}[]
\RequirePackage{beamerthemeMontpellier}
\RequirePackage[english]{babel}
\RequirePackage{graphicx,url}
\RequirePackage{amssymb,amsmath,verbatim,lscape,color}
\RequirePackage[english,short,num]{isodate}
\RequirePackage{lmodern}
\RequirePackage{tikz}
% load additional tikz' libraries
\usetikzlibrary{arrows,shapes}
\usetikzlibrary{calc}
% beamer settings
\usecolortheme{crane}
\usefonttheme{professionalfonts}
\subtitle{\docsubtitle}
\institute{}
\date{}
% get title and author
\makeatletter
\newcommand{\tntitle}{\@title}
\newcommand{\tnfrom}{\@author}
\makeatother
\AtBeginDocument{%
}%  % end AtBeginDocument
\AtEndDocument{%
}% end AtEndDocument


The file:

...\MiKTeX2.9\tex\generic\pgf\librariespgflibraryplothandlers.code.tex


appears to be the issue. What I have tried to date is the following:

1. Update MiKTeX
2. Remove pgf and pgfplots folders from C:\Program Files\MiKTeX 2.9\tex\latex and re-install packages.

Any thoughts or comments are greatly appreciated.

## closed as off-topic by user36296, Mensch, egreg, Torbjørn T., Stefan PinnowAug 1 '16 at 17:59

• This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

• Just as information in case someone wants to try: not reproducible with TeXLive 2016 – user36296 Jul 11 '16 at 19:39
• Probably you have a partially updated installation. I don't have MikTeX but add \listfiles and look for stale versions/odd paths. You don't need \makeatletter in a .cls and ought not have \makeatother. You don't need to load graphicx so often, especially since other things are already loading it. subfigure is obsolete and ought not be used. Don't load: graphicx, color, lscape, url. Pass english as a class option, but specify the variant you want instead. The arrows library is deprecated. shapes` has been superceded. – cfr Jul 12 '16 at 22:53
• @cfr, Thanks for the general advice and for the idea to check out the file paths. It turns out that I had a pgf folder at the path: C:\localtexmf\tex\generic, and also here: C:\localtexmf\tex\plain (I understand this to be my local texmf tree?). I deleted the folders. Problem solved. – John Chris Jul 14 '16 at 2:30
• @crf would you like to write an answer? Or close as "solved in comments"? – user36296 Jul 22 '16 at 15:45
• I'm voting to close this question as off-topic because solved in comments – user36296 Aug 1 '16 at 17:12