Dear All,
How to divide chapter in subchapters in latex such as i want to use chapter 2 in four parts chapter 2a, 2b, 2c and 2d. I am unable to divide the chapter in sub chapters in latex. Kindly suggest how to do that.
Thanks in advance.
Regards
Sandeep
Theses, Books, Title pages ⇒ Chapter divide in Sub chapter in Latex
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Chapter divide in Sub chapter in Latex
Well, usually people use
\section
to divide a chapter into sections (2.1., 2.2., 2.3. etc). You can of course change the numbering a bit: \renewcommand{\thesection}{\arabic{chapter}.\alph{section}}
.The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
-
- Posts: 2
- Joined: Tue Feb 12, 2019 7:19 pm
Chapter divide in Sub chapter in Latex
Dear Johannes_B,
My query is how to devide chapter in sub chapters for my thesis. The chapter into sections 2.1, 2.2 etc are coming but I need two parts like chapter 2a and 2b after that the section. I am using following for sub chapters but in the section part previous chapter numbering coming (chapter 3a, 3b then in section part 2a.1, 2a.2 and 3a.1, 3a.2 etc are coming). How I tackle the problem?
My query is how to devide chapter in sub chapters for my thesis. The chapter into sections 2.1, 2.2 etc are coming but I need two parts like chapter 2a and 2b after that the section. I am using following for sub chapters but in the section part previous chapter numbering coming (chapter 3a, 3b then in section part 2a.1, 2a.2 and 3a.1, 3a.2 etc are coming). How I tackle the problem?
Code: Select all
\newcounter{subchapter}\renewcommand{\thesubchapter}{\alph{subchapter}}
\makeatletter
% \patchcmd{<cmd>}{<search>}{<replace>}{<success>}{<failure>}
\newcommand{\updatechaptercounter}{}
\patchcmd{\@chapter}{\@afterheading}{\updatechaptercounter\@afterheading}{}{}% Regular patch of \@chapter
%\patchcmd{\Hy@org@chapter}{\@afterheading}{\updatechaptercounter\@afterheading}{}{}% Hyperref patch of \@chapter
\makeatother
\providecommand{\theHchapter}{}%
\newcommand{\startsubchapters}{%
\setcounter{subchapter}{0}% Reset sub-chapter numbering
\renewcommand{\thechapter}{\arabic{chapter}\thesubchapter}% Update chapter number display
% \renewcommand{\theHchapter}{\arabic{chapter}\thesubchapter}% Update chapter number display (for hyperref)
\renewcommand{\updatechaptercounter}{\addtocounter{chapter}{-1}}% Update chapter number
\let\oldchapter\chapter%
\renewcommand{\chapter}{\stepcounter{subchapter}\oldchapter}% Increment subchapter
}
\newcommand{\stopsubchapters}{%
\renewcommand{\thechapter}{\arabic{chapter}}% Reset chapter numbering
\renewcommand{\theHchapter}{\arabic{chapter}}% Reset chapter numbering (for hyperref)
\let\chapter\oldchapter% Restore regular \chapter command
\renewcommand{\updatechaptercounter}{}% Clear chapter counter update
\stepcounter{chapter}% Update chapter counter
}