--- title: LaTeXで余白を設定する author: kazu634 date: 2008-01-28 url: /2008/01/28/_825/ wordtwit_post_info: - 'O:8:"stdClass":13:{s:6:"manual";b:0;s:11:"tweet_times";i:1;s:5:"delay";i:0;s:7:"enabled";i:1;s:10:"separation";s:2:"60";s:7:"version";s:3:"3.7";s:14:"tweet_template";b:0;s:6:"status";i:2;s:6:"result";a:0:{}s:13:"tweet_counter";i:2;s:13:"tweet_log_ids";a:1:{i:0;i:3661;}s:9:"hash_tags";a:0:{}s:8:"accounts";a:1:{i:0;s:7:"kazu634";}}' categories: - LaTeX ---

 どうやら jsarticle.cls で紙の大きさの定義部分を探してきて、そいつから手動で計算しなければ行けないようだ。面倒だなぁ。

A4サイズ(縦294mm 横210mm)で

余白 上20mm 下25mm 右15mm 左10mm に設定したいとする。

プリアンブルで定義する。

\setlength{\topmargin}{20mm}  %上マージン 20mm
\addtolength{\topmargin}{-1in}  % 標準のマージン(1inch)を引く
\setlength{\textheight}{252mm}  %本文の長さ (縦) 297-(20+25)= 252
\setlength{\oddsidemargin}{10mm}  % 奇数ページ 左マージン 10mm
\addtolength{\oddsidemargin}{-1in}  % 奇数ページ 標準のマージン(1inch)を引く
\setlength{\evensidemargin}{10mm}  % 偶数ページ 左マージン 10mm
\addtolength{\evensidemargin}{-1in}  % 偶数ページ 標準のマージン(1inch)を引く
\setlength{\textwidth}{185mm}  %本文の長さ(横) 210 -(10+15) = 185

桃実のチャンネル:latexの余白設定