2

I don't know if my explanation is correct, but I'd like to make the following documents

This is about numbering. I'm trying it myself, but... I think this is too difficult for me. Can you tell me how to make a document like this?

enter image description here

Thank you!

  • 1
    Welcome to TeX.SE. – Sebastiano Mar 12 at 7:44
  • @hoodie Can you change the title of your question to reflect what your question is about? In its current the state the title will make it very difficult for future users with the same problem to find your question and the nice answers you got – user36296 Mar 12 at 12:50
4

As long as indenting of section headings is not an issue, the following could be a starting point:

\documentclass[a4paper]{article}
\usepackage{hyperref}

\setcounter{tocdepth}{5}
\setcounter{secnumdepth}{5}

\renewcommand\thesection{\Roman{section}.}
\renewcommand\thesubsection{\arabic{subsection}.}
\renewcommand\thesubsubsection{(\arabic{subsubsection})}
\renewcommand\theparagraph{\arabic{paragraph})}
\renewcommand\thesubparagraph{\arabic{subparagraph})}

\AtBeginDocument{%
  \csname @ifpackageloaded\endcsname{hyperref}{%
    % \theH... -macros are used ny hyperref's automatic creating of
    % anchor-names/destination-names for hyperlinking. Anchor-names/
    % destination-names must be unique within the document.
    \renewcommand\theHsection{\thesection}%
    \renewcommand\theHsubsection{\theHsection\thesubsection}%
    \renewcommand\theHsubsubsection{\theHsubsection\thesubsubsection}%
    \renewcommand\theHparagraph{\theHsubsubsection\theparagraph}%
    \renewcommand\theHsubparagraph{\theHparagraph\thesubparagraph}%
  }{}%
}%

\begin{document}

\tableofcontents

\section{First Section}
\subsection{First Subsection}
\subsubsection{First Subsubsection}
\paragraph{Paragraph (maybe?)}
\paragraph{Paragraph}
\paragraph{paragraph}
\subsection{Second Subsection}
\section{Second Section}

\end{document}

enter image description here

  • I don't care about indenting! That's what I wanted! Thanks a lot! I've been working on this all week... I really appreciate the excellent reply. – hoodie Mar 12 at 11:59
1

Of course, you can use paragraph to make a subsubsubsection, code is as follows:

\usepackage{titlesec}
\setcounter{secnumdepth}{4} % how many sectioning levels to assign numbers to
\setcounter{tocdepth}{4}    % how many sectioning levels to show in ToC
\titleformat{\paragraph}
{\normalfont\normalsize\bfseries}{\theparagraph}{1em}{}
\titlespacing*{\paragraph}
{0pt}{3.25ex plus 1ex minus .2ex}{1.5ex plus .2ex}
\newcommand{\subsubsubsection}{\paragraph}  %define newcommand \subsubsubsection

Outcome:

enter image description here

The above reslut achieved can be found in: https://github.com/wanzhenchn/Programming_Assignments_of_Deep_Learning

  • I didn't know there was a way. I thought only 'paragraph' could come after 'subsubsection'. Thank you very much for your answer! – hoodie Mar 12 at 12:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.