• 検索結果がありません。

クラスファイルが提供されていない

ドキュメント内 How to write your own thesis tutorial with LaTeX2e (ページ 147-153)

第 9 章 L A TEX の応用 117

10.2 学位論文のサンプル

10.2.2 クラスファイルが提供されていない

もし大学側からクラスが提供されていない場合は自前で作成することになります.しか も大抵の大学はTimes系のフォントを使ってフォントサイズは何々でという細かい指定 をしてくるのが普通のようです.親切な教員が作成してくれている場合もあります.と りあえず子供だましですがjsbookを用いた例を紹介します.jreportを使っても良いで

すがjsbookの方が個人的には良いと感じています.まずはご自分の大学の規定に合わせ

てjsbookに定義のいくつかに変更を加えます.jsbookそのものに変更を加えるとどこ

にどのような変更を加えたのかが分からなくなる問題などがありますので,別ファイル

mygs.styに変更したマクロなどをまとめておきます.ファイルの先頭に

%% File: mygs.sty

%% Copying : Your Name

%% E-mail : name@univ.ac.jp

%% Date : 2004/02/20

\ProvidesPackage{mygs}[2004/03/31 First Family]

のようなファイル情報を書き込んでおくとよいでしょう.大抵の機関でTimes系のフォ ントを指定すると思いますので

\RequirePackage{txfonts}

の1行も必要でしょう.マクロパッケージの中で他のパッケージを必要とする場合は

\Requirepacakge命令を使います.

まずは1行の字数です.1行40文字であったとすると長さ \textwidthに全角40文 字の幅(40zw)を指定します.

\setlength\textwidth{40zw}

\setlength\fullwidth{\textwidth}%jsbookで必要

行数は40行と指定されている場合\textheightに40行送り分(40\baselineskip)を 指定します.

\setlength\textheight{40\baselineskip}

この程度でも良いと思うのですが,

\setlength\hoffset{13\p@}

\setlength\voffset{0\p@}

\setlength\evensidemargin{0\p@}

\setlength\oddsidemargin{\evensidemargin}

\setlength\topmargin{0\p@}

\setlength\headheight{0\p@}

\setlength\headsep{0\p@}

\setlength\marginparwidth{0\p@}

\setlength\marginparpush{0\p@}

\setlength\marginparsep{0\p@}

のように設定しても良いでしょう.ここでの\p@は単位‘pt’のことです.マクロの中では このような命令を使うと良いそうです.ここでは傍注やヘッダーを出力しないと仮定して ほとんどの項目に‘0pt’を代入しています.

ヘッダーやフッターは割とシンプルなもので良いと思うのでjsbookの場合は

\pagestyle{plainfoot}

としてフッターの中央にページ番号を出力するようにします.jreportは最初からシンプ ルなplainというページスタイルになっています.ただし,‘– 13 –’のようにダッシュも 入れるときは

\let\@mkboth\@gobbletwo

\let\@oddhead\@empty

\let\@evenhead\@empty

\def\@oddfoot{\normalfont\hfil-- \thepage\ --\hfil}%

\let\@evenfoot\@oddfoot

\setlength\footskip{2\baselineskip}%必要に応じて

とします.ページ番号を太字にするときは\normalfont に後に \bfseriesを追加し ます.

見出しのフォントの場合は和文はゴシック,欧文はTimes Boldとしたい場合はjsbook の場合は

\renewcommand{\headfont}{\gtfamily\rmfamily\bfseries}

10.2 学位論文のサンプル 137

10

のようにしておけば良いでしょう.jsbookは標準では欧文がサンセリフ体になっていま

す.jreportの場合は最初から欧文がボールド体に設定されています.

おまけに目次の深さを決めるカウンタtocdepthも

\setcounter{tocdepth}{2}

とすると\subsectionまで出力されます.

jreportの場合は見出しの後の字下げが行われないことがありますので

\RequirePackage{indentfirst}

としてindentfirstパッケージを読み込みます.

これらをまとめると自分のマクロパッケージmygs.styが出来上がりです.

%% File: mygs.sty

%% Copying : Thor Watanabe

%% E-mail : thor@tex.dante.jp

%% Date : 2004/02/20

\ProvidesPackage{mygs}[2004/02/20 First Family]

\RequirePackage{txfonts}% Times系のフォントを使う

%\RequirePackage{indentfirst}% jreportは必要

\setlength\textwidth{40zw}%1行40文字

\setlength\fullwidth{\textwidth}%jsbookでは必要

\setlength\textheight{40\baselineskip}%1ページ40行

\setlength\hoffset{13\p@}%\p@は0ptのこと

\setlength\voffset{0\p@}

\setlength\evensidemargin{0\p@}

\setlength\oddsidemargin{\evensidemargin}

\setlength\topmargin{0\p@}

\setlength\headheight{0\p@}

\setlength\headsep{0\p@}

\setlength\marginparwidth{0\p@}

\setlength\marginparpush{0\p@}

\setlength\marginparsep{0\p@}

\setlength\footskip{2\baselineskip}%必要に応じて

\def\ps@foot{%フッターに ‘-- ページ番号 --’としたいとき

\let\@mkboth\@gobbletwo

\let\@oddhead\@empty

\let\@evenhead\@empty

\def\@oddfoot{\normalfont\hfil-- \thepage\ --\hfil}%

\let\@evenfoot\@oddfoot }

\pagestyle{plainfoot}%jsbookならば

