2

Problem

Context

I was trying to make a multi-column document, but found that the content wasn't being displayed properly as there was a display equation spilling over into the other column. My first solution (which worked) was to use the geometry package to set the paperwidth and paperheight to be the values for A4-paper * 1.5 (315mm and 445.5mm, respectively). This worked perfectly and I am happy with the layout of the document, but I would like the exported PDF to still be A4 sized (sort of like what Adobe Acrobat's pre-flight fixups do).

This is where I am hitting a dead end. I've tried googling this, but to no avail. Some suggest using the pdfpages package to load it in as a separate PDF file and just scale it down from there, but I would like to keep this in a single TeX file, if possible.

The actual problem

How can I shrink the entire document, which has been enlarged to 1.5x A4-paper, back down to A4-paper size, but keeping the layout and formatting of the enlarged (1.5xA4-paper size) document??

Minimum Reproducible Example

\documentclass[12pt,titlepage]{article}

\usepackage[margin=2cm, paperwidth=315mm, paperheight=445.5mm]{geometry}

\usepackage{multicol}

\usepackage{xspace}
\usepackage{microtype}

\usepackage{lipsum}
\usepackage{siunitx}

\title{MRE - Resizing entire document}
\author{BrightBulb123}

\begin{document}

    \maketitle

    \begin{multicols}{2}

        \section{Introduction}

        \lipsum[1-2]

        $$\frac{F_{\text{g}_{\text{Earth-Mars}}}}{F_{\text{g}_{\text{Earth-Sun}}}}\times100=\frac{\num{3.0e+16}}{\num{3.4e+22}}\times100\approx\num{8.8e-05}\%=0.000088\%$$  % troublesome equation

        \lipsum[2-5]

    \end{multicols}

\end{document}

Screenshots

What I had before

MRE showcasing the display math formula spilling over to the neighbouring column.

What I have now (enlarged page size)

MRE showcasing the enlarged page and the how the formula doesn't spill into the neighbouring column now.

Essentially, what I want is to just shrink down that second image to A4-paper size.


Edits

Edit 1

I want to clarify that it doesn't matter if it looks ugly or illegible at first glance. This is just a personal project of mine, not something that I will be showcasing professionally.

I just want to see how to do it from within the document's code itself, without using any external tools.

Edit 2

This post is similar to what I want to do (I'm just doing it backwards (shrinking instead of expanding)).

4
  • So, if that works, you will have reduced your font-size in the end? // May be it's good to post a few screenshots so we can better follow your problem description? // Just wondering why you don't use one of the ams packages or similar, available on ctan?
    – MS-SPO
    Commented Apr 30, 2023 at 8:17
  • 1. @MS-SPO Yes, I'll end up reducing the overall font size in the compiled PDF. // 2. I'll try to add screenshots to clarify my request. // 3. I'm using AMS packages to add symbols and environments in my actual document. Please recommend a specific package to guide me further as to what you mean in the context of resizing the page. The provided code does not require them as it compiled fine without them. Commented Apr 30, 2023 at 9:22
  • 2
    If you don't care that the font then gets smaller, why don't you write directly in 10 or 9pt as the main size? Commented Apr 30, 2023 at 12:03
  • 1
    Or use \small, \footnotesize, \scriptsize, or \tiny? Commented Apr 30, 2023 at 12:38

2 Answers 2

3

I assume, that your page margins are 2cm. In this case, when for siunitx is set tight-spacing, than equation not protrude right column border. But you may find @ MS-SPO comment useful. Using for example align* split equation into two lines and by this make it much narrower.

There is one more possibilities. Using nccmath package (which is extension of amsmath, so it also load it) and its macro \medmath make equation smaller. See if this an acceptable option for you.

\documentclass[12pt,titlepage]{article}
\usepackage[margin=2cm]{geometry}
%--------------- show page layout. don't use in a real document!
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.15pt}
\renewcommand*\ShowFrameColor{\color{red}}
%
\usepackage{lipsum}                             % for dummy text
%---------------------------------------------------------------%

\usepackage{lipsum}

\usepackage{multicol}

\usepackage{xspace}
\usepackage{microtype}
\usepackage{siunitx}
\usepackage{nccmath}

\title{MRE - Resizing entire document}
\author{BrightBulb123}

\begin{document}
\maketitle

\begin{multicols}{2}

\section{Introduction}
\lipsum[1-5]
\[
\sisetup{tight-spacing}
\frac{F_{\text{g}_{\text{Earth-Mars}}}}
     {F_{\text{g}_{\text{Earth-Sun}}}}\times100
        = \frac{\num{3.0e+16}}{\num{3.4e+22}}\times100
        \approx\qty{8.8e-05}{\%}
\]  % troublesome equation
However, above equation you can write as
\begin{align*}
\frac{F_{\text{g}_{\text{Earth-Mars}}}}
     {F_{\text{g}_{\text{Earth-Sun}}}}\times100
    & = \frac{\num{3.0e+16}}{\num{3.4e+22}}\times100 \\ 
    & \approx\qty{8.8e-05}{\%}        
