1

I often use latex to write out scratch work, but I enjoy having lots of freedom when I write. Is there a way to have a document that expands as a write in any direction?

I've found that you can make a page that kinda has this feature using the standalone class

\documentclass[border=1in]{standalone}
\usepackage{lipsum}
\begin{document}
    \begin{minipage}{21cm}
    \lipsum[1-150]
    \end{minipage}
\end{document}

Which generates a very long page of text.

After trying it out with a very basic example

\documentclass[border=1in]{standalone}
\begin{document}
    \begin{equation}
        x = 2
    \end{equation}
\end{document}

I get the following error You can't use `\eqno' in restricted horizontal mode.

So then this lead me this post which suggests to add the preview option, but then writing some scratchwork doesn't allow for horizontal expansion when the equations get long (it's cut off on the right):

\documentclass[border=1in, preview]{standalone}
\usepackage{amsmath, amssymb}
\begin{document}
    \begin{equation}
            \begin{bmatrix}
                1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 \\
                a & s & d & f & g & h & j & k \\
                l & p & o & i & u & y & t & r \\
                e & w & q & z & x & c & v & b \\
                n & m & k & l & o & i & j & y \\
                6 & 4 & ds & 3 & t & y & g & d \\
                t & vf & b & n & kj & 9 & 8 & 6 \\
                r & d & 5 & f & 6 & f & 6 & f 
            \end{bmatrix}
        \rightsquigarrow
            \begin{bmatrix}
                1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 \\
                a & s & d & f & g & h & j & k \\
                l & p & o & i & u & y & t & r \\
                e & w & q & z & x & c & v & b \\
                n & m & k & l & o & i & j & y \\
                6 & 4 & ds & 3 & t & y & g & d \\
                t & vf & b & n & kj & 9 & 8 & 6 \\
                r & d & 5 & f & 6 & f & 6 & f 
            \end{bmatrix}
        \rightsquigarrow
            \begin{bmatrix}
                1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 \\
                a & s & d & f & g & h & j & k \\
                l & p & o & i & u & y & t & r \\
                e & w & q & z & x & c & v & b \\
                n & m & k & l & o & i & j & y \\
                6 & 4 & ds & 3 & t & y & g & d \\
                t & vf & b & n & kj & 9 & 8 & 6 \\
                r & d & 5 & f & 6 & f & 6 & f 
            \end{bmatrix}
        \rightsquigarrow
    \end{equation}
\end{document}

enter image description here

But removing the preview option allows for horizontal expansion but throws you can't use \eqno in math mode

enter image description here

If anyone has an idea of how I can get a simple page that expands with what I write it would be greatly appreciated!

  • you can use the varwidth option to get closer to what you suggest but really there is no natural width unless you want to set every paragraph on one very long line, you need some target width for line breaking – David Carlisle Jul 10 at 21:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.