%\pagestyle{plain}%jreportならば

\renewcommand{\headfont}{\normalfont\bfseries}

\setcounter{tocdepth}{2}

そのような作業が終わったら自分の論文の主となるソースファイルを書き上げます.用 紙はA4で,フォントサイズは11 pt,左右起こしはせずに片面印刷というのが一般的だ と思いますから

\documentclass[a4j,11pt,openany,oneside]{jsbook}

のようにします.そして先程作成したmygs.styを

\usepackage{mygs}

として読み込みます.

この程度でも良いのですが,表紙もまた細かい指定をされる場合があります.1か

ら\maketitleを作っても良いのですが,一刻も早く論文を仕上げなければならないと

きに,命令を定義しては間に合わないかも知れません.そのようなときは断腸の思い で\titlepage環境を借用して表紙を作ることもできます.例として\maketitle命令 の変更例を紹介します.

\renewcommand{\maketitle}{%

\begin{titlepage}

\let\footnotesize\small

\let\footnoterule\relax

\let\footnote\thanks

\null\vskip2em%ページ上部の空白

\begin{center}\thispagestyle{empty}%

{\LARGE\headfont ここに表題を書きます}\par\vskip1.5em {\Large\normalfont 未来太郎}\par\vskip2em

{\small 未来研究学科 \qquad 学籍番号}\par\vskip1em {\small 指導教員 \qquad 北海太郎}\par\vskip2em {提出日 2004/02/30}\par\vskip1em

{\Large\headfont English Title}\par\vskip1em {\large\rmfamily Your Name}\par\vskip1em

\end{center}%

\vfill\null

\end{titlepage}}

\vskipとは垂直方向に空きを挿入する命令です.

以上は例ですので先方に規定された通りのレイアウトに適宜変更してください.

139

A

付録 A

GNU Free Documentation License

Version 1.2, November 2002

Copyright©2000,2001,2002 Free Software Foundation, Inc.

59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.

Preamble

The purpose of this License is to make a manual, textbook, or other functional and useful document "free" in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others.

This License is a kind of "copyleft", which means that derivative works of the document must themselves be free in the same sense. It com-plements the GNU General Public License, which is a copyleft license designed for free software.

We have designed this License in order to use it for manuals for free software, because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does. But this License is not limited to software manuals; it can be used for any textual work, regardless of subject matter or whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference.

1. APPLICABILITY AND DEFINITIONS

This License applies to any manual or other work, in any medium, that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. Such a notice grants a world-wide, royalty-free license, unlimited in duration, to use that work under the conditions stated herein. The "Document", below, refers to any such manual or work. Any member of the public is a licensee, and is addressed as "you". You accept the license if you copy, modify or dis-tribute the work in a way requiring permission under copyright law.

A "Modified Version" of the Document means any work contain-ing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language.

A"Secondary Section"is a named appendix or a front-matter

sec-tion of the Document that deals exclusively with the relasec-tionship of the publishers or authors of the Document to the Document’s overall sub-ject (or to related matters) and contains nothing that could fall directly within that overall subject. (Thus, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathemat-ics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophi-cal, ethical or political position regarding them.

The "Invariant Sections"are certain Secondary Sections whose ti-tles are designated, as being those of Invariant Sections, in the notice that says that the Document is released under this License. If a section does not fit the above definition of Secondary then it is not allowed to be designated as Invariant. The Document may contain zero Invariant Sections. If the Document does not identify any Invariant Sections then there are none.

The"Cover Texts"are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that the Document is released under this License. A Front-Cover Text may be at most 5 words, and a Back-Cover Text may be at most 25 words.

A "Transparent" copy of the Document means a machine-readable copy, represented in a format whose specification is available to the gen-eral public, that is suitable for revising the document straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic transla-tion to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file format whose markup, or absence of markup, has been arranged to thwart or discourage subse-quent modification by readers is not Transparent. An image format is not Transparent if used for any substantial amount of text. A copy that is not "Transparent" is called"Opaque".

Examples of suitable formats for Transparent copies include plain ASCII without markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly available DTD, and standard-conforming simple HTML, PostScript or PDF designed for human modification.

Examples of transparent image formats include PNG, XCF and JPG.

Opaque formats include proprietary formats that can be read and edited only by proprietary word processors, SGML or XML for which the DTD and/or processing tools are not generally available, and the machine-generated HTML, PostScript or PDF produced by some word processors for output purposes only.

The "Title Page" means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material this License requires to appear in the title page. For works in formats which do not have any title page as such, "Title Page" means the text near the most prominent appearance of the work’s title, preceding the beginning of the body of the text.

A section "Entitled XYZ" means a named subunit of the Docu-ment whose title either is precisely XYZ or contains XYZ in parentheses following text that translates XYZ in another language. (Here XYZ stands for a specific section name mentioned below, such as "Acknowl-edgements","Dedications", "Endorsements", or"History".) To

GNU Free Documentation License 141

"Preserve the Title" of such a section when you modify the Docu-

A

ment means that it remains a section "Entitled XYZ" according to this definition.

The Document may include Warranty Disclaimers next to the notice which states that this License applies to the Document. These Warranty Disclaimers are considered to be included by reference in this License, but only as regards disclaiming warranties: any other implication that these Warranty Disclaimers may have is void and has no effect on the meaning of this License.

ドキュメント内 How to write your own thesis tutorial with LaTeX2e (ページ 147-153)