\end{align*}
Another possibilities is use \verb+\medmath', which make equation about 20% smaller:

\[\medmath{
\frac{F_{\text{g}_{\text{Earth-Mars}}}}
     {F_{\text{g}_{\text{Earth-Sun}}}}\times100
    = \frac{\num{3.0e+16}}{\num{3.4e+22}}\times100 \\
\approx\qty{8.8e-05}{\%}
}\]
\lipsum[5-11]

\end{multicols}

\end{document}

(red lines indicate text box borders).

3
  • Thank you for the fix for the equation overflowing into the other column. However, I would still prefer to shrink the entire page to fit a desired size as the way the document is currently laid out (after expanding the page) appeals to me more. Commented Apr 30, 2023 at 8:55
  • 1
    @BrightBulb123, why? My solution already gives desired result! Your desired approach will change font size in entirely document (you will lost control over it). I strongly not recommended what you try to do. Possible result you can easily see, if in my my MWE changes font size to \scriptsize ... but all is up to you. If you like to have ugly looking document (which will not be accepted in any journal/conference), then persist to your demand.
    – Zarko
    Commented Apr 30, 2023 at 9:51
  • 1
    I am not typesetting for my document to be published in a journal/conference. I apologise for the confusion as I should have clarified this is just a personal project. It does not matter if the font is too tiny to read at first glance, or if it looks ugly when scaled down. I am just interested in if it can be done within the document itself without using external tools. Commented Apr 30, 2023 at 9:55
2

Something you could always do, but what I don't recommend, is using local overwrites, localized by a pair of { }. Here I used \tiny, because \small wasn't small enough.

As you can see, it has some side effects, because LaTeX tries to fill the page as good as possible.

Some thoughts and suggestions

However, from a writing philosophy perspective it reminds me more of a WORD-approach. Why not adopting the style, which the academic community uses, e.g. through the article-class?

Why don't you introduce and use here abbreviations for the long force-indices? The naming here is a big part of your problem. Also the "100", i.e. percentage calculations. Either your audience is familiar with that, or you can introduce it somewhere, e.g. in an appendix?

For references, do you know the wikibook on LaTeX, e.g. the section about advanced maths?

Google can be your friend. E.g. entering as search term ctan resizing points to package resizegather. Follow the ctan-links about the topic and see also categories.

This site is your friend. E.g. looking to the right column at Related there's this link, which may or may not help you with package geometry and resizing.

However, still wondering what kind of visual concept your writing will present to me, the reader?

(Desert of blackness - with poor eye navigation) desert of black

Code

result

% https://tex.stackexchange.com/questions/684318/resize-shrink-the-entire-document-after-resizing-expanding-it-once

%\documentclass[12pt,titlepage]{article}
%
%\usepackage[margin=2cm, paperwidth=315mm, paperheight=445.5mm]{geometry}

\documentclass[12pt,a4paper]{article}
\usepackage[margin=2cm]{geometry}


\usepackage{multicol}

%\usepackage{xspace}
%\usepackage{microtype}

\usepackage{lipsum}
\usepackage{siunitx}

\title{MRE - Resizing entire document}
\author{BrightBulb123}

\begin{document}

    \maketitle

    \begin{multicols}{2}

        \section{Introduction}

        \lipsum[1-4]
{% scoping / local change
\tiny
        \[\frac{F_{\text{g}_{\text{Earth-Mars}}}}{F_{\text{g}_{\text{Earth-Sun}}}}\times100=\frac{\num{3.0e+16}}{\num{3.4e+22}}\times100\approx\num{8.8e-05}\%\]  % troublesome equation
}
        \lipsum[5-11]

    \end{multicols}

\end{document}
2
  • 1
    Thank you for the comprehensive response. I apologise for not making the required edits to my question sooner. They would've made it clearer that I do not hold a regard for however ugly/illegible my document looks, I just want to scale it down to A4-paper size. However, I appreciate the time and thought that you have put into providing me with the helpful references and links and imparting your writing philosophy to a beginner like me. With regard to the actual problem, I have edited my question to (hopefully) make it clearer what I want to achieve (I have included screenshots). Commented Apr 30, 2023 at 10:27
  • Thanks. I read the other comments, so it‘s not necessary to repeat ;-) Unlike in other places we tend to avoid discussions here.
    – MS-SPO
    Commented Apr 30, 2023 at 10:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .