GeneralCannot compile pdf with pdflatex

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
RedSquirrel
Posts: 7
Joined: Fri Aug 10, 2012 6:36 pm

Cannot compile pdf with pdflatex

Post by RedSquirrel »

Hello,

I've been using latex and biblatex (with the apa style) to write my dissertation for a few months now as lyx proved problematic. I'm running Ubuntu 12.04 and vanilla texlive 2012. Until now it has served this purpose well. However, pdflatex now longer produces a pdf and the latex command produces a dvi file with no bibliography. I've raised the various recommended limits in my texmf.cnf file to no effect.

I have each of my chapters separated off into separate files, though only chapters 1 and 2 have much in the way of content so far. Lately I've been working on the 2nd chapter and expanding my bibliography, so I've been looking for errors within this chapter and my bib file; I've not found anything as yet, but that doesn't mean there isn't something glaringly idiotic that I've missed. It surely must be something I have done after all. If it should prove helpful see either of these files I can provide them.

This is extremely frustrating as I thought I had my document sorted and could focus on actually getting work done. I'd like to continue using latex, but if I can't use it to get work done then I'll be forced back to using openoffice. I'm going to continue trying to figure this out in the meantime, however any help or suggestions would be much appreciated as I'm still relatively new to latex. If I can learn something from this, then in the final analysis this won't be time wasted.

The actual error appears to be the following, sadly I not found it all that helpful (I gather this is not unusual for latex error messages ;) ):

Code: Select all

! TeX capacity exceeded, sorry [input stack size=30000].
\ifdef #1->\ifdefined #1
Here's the full terminal output:

Code: Select all

rfa@ThinkPad-T410:~/MScEcon/ilm-1460/write_up$ pdflatex thesis.tex
This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012)
 restricted \write18 enabled.
