TeX - LaTeX Asked on June 18, 2021
I want to make a thesis like my institute format. And in my institute, the roman numbering is oneside (except tableofcontent) and the arabic numbering is twoside. How to make it? This is my MWE
documentclass[a4paper, 12pt, twoside]{book}
usepackage{pdfpages}
usepackage{pslatex}%
usepackage{setspace}
setlength{abovecaptionskip}{1pt}
usepackage[paperheight=297mm,paperwidth=215mm,top=3cm,left=4cm,bottom=3cm,right=3cm]{geometry}
renewcommand{thechapter}{Roman{chapter}}
renewcommand{thesection}{arabic{chapter}.arabic{section}}
renewcommand{thesubsubsection}{arabic{chapter}.arabic{subsubsection}}
renewcommand{thefigure}{arabic{chapter}.arabic{figure}}
renewcommand{thetable}{arabic{chapter}.arabic{table}}
renewcommand{theequation}{arabic{chapter}.arabic{equation}}
renewcommand{figurename}{Gambar}
renewcommand{tablename}{Tabel}
%renewcommand{refname}{Daftar Pustaka}
%renewcommand{bibliname}{Daftar Pustaka}
usepackage{colortbl}
usepackage[none]{hyphenat}
usepackage{wrapfig}
usepackage{textcomp}
usepackage{enumerate}
usepackage{changepage}
usepackage{mdframed} newmdenv[]{kotak} %membuat kotak
newenvironment{subs}
{adjustwidth{0.935cm}{0pt}}
{endadjustwidth}
newenvironment{subs2}
{adjustwidth{1.28cm}{0pt}}
{endadjustwidth}
newenvironment{subs3}
{adjustwidth{2cm}{0pt}}
{endadjustwidth}
% Membuat seluruh tulisan menjadi Times New Roman.
usepackage{pslatex}
usepackage{amsmath} usepackage{mathtools} newcommand
numberthis{addtocounter{equation}{1}tag{theequation}} %penomoran equation
usepackage{amssymb} usepackage{mathrsfs}
hyphenpenalty=10000
hbadness=10000
tolerance=1
emergencystretch=maxdimen
usepackage{graphicx}
renewcommand{chaptername}{BAB} % mengubah "Chapter" jadi "BAB"
makeatletter
renewcommand{@makechapterhead}[1]{ %pengaturan awal
{parindent z@ raggedright normalfont
ifnum c@secnumdepth >m@ne
if@mainmatter
center MakeUppercase{largebfseries @chapappspace thechapter}
%chapappspace memunculkan kata "Bab"
parnobreak
vskip 6p@ % Mengatur jarak antara "Bab 1" dan "Pendahuluan"
fi
fi
interlinepenalty@M
large uppercase{bfseries #1parnobreak} %Bagian ini memunculkan judul bab
vskip 30p@ % Mengatur jarak antara "Bab 1" dengan "Teks"
}}
%
makeatother %pengaturan akhir
usepackage[pagestyles]{titlesec}
titleformat{section}{bfnormalsize}{makebox[1.78em][l]{thesection}}{1ex}{}{}
titleformat*{subsection}{bfnormalsize}
titleformat*{subsubsection}{bfnormalsize}
% Mengatur spacing section
titlespacing*{section}
{0pt}{24pt}{6pt}
titlespacing*{subsection}
{0pt}{24pt}{6pt}
titlespacing*{subsubsection}
{0pt}{24pt}{6pt}
% Untuk mengkustomisasi margin
newpagestyle{mainps}{%
setfoot[thepage][][]{}{}{thepage}
}
usepackage{scrextend}
% Digunakan untuk mengatur caption dalam dokumen.
usepackage[font=footnotesize,format=plain,up,textfont=up]{caption}
% Untuk menghapus titik dua (colon)
captionsetup[figure]{labelsep=space}
captionsetup[table]{labelsep=space}
usepackage{tocbasic}
renewcommand{contentsname}{DAFTAR ISI}
% Redefinition of ToC command to get centered heading
makeatletter
renewcommandtableofcontents{%
addcontentsline{toc}{chapter}{DAFTAR ISI}cleardoublepagenullvspace{-12pt}hfilltextbf{largecontentsname}hfillnullpar
@mkboth{MakeUppercasecontentsname}{MakeUppercasecontentsname}%
vspace{30pt}
@starttoc{toc}%
}
makeatother
usepackage{eqparbox} %membuat spasi chapter rata
usepackage{titletoc}%
titlecontents{chapter}% <section-type>
[0pt]% <left>
{vspace{12pt}bfseries}% <above-code>
{eqmakebox[TC][l]{chaptername~thecontentslabel }quad}% <numbered-entry-format>
{}% <numberless-entry-format>
{hfillcontentspage}[vspace{0pt}]
titlecontents{section}[27mm]
{vspace{-6pt}normalsizenormalfont}
{contentslabel[thecontentslabel]{24pt}}{}
{titlerule*[.75em]{.}{contentspage}}
titlecontents{subsection}[38mm]
{vspace{-6pt}normalsizenormalfont}
{contentslabel[thecontentslabel]{30pt}}{}
{titlerule*[.75em]{.}{contentspage}}
%listoffigures
renewcommand{listfigurename}{DAFTAR GAMBAR}
cleardoublepage
makeatletter
renewcommandlistoffigures{{%
letoldnumberlinenumberline%
renewcommand{numberline}{figurename~oldnumberline}%
nullvspace{-24pt}hfilltextbf{fontsize{14}{12}selectfontlistfigurename}hfillnullpar
@mkboth{MakeUppercaselistfigurename}{MakeUppercaselistfigurename}%
vspace{20pt}
@starttoc{lof}%
}}
titlecontents{figure}
[2.5cm]
{addvspace{12pt}}
{makebox[0pt][r]{%
makebox[2.4cm][l]{Gambar~thecontentslabel}%
}%
}
{hspace{-1.7cm}}
{titlerule*[6pt]{.}contentspage}
% from https://tex.stackexchange.com/a/275577:
usepackage{xpatch}
makeatletter
xpatchcmd{@chapter}{%
addtocontents{lof}{protectaddvspace{10p@}}%
addtocontents{lot}{protectaddvspace{10p@}}%
}{}{}{}
makeatother
%listoftables
renewcommand{listtablename}{DAFTAR TABEL}
cleardoublepage{}
makeatletter
renewcommandlistoftables{%
nullhfilltextbf{largelisttablename}hfillnullpar
@mkboth{MakeUppercaselisttablename}{MakeUppercaselisttablename}%
vspace{20pt}
@starttoc{lot}%
}
renewcommand{listtablename}{DAFTAR TABEL}
cleardoublepage{}
makeatletter
renewcommandlistoffigures{{%
letoldnumberlinenumberline%
renewcommand{numberline}{figurename~oldnumberline}%
nullhfilltextbf{largelistfigurename}hfillnullpar
@mkboth{MakeUppercaselistfigurename}{MakeUppercaselistfigurename}%
vspace{20pt}
@starttoc{lof}%
}}
titlecontents{table}
[2.5cm]
{addvspace{12pt}}
{makebox[0pt][r]{%
makebox[2.4cm][l]{Tabel~thecontentslabel}%
}%
}
{hspace{-1.7cm}}
{titlerule*[6pt]{.}contentspage}
usepackage{xpatch}
makeatletter
xpatchcmd{@chapter}{%
addtocontents{lof}{protectaddvspace{10p@}}%
addtocontents{lot}{protectaddvspace{10p@}}%
}{}{}{}
makeatother
newenvironment{abstract}{
vspace*{fill}
begin{center}%
bfseriesabstractname
end{center}}%
{vfill}
usepackage[style=authoryear,natbib=true]{biblatex}
addbibresource{references.bib}
usepackage{fancyhdr}
usepackage{subcaption}
begin{document}
pagestyle{plain}
%fncyfront
frontmatter
newgeometry{top=4.5cm, bottom=4.5cm,left=2cm,right=2cm}
begin{titlepage}
pagestyle{fancy}
addcontentsline{toc}{chapter}{HALAMAN SAMPUL} %Menghilangkan nomor halaman
centering %rata tengah
%Memanggil gambar, untad.jpg = nama file gambar, width = lebar gambar, height = tinggi gambar
%environment akhir gambar
vspace{0.5cm}
%memulai rata tengah
fontsize{14}{12pt} selectfont {SOLUSI NUMERIK MODEL ALIRAN MASSADALAM SISTEM KULTIVASI textit{OPEN POND RACEWAYS} PADA SAWAH ALGA}
end{titlepage}
setcounter{page}{2}
addcontentsline{toc}{chapter}{HALAMAN JUDUL}
begin{titlepage}
cleardoublepage
pagestyle{fancy}
%Menghilangkan nomor halaman
centering %rata tengah
%memulai rata tengah
kkkkkkkkkkkkkkk
end{titlepage}
restoregeometry
setcounter{page}{3}
addcontentsline{toc}{chapter}{HALAMAN PERSETUJUAN PEMBIMBING}
begin{center}
{fontsize{14}{12}selectfont{textbf{PERSETUJUAN PEMBIMBING}}}
end{center}
vspace{36pt}
cleardoublepage
addcontentsline{toc}{chapter}{HALAMAN PENGESAHAN PENGUJI}
begin{center}
{fontsize{14}{12}selectfont{textbf{PENGESAHAN DEWAN PENGUJI}}}
end{center}
vspace{24pt}
addcontentsline{toc}{chapter}{DAFTAR ISI}
tableofcontents
newpage
mainmatter
pagestyle{mainps}
cleardoublepage
onehalfspacing
chapter{PENDAHULUAN}
thispagestyle{empty}
section{Latar Belakang}
newpage
section{Rumusan Masalah}
end{document}
from titlepage
until tableofcontent
must be oneside. And from chapter until the last must be twoside.
Not a complete answer to your question but the following shows how you can change between onesided roman numbered pages and twosided arabic numbered pages.
% sideprob.tex SE 522630 mix of one and twosided
documentclass[twoside]{report}
usepackage{lipsum}
setlength{textheight}{4in}
makeatletter
newcommand{setoneside}{@twosidefalse @mparswitchfalse}
newcommand{settwoside}{@twosidetrue @mparswitchtrue}
makeatother
begin{document}
pagenumbering{roman}
setoneside
textbf{One sided roman numbering}
lipsum[1-6]
clearpage
pagenumbering{arabic}
settwoside
textbf{Two side arabic numbering}
lipsum[1-6]
end{document}
Use the appropriate macros (set...side
and pagenumbering{...}
at the appropriate places in your document.
Answered by Peter Wilson on June 18, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP