Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

one of the auto-generated latex code, for some reason, generates no output in pdf.

I made a MWE that has this latex code in it, all inside \[....\], and then run pdflatex but the file is empty.

Please do not complain about the latex code itself, or why I am trying to typeset this, I am just trying to find out why pdflatex and latex produces no output at all for this input, that is all, and if there something I need to do to make it generate output, even it is not typesetted right. (this code was generated by Maple latex command, fyi)

I put the .tex file and the log file and the pdf file in this folder

>pdflatex no_output.tex
This is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2014) 
(preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode
(./no_output.tex
LaTeX2e <2014/05/01>
....
pfb></usr/local/texlive/2014/texmf-dist/fonts/type1/public/amsfonts/cm/cmti12.p
Output written on no_output.pdf (1 page, 111713 bytes).
Transcript written on no_output.log.

But the pdf file is empty. I looked at the log file, but do not see something obvious, but I am no expert of what it is saying there really.

share|improve this question
    
Your pdf is not empty, it contains the page number on the footer. –  Sigur Jul 26 at 2:22
    
Ow!! With that tooooo long equation it is impossible to print it... lol No way. –  Sigur Jul 26 at 2:23

1 Answer 1

up vote 7 down vote accepted

The equation is way to wide. \maxdimen is 16383.99998 pt = 1073741823 sp = (230 - 1) sp≈ 5.76 m. I can fit the equation to \maxdimen only, if the font size is reduced dramatically:

\documentclass[12pt]{article}
\usepackage{fix-cm}% to provide smooth tiny font sizes
\usepackage{amsmath,mathtools}
\usepackage[
  paperwidth=\maxdimen,% normal paper width is hopeless
  hmargin=0pt,
]{geometry}
\begin{document}

\fontsize{2.65pt}{3pt}\selectfont
\showboxdepth=2
\showboxbreadth=10
\tracingonline=1
\AtEndDocument{\nonstopmode\showlists}
\[
   ...
\]
\end{document}

TeX reports (\showlists) for the equation box:

\hbox(7.02252+6.27673)x16313.41013, shifted 35.29494, display

The width is already pretty close to \maxdimen.

Without \fontsize setting:

 \hbox(31.8003+27.96019)x-12840.86679, shifted 14612.4334, display

TeX stores the dimen values as signed integers with 32 bit. Calculations with results beyond the allowed range gives Arithmetic overflow errors. Boxes are special, they can accumulate elements with the box dimensions outside the allowed range, e.g.:

\setbox0=\hbox{\kern100000pt\kern10000pt}
\showthe\wd0
> 18000.0pt.

However, the result must fit into a signed integer with 32 bit (unit sp). Beyond the values are wrapped around, continuing in the negative range:

\setbox0=\hbox{\kern10000pt\kern10000pt\kern10000pt\kern10000pt}
\showthe\wd0
> -25536.0pt.

This happened with your long equation. Because the values are no longer correct TeX miscalculates the centering of the equation dramatically (screenshot from xpdf with "fit width"):

Result

The wraparound has the curious effect that the very end of the equation can be seen on the left side and the start of the equation on the right side. The main part in the middle of the equation is outside the paper.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.