ほげ
HTML変換
ほげ
ほげのほげ
ほげのほげのほげ
あああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああ
ほげのほげのひげ
あああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああ
ほげのひげ
ほげのひげのほげ
あああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああ
ほげのひげのひげ
あああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああ
ひげ
ひげのひげ
ひげのひげのひげ
[1]{
タイトル:#1
toc{分類名}{section節 目次に出す文字列}
の定義
toc{TeXソースそのもの}
TeXソース
TeXソース
入力コード
%!usecache %%% !の後のスペースを消すとプリアンブルのキャッシュを作成
\documentclass[b5j,10pt,twoside]{tetsujsarticle}
\usepackage{tetsuryoku}
\endofdump
\makeatletter
\def\tableofcontents{%
\網掛け中央揃え見出し{目次}%%
\@starttoc{toc} % ここでtocファイルが読み込まれる
\clearpage % 目次後に改ページ
}
%%%% tocファイルの中身は原則として
%% \contentsline{#1}{#2}{#3}
%% のものが並んでいる
%% #1: 分類名
%% #2: 目次に出す文字列
%% #3: ページ番号
%%% => これを処理すればよい
%% \def\contentsline#1#2#3{%
%% \ifthenelse{\equal{#1}{大見出し}}{#2...#3}{}%
%% }
%% のように定義する
\makeatother
\begin{document}
\tableofcontents % ここに目次が挿入される
\section{ほげ}
\subsection{ほげのほげ}
\subsubsection{ほげのほげのほげ}
あああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああ
\subsubsection{ほげのほげのひげ}
あああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああ
\subsection{ほげのひげ}
\subsubsection{ほげのひげのほげ}
あああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああ
\subsubsection{ほげのひげのひげ}
あああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああ
\section{ひげ}
\subsection{ひげのひげ}
\subsubsection{ひげのひげのひげ}
\newcommand\大見出し[1]{%
タイトル:#1
%%%% tocへの書き出しを実行
\addcontentsline{toc}{分類名}{\arabic{section}節 目次に出す文字列}%
}
\大見出し{\protect\DegC の定義}
%%%% 例外的な命令
\addtocontents{toc}{TeXソースそのもの}
%% 例:\addtocontents{toc}{\protect\newpage}
\end{document}