Kodama's home / tips.
1. 節(section)
1.2 細節(subsection)
1.2.3 細細節(subsubsection)
ア 箇条書き レベル1
(1) 箇条書き レベル2
\section 等と \item の両方を調整する必要がある.
想定しているのは, 神戸市でよく使われている文書形式. すごく珍しい形式のような気がするが, 何に由来するのだろう?
\documentclass[a4j,11pt]{jarticle}
\makeatletter
%%%%%%% Paper size
%% 1in=72.27pt=25.4mm %% 1pt=0.351mm %% 3pt=1.054mm
\setlength\paperheight {297mm}
\setlength\paperwidth {210mm}
%%%% height
\topmargin -40pt % 30+10
\headheight 10pt%
\headsep 30pt %
\addtolength{\headsep}{5.4mm} % 上端空き 30mm
\newlength{\undermargin}
\undermargin 5.4mm % 下端空き 30mm
%%%% width
\oddsidemargin 5.4mm % 左右空き 30mm
\evensidemargin 5.4mm % 左右空き 30mm
%% textheight
\setlength{\textheight}{\paperheight}
\addtolength{\textheight}{-2in}
\addtolength{\textheight}{-\topmargin}
\addtolength{\textheight}{-\headheight}
\addtolength{\textheight}{-\headsep}
\addtolength{\textheight}{-\undermargin}
%% textwidth
\setlength{\textwidth}{\paperwidth}
\addtolength{\textwidth}{-2in}
\addtolength{\textwidth}{-2\oddsidemargin}
%% タグ附けの階層 (節番号) %% 1. %% \section %% 1.1 %% \subsection %% 1.1.1 %% \subsubsection %% 大見出し(3.○○の部分) ゴシック 1行空け,2行とり %% 中見出し(3.1 ○○の部分) ゴシック 1行とり 左インデント1字(字下げ) %% 小見出し(3.1.1 ○○の部分)ゴシック 1行とり 左インデント2字(字下げ)
\def\thesection{\protect\noexpand\bf\arabic{section}.} %% 1. %% section番号
\def\thesubsection{\protect\noexpand\thesection\arabic{subsection}} %% 1.1 %% subsection番号
\def\thesubsubsection{\protect\noexpand\thesubsection.\arabic{subsubsection}} %% 1.1.1 %% subsubsection番号
% c.f. jart11.sty
% \def\section{\@startsection {section}{1}{\z@}{前}{後}{\Large\bf}}
%% 箇条書きのような感じで, 字下げを行う. \leftskip を用いる
\def\section{\leftskip=0em%
\@startsection {section}{1}{\z@}{2.00ex plus 1ex minus .2ex}{0.1ex plus .2ex}{\Large\bf}}
\def\subsection{\leftskip=1em% 本文 1字下げ
\@startsection{subsection}{2}{\z@}{0.00ex plus 1ex minus .2ex}{0.1ex plus .2ex}{\normalsize\bf}}
\def\subsubsection{\leftskip=2em% 本文 2字下げ
\@startsection{subsubsection}{3}{\z@}{0.00ex plus 1ex minus .2ex}{0.1ex plus .2ex}{\normalsize\bf}}
%% 目次 \tableofcontents
%% \@dottedtocline{レベル}{字下げ}{節番号-題間隔}{題字}{ページ} %%% latex.tex
\def\l@section#1#2{\@dottedtocline{1}{0em}{1.8em}{\bf #1}{#2}}
\def\l@subsection#1#2{\@dottedtocline{2}{1.5em}{2.3em}{\bf #1}{#2}}
\def\l@subsubsection#1#2{\@dottedtocline{3}{3.8em}{3.2em}{\bf #1}{#2}}
%% タグ附けの階層 (箇条書き) %% ア %% enumi %% (1) %% enumii %% (iii) %% enumiii
\def\@kkana#1{%
\ifcase#1\or ア\or イ\or ウ\or エ\or オ\or カ\or キ\or ク\or ケ\or コ\or
サ\or シ\or ス\or セ\or ソ\or タ\or チ\or ツ\or テ\or ト\or
ナ\or ニ\or ヌ\or ネ\or ノ\or ハ\or ヒ\or フ\or ヘ\or ホ\else\@ctrerr\fi}
\def\kkana#1{\expandafter\@kkana\csname c@#1\endcsname}%カナ
%%
\def\theenumi{\kkana{enumi}} \def\labelenumi{\theenumi} %%% ア
\def\theenumii{\arabic{enumii}} \def\labelenumii{(\theenumii)} %%% (2)
\def\theenumiii{\roman{enumiii}} \def\labelenumiii{(\theenumiii)} %%% (iii)
%% 行間の調整は行わないべた書き
\def\@listI{%
\leftmargin\leftmargini \addtolength{\leftmargin}{\leftskip}
\parsep 0pt %4.5pt plus 2pt minus 1pt
\topsep 0pt% 9pt plus 3pt minus 5pt
\itemsep 0pt% 4.5pt plus 2pt minus 1pt
}
\let\@listi\@listI
\@listi
\def\@listii{\leftmargin\leftmarginii \addtolength{\leftmargin}{\leftskip}
\labelwidth\leftmargin\advance\labelwidth-\labelsep
\topsep 0pt%4.5pt plus 2pt minus 1pt
\parsep 0pt%2pt plus 1pt minus 1pt
\itemsep \parsep}
\def\@listiii{\leftmargin\leftmarginiii \addtolength{\leftmargin}{\leftskip}
\labelwidth\leftmarginiii\advance\labelwidth-\labelsep
\topsep 0pt% 2pt plus 1pt minus 1pt
\parsep \z@ \partopsep 1pt plus 0pt minus 1pt
\itemsep \topsep}
\def\@listiv{\leftmargin\leftmarginiv \addtolength{\leftmargin}{\leftskip}
\labelwidth\leftmarginiv\advance\labelwidth-\labelsep}
%% \item の後 1字字下げ
\def\item{\@ifnextchar [{\@item}{\@noitemargtrue \@item[\@itemlabel]}{\hskip 1em}}
%% 縦の間隔 基本的にはべた書き
\parskip=0ex
\topsep=0ex % \@list.. で再設定される
\parsep=0ex % \@list.. で再設定される
\partopsep=0ex % \@list.. で再設定される
\itemsep=0ex % \@list.. で再設定される
\renewcommand{\baselinestretch}{1.2} %% 行送りの補正
%% 横の間隔 %\itemindent=3em %\listparindent=1ex \labelsep=0em % \item の後字下げするので, ここは 0pt \itemindent=0em \parindent=1em %% 段落字下げ \leftskip=0em% \sloppy %% 横調整は緩く %\twocolumn %\flushbottom
\makeatother
\begin{document}
ここに本文.
\end{document}
Kodama's home / tips.