General ⇒ Custom section counter in LNCS format
Custom section counter in LNCS format
I'm writing my manustript on LCNS format, and I want to divide my document into two parts, the first part would use as section counters A1, A2, etc. and the second part would use section counters B1, B2 etc..
I've searched around but couldn't find a solution.. Any ideas on this? Thanks!
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Custom section counter in LNCS format
Custom section counter in LNCS format
- Ijon Tichy
- Posts: 640
- Joined: Mon Dec 24, 2018 10:12 am
Custom section counter in LNCS format
\thesection resp. \thechapter. But I do not know how to do it with the class you are using. Please add a link to the class and a Custom section counter in LNCS format
Code: Select all
\documentclass{llncs}
\begin{document}
\title{My document}
\maketitle
\noindent\Large\textbf{Section A}
\normalsize
\section{This should be section A1}
blah blah blah
\section{This should be section A2}
\subsection{This should be subsection A2.1}
\noindent\Large\textbf{Section B}
\normalsize
\setcounter{section}{0}
\section{This should be section B1}
blah blah blah
\section{This should be section B2}
\subsection{This should be subsection B2.1}
\end{document}- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Custom section counter in LNCS format
Code: Select all
\documentclass{llncs}
\begin{document}
\title{My document}
\newcounter{Section}
\renewcommand{\theSection}{\Alph{Section}}
\renewcommand{\thesection}{\theSection\arabic{section}}
\newcommand{\Section}{\refstepcounter{Section}\setcounter{section}{0}\bigskip\noindent\Large\textbf{Section~\theSection}\par\normalsize}
\maketitle
\Section
\section{This should be section A1}
blah blah blah
\section{This should be section A2}
\subsection{This should be subsection A2.1}
\Section
\section{This should be section B1}
blah blah blah
\section{This should be section B2}
\subsection{This should be subsection B2.1}
\end{document}