# Write huge equation (width 8 meters) [closed]

bigequation.tex

I'm desperately trying to type this huge equation in an A4 page.

Any reasonable solution would be ok (including splitting the equation). The problem is that the total width is 800cm. Hence this would require more than 20 lines for a single equation (considering A4 width is 29.7cm).

• where are you publishing this? International billboard of mathematics? – percusse Jul 17 '17 at 13:51
• You can copy and paste your document here. The web site you are using requires a logon. – John Kormylo Jul 17 '17 at 13:58
• This is obviously a joke, isn't it? – egreg Jul 17 '17 at 14:01
• It's outrageous but still a valid question. Please stop voting to close everything. – percusse Jul 17 '17 at 14:37
• Just for curiosity, could you explain to us the meaning of such a monster? – CarLaTeX Jul 17 '17 at 21:17

The following (technically) works with your dropbox-file. I just excluded your formula from the example. As https://tex.stackexchange.com/users/9057/schweinebacke mentioned your formula is bigger than the maximum width so you need to introduce line breaks. It is quite easy to find the spots with syntax highlighting.

\documentclass{scrartcl}
\usepackage[paperwidth=16383.99999pt,paperheight=100cm,margin=1in]{geometry}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}

\begin{document}

\begin{align*}
1=1\forall 1 \\\textup{Your formula here}
\end{align*}

\end{document}


Your might try gather instead of align in case you prefer a centered alignment.

Here is an image of the beauty:

So if anyone knows how to extend \maxdimen, this would be welcomed. Compare What's the absolute largest paper size permissible with pdflatex?. Note 16383.99999pt*2.54/72.27*cm/pt≈5.75831741726858m.

• Can you include the result screenshot so that it's not taken as a tongue-in-cheek answer? – percusse Jul 17 '17 at 14:44
• @percusse Done. But I needed to reduce the resolution. – CampanIgnis Jul 17 '17 at 14:49
• No worries. It's probably not meant for reading anyways – percusse Jul 17 '17 at 14:50
• @CampanIgnis A nice wallpaper :) – samcarter_is_at_topanswers.xyz Jul 17 '17 at 15:22
• In PDF 1.5. From AFAIK PDF 1.6 you can change the unit size. I've never testes, how to do so using pdftex. But I think this is theory only. Because it doesn't really matter: You cannot have paper or text area width of 800cm with TeX. – Schweinebacke Jul 17 '17 at 15:51

The hardest part is getting rid of the spurious {} groups, without that you would just need simple inline definitions as in

Suggestion for automatic alignment of large equations

Use $\z ... \zstop$ not begin{equation}... otherwise the math is unchanged.

\documentclass[a4paper]{article}
%\usepackage[paperwidth=500cm,paperheight=21cm,margin=1in]{geometry}
\usepackage[utf8]{inputenc}
\showboxdepth10000
\begin{document}
\let\left\relax
\let\right\relax
\def\sqrt#1{(#1)^{{1\over2}}% image uses bad version: \def\sqrt#1{1/(#1)}
\def\frac#1#2{(#1)/(#2)}
\def\mathrm#1{\begingroup\fam0 #1\endgroup}
\let\!\relax% they should never have been there
\def\z#1{%
\ifx\frac#1\let\next\ztwo
\else\ifx\sqrt#1\let\next\zone
\else\ifx\mathrm#1\let\next\zone
\else\ifx^#1\let\next\zone
\else\ifx_#1\let\next\zone
\else\ifx\dot#1\let\next\zone
\else\let\next\znone
\fi\fi\fi\fi\fi\fi
\next{#1}}
\def\ztwo#1#2#3{#1{\z#2\zstop}{\z#3\zstop}\z}
\def\zone#1#2{#1{\z#2\zstop}\z}
\def\znone#1{\zonex#1}
\def\zonex#1{#1\z}
\def\zstop#1{}
\begin{center}
$\z \frac{...}{...} .... \frac{...}170} \zstop$
\end{center}

\end{document}

• The square root is not the reciprocal. – egreg Jul 17 '17 at 21:10
• @egreg minor details:-) \def\sqrt#1{(#1)^{{1\over2}} – David Carlisle Jul 17 '17 at 21:12
• Not that anybody would notice. ;-) – egreg Jul 17 '17 at 21:12