I am tryin to adapt the Elegant Book template for my book. I have made some changes, but I am having problems adapting the template for the following:
The page layout as required by the publisher, which I have printed to a PDF using the layout package. I want to replicate this page layout with the Elegant Book template (please see the image below:
).
I want to add crop marks to all pages, with width of 6.14.in and height of 9.30in.
Related to the point 2, with all the templates that I have tried, the crop marks appear correctly before the first chapter begins, but they get disturbed (printed at wrong place) from the beginning of the first chapter (please see the image below:
).
How can I get different headers for odd and even pages. Currently, both sides have section number and title, but I would like to have, preferably, chapter number and short chapter title on the even side (right-aligned) and section number and section title on the odd side (left-aligned), as is usual with many publications.
I don't want to indent the first line of a paragraph.
I am sorry if some of these questions are naive. I am only familiar with very high level use of LaTeX and this is the first time I am formatting a book.
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}
\include
or\frontmatter
in the preamble. use\input{frontmatter/preamble}
and move\frontmatter
to the document (where you have it commented out)