How to make document custom page dimensions?

I have seen the options such as a4paper, a5paper, letterpaper, etc. to go in the square brackets after \documentclass, but what I want is 8.25 inches width by 10.75 inches height for one document and 6 inches width by 9 inches height for another one. How is this done?

253k 70 70 gold badges 730 730 silver badges 796 796 bronze badges asked Nov 5, 2012 at 11:38 1,977 2 2 gold badges 17 17 silver badges 18 18 bronze badges Use the geometry package. Commented Nov 5, 2012 at 11:41

3 Answers 3

Hope the code is self explanatory.

\documentclass \usepackage \usepackage[paperheight=10.75in,paperwidth=8.25in,margin=1in,heightrounded,showframe] \begin \Blinddocument \end
\documentclass \usepackage \usepackage[paperheight=9in,paperwidth=6in,top=1in,bottom=1in,right=1in,left=1in,heightrounded,showframe] \begin \Blinddocument \end
answered Nov 5, 2012 at 12:34 user11232 user11232

Here is method without using a package:

\pdfpagewidth 8.25in \pdfpageheight 10.75in 
answered Mar 19, 2016 at 22:50

NB this won't work if the desired dimensions are less than the default margins of the document type. e.g. I tried making a 8.5" x 1" with \documentclass

, and nothing shows up. Once you load the geometry package to address this issue, this solution has no advantage. Perhaps there is another way of changing the default margins?

Commented Sep 28, 2018 at 17:59

The geometry package, version 2020/01/02 v5.9, now has the command ''heightrounded'', which calculates for you an integer number of lines of text in ''\textheight''. So, it is suggested that that if you change ''\baselineskip'', that this be done before calling geometry:

\documentclass[11pt,openany] % XeLatex. pdf output. \author \date \title \usepackage \usepackage \usepackage \setmainfont[Mapping=tex-text] \newlength <\OriginalBaselineSkip>\setlength<\OriginalBaselineSkip> \usepackage \setstretch % Set font and line spacing before `heightrounded' below. \setlength<\paperwidth> \setlength<\paperheight> \usepackage[% showframe, % left=0.8in, % 'left' means 'insidemargin' right=1.446in, % 'right' means 'outsidemargin' hmarginratio=, top=1.446in, vmarginratio=, marginparwidth=0.6in, marginparsep=0.125in, heightrounded, % To make the text block height an integer number of lines. driver=pdftex % Final output is pdf. ] % \usepackage % ------- \layout --------------------------------------------------- % \usepackage % Use \layout to show page geometry % % You can change \layout output metric here.. % (Heiko Oberdiek) % in = 1/72.27 = 0.013837000 % % picas = 12/72.27 = 0.166044002 % % bp = 72/72.27 = 0.996264010 % % mm = 25.4/72.27 = 0.351459804 % \makeatletter % \renewcommand*<\lay@value>[2] % < % \strip@pt\dimexpr0.013837\dimexpr\csname#2\endcsname\relax\,in % >% \makeatother % % ------------------------------------------------------------------- % \usepackage % For nice looking tables \begin . \end \usepackage % Adds 'S' option for aligning table values at decimal point. %%%%%%%%%% A macro to display parameters in other units: %%%%%%%%%%%%%%%%%%% %%% Example useage: \convertto<\pdfpagewidth>in %%% \the\pdfpagewidth also works. \makeatletter \def\convertto#1#2 \makeatother %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \usepackage[hyphens] \usepackage[hidelinks] \raggedbottom % \flushbottom \begin % \pagenumbering \maketitle % \pagenumbering \pagestyle \tableofcontents \thispagestyle \pagenumbering \pagestyle \chapter \section \kant[1-7] \newlength <\insidemargin>\setlength<\insidemargin> \addtolength<\insidemargin> <\oddsidemargin>\newlength <\outsidemargin>\setlength<\outsidemargin> <\paperwidth>\addtolength<\outsidemargin> <-\insidemargin>\addtolength<\outsidemargin> \newlength \setlength \addtolength <\headheight>\addtolength \addtolength <\headsep>\newlength \setlength <\paperheight>\addtolength \addtolength \newlength <\TextWidth>\setlength<\TextWidth> \newlength <\TextHeight>\setlength<\TextHeight> \newlength <\LinesOfText>\newlength \setlength \addtolength \setlength\LinesOfText<1pt*\ratio+1pt> \newpage % \begin \centering \begin \toprule \multicolumn & Name & pt & in & mm \\ \midrule 1 & \verb|\paperwidth| & \convertto <\paperwidth>& \convertto <\paperwidth>& <\paperwidth>> \\ 2 & \verb|\paperheight| & \convertto <\paperheight>& \convertto <\paperheight>& <\paperheight>> \\ 3 & \verb|\textwidth| & \convertto <\TextWidth>& \convertto <\TextWidth>& <\TextWidth>> \\ 4 & \verb|\textheight| & \convertto <\TextHeight>& \convertto <\TextHeight>& <\TextHeight>> \\ 5 & \verb|\left| & \convertto <\insidemargin>& \convertto <\insidemargin>& <\insidemargin>> \\ 6 & \verb|\right| & \convertto <\outsidemargin>& \convertto <\outsidemargin>& <\outsidemargin>> \\ 7 & \verb|\top| & \convertto & \convertto & > \\ 8 & \verb|\bottom| & \convertto & \convertto & > \\ 9 & \verb|\marginparwidth| & \convertto <\marginparwidth>& \convertto <\marginparwidth>& <\marginparwidth>> \\ 10 & \verb|\marginparsep| & \convertto <\marginparsep>& \convertto <\marginparsep>& <\marginparsep>> \\ 11 & \verb|\headheight| & \convertto <\headheight>& \convertto <\headheight>& <\headheight>> \\ 12 & \verb|\headsep| & \convertto <\headsep>& \convertto <\headsep>& <\headsep>> \\ 13 & \verb|\footskip| & \convertto & \convertto & > \\ \bottomrule \end \flushleft \verb|\baslineskip =| \the\OriginalBaselineSkip\ (Original)\par \verb|\baslineskip =| \the\baselineskip\ (Current, after \verb|\setstretch|)\par \verb|\topskip =| \the\topskip\par The number of lines of text = \par \verb|(\textheight-\topskip)/\baselineskip + 1 = | \convertto <\LinesOfText>% \end \layout \end