如何使单面罗马数字和双面阿拉伯数字

如何使单面罗马数字和双面阿拉伯数字

我想写一篇像我所在学院格式的论文。在我的学院里,罗马数字编号是单面的(目录除外),阿拉伯数字编号是双面的。怎么做?这是我的 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{\large\bfseries \@chapapp\space \thechapter}
    %\chapapp\space memunculkan kata "Bab"
    \par\nobreak
    \vskip 6\p@ % Mengatur jarak antara "Bab 1" dan "Pendahuluan"
    \fi
    \fi
    \interlinepenalty\@M
    \large \uppercase{\bfseries #1\par\nobreak} %Bagian ini memunculkan judul bab
    \vskip 30\p@ % Mengatur jarak antara "Bab 1" dengan "Teks"
    }}
    %
    \makeatother                            %pengaturan akhir
    \usepackage[pagestyles]{titlesec}

    \titleformat{\section}{\bf\normalsize}{\makebox[1.78em][l]{\thesection}}{1ex}{}{}
    \titleformat*{\subsection}{\bf\normalsize}
    \titleformat*{\subsubsection}{\bf\normalsize}
    % 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
    \renewcommand\tableofcontents{%
      \addcontentsline{toc}{chapter}{DAFTAR ISI}\cleardoublepage\null\vspace{-12pt}\hfill\textbf{\large\contentsname}\hfill\null\par
      \@mkboth{\MakeUppercase\contentsname}{\MakeUppercase\contentsname}%
      \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>
      {\hfill\contentspage}[\vspace{0pt}]

      \titlecontents{section}[27mm]
        {\vspace{-6pt}\normalsize\normalfont}
        {\contentslabel[\thecontentslabel]{24pt}}{}
        {\titlerule*[.75em]{.}{\contentspage}}

      \titlecontents{subsection}[38mm]
        {\vspace{-6pt}\normalsize\normalfont}
        {\contentslabel[\thecontentslabel]{30pt}}{}
        {\titlerule*[.75em]{.}{\contentspage}}
    %listoffigures
    \renewcommand{\listfigurename}{DAFTAR GAMBAR}
    \cleardoublepage
    \makeatletter
    \renewcommand\listoffigures{{%
      \let\oldnumberline\numberline%
      \renewcommand{\numberline}{\figurename~\oldnumberline}%
      \null\vspace{-24pt}\hfill\textbf{\fontsize{14}{12}\selectfont\listfigurename}\hfill\null\par
      \@mkboth{\MakeUppercase\listfigurename}{\MakeUppercase\listfigurename}%
      \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}{\protect\addvspace{10\p@}}%
      \addtocontents{lot}{\protect\addvspace{10\p@}}%
    }{}{}{}
    \makeatother

    %listoftables
    \renewcommand{\listtablename}{DAFTAR TABEL}
    \cleardoublepage{}
    \makeatletter
    \renewcommand\listoftables{%
      \null\hfill\textbf{\large\listtablename}\hfill\null\par
      \@mkboth{\MakeUppercase\listtablename}{\MakeUppercase\listtablename}%
      \vspace{20pt}

        \@starttoc{lot}%
    }
    \renewcommand{\listtablename}{DAFTAR TABEL}
    \cleardoublepage{}
    \makeatletter
    \renewcommand\listoffigures{{%
      \let\oldnumberline\numberline%
      \renewcommand{\numberline}{\figurename~\oldnumberline}%
      \null\hfill\textbf{\large\listfigurename}\hfill\null\par
      \@mkboth{\MakeUppercase\listfigurename}{\MakeUppercase\listfigurename}%
      \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}{\protect\addvspace{10\p@}}%
      \addtocontents{lot}{\protect\addvspace{10\p@}}%
    }{}{}{}
    \makeatother

    \newenvironment{abstract}{
      \vspace*{\fill}
      \begin{center}%
        \bfseries\abstractname
      \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 MASSA\\DALAM 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}

\titlepage\tableofcontent必须是单面的。从 章 到 最后一章 必须是双面的。

答案1

这不是对您的问题的完整回答,但以下内容显示了如何在单面罗马数字页和双面阿拉伯数字页之间进行切换。

% 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}

使用适当的宏(\set...side\pagenumbering{...}在文档中的适当位置)。

相关内容