ElegantLaTeX/ElegantBook

Trying to adapt the template for a different page size, font size with crop marks

singhakr opened this issue · 3 comments

I am trying to adapt the ElegantBook template for my book, which requires different text width and height, font size and also requires crop marks (width=6.14in, height=9.30in). I am not sure how to do it. The class file to which these formatting options have to match is attached (with document class option sunil1). Example PDF output is also attached: only for text width, text height and font size.

My book.tex file is as below:


% \documentclass[11pt]{elegantbook}
\documentclass[black,10pt]{elegantbook}

\usepackage{fixltx2e,fix-cm}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{wrapfig,lipsum,booktabs}
\usepackage{subfigure}
\usepackage{makeidx}
\usepackage{multicol}
%\usepackage[breaklinks]{hyperref}
% \usepackage{ragged2e}
%\usepackage{algpseudocode}
%\usepackage[ruled,vlined]{algorithm2e}
\usepackage[linesnumbered,ruled,vlined]{algorithm2e}

% \usepackage[dvips=false,pdftex=false,vtex=false]{geometry}
% \geometry{
% paperwidth=6.14in%4.71875in,
% paperheight=9.30in%4.75in,
% % margin=2em,
% % bottom=1.5em,
% %nohead
% }
% \usepackage[cam,a4,center,dvips]{crop}

\usepackage[
% set width and height to a4 width and height + 6mm
width=6.14in, height=9.30in,
% width=21.6truecm, height=30.3truecm,
% use any combination of these options to add different cut markings
cam, axes, frame, cross,
% set the type of TeX renderer you use
pdftex,
% center the contents
center
]{crop}

\usepackage{lscape}

\usepackage{tipa}
\let\ipa\textipa
\usepackage{vowel}

\usepackage{adjustbox}

% \usepackage{showframe}
\usepackage{rotating}

\newcommand{\BlankCell}{}

\usepackage[
left = \flqq{},%
right = \frqq{},%
leftsub = \flq{},%
rightsub = \frq{} %
]{dirtytalk}

\usepackage[english]{babel}
\usepackage{csquotes}

\usepackage[T1]{fontenc}
\usepackage{listings}
\usepackage[lastexercise]{exercise}
\usepackage{xcolor}
\usepackage{courier}

\frenchspacing
\tolerance=5000

% \definecolor{codegreen}{rgb}{0,0.6,0}
% \definecolor{codegray}{rgb}{0.5,0.5,0.5}
% \definecolor{codepurple}{rgb}{0.58,0,0.82}
% \definecolor{backcolour}{rgb}{0.95,0.95,0.92}

\lstdefinestyle{mystyle}{
% backgroundcolor=\color{backcolour},
% commentstyle=\color{codegreen},
% keywordstyle=\color{magenta},
% numberstyle=\tiny\color{codegray},
% stringstyle=\color{codepurple},
basicstyle=\fontfamily{phv},%\footnotesize,
breakatwhitespace=false,
breaklines=true,
captionpos=b,
keepspaces=true,
numbers=left,
numbersep=5pt,
showspaces=false,
showstringspaces=false,
showtabs=false,
tabsize=2
}

\lstset{style=mystyle}

\lstset{basicstyle=\fontfamily{phv}\selectfont}

\makeindex

\include{frontmatter/preamble} %place custom commands and macros here

\lstset{numbers=left,xleftmargin=2em,frame=single,framexleftmargin=1.5em}
\lstset{frame=shadowbox}
\lstset{showlines=false}

\frontmatter

\title{Title} %This is a placeholder titlepage, it will not be final.
\author{Author}

% \subtitle{Classic Elegant\LaTeX{} Template}

% \author{Author}
% \institute{Elegant\LaTeX{} Program}
% \date{April 9, 2022}
% \version{4.3}
% \bioinfo{Bio}{Information}

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

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

% modify the color in the middle of titlepage
\definecolor{customcolor}{RGB}{32,178,170}
\colorlet{coverlinecolor}{customcolor}

\begin{document}

\maketitle

% \frontmatter
% \tableofcontents

% \mainmatter

% \include{frontmatter/dedication}
\cleardoublepage
\setcounter{page}{3} %previous pages will be \setcounter{page}{7} %previous pages will be reserved for frontmatter to be added in later.
\tableofcontents
\include{frontmatter/foreword}
\include{frontmatter/preface}
%\listoffigures
%\listoftables
%\include{frontmatter/contributor}
%\include{frontmatter/symbollist}
\mainmatter

\part{Introduction and Prerequisites}

%%%
% Chapter includes
%%%

\bibliographystyle{plain}
\bibliography{bibliography}

\printindex

\end{document}

sunil.cls.txt
Example_Output.pdf

I have a couple of more questions related to this, which I have put here:

Good answer from TeX Stack Exchange, you can check if it meets your needs.

That answer was written by me, as I had found a way to do that.