# TeXLive problem with the default MLA package, \ifpdf seems to be undefined

As I'm compiling an example document to a PDF, which worked on the Ubuntu repository's version of TeXLive, but now on the install that I ran last night, things are broken.

This is the output I get when compiling, and below is listed the file that I'm compiling. Do you have any ideas as to what is the problem, or at least how I could fix it?

\documentclass[12pt,letterpaper]{article}

\usepackage{mla}
\usepackage{setspace}
\usepackage{calc}

\begin{document}

\begin{mla}{Christopher}{Cooper}{Mrs.~Mills}{English 9 H}{27 October 2012}{An Exploration}

%body here

\end{mla}

\end{document}


gives log

This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012)
restricted \write18 enabled.
entering extended mode
(./poem.tex
LaTeX2e <2011/06/27>
Babel <v3.8m> and hyphenation patterns for english, dumylang, nohyphenation, ge
rman-x-2012-05-30, ngerman-x-2012-05-30, afrikaans, ancientgreek, ibycus, arabi
c, armenian, basque, bulgarian, catalan, pinyin, coptic, croatian, czech, danis
h, dutch, ukenglish, usenglishmax, esperanto, estonian, ethiopic, farsi, finnis
h, french, friulan, galician, german, ngerman, swissgerman, monogreek, greek, h
ungarian, icelandic, assamese, bengali, gujarati, hindi, kannada, malayalam, ma
rathi, oriya, panjabi, tamil, telugu, indonesian, interlingua, irish, italian,
kurmanji, latin, latvian, lithuanian, mongolian, mongolianlmc, bokmal, nynorsk,
polish, portuguese, romanian, romansh, russian, sanskrit, serbian, serbianc, s
lovak, slovenian, spanish, swedish, turkish, turkmen, ukrainian, uppersorbian,
(/usr/local/texlive/2012/texmf-dist/tex/latex/base/article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(/usr/local/texlive/2012/texmf-dist/tex/latex/base/size12.clo))
(/usr/local/texlive/2012/texmf-dist/tex/latex/mla-paper/mla.sty
MLA Package - by Ryan Aycock
! Undefined control sequence.
l.67 \ifpdf
% We're generating a pdf
?

-
Welcome to TeX.sx! You can use the {} button in the edit window to format a block of code. –  Peter Jansson Feb 6 '13 at 12:31
I am the person who created the first version of the MLA-paper package back in 2003 so that I could write my thesis without using MS Word. I posted the resulting package to CTAN and have largely left it untouched ever since. Every few years LaTeX goes through an update that causes the mla-paper package to become unusable. Since I no longer use it, I relay on the generosity of others to find bugs and let me know whenever an issue arises. If anyone has any changes that you think should be made, let me know at ryanaycock (at) gmail (dot) com. More importantly, If anyone wants to become the mainta –  user56649 Jul 6 '14 at 4:07

It looks like the mla package is defective as it uses \ifpdf without any mechanism to define it. However, the simple step of loading the ifpdf package seems to fix things

\documentclass[12pt,letterpaper]{article}
\usepackage{ifpdf}

\usepackage{mla}
\usepackage{setspace}
\usepackage{calc}

\begin{document}

\begin{mla}{Christopher}{Cooper}{Mrs.~Mills}{English 9 H}{27 October 2012}{An Exploration}

%body here

\end{mla}

\end{document}


(I'm suspicious of why mla is testing for PDF mode, but that is a separate thing.)

-
To say what is going on in the Ubuntu case I guess we'd need to see the version of mla that is in use. –  Joseph Wright Feb 6 '13 at 13:02
mla uses \ifpdf to do some useless things and an awful one, that is, loading thumbpdf. Since several years all PDF viewers have known how to create thumbnails for the pages. I'd never recommend loading it. –  egreg Feb 6 '13 at 14:10
Thank you very much. I've tested that solution, and it works. –  krye Feb 6 '13 at 23:10
I've gotten a modified version of mla.sty which does basically the same, it uses ifpdf. raw.github.com/KnightsOfTheComputerTable/WL-LaTeX/master/sty/… –  krye Feb 6 '13 at 23:12