Ihave stumbled upon strange behavior (at least for me). I am generating a document composed of a set of blank framed boxes, each with a text attached above, and it will always be most likely necessary to span more than page. But as soon as the number of boxes-texts warrants a new page, pdfLaTeX simply refuses to do so, throwing a "Missing $ inserted" error.
I'm attaching my source, trying as much as possible to keep it short. The companylogo is placed next to this .tex file (But curious enough, it does not appear in the output).
Thank you.
\documentclass[12pt,lettersize,twoside,twocolumn]{article}
\usepackage[utf8]{inputenc}
\usepackage[spanish,es-tabla]{babel} % The original content is written in spanish.
\usepackage[fixlanguage]{babelbib}
\usepackage{amssymb,amsmath}
\usepackage{graphicx}
\usepackage{array}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{rotating}
\usepackage{booktabs}
\usepackage{multirow}
\usepackage{calc}
\usepackage{stfloats}
\usepackage{fixltx2e}
% Document margins
\usepackage[top=1cm, bottom=1cm, left=1cm, right=1cm]{geometry}
% Headers Config.
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhead{}
\renewcommand{\headrulewidth}{0.4pt}
\setlength{\headheight}{2.5cm}
\addtolength{\textheight}{-2.22cm}
\fancyhead[LO,RE]{\includegraphics[height=2.22cm]{companylogo}}
\fancyhead[LE,RO]{}
% Footers Config.
\fancyfoot{}
\renewcommand{\footrulewidth}{0pt}
\fancyfoot[C]{\thepage}
% Use dot as decimal point
\decimalpoint
% Enable page-broken equations
\allowdisplaybreaks[2]
% Command macros
\newcommand{\HRule}{\rule{\linewidth}{0.5mm}}
\newcommand{\emptybox}[2]{\fbox{\begin{minipage}{#1}\hfill\vspace{#2}\end{minipage}}}
\newcommand{\elembox}[1]{\begin{center}#1 \\ \emptybox{3cm}{3cm} \end{center}}
\title{SomeTitle}
% Remove author and date info from title
\makeatletter
\renewcommand{\@maketitle}{
\vspace{-2cm}
\begin{center}%
{\LARGE \@title}%
\end{center}%
\par} \makeatother
\begin{document}
\maketitle
\elembox{1206 (1)}
\elembox{2512 (2)}
\elembox{0805 (1)}
\elembox{carbon-resistor-0.5W (1)}
\elembox{oar-5 (1)}
\elembox{1206 (2)}
\elembox{0603 (2)}
\elembox{2416 (1)}
\elembox{oar-5 (1)}
\elembox{carbon-resistor-0.5W (1)}
\elembox{qfn40 (1)}
\elembox{dip44 (2)}
% Up to this many \elemboxes this compiles. but if you uncomment the one below, BOOM.
% \elembox{dip8 (2)}
% More \elemboxes to follow, but starting from the one above, pdfLaTeX throws the error.
\end{document}
demooption forgraphicxto ignore the missingcompanylogo). I enabled the last\elembox, which should have been enabled from the start. Examples should always produce the error. – Martin Scharrer♦ May 8 '12 at 20:00graphicx; i.e., if you load the package like this:\usepackage[demo]{graphicx}? – Gonzalo Medina May 8 '12 at 20:00demooption ingraphicx. The code compiled correctly with this option set. In other to make it work without it (and so making thecompanylogoappear), I had to use the file's absolute path (I was using the path relative to~/, which seems not to work. I have always worked with relative paths containing../without an issue. – Luis E. May 10 '12 at 13:04