【LaTeX】sectionやsubsectionなどの見た目を変える
format_nenpo.doc
に悩まされる全ての学生に.
な〜〜〜にが「MSゴシック 10pt」じゃw
section の見た目
\section{はじめに}
標準だと1 はじめに
のようになる.
それを1. はじめに
みたいな感じにしたい.あとは第1章 はじめに
とか.
bad case
よくあるパターン.
\renewcommand{\thesection}{\arabic{section}.}
これだと後ろで章(節)番号を参照するときにも.
が入る.
章番号と文字の間隔を明示的に指定するときも\thesection
に入れるのはNG.
わけわからんスペースとかが出現する.
あまり嬉しくない副作用である.
\section{はじめに} \label{sec:introduction} \ref{sec:introduction}章やで. % => 1.章やで
ただしい? やりかた
\makeatletter \def\@seccntformat#1{% \@nameuse{@seccnt@prefix@#1}% \@nameuse{the#1}% \@nameuse{@seccnt@postfix@#1}% \@nameuse{@seccnt@afterskip@#1}} \def\@seccnt@prefix@section{} \def\@seccnt@postfix@section{.} \def\@seccnt@afterskip@section{\hskip1zw} \makeatother
章番号と文字の間隔を明示的に指定したい時はafterskip
を指定する.
prefix
: 章番号の前postfix
: 章番号の後ろafterskip
: 章番号と文字の間隔(この例だと1.
とはじめに
の間隔)
参考
- 作者: 奥村晴彦,黒木裕介
- 出版社/メーカー: 技術評論社
- 発売日: 2013/10/23
- メディア: 大型本
- この商品を含むブログ (14件) を見る
どうでもいいけど*.doc
みたいな環境依存なフォーマットでテンプレ配るのどうなの.
せめて*.pdf
を….