What do hscale and vscale in the geometry package mean?

1,616

Barring some technical details, using

\usepackage{geometry}% http://ctan.org/pkg/geometry
\geometry{hscale=<hval>,vscale=<vval>}

is effectively similar to

\geometry{totalwidth=<hval>\paperwidth,totalheight=<vval>\paperheight}%

thereby scaling the "total body" with respect to the stock/paper size. Technically, the "total body" could include the space around the text block, which includes the margin space (horizontally), header and footer (vertically), so the above is a small simplification.

Compiling the following minimal example, removing the appropriate comment, you'll notice the same look output by geometry:

\documentclass{article}
\usepackage{lipsum}% http://ctan.org/pkg/lipsum
\usepackage{geometry}% http://ctan.org/pkg/geometry
\geometry{showframe,hscale=0.6,vscale=0.5}% First compile (left image)
%\geometry{showframe,totalwidth=0.6\paperwidth,totalheight=0.5\paperheight}% Second compile (right image)
\begin{document}
\lipsum[1-5]
\end{document}

The image on the left contains the hscale and vscale options, while the image on the right contains the equivalent totalwidth and totalheight settings:

Use of hscale and vscale in geometry package

There are many equivalences between options that can be specified. For example, noheadfoot is equivalent to specifying both nohead and nofoot. These equivalences are usually meant to provide abbreviated package options (that combine other, more specific, choices) and promote ease-of-use.

Share:
1,616

Related videos on Youtube

Prabhanjan Naib
Author by

Prabhanjan Naib

Updated on December 04, 2020

Comments

  • Prabhanjan Naib
    Prabhanjan Naib almost 3 years

    What are hscale and vscale? How can I use them?

    If I use geometry package like the code below, what will happen to the total body?

    \usepackage{geometry}
    \geometry{hscale = 0.6, vscale = 0.5}
    

    I didn't understand the use even after reading the user manual page number = 6, 7.