entering extended mode
(./thesis.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, 
welsh, loaded.
(/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/psnfss/mathptmx.sty)
(/usr/local/texlive/2012/texmf-dist/tex/latex/base/fontenc.sty
(/usr/local/texlive/2012/texmf-dist/tex/latex/base/t1enc.def))
(/usr/local/texlive/2012/texmf-dist/tex/latex/base/inputenc.sty
(/usr/local/texlive/2012/texmf-dist/tex/latex/base/latin9.def))
(/usr/local/texlive/2012/texmf-dist/tex/latex/geometry/geometry.sty
(/usr/local/texlive/2012/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/local/texlive/2012/texmf-dist/tex/generic/oberdiek/ifpdf.sty)
(/usr/local/texlive/2012/texmf-dist/tex/generic/oberdiek/ifvtex.sty)
(/usr/local/texlive/2012/texmf-dist/tex/generic/ifxetex/ifxetex.sty))
(/usr/local/texlive/2012/texmf-dist/tex/latex/setspace/setspace.sty)
(/usr/local/texlive/2012/texmf-dist/tex/generic/babel/babel.sty
(/usr/local/texlive/2012/texmf-dist/tex/generic/babel/english.ldf
(/usr/local/texlive/2012/texmf-dist/tex/generic/babel/babel.def)))
(/usr/local/texlive/2012/texmf-dist/tex/latex/csquotes/csquotes.sty
(/usr/local/texlive/2012/texmf-dist/tex/latex/etoolbox/etoolbox.sty
(/usr/local/texlive/2012/texmf-dist/tex/latex/etex-pkg/etex.sty))
(/usr/local/texlive/2012/texmf-dist/tex/latex/csquotes/csquotes.def)
(/usr/local/texlive/2012/texmf-dist/tex/latex/csquotes/csquotes.cfg))
(/usr/local/texlive/2012/texmf-dist/tex/latex/biblatex/biblatex.sty
(/usr/local/texlive/2012/texmf-dist/tex/latex/biblatex/biblatex2.sty
(/usr/local/texlive/2012/texmf-dist/tex/latex/oberdiek/kvoptions.sty
(/usr/local/texlive/2012/texmf-dist/tex/generic/oberdiek/ltxcmds.sty)
(/usr/local/texlive/2012/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty
(/usr/local/texlive/2012/texmf-dist/tex/generic/oberdiek/infwarerr.sty)
(/usr/local/texlive/2012/texmf-dist/tex/generic/oberdiek/etexcmds.sty
(/usr/local/texlive/2012/texmf-dist/tex/generic/oberdiek/ifluatex.sty))))
(/usr/local/texlive/2012/texmf-dist/tex/latex/logreq/logreq.sty
(/usr/local/texlive/2012/texmf-dist/tex/latex/logreq/logreq.def))
(/usr/local/texlive/2012/texmf-dist/tex/latex/base/ifthen.sty)
(/usr/local/texlive/2012/texmf-dist/tex/latex/url/url.sty)
(/usr/local/texlive/2012/texmf-dist/tex/latex/biblatex/blx-dm.def)
(/usr/local/texlive/2012/texmf-dist/tex/latex/biblatex-apa/apa.dbx)
(/usr/local/texlive/2012/texmf-dist/tex/latex/biblatex/blx-compat.def)
(/usr/local/texlive/2012/texmf-dist/tex/latex/biblatex/biblatex.def)
(/usr/local/texlive/2012/texmf-dist/tex/latex/biblatex-apa/apa.bbx
(/usr/local/texlive/2012/texmf-dist/tex/latex/biblatex/bbx/standard.bbx)

Package biblatex Warning: Macro 'reviewauthor' undefined.
(biblatex)                Using \newbibmacro.

) (/usr/local/texlive/2012/texmf-dist/tex/latex/biblatex-apa/apa.cbx)
(/usr/local/texlive/2012/texmf-dist/tex/latex/biblatex/biblatex.cfg)))
(/usr/local/texlive/2012/texmf-dist/tex/latex/biblatex-apa/british-apa.lbx
(/usr/local/texlive/2012/texmf-dist/tex/latex/biblatex/lbx/british.lbx
(/usr/local/texlive/2012/texmf-dist/tex/latex/biblatex/lbx/english.lbx)))
(./thesis.aux) (/usr/local/texlive/2012/texmf-dist/tex/latex/psnfss/t1ptm.fd)
*geometry* driver: auto-detecting
*geometry* detected driver: pdftex
*geometry* verbose mode - [ preamble ] result:
* driver: pdftex
* paper: <default>
* layout: <same size as paper>
* layoutoffset:(h,v)=(0.0pt,0.0pt)
* modes: 
* h-part:(L,W,R)=(92.14519pt, 430.00462pt, 92.14519pt)
* v-part:(T,H,B)=(71.13188pt, 652.70622pt, 71.13188pt)
* \paperwidth=614.295pt
* \paperheight=794.96999pt
* \textwidth=430.00462pt
* \textheight=652.70622pt
* \oddsidemargin=19.8752pt
* \evensidemargin=19.8752pt
* \topmargin=-38.1381pt
* \headheight=12.0pt
* \headsep=25.0pt
* \topskip=12.0pt
* \footskip=30.0pt
* \marginparwidth=44.0pt
* \marginparsep=10.0pt
* \columnsep=10.0pt
* \skip\footins=10.8pt plus 4.0pt minus 2.0pt
* \hoffset=0.0pt
* \voffset=0.0pt
* \mag=1000
* \@twocolumnfalse
* \@twosidefalse
* \@mparswitchfalse
* \@reversemarginfalse
* (1in=72.27pt=25.4mm, 1cm=28.453pt)

(./thesis.bbl) (./titlepage.tex
(/usr/local/texlive/2012/texmf-dist/tex/latex/psnfss/ot1ztmcm.fd)
(/usr/local/texlive/2012/texmf-dist/tex/latex/psnfss/omlztmcm.fd)
(/usr/local/texlive/2012/texmf-dist/tex/latex/psnfss/omsztmcm.fd)
(/usr/local/texlive/2012/texmf-dist/tex/latex/psnfss/omxztmcm.fd)
(/usr/local/texlive/2012/texmf-dist/tex/latex/psnfss/ot1ptm.fd)) [1{/usr/local/
texlive/2012/texmf-var/fonts/map/pdftex/updmap/pdftex.map}] [2]
(./declaration.tex) [3] (./thesis.toc) [4] [5] (./chapter1-introduction.tex
[6] [7] [8] [9]) [10] (./chapter2-literature_review.tex [11] [12] [13] [14])
[15] (./chapter3-research_methods.tex) [16] (./chapter4-results.tex) [17]
(./chapter5-discussion.tex) [18] (./chapter6-conclusion.tex) [19]
! TeX capacity exceeded, sorry [input stack size=30000].
\ifdef #1->\ifdefined #1
                        \expandafter \@firstoftwo \else \expandafter \@secon...
l.80 \par
         \end{flushleft}
!  ==> Fatal error occurred, no output PDF file produced!
Transcript written on thesis.log.
Attachments
thesis.log
(22.04 KiB) Downloaded 289 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10326
Joined: Mon Mar 10, 2008 9:44 pm

Re: Cannot compile pdf with pdflatex

Post by Stefan Kottwitz »

No need to waste too much time or to get frustrated. I'm sure if you would provide sufficient information we can help to fix it. LaTeX can easily work with very large documents.

Such a stack error could occur because of a recursion, such as when a command redefinition refers to the original command, for example.

I suggest, make a copy of your code, and reduce it step by step, testing in each step. Finally you would get a small piece of code which bring this error when we test it, or you know the step which removed it. Either way, once we see the part which causes it, I'm sure we would be able to fix it.

Stefan
LaTeX.org admin
RedSquirrel
Posts: 7
Joined: Fri Aug 10, 2012 6:36 pm

Cannot compile pdf with pdflatex

Post by RedSquirrel »

Right, yes. I've been thinking about how best to cut the document down as it is somewhat complex. I think I'll start by cutting entries from the bib file and see what happens.

Here is the preamble as it stands at present, if there's any further helpful information that I can supply. Please let me know.

Code: Select all

\documentclass[12pt,british]{article}
\usepackage{mathptmx}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{geometry}
\geometry{verbose,tmargin=2.5cm,bmargin=2.5cm}
\setcounter{secnumdepth}{2}
\setcounter{tocdepth}{2}
\usepackage{setspace}
\doublespacing

\makeatletter
\@ifundefined{date}{}{\date{}}
\usepackage[british]{babel}
\usepackage{csquotes}
\usepackage[style=apa, backend=biber]{biblatex}
\DeclareLanguageMapping{british}{british-apa}
\addbibresource{thesis.bib}
\makeatother

\usepackage{babel}
Last edited by Stefan Kottwitz on Wed Jan 23, 2013 11:04 pm, edited 1 time in total.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10326
Joined: Mon Mar 10, 2008 9:44 pm

Re: Cannot compile pdf with pdflatex

Post by Stefan Kottwitz »

The preamble is error-free, I tested it (without the three lines for biblatex). I just need some code which brings the error when I run it. Such as this piece above (with a short document body) and possibly a (problematic?) .bib file. In my years of experience, runnung and getting the error is a guarantee for quickly fixing it.

Stefan
LaTeX.org admin
RedSquirrel
Posts: 7
Joined: Fri Aug 10, 2012 6:36 pm

Cannot compile pdf with pdflatex

Post by RedSquirrel »

Removing entries from the bib file has proven to be successful and I've got it working again. For some reason copying the files so I could alter and test them had not occurred to me before you suggested it.

The responsible entry was the following:

Code: Select all

@article{DuffW-2007,
author = {Duff, W.},
title = {‘You're a guide rather than an expert’: {Archival} reference from an archivist's point of view},
journaltitle = {Journal of the Society of Archivists},
volume = {27},
number = {2},
pages = {129-153},
year = {2006}
}


I guess it did not like the single quotes. All seems pretty obvious now :oops:

Thank you very much for your help and sorry for taking up your time.
Last edited by cgnieder on Wed Jan 23, 2013 11:39 pm, edited 1 time in total.
Post Reply