# How change paper size in ElegantBook class?

I would like to get paper size A6 (105mm x 148mm). I have used paper=a6paper in document class option, but it is not working. Any suggest is appreciated in advance.

MWE:

\documentclass[10pt,fancy,authoryear,twoside]{elegantbook}% A6 pocket book shape

\usepackage{tabularx}

\setcounter{tocdepth}{4} %to show subsubsections and paragraphs in TOC
\setcounter{secnumdepth}{4}%to show subsubsections and paragraphs in TOC
%--------------------------------------------------
%Bengali Font in Document
%--------------------------------------------------
\tracinglostchars=2
% For a bilingual document
\RequirePackage{fontspec}
\RequirePackage{polyglossia}

\defaultfontfeatures{Ligatures=TeX, Scale=MatchUppercase}
% Times New Roman used for English
%\setmainfont{Times New Roman}
%\setmainfont{Times New Roman}[NFSSFamily=ntxtlf]
\setmainlanguage{bengali}
\setotherlanguage{english}

% Bengali
\newfontfamily\bengalifont{Kalpurush}[
Script=Bengali,
Language=Bengali,
AutoFakeBold = 0.2,
AutoFakeSlant = 0.15  ]

\renewcommand{\chaptermark}[1]{\markboth{\chaptername~\thechapter \, #1\,}{}}
\titleformat{\chapter}[\style]{\bfseries}
{\filcenter\LARGE\enspace\bfseries{\color{structurecolor}%
\IfAppendix{\appendixname}{\chaptername~\thechapter}\enspace}}
{1pt}{\bfseries\color{structurecolor}\LARGE\filcenter}[]

%End--------------------------------------------

\title{নবী ও কবি}
%\subtitle{\Large \it আপনার জন্য সেরা সমাধান}
\author{নসীর  আহমদ}
\date{\today}

%\version{3.11}
%\bioinfo{Bio}{Information}

%\extrainfo{Victory won\rq t come to us unless we go to it. }

%\logo{logo-blue.png}
\cover{cover.jpg}

\begin{document}

\maketitle
\frontmatter

%\include{others/preface}

\tableofcontents

\mainmatter

\include{chapters/chapter01}%

\end{document}


Here is the elegantbook.cls file

Updated: When I use \geometry{reset,a6paper} it totally changes the whole document setting like font size, header line , page number position etc. as below:

How can I fix this?

• Please the the update of my answer. Oct 14 at 17:09

Put \geometry{reset,a6paper}

after \documentclass[10pt,fancy,authoryear,twoside]{elegantbook}% A6 pocket book shape

A6 measures 105 × 148 millimeters or 4.13 × 5.83 inches.

The class elegantbook uses the package geometry. You can change the default layout of the page using \geometry{〈options〉} in the preamble.

(reset sets back the layout dimensions to the settings before geometry was loaded)

UPDATE

The change in font size (margins look larger too) it is an optical illusion, produced by expanding the view in the pdf reader to fit the page in both cases. But A6 paper is half the width of A4. And the text width A6/A4 is 0.38, less than half.

Compile this example using \documentclass[10pt,a4paper]{book} and \documentclass[10pt,a6paper]{book}

% !TeX TS-program = xelatex

\documentclass[10pt,a6paper]{book} % <<<<< A6
%\documentclass[10pt,a4paper]{book} % <<<<< A4
\usepackage{fontspec}

\usepackage[top=20mm, bottom=20mm, left=20mm, right=20mm, showframe,
foot=15mm, marginparsep=0mm]{geometry}

\setlength{\parindent}{0pt}

\makeatletter
\newcommand{\currentfontsize}{Font size is: \f@size pt \bigskip}
\makeatother

\begin{document}

\currentfontsize

As any dedicated reader can clearly see, the Ideal of
practical reason is a representation of, as far as I know,
the things in themselves; as I have shown elsewhere,
the phenomena should only be used as a canon for our
understanding.

\bigskip

Text width = \the\textwidth

\end{document}


The font (10pt} and the margins are the same in both cases. If you print the pages you will see that the font size is the same.

A4 paper size Red lines mark A6 text width with the same margins. See next figure.

A6 paper size

Final test

Compile this code as A6M.tex. It will generate A6M.pdf  with several pages into a A6 paper size.

% !TeX TS-program = xelatex

\documentclass[10pt,a6paper]{book}
\usepackage{fontspec}

\usepackage[top=20mm, bottom=20mm, left=20mm, right=20mm,
foot=15mm, marginparsep=0mm]{geometry}

\setlength{\parindent}{0pt}

\makeatletter
\newcommand{\currentfontsize}{Font size is: \f@size pt \bigskip}
\makeatother

\usepackage{kantlipsum} % dummy text

\begin{document}

\currentfontsize

\kant[1-7]

\end{document}


Now run this code in the same directory. It will place the first four pages of A6M.pdf (A6 page size) on one A4 page. This is a standard procedure to print smaller pages on larger and more available A4.

\documentclass{article}% default is a4paper
\usepackage{pdfpages}
\begin{document}

\includepdf[pages={1-4},nup=2x2, noautoscale, frame]{A6M.pdf}%

\end{document}


• @ SimonDispa When I use \geometry{reset,a6paper}, it changes font size of the document and header line. Please see updated post.
– BSFU
Oct 14 at 0:07
• @BSFU I added un update to the answer explaining why the fonts looks larger. Oct 14 at 17:10

May be try to use something like this one:

\usepackage{geometry}
\geometry{
a6paper,
total={105mm,148mm}
}


https://ru.overleaf.com/learn/latex/Page_size_and_margins