简体   繁体   English

Latex款自定义编号

[英]Latex section custom numbering

I am using a document class article and package kafkanotes.我正在使用文档 class 文章和 package kafkanotes。 I want to start my section numbering from 4 instead of 1. Is it possible?我想从 4 而不是 1 开始我的部分编号。可以吗? How to do it?怎么做?

My complete sty file我完整的风格文件

%==============STYLE DIMULAI==============%
\usepackage[marginparwidth=6cm, marginparsep=0.7cm]{geometry}
%Package Matematika
\usepackage{amsmath}
%Style Gambar
\usepackage{graphicx}
\usepackage{floatrow}
\floatsetup[widefigure]{margins=hangright,capposition=beside,
capbesideposition={bottom, right},floatwidth=\textwidth}
%Package Catatan di Margin
\usepackage{sidenotes}
%Style \maketitle
\usepackage{titlesec}
\makeatletter
\renewcommand{\maketitle}{\bgroup\setlength{\parindent}{0pt}
\begin{flushleft}
  {\Huge\sffamily\bfseries\@title}
  \vskip 1.5em
  {\sffamily\@author}
\end{flushleft}\egroup
}
\makeatother
%Header and Footer Package
\usepackage{fancyhdr}
%Style Abstract
\renewenvironment{abstract}
    {\par{\bfseries \noindent \sffamily \abstractname.}}
    {\vskip 0.1em \medskip\noindent \rule{\linewidth}{.5pt}}
%Font Teks Utama dan Sesi
\usepackage{lmodern}
\renewcommand*\familydefault{\sfdefault} %% Only if the base font of the document is to be sans serif
\usepackage[T1]{fontenc}
\usepackage{sectsty}
\sectionfont{\sffamily\fontsize{15}{15}\selectfont}
\subsectionfont{\sffamily\fontsize{10}{5}\selectfont}
%Style Hyperlink
\usepackage{hyperref}
\hypersetup{
    colorlinks,
    citecolor=black,
    filecolor=black,
    linkcolor=black,
    urlcolor=black
}
%Pembahasaan ke Indonesia
\renewcommand{\figurename}{\footnotesize Figure}
\renewcommand{\tablename}{\footnotesize Table}
\renewcommand{\contentsname}{Outline}

My tex file:我的tex文件:

\documentclass{article}

\usepackage{kafkanotes}
\usepackage{booktabs}
\usepackage{biblatex} %Imports biblatex package
\addbibresource{bibliography.bib} %Import the bibliography file

%Judul dan Penulis
\title{XYZ}
\author{\textbf{ABC}}


\begin{document}

\begin{titlepage}
\thispagestyle{empty}
\maketitle

\begin{abstract}
Lorem
\end{abstract}

\tableofcontents
\end{titlepage}
\section{Some section}

\printbibliography
\end{document}

You could increase your section counter at the start of the document with \addtocounter{section}{3}您可以使用\addtocounter{section}{3}增加文档开头的部分计数器


\documentclass{article}

\makeatletter
%==============STYLE DIMULAI==============%
\usepackage[marginparwidth=6cm, marginparsep=0.7cm]{geometry}
%Package Matematika
\usepackage{amsmath}
%Style Gambar
\usepackage{graphicx}
\usepackage{floatrow}
\floatsetup[widefigure]{margins=hangright,capposition=beside,
capbesideposition={bottom, right},floatwidth=\textwidth}
%Package Catatan di Margin
\usepackage{sidenotes}
%Style \maketitle
\usepackage{titlesec}
\makeatletter
\renewcommand{\maketitle}{\bgroup\setlength{\parindent}{0pt}
\begin{flushleft}
  {\Huge\sffamily\bfseries\@title}
  \vskip 1.5em
  {\sffamily\@author}
\end{flushleft}\egroup
}
\makeatother
%Header and Footer Package
\usepackage{fancyhdr}
%Style Abstract
\renewenvironment{abstract}
    {\par{\bfseries \noindent \sffamily \abstractname.}}
    {\vskip 0.1em \medskip\noindent \rule{\linewidth}{.5pt}}
%Font Teks Utama dan Sesi
\usepackage{lmodern}
\renewcommand*\familydefault{\sfdefault} %% Only if the base font of the document is to be sans serif
\usepackage[T1]{fontenc}
\usepackage{sectsty}
\sectionfont{\sffamily\fontsize{15}{15}\selectfont}
\subsectionfont{\sffamily\fontsize{10}{5}\selectfont}
%Style Hyperlink
\usepackage{hyperref}
\hypersetup{
    colorlinks,
    citecolor=black,
    filecolor=black,
    linkcolor=black,
    urlcolor=black
}
%Pembahasaan ke Indonesia
\renewcommand{\figurename}{\footnotesize Figure}
\renewcommand{\tablename}{\footnotesize Table}
\renewcommand{\contentsname}{Outline}


\makeatother

\usepackage{booktabs}
\usepackage{biblatex} %Imports biblatex package
\addbibresource{bibliography.bib} %Import the bibliography file

%Judul dan Penulis
\title{XYZ}
\author{\textbf{ABC}}


\begin{document}

\addtocounter{section}{3}

\begin{titlepage}
\thispagestyle{empty}
\maketitle

\begin{abstract}
Lorem
\end{abstract}

\tableofcontents
\end{titlepage}
\section{Some section}

\printbibliography
\end{document}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM