Created
February 18, 2017 15:29
-
-
Save motchy869/3f88dc4c5b2086fc212affe6a82b7e6d to your computer and use it in GitHub Desktop.
部番号表示
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass[a4paper]{jsarticle} | |
%section, subsection, subsubsection の先頭に部番号が付くようにする | |
\makeatletter | |
\@addtoreset{section}{part}\renewcommand{\thesection}{\thepart.\arabic{section}} | |
\@addtoreset{subsection}{section}\renewcommand{\thesubsection}{\thesection.\arabic{subsection}} | |
\@addtoreset{subsubsection}{subsection}\renewcommand{\thesubsubsection}{\thesubsection.\arabic{subsubsection}} | |
\makeatother | |
\begin{document} | |
\title{部番号なし} | |
\author{motchy} | |
\maketitle | |
\part{A} | |
\section{B} | |
\subsection{C} | |
\label{subsec:C} | |
Alpha Bravo Charlie | |
\part{い} | |
\setcounter{section}{0} | |
\section{ろ} | |
\subsection{は} | |
\label{subsec:は} | |
いろは にほへと ちりぬるを | |
\part{ほげ} | |
\setcounter{section}{0} | |
\section{ふが} | |
\subsection{ぴよ} | |
\ref{subsec:C}, \ref{subsec:は} より... | |
\end{document} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment