45 lines
3.7 KiB
Markdown
45 lines
3.7 KiB
Markdown
|
---
|
|||
|
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
|
|||
|
|
|||
|
---
|
|||
|
<div class="section">
|
|||
|
<p>
|
|||
|
どうやら jsarticle.cls で紙の大きさの定義部分を探してきて、そいつから手動で計算しなければ行けないようだ。面倒だなぁ。
|
|||
|
</p>
|
|||
|
|
|||
|
<blockquote title="桃実のチャンネル" cite="http://ch10007.kitaguni.tv/e346935.html">
|
|||
|
<p>
|
|||
|
A4サイズ(縦294mm 横210mm)で
|
|||
|
</p>
|
|||
|
|
|||
|
<p>
|
|||
|
余白 上20mm 下25mm 右15mm 左10mm に設定したいとする。
|
|||
|
</p>
|
|||
|
|
|||
|
<p>
|
|||
|
プリアンブルで定義する。
|
|||
|
</p>
|
|||
|
|
|||
|
<pre class="syntax-highlight">
|
|||
|
<span class="synStatement">\setlength</span><span class="synSpecial">{</span><span class="synStatement">\topmargin</span><span class="synSpecial">}{</span><span class="synConstant">20mm</span><span class="synSpecial">}</span> <span class="synComment">%上マージン 20mm</span>
|
|||
|
<span class="synStatement">\addtolength</span><span class="synSpecial">{</span><span class="synStatement">\topmargin</span><span class="synSpecial">}{</span>-<span class="synConstant">1in</span><span class="synSpecial">}</span> <span class="synComment">% 標準のマージン(1inch)を引く</span>
|
|||
|
<span class="synStatement">\setlength</span><span class="synSpecial">{</span><span class="synStatement">\textheight</span><span class="synSpecial">}{</span><span class="synConstant">252mm</span><span class="synSpecial">}</span> <span class="synComment">%本文の長さ (縦) 297-(20+25)= 252</span>
|
|||
|
<span class="synStatement">\setlength</span><span class="synSpecial">{</span><span class="synStatement">\oddsidemargin</span><span class="synSpecial">}{</span><span class="synConstant">10mm</span><span class="synSpecial">}</span> <span class="synComment">% 奇数ページ 左マージン 10mm</span>
|
|||
|
<span class="synStatement">\addtolength</span><span class="synSpecial">{</span><span class="synStatement">\oddsidemargin</span><span class="synSpecial">}{</span>-<span class="synConstant">1in</span><span class="synSpecial">}</span> <span class="synComment">% 奇数ページ 標準のマージン(1inch)を引く</span>
|
|||
|
<span class="synStatement">\setlength</span><span class="synSpecial">{</span><span class="synStatement">\evensidemargin</span><span class="synSpecial">}{</span><span class="synConstant">10mm</span><span class="synSpecial">}</span> <span class="synComment">% 偶数ページ 左マージン 10mm</span>
|
|||
|
<span class="synStatement">\addtolength</span><span class="synSpecial">{</span><span class="synStatement">\evensidemargin</span><span class="synSpecial">}{</span>-<span class="synConstant">1in</span><span class="synSpecial">}</span> <span class="synComment">% 偶数ページ 標準のマージン(1inch)を引く</span>
|
|||
|
<span class="synStatement">\setlength</span><span class="synSpecial">{</span><span class="synStatement">\textwidth</span><span class="synSpecial">}{</span><span class="synConstant">185mm</span><span class="synSpecial">}</span> <span class="synComment">%本文の長さ(横) 210 -(10+15) = 185</span>
|
|||
|
</pre>
|
|||
|
|
|||
|
<p>
|
|||
|
<cite><a href="http://ch10007.kitaguni.tv/e346935.html" onclick="__gaTracker('send', 'event', 'outbound-article', 'http://ch10007.kitaguni.tv/e346935.html', '桃実のチャンネル:latexの余白設定');" target="_blank">桃実のチャンネル:latexの余白設定</a></cite>
|
|||
|
</p>
|
|||
|
</blockquote>
|
|||
|
</div>
|