1 #LyX 1.6.5 created this file. For more info see http://www.lyx.org/
7 % DO NOT ALTER THIS PREAMBLE!!!
9 % This preamble is designed to ensure that the manual prints
10 % out as advertised. If you mess with this preamble,
11 % parts of the manual may not print out as expected. If you
12 % have problems LaTeXing this file, please contact
13 % the documentation team
14 % email: lyx-docs@lists.lyx.org
16 \ifnum 42146=\euc"A4A2 \AtBeginDvi{\special{pdf:tounicode EUC-UCS2}}\else
17 \AtBeginDvi{\special{pdf:tounicode 90ms-RKSJ-UCS2}}\fi
23 % set fonts for nicer pdf view
24 \IfFileExists{lmodern.sty}
25 {\usepackage{lmodern}}{}
27 \fi % end if pdflatex is used
29 % the pages of the TOC are numbered roman
30 % and a PDF-bookmark for the TOC is added
32 \let\myTOC\tableofcontents
33 \renewcommand{\tableofcontents}{%
34 \pdfbookmark[1]{\contentsname}{}
37 \pagenumbering{arabic}}
39 % redefine the \LyX macro for PDF bookmarks
40 \def\LyX{\texorpdfstring{%
41 L\kern-.1667em\lower.25em\hbox{Y}\kern-.125emX\@}
44 % used for multi-column text
47 % extra space for tables
48 \newcommand{\extratablespace}[1]{\noalign{\vskip#1}}
52 \options fleqn,liststotoc,bibtotoc,idxtotoc,BCOR7.5mm,titlepage,tablecaptionabove
53 \use_default_options false
61 InsetLayout CharStyle:MenuItem
70 \newcommand*{\menuitem}[1]{{\sffamily #1}}
75 \inputencoding JIS-pLaTeX
78 \font_typewriter default
79 \font_default_family default
90 \pdf_author "LyXプロジェクトチーム"
91 \pdf_subject "LyX拡張機能取扱説明書"
92 \pdf_keywords "LyX、取扱説明書、文書化、拡張"
94 \pdf_bookmarksnumbered true
95 \pdf_bookmarksopen false
96 \pdf_bookmarksopenlevel 1
101 \pdf_pdfusetitle false
102 \pdf_quoted_options "unicode=false,linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue, pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false, pdfpagelabels"
109 \paperorientation portrait
112 \paragraph_separation indent
114 \quotes_language english
117 \paperpagestyle headings
118 \tracking_changes false
119 \output_changes false
135 \begin_layout Plain Layout
136 このファイルは主にRichard Heckによって管理されています。コメントをされたい場合や誤りを発見された場合には、LyX文書化メーリングリスト
137 \begin_inset Flex CharStyle:Code
140 \begin_layout Plain Layout
144 <lyx-docs@lists.lyx.org>
149 に英文にてお知らせ下さい。この文書の翻訳は、当初人見光太郎氏が行った貢献に基づいています。
157 \begin_layout Standard
158 \begin_inset CommandInset toc
159 LatexCommand tableofcontents
166 \begin_layout Chapter
170 \begin_layout Standard
179 』の第二部です。この文書を別部とした理由は、単純に『
187 』が、ほとんどの文書を作成する上で必要な基本機能をすべて説明してしまっているためです。一方で、LyXプロジェクトチームは、LyXを各設定ファイルと外部パッケージ
188 によって拡張可能な状態にしておくことを長期的な目標にしています。つまり、あるLaTeXパッケージをサポートしたい場合に、LyX自身に変更を加えることなく、当該パ
189 ッケージ用のレイアウトファイル(ないしモジュール)を作成すればいいようにしているのです。すでにこのような形で、いくつもの新機能がユーザーによって追加されています
190 。この取扱説明書は、そのような形での貢献を文書化する冊子として位置付けられています。
193 \begin_layout Standard
194 この取扱説明書では、ファックスのサポート・バージョン管理・SGMLサポートのような、正しく機能するためには追加的なソフトウェアを必要とする特殊機能についても説明
195 しています。さらに、LaTeXの強力な機能を直接使って文書を美しく仕上げるための、LaTeXツールやテクニックを述べた章も収録しています。つきつめれば、LyXと
196 はあくまでWYSIWYMたることを企図しているため、LaTeXの全機能の一部へのインタフェースは用意するものの、すべてを用意することはないでしょう。
199 \begin_layout Standard
204 』をお読みでなかったら、この取扱説明書から読みはじめるのは誤りです。『
208 』には、全取扱説明書に共通の表記法と書式が説明されていますので、まずそれからお読みください。さらに、この取扱説明書を読もうとする前に、『
212 』をよくお読みになって、LyXの全基本機能を習得してください。
215 \begin_layout Standard
216 この取扱説明書の取り上げられている話題は、LyXがLaTeXにどう関わっているかに強く関係していますので、まず次章では、LyXの内部動作がどうなっているか、Ly
217 Xに希望するLaTeXコードを正確に生成させるにはどうしたらいいかを収録しています。本章は、あきらかに熟練LyXユーザー向けの章となっています。
220 \begin_layout Chapter
224 \begin_layout Section
228 \begin_layout Standard
238 は、TeX熟練者とLaTeXに興味のある方向けの章です。ここでは、LyXとLaTeXが、印刷可能な出力を生成するのに、どのように協働しているのかを説明します。全
239 取扱説明書中で本章だけは、LaTeXのことを多少なりともご存知であることを前提とします。
242 \begin_layout Standard
270 なフロントエンド」と呼ばれていましたが、いまではこれは正しくありません。LaTeXのフロントエンドは、いくつも出回っています
274 \begin_layout Plain Layout
284 有名なものとしては、Linux上のTeXmakerとkile、OSX上のTeXshopなどがあります。もちろんviとemacsのLaTeXモードも含まれます。
289 。これらは、基本的にLaTeXを走らせる機能を有し、編集中のファイルのエラーを表示する機能を持ったテキストエディタです。LyXも、エディタであり、LaTeXを走
290 らせる機能を有し、ファイル中のエラーを指摘しますが、それ以上にもっともっと多くのことをしてくれます。
308 LyXを効果的に使うのに、LaTeXの知識が必要とされないことが挙げられます。またLyXは、それ自身、いくつかの拡張をLaTeXに加えています。時間のあるときに
309 でも、いちど以下の手順を試してみてください。まず
319 \begin_inset Flex CharStyle:MenuItem
322 \begin_layout Plain Layout
349 \begin_inset Flex CharStyle:MenuItem
352 \begin_layout Plain Layout
355 エクスポート\SpecialChar \menuseparator
380 \begin_inset Flex CharStyle:MenuItem
383 \begin_layout Plain Layout
386 表示\SpecialChar \menuseparator
402 \begin_inset Flex CharStyle:Code
405 \begin_layout Plain Layout
413 ファイルのプリアンブルをご覧ください。LyXによって特別に定義された新しいマクロが複数定義されていることに気づかれるはずです
422 。これらのマクロは、文書中で使用する機能に応じて、自動的に定義されます。
425 \begin_layout Standard
435 自動的にLaTeXを実行するコマンドが、以下のようにいくつかあります。
438 \begin_layout Itemize
439 \begin_inset Flex CharStyle:MenuItem
442 \begin_layout Plain Layout
445 表示\SpecialChar \menuseparator
456 \begin_layout Itemize
459 \begin_inset Flex CharStyle:MenuItem
462 \begin_layout Plain Layout
465 表示\SpecialChar \menuseparator
466 更新\SpecialChar \menuseparator
477 \begin_layout Itemize
480 \begin_inset Flex CharStyle:MenuItem
483 \begin_layout Plain Layout
488 \SpecialChar \menuseparator
499 \begin_layout Itemize
502 \begin_inset Flex CharStyle:MenuItem
505 \begin_layout Plain Layout
510 \SpecialChar \menuseparator
521 \begin_layout Standard
531 これらは、最後にLaTeXを実行してからファイルに変更が加えられた場合のみ、LaTeXを実行します。
534 \begin_layout Standard
544 LyXが編集中のファイルをLaTeXにかけるとき、LyXは以下の段階をふみます。
547 \begin_layout Enumerate
557 文書をLaTeXに変換し、ファイルの拡張子を
558 \begin_inset Flex CharStyle:Code
561 \begin_layout Plain Layout
577 \begin_inset Flex CharStyle:Code
580 \begin_layout Plain Layout
598 \begin_layout Enumerate
609 \begin_inset Flex CharStyle:Code
612 \begin_layout Plain Layout
627 ファイルに対して(必要に応じて複数回)LaTeXを実行し、LaTeXファイルをコンパイルするのに必要な他のコマンド(
628 \begin_inset Flex CharStyle:Code
631 \begin_layout Plain Layout
647 \begin_inset Flex CharStyle:Code
650 \begin_layout Plain Layout
668 \begin_layout Enumerate
681 \begin_layout Standard
701 \begin_inset Flex CharStyle:MenuItem
704 \begin_layout Plain Layout
707 表示\SpecialChar \menuseparator
722 を使用して実行した場合には、LyXはこの後、DVIビューアを実行してDVIファイルを表示します。
723 \begin_inset Flex CharStyle:MenuItem
726 \begin_layout Plain Layout
736 表示\SpecialChar \menuseparator
742 を使用した場合には、LyXはさらに以下の段階をふみます。
745 \begin_layout Itemize
755 \begin_inset Flex CharStyle:Code
758 \begin_layout Plain Layout
796 \begin_layout Itemize
806 \begin_inset Flex CharStyle:Code
809 \begin_layout Plain Layout
817 などのPostScript®ビューアを実行して、PostScript®
829 \begin_layout Standard
830 LyXは、他の書式を表示したりエクスポートしたりする際にも、同様のことを行います。
833 \begin_layout Section
837 \begin_layout Standard
841 \begin_inset Flex CharStyle:MenuItem
844 \begin_layout Plain Layout
847 ファイル\SpecialChar \menuseparator
848 インポート\SpecialChar \menuseparator
863 コマンドを使用すると、LaTeXファイルを
879 LyXにインポートすることができます。このコマンドは、
889 \begin_inset Flex CharStyle:Code
892 \begin_layout Plain Layout
919 \begin_inset Flex CharStyle:Code
922 \begin_layout Plain Layout
933 \begin_inset Flex CharStyle:Code
936 \begin_layout Plain Layout
944 を生成します。LyXは、この変換したファイルを開きます
948 \begin_layout Plain Layout
949 \begin_inset Flex CharStyle:Code
952 \begin_layout Plain Layout
958 は、もちろんコマンドラインから実行することもできます。
966 \begin_layout Standard
969 \begin_inset Flex CharStyle:Code
972 \begin_layout Plain Layout
989 は、文法的に正しいLaTeXファイルのほとんどを変換することができますが、すべてを変換できるわけではありません。
999 \begin_inset Flex CharStyle:Code
1002 \begin_layout Plain Layout
1019 は、理解不能な部分はTeXコードボックスの形で残しますので、ファイルを
1029 \begin_inset Flex CharStyle:Code
1032 \begin_layout Plain Layout
1049 で変換したのち、TeXコードボックスを探して、手動で正しく編集してください。
1052 \begin_layout Standard
1062 TeXコードボックスがなにかご存じなければ、次節をお読みください。
1065 \begin_layout Section
1067 \begin_inset CommandInset label
1069 name "sec:LaTeXコードを挿入する"
1076 \begin_layout Standard
1086 どのLyX文書にもつねにTeXコードを挿入することが可能であるというきわめて単純な理由によって、LaTeXにできることは、つねにLyXでも行うことができます。一
1087 方、LyXは、すべてのLaTeX構成物をLyX内に表示できるわけではなく、将来的にもそうならないでしょう。かりにLaTeXコマンドをLyX文書に挿入する必要が出
1089 \begin_inset Flex CharStyle:Code
1092 \begin_layout Plain Layout
1117 \begin_inset Flex CharStyle:MenuItem
1120 \begin_layout Plain Layout
1123 挿入\SpecialChar \menuseparator
1141 \begin_layout Standard
1142 以下は、LaTeXコマンドをLyX文書中に挿入する例です。コードは以下のようになっているとしましょう。
1145 \begin_layout LyX-Code
1149 \begin_inset Newline newline
1154 begin{minipage}{5cm}
1155 \begin_inset Newline newline
1159 \begin_inset Newline newline
1163 \begin_inset Newline newline
1167 \begin_inset Newline newline
1171 \begin_inset Newline newline
1175 \begin_inset Newline newline
1181 \begin_inset Newline newline
1185 \begin_inset Newline newline
1190 begin{minipage}{5cm}
1191 \begin_inset Newline newline
1197 \begin_inset Newline newline
1202 begin{minipage}{5cm}
1203 \begin_inset Newline newline
1208 \begin_inset Newline newline
1214 \begin_inset Newline newline
1220 \begin_inset Newline newline
1226 \begin_inset Newline newline
1234 \begin_layout LyX-Code
1238 \begin_layout Standard
1240 \begin_inset Flex CharStyle:Code
1243 \begin_layout Plain Layout
1249 ボックスが、この段落の直後にあります。この取扱説明書をLyX上でご覧になっていれば、TeXコード差込枠のみが見えるはずです。印刷した取扱説明書をご覧であれば、実
1253 \begin_layout Standard
1257 \begin_layout Plain Layout
1264 \begin_layout Plain Layout
1268 begin{minipage}{5cm}
1271 \begin_layout Plain Layout
1273 これは、ミニページ環境の例です。これには、(フロートでない)図表を含め、ほとんど何でも入れることができます。
1278 \begin_layout Plain Layout
1283 \begin_layout Plain Layout
1287 begin{minipage}{5cm}
1290 \begin_layout Plain Layout
1297 \begin_layout Plain Layout
1301 begin{minipage}{5cm}
1304 \begin_layout Plain Layout
1312 \begin_layout Plain Layout
1319 \begin_layout Plain Layout
1326 \begin_layout Plain Layout
1338 \begin_layout Standard
1348 TeXコードを使用する方法に加えて、複雑なLaTeXコードを含む部分を別ファイルとして作成しておき、そのファイルをインクルードするのに
1349 \begin_inset Flex CharStyle:MenuItem
1352 \begin_layout Plain Layout
1362 挿入\SpecialChar \menuseparator
1363 ファイル\SpecialChar \menuseparator
1369 を使用する方法もあります(取り込みの型として
1370 \begin_inset Flex CharStyle:Code
1373 \begin_layout Plain Layout
1388 を選択しなくてはなりません)。この方法をとる場合には、.texファイルが正しく動作することが
1406 場合のみに限った方がよいでしょう。さもないと、LaTeXエラーを追跡するたいへんな作業を行わなくてはならなくなります。
1409 \begin_layout Standard
1419 最後に、いくつか強調しておくべきことがあります。
1422 \begin_layout Itemize
1432 LyXは、あなたのLaTeXコードが正しいかどうかを
1453 \begin_layout Itemize
1463 車輪の再発明をしないようにご注意ください。
1466 \begin_layout Standard
1476 二番目の点に関して、LyXはひじょうにたくさんの機能を装備しており、その数は増えつづけています。ご自身でLaTeXコードを書かなくてはならないと思い込む前に、L
1477 yXがこれこれの機能をもっていないことを、取扱説明書で確実に確かめてください。さらに世の中には、封筒のラベルから美しい複数ページにわたる表を作るものまで、ありと
1478 あらゆることを行う膨大な数のLaTeXパッケージが存在します。
1488 \begin_inset CommandInset href
1491 target "http://www.ctan.org/"
1505 \begin_inset CommandInset ref
1507 reference "cha:secrets"
1514 \begin_layout Standard
1524 もし、文書中で例外的に手の込んだことをなさりたければ、かならず良いLaTeX関連書籍を参考とするようにしてください。『
1542 』の参考文献に多くのLaTeX関連書籍が引用されています。
1545 \begin_layout Section
1549 \begin_layout Subsection
1553 \begin_layout Standard
1563 すでにLaTeXについてご存知であれば、ここでプリアンブル(前置文)が何に向いているか説明する必要はないでしょう。もしご存じなければ、以下の説明で大まかな理解は
1564 得られるはずです。詳しくはLaTeX関連書籍をご参照ください。いずれにしても、以下でLyX文書のLaTeXプリアンブルで何ができるか、または何をする必要がないか
1565 説明をしますので、以下の各要点はお読みになった方が良いでしょう。
1568 \begin_layout Standard
1578 LaTeXプリアンブルは、LaTeX文書のいちばん始め、本文の
1596 の部分に来ます。ここでは以下のことを行います。
1599 \begin_layout Itemize
1609 文書クラス(ドキュメントクラス)の宣言。
1610 \begin_inset Newline newline
1613 これはLyXがすでに行ってくれています。もしあなたが熟達したLaTeX使いであり、自作の文書クラスを使いたい場合には、取扱説明書『
1631 』をご覧になれば、LyXに自作文書クラスへの仲介を行わせるにはどうすればよいかの情報があります。
1634 \begin_layout Itemize
1645 \begin_inset Newline newline
1648 LaTeXパッケージは、パッケージがプリアンブルで宣言された場合のみ、文書中で利用可能となる、追加コマンド群を提供します。例えば
1667 \begin_inset Flex CharStyle:Code
1670 \begin_layout Plain Layout
1678 パッケージは、すべての段落の最初の行を字下げします。他にも、ラベルや宛名書き、余白設定等の様々なパッケージがあります。
1681 \begin_layout Itemize
1692 \begin_inset Newline newline
1695 LaTeXのカウンタと変数の中には、プリアンブルでグローバルに
1715 、望んだ効果を持たないものがあります。(文書中で設定したり再設定したりすることのできる変数もあります。)余白は、プリアンブルで設定しなくてはならない変数の代表例
1716 です。他には、箇条書きに付けるラベル書式が挙げられます。じつは、この設定は文書中どこでもできるのですが、プリアンブルでいちどだけ設定するのが望ましい方法です。
1719 \begin_layout Itemize
1730 \begin_inset Flex CharStyle:Code
1733 \begin_layout Plain Layout
1751 \begin_inset Flex CharStyle:Code
1754 \begin_layout Plain Layout
1772 \begin_inset Newline newline
1775 ユーザー定義コマンドは、文書中で頻出するLaTeXコマンドの短縮形です。このようなコマンドを宣言するには、プリアンブルが適した場所ですが、どこで宣言することも
1793 です(もちろんコマンドが初めて使用される場所よりも前です)。あまりないことではありますが、お使いの文書中に生のLaTeXコードがあふれている場合には便利でしょう
1797 \begin_layout Standard
1808 \begin_inset Flex CharStyle:Code
1811 \begin_layout Plain Layout
1826 ファイルのプリアンブルに、それ自身の定義を追加します。これによって、LyXの生成するLaTeXファイルの可搬性を高めています。
1829 \begin_layout Subsection
1833 \begin_layout Standard
1843 LyXがLaTeXファイルのプリアンブルに追加するコマンドは、つねに同じです。これは、LyX自体にパッチを当てないかぎり変更できないようになっています。しかしな
1845 \begin_inset Flex CharStyle:MenuItem
1848 \begin_layout Plain Layout
1858 文書\SpecialChar \menuseparator
1865 \begin_inset Flex CharStyle:MenuItem
1868 \begin_layout Plain Layout
1883 の項から、プリアンブルに追加をすることはできます。LyXは、
1893 \begin_inset Flex CharStyle:MenuItem
1896 \begin_layout Plain Layout
1913 ダイアログ内のすべてのものを、LyX埋込みのプリアンブルに付け加えます。ご自身の宣言をプリアンブルに追加する前に、あなたがしようとしていることをLyXがすでにサ
1914 ポートしていないかどうか確認してください(車輪の再発明をしないように、とはすでに申しあげたことです)。
1925 プリアンブルコードが正しいことを確認してください。
1927 LyXは、プリアンブルをチェックしません。
1937 \begin_inset Flex CharStyle:Code
1940 \begin_layout Plain Layout
1957 」といったエラーが出ることでしょう。このようなエラーが出たときは、プリアンブルを再確認してください。
1960 \begin_layout Subsection
1964 \begin_layout Standard
1974 以下は、プリアンブルに追加できるものとその効果を示す例です。
1977 \begin_layout Subsubsection
1981 \begin_layout Standard
2010 \begin_inset Flex CharStyle:Code
2013 \begin_layout Plain Layout
2033 \begin_inset Flex CharStyle:Code
2036 \begin_layout Plain Layout
2055 というページ位置を制御する2つの変数があります。その機能は名前から明らかなとおりです。これらの変数は、ラベルを印刷するときなどに便利です。往々にして、印刷用紙の
2056 寸法とそのうち実際に印字可能な範囲は同じではありません。ここに
2057 \begin_inset Flex CharStyle:Code
2060 \begin_layout Plain Layout
2080 \begin_inset Flex CharStyle:Code
2083 \begin_layout Plain Layout
2098 \begin_layout Standard
2108 \begin_inset Flex CharStyle:Code
2111 \begin_layout Plain Layout
2131 \begin_inset Flex CharStyle:Code
2134 \begin_layout Plain Layout
2153 の既定値はともに0ポイント、つまりページをシフトしません。残念ながら、DVIドライバによってはつねにページをシフトすることがあるようです。我々には、どうしてその
2154 ようなことをするのか、そしてシスアドがどうしてそれを修正しないのか理解できませんが、もし個人的に管理できないシステムでLyXを使用していて、シスアドがお馬鹿さん
2156 \begin_inset Flex CharStyle:Code
2159 \begin_layout Plain Layout
2179 \begin_inset Flex CharStyle:Code
2182 \begin_layout Plain Layout
2201 が役に立ちます。かりに、上余白と左余白がつねに0.5インチずつ大きすぎるものとしましょう。その場合は、以下をプリアンブルに追加するとよいでしょう。
2204 \begin_layout LyX-Code
2212 \begin_layout LyX-Code
2220 \begin_layout Standard
2233 \begin_layout Subsubsection
2237 \begin_layout Standard
2247 いま、たくさんの宛名ラベルを印刷をしたいものとしましょう。ラベルシートを印刷するために便利な
2248 \begin_inset Flex CharStyle:Code
2251 \begin_layout Plain Layout
2259 というLaTeXパッケージが、お近くのCTANアーカイブで入手可能です。お使いのシステムには、既定ではこのパッケージは導入されていないかもしれません。ご自身でお
2260 確かめください。また、このパッケージの取扱説明書を読まれたいかもしれませんが、それもご自身にお任せします。これは使用例ですので、このパッケージをどう使うかの例だ
2264 \begin_layout Standard
2275 \begin_inset Flex CharStyle:Code
2278 \begin_layout Plain Layout
2286 文書クラスを使用していることをご確認ください。次に、以下のような設定をプリアンブルに追加しなければなりません。
2289 \begin_layout LyX-Code
2295 \begin_layout LyX-Code
2301 \begin_layout LyX-Code
2307 \begin_layout LyX-Code
2313 \begin_layout LyX-Code
2319 \begin_layout LyX-Code
2325 \begin_layout LyX-Code
2331 \begin_layout Standard
2350 Avery®ラベルシートのストック5360
2359 番を使用する場合の設定です。これで、各宛名を
2360 \begin_inset Flex CharStyle:Code
2363 \begin_layout Plain Layout
2383 \begin_inset Flex CharStyle:Code
2386 \begin_layout Plain Layout
2405 で囲めば、宛名ラベルの印刷をすることができます。本機能およびその他の機能に関しては、
2406 \begin_inset Flex CharStyle:Code
2409 \begin_layout Plain Layout
2420 \begin_layout Standard
2430 そのうち誰かが、このパッケージを直接サポートするLyXレイアウトファイルを作ってくれるかもしれません。その誰かはあなたかもしれません。
2433 \begin_layout Subsubsection
2437 \begin_layout Standard
2467 段落の最初の行を字下げするように教育されています。そのために彼らの他の変な習慣と同じく、いつものようにすべての段落の最初の行を下げるまで、アメリカ人はごちゃごち
2484 \begin_layout Standard
2494 もちろん、これは標準的な組版ルールではありません。書籍では、典型的には、他の段落のあとにくる段落
2512 字下げを行ないます。一行めを字下げをするそもそもの目的は、隣接する段落から区別するためです。したがって、図のあとや節の最初の段落など、先行する段落がない場合には
2516 \begin_layout Standard
2526 けれどもあなたが典型的なアメリカ人なら(ユーーモアですって!)、そのような小難しいことはかまわずに、いつもどおりの字下げをせずにはいられないでしょう!プリアンブ
2530 \begin_layout LyX-Code
2533 usepackage{indentfirst}
2536 \begin_layout Standard
2546 もしお使いのTeX頒布版が脳死状態でなければ、このパッケージが入っているはずなので、建国の父たちが意図したように、すべての段落が字下げされます。
2549 \begin_layout Subsubsection
2553 \begin_layout Standard
2563 この文書のプリアンブルを見てみると、どのような高度な設定ができるか、おおまかな理解が得られるでしょう。また第
2573 \begin_inset CommandInset ref
2575 reference "cha:secrets"
2588 章には、他の例や、LaTeXの各種の「汚い技」があります。
2591 \begin_layout Section
2595 \begin_layout Standard
2605 LyXがLaTeXを呼び出す際、LyXはLaTeXに、かりにエラーがあったとしても楽観的に無視して先に進むように指示します。その後LyXは、LaTeXの実行ログ
2606 ファイルを事後処理用に使います。ログファイルを分析したのち、LyXはエラーを一覧表示するダイアログを表示します。エラーのうちどれかをクリックすると、LyXファイ
2607 ル中、そのエラーの発生した場所に表示を移動します
2611 \begin_layout Plain Layout
2621 正確にいうと、通常は、です。ログファイルの分析は難しい仕事ですので、LyXはつねに正しい行に連れて行ってくれるとは限りません。ときには、LaTeXがある行にエラ
2622 ーがあると報告したとしても、実際のエラーはそれよりも前であることもあります。これは、プログラムで閉じ括弧を忘れたときに似ていなくもありません。エラーは表示されま
2623 すが、実際にエラーのある場所よりも後ろでエラーが報告されるのです。
2640 \begin_layout Standard
2650 人によっては、ログファイルを直接ご覧になりたいかもしれません。これは、
2651 \begin_inset Flex CharStyle:MenuItem
2654 \begin_layout Plain Layout
2664 文書\SpecialChar \menuseparator
2670 で見ることができます。エラーメッセージや警告には、よく見かけるものがいくつかありますので、それらをここに収録しておきます。ここにないエラーや警告に関しては、La
2674 \begin_layout Itemize
2677 \begin_inset Flex CharStyle:Code
2680 \begin_layout Plain Layout
2698 \begin_inset Newline newline
2701 これで始まるメッセージは、LaTeXコード自体を「デバッグ」するための警告メッセージです。相互参照や参考文献を追加したり変更した場合に、もう一度LaTeXを実行
2702 する必要があることを知らせるために、このようなメッセージが表示されます。このメッセージは、だいたいにおいて無視しても大丈夫です。
2705 \begin_layout Itemize
2708 \begin_inset Flex CharStyle:Code
2711 \begin_layout Plain Layout
2729 \begin_inset Newline newline
2732 LaTeXがフォントを見つけられなかったと言う警告メッセージです。多くの場合、このメッセージの後に、LaTeXが使用した代替フォントに関する情報が続きます。これ
2736 \begin_layout Itemize
2746 \begin_inset Flex CharStyle:Code
2749 \begin_layout Plain Layout
2760 \begin_inset Newline newline
2781 この警告を吐き出します。これは、一行が長すぎて右余白にはみ出してしまったという警告ですが、ほとんどの場合、最終出力を見ても判別できないくらい(せいぜい1ポイント
2782 か2ポイント)です。あるいは1文字か2文字右余白に出ているくらいです。LaTeXは、どんな文書を書いても、少なくとも一つはこのメッセージを出すようです。
2783 \begin_inset Newline newline
2786 このメッセージは無視しても大丈夫です。何か行が長すぎるような問題があれば、目で見ればわかります。出力を目で確認してください
2790 \begin_layout Plain Layout
2792 \begin_inset Flex CharStyle:MenuItem
2795 \begin_layout Plain Layout
2796 文書\SpecialChar \menuseparator
2802 で「draft」オプションを指定する方法もあります。こうすると、LaTeXは、overfullの発生した行の余白に黒い四角を描画します。
2810 \begin_layout Itemize
2813 \begin_inset Flex CharStyle:Code
2816 \begin_layout Plain Layout
2827 \begin_inset Newline newline
2839 これは上の警告と違ってあまり出てきません。なぜだかは分かりませんが、LaTeXは1行を短めにする印字するよりは、長めにする方が好きなようです。
2842 \begin_layout Itemize
2843 \begin_inset Flex CharStyle:Code
2846 \begin_layout Plain Layout
2859 \begin_inset Flex CharStyle:Code
2862 \begin_layout Plain Layout
2875 \begin_inset Newline newline
2887 ページ区切りに問題があったという警告です。この場合も、出力を目で確認してください。何か問題があれば、見てすぐわかります。
2890 \begin_layout Itemize
2893 \begin_inset Flex CharStyle:Code
2896 \begin_layout Plain Layout
2900 \begin_inset Quotes els
2904 \begin_inset Quotes ers
2922 \begin_inset Newline newline
2925 ファイル「Xxxx」が、システムに導入されていません。これは通常、文書が必要としているLaTeXパッケージに、導入済でないものがある場合に現れます。プリアンブル
2927 \begin_inset Flex CharStyle:Code
2930 \begin_layout Plain Layout
2940 コマンドも使用していないとすれば、LyXが読み込もうしているパッケージに存在しないものがあるということです。
2950 \begin_inset Flex CharStyle:MenuItem
2953 \begin_layout Plain Layout
2954 ヘルプ\SpecialChar \menuseparator
2969 を使用して、LyXが認識しているパッケージの一覧を得てください。このファイルは、(
2970 \begin_inset Flex CharStyle:MenuItem
2973 \begin_layout Plain Layout
2983 ツール\SpecialChar \menuseparator
2989 を使用して)LyXの再設定を行うたびに更新され、どのパッケージが検出されたか、それらのパッケージが何をするものかを表示します。
2990 \begin_inset Newline newline
3003 \begin_inset Flex CharStyle:Code
3006 \begin_layout Plain Layout
3025 コマンドを使っていて、肝心のパッケージが導入されていない場合には、ご自身で導入する必要があります。
3028 \begin_layout Itemize
3031 \begin_inset Flex CharStyle:Code
3034 \begin_layout Plain Layout
3037 LaTeX Error: Unknown option
3052 \begin_inset Newline newline
3055 このように始まるエラーメッセージは、パッケージに誤ったあるいは未定義のオプションが指定されていることを伝えようとするものです。パッケージの取扱説明書をご確認くだ
3059 \begin_layout Itemize
3062 \begin_inset Flex CharStyle:Code
3065 \begin_layout Plain Layout
3068 Undefined control sequence
3083 \begin_inset Newline newline
3086 お使いの文書にLaTeXコードを挿入した際、打ち間違いをしてしまうと、このようなメッセージが表示されます。あるいは、パッケージを読み込ませるのを忘れたのかもしれ
3087 ません。いずれにしても、このメッセージは、あなたが未定義のコマンドを使用したことを示しています。
3090 \begin_layout Standard
3100 これ以外にも、エラーメッセージや警告メッセージがあります。一般に、読んで意味がすぐにわかるものは、LaTeXのメッセージです。何を言っているのかさっぱりわからな
3101 いものもありますが、通常これらは、TeXのメッセージであり、それが何を意味しているのか、どのように解読すればいいのか、
3119 手がかりがありません。誰もわからないのです。
3122 \begin_layout Standard
3132 エラーメッセージが表示された場合は、つねに以下のチェックリストにしたがった方がよいでしょう。
3135 \begin_layout Enumerate
3145 ご自分で挿入したLaTeXコードに打ち間違いがないかどうか確かめる。
3148 \begin_layout Enumerate
3158 打ち間違いがなければ、コマンドを正しく使ったかどうか確かめる。
3161 \begin_layout Enumerate
3171 文書のもっともはじめの部分にエラーボックスが多数積み上がった場合には---特に
3172 \begin_inset Flex CharStyle:Code
3175 \begin_layout Plain Layout
3192 が表示されているならば---、プリアンブルにエラーがあることを意味します。プリアンブルのデバックを行ってください。
3195 \begin_layout Enumerate
3205 プリアンブルに何も追加せず、文書にLaTeXコードをまったく挿入しなかった場合には、LaTeX頒布版自体をまず疑ってください。導入されていないパッケージを探しだ
3209 \begin_layout Enumerate
3219 導入されていないパッケージはなかったものとしましょう。LyXを微調整するオプションを使用していますか。特に、手動で
3220 \begin_inset Flex CharStyle:Code
3223 \begin_layout Plain Layout
3227 \begin_inset space ~
3236 \begin_inset Flex CharStyle:Code
3239 \begin_layout Plain Layout
3257 \begin_inset Flex CharStyle:Code
3260 \begin_layout Plain Layout
3277 などをたくさん挿入するなど、微調整オプションを
3295 していませんか。適切な段落環境を使用する代わりに、これらを使用してその場をしのごうとしていませんか。
3298 \begin_layout Enumerate
3308 微調整オプションはまったく使用しておらず、規則に乗っ取って作業していたものとしましょう。何か曲芸のようなことをしようとはしていませんか。数式や表中で、たとえば表
3309 のセルに図を入れるなど、おかしなことをしようとしていませんか。
3312 \begin_layout Enumerate
3313 LaTeXが改行位置を見つけられないほど長い一節がありませんか。既定では、改行するために単語間に空白をたくさん追加することを、LaTeXはかなり嫌います。可能で
3314 あれば、問題が生じないように段落を修正するのが望ましいでしょう。それが難しければ、LaTeXが改行しやすく(sloppy)なるように、その部分を
3317 \begin_inset Flex CharStyle:Code
3320 \begin_layout Plain Layout
3335 \begin_layout Enumerate
3345 入れ子の階層を深くしすぎていませんか。LyXは、(今のところ)環境の入れ子の階層が制限内にあるかチェックしません。かりに、環境を17段の入れ子にしたりしていたら
3346 、それが原因です(LaTeXの上限は5段です)。
3349 \begin_layout Enumerate
3359 エラーメッセージは発生しないけれども、出力がひどいものとしましょう。図表が幅が広すぎたり長すぎてページに収まらない場合には、
3363 \begin_layout Enumerate
3376 \begin_layout Enumerate
3389 \begin_layout Standard
3403 \begin_layout Enumerate
3404 他に出力におかしいところがあり、曲芸をやろうとしたり微調整オプションでしのごうとしたりはしていないとすれば、何がおかしいのか確定的なことは言えません。
3407 \begin_layout Standard
3435 LyXのバグを発見したのかもしれません‥‥。
3438 \begin_layout Chapter
3442 \begin_layout Section
3443 BibTeXによる参照文献のカスタマイズ
3446 \begin_layout Standard
3455 の節に説明があります。以下の各小節では、LyXでサポートされている参考文献の特別な機能について説明することとします。
3458 \begin_layout Subsection
3462 \begin_layout Standard
3463 標準のBibTeXは、引用された著作を参照するのに、([12]のように)数字を使用します。しかし、多くの科学分野で、これとは異なる引用様式が用いられています。も
3464 っともよく見られるのは、著者-出版年様式(例:Knuth 1984a)です。LyXは、この様式を提供する2つのパッケージ
3465 \begin_inset Flex CharStyle:Code
3468 \begin_layout Plain Layout
3475 \begin_inset Flex CharStyle:Code
3478 \begin_layout Plain Layout
3484 をサポートしています。これらのパッケージには、それぞれ長所短所がありますが、ここでは詳細に立ち入る紙幅がありません。単純な著者-出版年様式(あるいは著者-番号)
3486 \begin_inset Flex CharStyle:Code
3489 \begin_layout Plain Layout
3495 用スタイルファイルのうちどれかを使用したい場合には、定評のある
3496 \begin_inset Flex CharStyle:Code
3499 \begin_layout Plain Layout
3505 パッケージがおそらくよい選択でしょう。短縮タイトルによる参照や
3510 \begin_inset Flex CharStyle:Code
3513 \begin_layout Plain Layout
3519 パッケージの利用を考えるとよいかもしれません。
3522 \begin_layout Standard
3523 LyXでの両パッケージの取扱い方は、ほぼ同じです。
3524 \begin_inset Flex CharStyle:MenuItem
3527 \begin_layout Plain Layout
3528 文書\SpecialChar \menuseparator
3535 \begin_inset Flex CharStyle:MenuItem
3538 \begin_layout Plain Layout
3545 \begin_inset Flex CharStyle:MenuItem
3548 \begin_layout Plain Layout
3555 \begin_inset Flex CharStyle:MenuItem
3558 \begin_layout Plain Layout
3564 オプションを選択してください。これらのパッケージによって、引用ダイアログに機能が追加され、参照の様式が選択できるようになります(「Knuth 1984」、「Kn
3565 uth (1984)」、「Knuth, 1984」、「1984」など)。両パッケージは、専用にデザインされたスタイルファイルを必要とすることに注意してください。
3566 両者ともそれ自身のスタイルファイルを同梱していますが、他にもたくさんの追加スタイルファイルがありますし、
3567 \begin_inset Flex CharStyle:Code
3570 \begin_layout Plain Layout
3576 に至っては、対話的なスタイルファイルビルダーさえ存在します
3580 \begin_layout Plain Layout
3581 \begin_inset Flex URL
3584 \begin_layout Plain Layout
3586 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/
3599 \begin_layout Subsection
3603 \begin_layout Standard
3604 場合によっては、参考文献をいくつかの節に分ける必要があることがあります。たとえば、あなたが歴史家であるとすれば、出典と学術文献を分ける機能は、おそらく「必需品」
3605 でさえあります。残念ながら、BibTeX自身ではこのようなことができません。しかし、適切なLaTeXパッケージの助けを借りると、BibTeXをこのような必要性を
3609 \begin_layout Standard
3610 LyXは、このようなパッケージの一つである
3611 \begin_inset Flex CharStyle:Code
3614 \begin_layout Plain Layout
3624 \begin_layout Plain Layout
3625 \begin_inset Flex URL
3628 \begin_layout Plain Layout
3630 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/
3640 をそのままでサポートします。このパッケージの長所は、(
3641 \begin_inset Flex CharStyle:Code
3644 \begin_layout Plain Layout
3650 のような他のパッケージと比較すると)新規の引用コマンドを定義する必要がないことです。そのかわりに、参考文献の違う節には、その節向けの項目を収録した別の参考文献デ
3651 ータベースを用意する必要があります。たとえば、参考文献を「出典」の節と「学術文献」の節に分けたい場合には、それぞれの参考文献データベース、たとえば
3652 \begin_inset Flex CharStyle:Code
3655 \begin_layout Plain Layout
3662 \begin_inset Flex CharStyle:Code
3665 \begin_layout Plain Layout
3674 \begin_layout Standard
3675 \begin_inset Flex CharStyle:MenuItem
3678 \begin_layout Plain Layout
3679 文書\SpecialChar \menuseparator
3686 \begin_inset Flex CharStyle:MenuItem
3689 \begin_layout Plain Layout
3696 \begin_inset Flex CharStyle:MenuItem
3699 \begin_layout Plain Layout
3705 をチェックしてください。すると、参考文献の各節に一つずつ、複数の参考文献を挿入することができます。上記の例では、BibTeX参考文献
3706 \begin_inset Flex CharStyle:Code
3709 \begin_layout Plain Layout
3716 \begin_inset Flex CharStyle:Code
3719 \begin_layout Plain Layout
3725 を挿入します。各節に同じスタイルを用いるか異なるスタイルを用いるかは自由です。くわえて、参考文献の節に、指定したデータベースの「引用されたすべての参照」を載せる
3726 (これが既定です)か、「引用されなかったすべての参照」を載せるか、あるいは「すべての参照」を載せるかを選択することができます。これは、もし参考文献を「本文に引用
3727 された出典」・「本文に引用されていない出典」・「学術文献」の三つの節に分割したい場合に、便利でありましょう。各節の見出しは、通常の節や小節として入れることができ
3729 \begin_inset Flex CharStyle:Code
3732 \begin_layout Plain Layout
3738 は、参考文献用の見出しを取り除いてしまいますので、手動でこれを追加しなくてはなりません(たとえば章*や節*などをお使いください)。
3741 \begin_layout Subsection
3745 \begin_layout Standard
3746 文書の節ごとあるいは章ごとの参考文献など、複数の参考文献はBibTeX自身ではサポートされていません。しかしながら、もし若干の
3747 \begin_inset Flex CharStyle:Code
3750 \begin_layout Plain Layout
3757 \begin_inset CommandInset ref
3759 reference "sec:LaTeXコードを挿入する"
3763 節を参照)を利用することを厭わなければ、LyXで節分けされた参考文献を作るのに使用されている(前節を参照)
3764 \begin_inset Flex CharStyle:Code
3767 \begin_layout Plain Layout
3773 パッケージが、この課題を解決する簡単な方法を提供します
3777 \begin_layout Plain Layout
3779 \begin_inset Flex CharStyle:Code
3782 \begin_layout Plain Layout
3789 \begin_inset Flex CharStyle:Code
3792 \begin_layout Plain Layout
3806 \begin_layout Standard
3808 \begin_inset Flex CharStyle:MenuItem
3811 \begin_layout Plain Layout
3812 文書\SpecialChar \menuseparator
3819 \begin_inset Flex CharStyle:MenuItem
3822 \begin_layout Plain Layout
3829 \begin_inset Flex CharStyle:MenuItem
3832 \begin_layout Plain Layout
3838 を有効にしてください。つぎに文書中において、参考文献(BibTeX参考文献本体を含む)の入った節を
3839 \begin_inset Flex CharStyle:Code
3842 \begin_layout Plain Layout
3851 \begin_inset Flex CharStyle:Code
3854 \begin_layout Plain Layout
3862 のあいだにはさまなくてはなりません(これらのコマンドはTeXコードとして挿入する必要があります)。参考文献には、現在位置の
3863 \begin_inset Flex CharStyle:Code
3866 \begin_layout Plain Layout
3872 において引用されたすべての参照が含まれることになります。
3876 この方法を用いる場合には、すべての参照はいずれかの
3877 \begin_inset Flex CharStyle:Code
3880 \begin_layout Plain Layout
3887 \begin_inset Flex CharStyle:Code
3890 \begin_layout Plain Layout
3899 \begin_layout Section
3903 \begin_layout Subsection
3907 \begin_layout Standard
3908 たくさんの節を含んだ大きなファイルで作業をする場合、文書をいくつかのファイルに分割した方が往々にして便利ですし、場合によっては、表部分にはしょっちゅう変更が加え
3909 られるけれども、その前の文章はつねに同じであるようなケースもあるでしょう。このような場合には、複合文書を利用することを、まずご検討ください。たとえば、科学論文は
3910 通常、導入部・所見・結果・議論・結論の五つの節から成ります。これら各節を別々のLyXファイルにして、タイトル・著者・概要・参考文献等と、これら五つのインクルード
3914 \begin_layout Plain Layout
3919 「取り込む」の意です。原語「include」に対する訳語として、プログラミング用語の「インクルードする」以外に適語がないので、ここではプログラミング用語をそのま
3925 ファイルを持つ、もう一つ別の「マスター」ファイルを作成するようにすることができます。これらの各ファイルは、単にマスターファイルにインクルードされるだけでなく、単
3926 独でも出力したり印刷したりすることのできる完全なLyXファイルであるように注意することが重要です。しかも、これらの各ファイルは、同じ文書クラスでなくてはなりませ
3927 ん。articleクラスとbookクラスを混在させるようなことはなさらないでください。LaTeXファイルをインクルードすることもできますが、このファイルにはプリ
3940 t}行は削除しておかなければなりません)。さもないと、DVIファイルを作成する際にエラーが発生するでしょう。
3943 \begin_layout Standard
3946 挿入\SpecialChar \menuseparator
3947 ファイル\SpecialChar \menuseparator
3950 で簡単にファイルをインクルードすることができます。このメニューを選んでクリックすると、カーソルの現在位置に小さな枠が挿入されます。この枠をクリックすると、ダイア
3951 ログが現れるので、そこでインクルードするファイルとインクルード方法を選択することができます。
3954 \begin_layout Standard
3955 ファイル選択ボックスは、いまや自明でしょう。インクルード方法には、「include」・「input」・「verbatim」の三つがあります。「include」と
3956 「input」の違いは、正確にはLaTeXの達人にしか意味のないものですが、ほとんどの人にとって意味のある違いといえば、「include」されたファイルは新規頁
3957 から組版されるのに対し、「input」されたファイルは現在のページから組版される点です。
3960 \begin_layout Standard
3961 一般に、マスターファイルは、組版前に完全なLaTeXファイルに変換されますが、インクルードされるファイルは、プリアンブル情報をまったく持たないLaTeXファイル
3965 \begin_layout Standard
3966 「verbatim」インクルードファイルでは、ファイルの内容がそのまま(つまり「
3967 \begin_inset Flex CharStyle:Code
3970 \begin_layout Plain Layout
3976 」モードで)固定幅タイプライタフォントで組版されます。通常、このファイルの空白は、通常のLyXでの空白の取扱いとは違って、連続した複数の空白がそのまま出力される
3977 ものの、単なる見えない空白です。ただし、
3980 \begin_inset Flex CharStyle:MenuItem
3983 \begin_layout Plain Layout
3993 チェックボックスを有効にすると、空白が存在することを明確にするために空白の印が出力されます。
3996 \begin_layout Subsection
4000 \begin_layout Standard
4001 \begin_inset Box Shadowbox
4010 height_special "totalheight"
4013 \begin_layout Plain Layout
4014 この節の内容は、すでに古くなっています。既定のマスター文書についてと、マスターが開いているときに子文書をどう開くかについて記述する必要があります。[[要修正]]
4022 \begin_layout Standard
4023 異なるファイル間に相互参照を設定することも可能です。まず、すべての関係するファイルを開いてください。例として、2つのファイルを扱う場合を考え、各ファイルをA・B
4024 と呼びます。BがAにインクルードされるファイルだとします。Aにラベルを入れて、Bで参照したいとしましょう。文書Bで相互参照ダイアログを開いて、使用する「バッファ
4028 \begin_layout Subsection
4032 \begin_layout Standard
4033 \begin_inset Box Shadowbox
4042 height_special "totalheight"
4045 \begin_layout Plain Layout
4046 この節も更新が必要です。この点に関する内容がwikiにあるので、それをここにコピーすることも可か。
4054 \begin_layout Standard
4055 すべての子文書の全文献項目を含んだ参考文献一覧をコピーし、それをコメントに変更してください。このようにすることで、LyXは.bibファイルを見つけることができ、参
4056 考文献一覧を見えるようにせずとも簡単に参照を挿入することができるようになります。
4059 \begin_layout Standard
4060 参考文献一覧がコメントにあるために、LaTeXはそれを使用しないので、参照は[1]のようには表示されないで[?]のように表示されます。ひとつの解決法として、コメ
4061 ントをインクルードするLaTeXパッケージの
4062 \begin_inset Flex CharStyle:Code
4065 \begin_layout Plain Layout
4071 を使用して、ファイルを別々に処理する方法があります。そのためには、すべての子文書のプリアンブルに以下を書き加えてください。
4074 \begin_layout LyX-Code
4080 \begin_layout LyX-Code
4083 includecomment{comment}
4086 \begin_layout Standard
4087 \begin_inset Flex URL
4090 \begin_layout Plain Layout
4092 http://wiki.lyx.org/FAQ/Unsorted#toc31
4100 \begin_layout Section
4104 \begin_layout Standard
4105 既定のページレイアウトは、どちらかといえば素っ気ないものです。
4106 \begin_inset Flex CharStyle:Code
4109 \begin_layout Plain Layout
4115 文書クラスの場合には、ページの下の真ん中にページ番号がつくだけです。この取扱説明書はKOMA-scriptのbookクラスなので、すこしは凝ってますが、ほんとう
4120 』に述べられているように、文書ページスタイルを「装飾的(fancy)」に設定する必要があります。この節では、望んだとおりの効果を得るために、LaTeXプリアンブ
4121 ルに挿入する必要のあるLaTeXコードについて解説します。
4124 \begin_layout Standard
4125 ページへッダは、「left(左)」・「center(中央)」・「right(右)」と命名された3つのフィールドに分けられています。フッタも同様に3つのフィールド
4126 に分類されています。これらのフィールドをもっとも簡単に設定するLaTeXコマンドには、
4129 \begin_inset Flex CharStyle:Code
4132 \begin_layout Plain Layout
4147 \begin_inset Flex CharStyle:Code
4150 \begin_layout Plain Layout
4165 \begin_inset Flex CharStyle:Code
4168 \begin_layout Plain Layout
4181 \begin_inset Flex CharStyle:Code
4184 \begin_layout Plain Layout
4192 などがあります。かりに、各ページの左上端に自分の名前を入れたいものとしましょう。次のようなコマンドをプリアンブルに入れるだけです。
4195 \begin_layout Standard
4203 \begin_layout Standard
4204 これで自分の名前が左上に現れます。フィールドに取り除きたい既定の内容がある場合(往々にして中央のフッタにはページ番号が入ります)には、空の引数を持つコマンドを入
4208 \begin_layout Standard
4214 \begin_inset Newline newline
4222 \begin_layout Standard
4223 もっと美しくしてみましょう。節番号を「第‥節」という言葉といっしょに(第3節のように)左上に入れ、ページ番号を(4ページのように)右上に、自分の名前を左下に、日
4224 付を右下に入れます。以下のコマンドをプリアンブルに入れます。
4227 \begin_layout Standard
4237 \begin_layout Standard
4245 \begin_layout Standard
4255 \begin_layout Standard
4263 \begin_layout Standard
4271 \begin_layout Standard
4281 \begin_layout Standard
4285 \begin_inset Flex CharStyle:Code
4288 \begin_layout Plain Layout
4305 \begin_inset Flex CharStyle:Code
4308 \begin_layout Plain Layout
4320 は、それぞれLaTeXの節カウンタおよびページカウンタを取得するもので、これによって現在の節番号とページ番号を印字します。
4321 \begin_inset Flex CharStyle:Code
4324 \begin_layout Plain Layout
4339 \begin_layout Standard
4340 へッダ下またはフッタ上に描かれる罫線の太さも変更することができます。もし罫線が必要なければ、太さを0にしてください。ヘッダ罫線は、既定では0.4ptの太さであり、
4341 フッタ罫線は0ptです。太さを変更するには、
4344 \begin_inset Flex CharStyle:Code
4347 \begin_layout Plain Layout
4354 headrulewidth}{0.4pt}
4364 \begin_inset Flex CharStyle:Code
4367 \begin_layout Plain Layout
4374 footrulewidth}{0.4pt}
4384 \begin_layout Standard
4385 \begin_inset Flex CharStyle:Code
4388 \begin_layout Plain Layout
4393 thispagestyle{empty}
4399 \begin_inset Flex CharStyle:Code
4402 \begin_layout Plain Layout
4407 thispagestyle{plain}
4413 \begin_inset Flex CharStyle:Code
4416 \begin_layout Plain Layout
4421 thispagestyle{fancy}
4426 のようなコマンドを使えば、各ページごとにへッダ・フッタ設定を有効にしたり無効にしたりすることができます。設定を変更したいページに、これらのコマンドをTeXコード
4427 として挿入してください。実は、タイトルページは、その後のページは大域的に装飾的(fancy)に設定されていれば装飾的(fancy)になるにもかかわらず、既定でプ
4428 レーン(plain)になるように設定されているのです。
4431 \begin_layout Standard
4432 奇数ページの左上だけに何かを挿入するなど、もっと複雑なコマンドもあるのですが、詳しい解説は
4433 \begin_inset Flex CharStyle:Code
4436 \begin_layout Plain Layout
4444 パッケージの取扱説明書をご参照ください(
4445 \begin_inset Flex CharStyle:Code
4448 \begin_layout Plain Layout
4457 \begin_layout Standard
4458 最後の例として、へッダやフッタに画像を挿入できることを取り上げましょう。会社のロゴをページ左上に入れたいものとします。たとえば、
4461 \begin_layout Standard
4470 includegraphics{logo.eps}}}
4473 \begin_layout Standard
4475 とすれば、これを実現できます(文書中に他に画像を挿入していない場合には、
4476 \begin_inset Newline newline
4480 \begin_inset Flex CharStyle:Code
4483 \begin_layout Plain Layout
4489 usepackage{graphics}
4494 をプリアンブルに宣言する必要があります)。
4497 \begin_layout Section
4499 \begin_inset CommandInset label
4508 \begin_layout Standard
4514 \begin_layout Subsection
4518 \begin_layout Standard
4519 LyXには、ブリットの形が216個準備されていて、簡単なダイアログから呼び出すことができます。このダイアログを使えば、箇条書き(記号)の各階層で使うブリットの形
4520 を変更することができます。この設定は文書全体に共通なので、段落ごとに別のブリットを指定することはできません
4524 \begin_layout Plain Layout
4525 正確には可能ですが、手動で行う必要があります。
4533 \begin_layout Subsection
4537 \begin_layout Standard
4539 \begin_inset Flex CharStyle:MenuItem
4542 \begin_layout Plain Layout
4543 文書\SpecialChar \menuseparator
4550 \begin_inset Flex CharStyle:MenuItem
4553 \begin_layout Plain Layout
4562 \begin_layout Standard
4563 そのダイアログに、ブリットの形の一覧表があります。
4564 \begin_inset Flex CharStyle:MenuItem
4567 \begin_layout Plain Layout
4573 と書いてあるドロップダウンメニューで、6つの各ブリット形パネルを切り替えることができます。また、一覧表左の
4574 \begin_inset Flex CharStyle:MenuItem
4577 \begin_layout Plain Layout
4583 パネルは、変更したい階層を選択するものです。
4584 \begin_inset Flex CharStyle:MenuItem
4587 \begin_layout Plain Layout
4593 では、指定したいLaTeX表現を入力することができます。任意のブリットを指定した場合には、そのコマンドが必要とするパッケージをLaTeXプリアンブルで指定する必
4597 \begin_layout Standard
4598 6つのパネルは、それぞれが必要とするパッケージによって分類されています。下記は、フォント名とLaTeXパッケージの対応表です。
4601 \begin_layout Standard
4603 \begin_inset Tabular
4604 <lyxtabular version="3" rows="7" columns="2">
4606 <column alignment="center" valignment="top" width="0pt">
4607 <column alignment="center" valignment="top" width="0pt">
4609 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4612 \begin_layout Plain Layout
4618 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4621 \begin_layout Plain Layout
4638 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4641 \begin_layout Plain Layout
4649 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4652 \begin_layout Plain Layout
4670 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4673 \begin_layout Plain Layout
4688 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4691 \begin_layout Plain Layout
4708 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4711 \begin_layout Plain Layout
4726 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4729 \begin_layout Plain Layout
4746 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4749 \begin_layout Plain Layout
4764 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4767 \begin_layout Plain Layout
4784 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4787 \begin_layout Plain Layout
4802 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4805 \begin_layout Plain Layout
4822 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4825 \begin_layout Plain Layout
4840 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4843 \begin_layout Plain Layout
4866 \begin_layout Standard
4867 LyXは、ユーザーが導入されていないパッケージのブリットを使用したとしても、警告を発しません。ファイルを閲覧したり印刷したりしようとしたときにLaTeXエラーが
4868 出るようならば、パッケージが導入されていない可能性が大です
4872 \begin_layout Plain Layout
4873 LyXが、パッケージがなくてもブリットを使用することを許すのは、編集をここで行ったとしても、別のところへエクスポートする可能性があるからです。
4881 \begin_layout Subsection
4885 \begin_layout Standard
4886 変更したいブリット階層を選んで、ブリットの形と大きさを選んでください。何らかの変更を加えたとしても、LyX上には反映されませんが、文書の表示を行えば確認されます
4890 \begin_layout Plain Layout
4895 段落ごとに異なるブリットの形を使いたいならば、TeXコードを使って少し手を汚す必要があります。この場合も、ブリット選択ダイアログを使えば、さまざまな形のLaTe
4896 Xコードを確認することができるので手助けとなるでしょう。任意に設定した段落をつくるには、以下のような選択肢があります。
4899 \begin_layout Plain Layout
4903 \begin_layout Plain Layout
4919 \begin_layout Plain Layout
4923 \begin_layout Plain Layout
4945 \begin_layout Itemize
4946 特定の階層の新しいブリット形を指定するには、LaTeXコマンド
4947 \begin_inset Flex CharStyle:Code
4950 \begin_layout Plain Layout
4960 を使用します。あとで現在のブリット形に戻すことができるように、現在のブリット形を保存しておく必要もあります。ここで使っている箇条書きでは、第1階層のブリットを変
4961 更するために、以下のLaTeXコードが使用されています。
4965 \begin_layout LyX-Code
4977 \begin_layout LyX-Code
4996 \begin_layout Itemize
4998 \begin_inset Flex CharStyle:Code
5001 \begin_layout Plain Layout
5009 コマンドの一部にローマ数字で指定されていることに注意してください。
5012 \begin_layout Itemize
5016 \begin_layout Plain Layout
5029 各項目のブリットを指定するには、角括弧で囲んだブリット形を、行頭に
5030 \begin_inset Flex CharStyle:Code
5033 \begin_layout Plain Layout
5039 として挿入してください。たとえば、この項目の行頭には
5042 \begin_inset Flex CharStyle:Code
5045 \begin_layout Plain Layout
5064 \begin_layout Plain Layout
5068 \begin_layout Plain Layout
5084 \begin_layout Plain Layout
5085 文書全体で使用するブリット形が有効であるようにするために、labelitemを元の設定に戻す必要があります。そのためには、以下のようにします。
5088 \begin_layout LyX-Code
5105 \begin_layout Chapter
5109 \begin_layout Section
5113 \begin_layout Standard
5114 「LyXサーバー」を使用すると、他のプログラムが、LyXと通信したり、LyXコマンドを実行させたり、LyXの内部状態に関する情報を取得したりすることができるよう
5115 になります。これは熟練したユーザー向けの機能ですが、便利なはずです。たとえば、LyXサーバーに書き込むことによって、JabRefのような参考文献管理ソフトが、L
5116 yXに文献引用を「押し込む」ことが可能となります。
5119 \begin_layout Standard
5122 LyXサーバーはWindowsでは機能しない
5128 \begin_layout Plain Layout
5129 これが不可能でなければならない理由はありません。しかし、いまのところ、Windows向け開発者でこの機能を実装しようとする者がいないのです。
5137 \begin_layout Section
5141 \begin_layout Standard
5142 LyXサーバーは、名前をつけたパイプの対を利用することで機能します。パイプは、通常
5143 \begin_inset Flex CharStyle:Code
5146 \begin_layout Plain Layout
5152 の下に作られ(Windowsを除く。Windowsでは、名前を付けた
5157 \begin_inset Flex CharStyle:Code
5160 \begin_layout Plain Layout
5172 に特別なオブジェクトとして置かれます)、「
5173 \begin_inset Flex CharStyle:Code
5176 \begin_layout Plain Layout
5183 \begin_inset Flex CharStyle:Code
5186 \begin_layout Plain Layout
5192 」という名前がついています。外部プログラムは、
5193 \begin_inset Flex CharStyle:Code
5196 \begin_layout Plain Layout
5203 \begin_inset Flex CharStyle:Code
5206 \begin_layout Plain Layout
5213 \begin_inset Flex CharStyle:MenuItem
5216 \begin_layout Plain Layout
5217 ツール\SpecialChar \menuseparator
5224 \begin_inset Flex CharStyle:Code
5227 \begin_layout Plain Layout
5228 /home/myhome/lyxpipe
5234 \begin_inset Flex CharStyle:Code
5237 \begin_layout Plain Layout
5251 」などに設定することができます。サーバーを開始するためには、これを
5258 \begin_layout Standard
5260 \begin_inset Flex CharStyle:Code
5263 \begin_layout Plain Layout
5270 \begin_inset Flex CharStyle:Code
5273 \begin_layout Plain Layout
5279 」を付け加えます。パイプがすでに存在していれば、LyXは他のLyXプロセスがすでに実行中であると判断して、サーバーを開始しません。POSIX(Unix型)システ
5280 ムでは、なんらかの理由で、LyXが終了する際に使用されていない「古い」パイプが削除されずに残ったりすると、LyXはこれを削除しようとします。何らかの理由でこれが
5281 失敗した場合、手動でパイプを削除したのちに、LyXを再起動する必要があります。Windowsでは、プログラムが終了したりクラッシュしたりすると、OSがパイプを削
5282 除するので、「古い」パイプが残ることはありません。
5285 \begin_layout Standard
5286 サーバーを使用するLyXプロセスを複数起動するには、それぞれのプロセスに、別のユーザーディレクトリを使用させたり、べつべつの
5287 \begin_inset Flex CharStyle:Code
5290 \begin_layout Plain Layout
5296 ファイルを使用させるなど、別々の設定を使用する必要があります。
5299 \begin_layout Standard
5300 クライアントプログラムを開発しようとされているのであれば、LyXサーバーからのデバッグ情報を有効にすると便利かもしれません。そのためには、Lyxを
5301 \begin_inset Flex CharStyle:Code
5304 \begin_layout Plain Layout
5313 \begin_layout Standard
5314 C言語で書かれた完全なサンプルクライアントが、ソース頒布版の
5315 \begin_inset Flex CharStyle:Code
5318 \begin_layout Plain Layout
5319 development/lyxserver/server_monitor.c
5327 \begin_layout Standard
5329 \begin_inset Flex CharStyle:Code
5332 \begin_layout Plain Layout
5333 src/client/lyxclient
5338 にあるコマンドラインベースのクライアントがあります。
5341 \begin_layout Section
5345 \begin_layout Standard
5346 LyXコールを発行するには、クライアントはASCIIテキスト行を入力パイプに書き込みまなくてはなりません。この行は、以下の書式を持ちます。
5363 \begin_layout Description
5364 クライアント名 は、クライアントが自由に選べる名前です。これが用いられるのは、クライアントが他の要求クライアントから結果を見分けることができるように、LyXが返
5365 答をする際、クライアント名をエコーするときだけです。
5368 \begin_layout Description
5369 関数 は、LyXに実行させたい関数です。これは、ミニバッファで使用するコマンドと同じです。
5372 \begin_layout Description
5373 引数 は、一部の関数のみに効力を持つオプションの引数です(たとえば、「自己挿入」LFUNは、現在のカーソル位置に引数を文章として挿入します)。
5376 \begin_layout Standard
5377 LyXからの返答は、出力パイプに送り出され、
5394 \begin_layout Standard
5403 は、コマンド要求からそのままエコーされますが、
5407 はコマンド実行の結果に依存した、多少なりとも有用な情報です。「font-state」のような一部のコマンドは、LyXの内部状態に関する情報を返しますが、空のデー
5408 タ応答を返すものもあります。空のデータ返答は、コマンド実行が無事終わったことを意味します。
5411 \begin_layout Standard
5429 \begin_layout Standard
5434 には、なぜコマンドが失敗したかの説明が入っているはずです。
5437 \begin_layout Standard
5441 \begin_layout LyX-Code
5442 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
5443 \begin_inset Newline newline
5446 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
5447 \begin_inset Newline newline
5450 read a <~/.lyxpipe.out
5451 \begin_inset Newline newline
5457 \begin_layout Section
5461 \begin_layout Standard
5462 LyXは、発生しているイベントを、非同期的にクライアントに通知することができます。いまのところ、ユーザーがあるキー列を関数「notify」に割り当てているときの
5463 み、LyXはこの通知を行います。LyXが送る文字列の書式は
5467 \begin_inset Flex CharStyle:Code
5470 \begin_layout Plain Layout
5481 \begin_layout Standard
5486 は、ユーザーが実際に打鍵したキー列の印字表現になります。
5489 \begin_layout Standard
5490 この機構は、LyXのコマンド群を拡張してマクロを実装するのに使用することができます。なんらかのキー列を「notify」に割り当ててください。それから出力パイプで
5491 待機するクライアントを起動し、キー列に応じたコマンドを読み込み、一つないし複数のLyXコマンドを発行するLyX要求とLyXコールを使用する関数を開始するのです。
5494 \begin_layout Section
5498 \begin_layout Standard
5499 LyXは、セッション管理に使用することができる単純なプロトコルを実装しています。メッセージは、すべて
5512 \begin_layout Standard
5517 は「hello」ないし「bye」です。クライアントから「hello」を受け取ると、LyXはメッセージを聴いていることをクライアントに伝えるために返答をし、LyX
5518 が終了することをクライアントに伝えるのには、LyXが「bye」を送信します。
5521 \begin_layout Section
5525 \begin_layout Standard
5530 \begin_layout Plain Layout
5531 PDFの遡及検索機能を提供しているビューアには、KDE/Linux上のOkularとMac OS X上のSkim、Windows上のSumatraPDFがありま
5537 には、遡及検索(reverse searchないしinverse searchと呼ばれます)機能を提供しているものがあります。これを使えば、DVI/PDF出力の
5538 特定の場所をクリックすることによって、LyXの文書中で対応する行にカーソルを移動させることができます。これを実現するためには、ビューアはLyXと情報交換を行う必
5539 要があります。これは、命名パイプ(lyxpipe)を使用するか、LyXが作業ディレクトリに生成するUNIXドメインソケット(lyxsocket)を使用する(これ
5541 \begin_inset Flex CharStyle:Code
5544 \begin_layout Plain Layout
5550 プログラムがLyXと通信するのに使用している方法です)ことで、LyXサーバを経由して実現することができます。場合によっては、ビューアとLyXを橋渡しする補助スク
5551 リプトを必要とすることがあるかもしれませんが、それ以外は、ビューアはLyXと直接通信することができます。これは、選んだビューアと基本ソフトに依存します。また、必
5552 要とされるビューアの設定法と遡及検索が実際に行われる方法とにも依存します。したがって、下記では個々のビューア毎の遡及検索の設定の仕方を説明することとします。その
5553 前に、DVI/PDF出力で遡及検索を有効にするためには、一般に何が必要とされるかを説明します。
5556 \begin_layout Subsection
5560 \begin_layout Standard
5561 LaTeXは、遡及検索のために複数の方法を提供しています。ある方法は
5562 \begin_inset Flex CharStyle:Code
5565 \begin_layout Plain Layout
5571 プログラムに組み込まれており、他の方法は外部パッケージとして提供されています。どちらを選択するかは、お使いのLaTeX頒布版が既に特定の方法を提供しているか(組
5572 み込みによる方法は比較的新しいものです)と、お使いのビューアがそれに対応しているかに依存します。使用可能な方法を以下に述べます。
5575 \begin_layout Subsubsection*
5576 src-special経由のDVI組み込み検索(DVIのみ)
5579 \begin_layout Standard
5580 この方法は、DVIファイルに遡及検索に必要な情報を追加するものです。これは、かなり前のLaTeXから利用可能となっており(比較的最近のLaTeX頒布版はすべて対
5581 応しています)、安定して動作します。これを有効にするには、
5582 \begin_inset Flex CharStyle:MenuItem
5585 \begin_layout Plain Layout
5586 設定\SpecialChar \menuseparator
5587 ファイル処理\SpecialChar \menuseparator
5594 \begin_inset Flex CharStyle:MenuItem
5597 \begin_layout Plain Layout
5602 \begin_layout Plain Layout
5615 \begin_inset Flex CharStyle:MenuItem
5618 \begin_layout Plain Layout
5623 \begin_layout Plain Layout
5630 eX (plain)->DraftDVI
5636 \begin_inset Flex CharStyle:Code
5639 \begin_layout Plain Layout
5640 latex -src-specials $$i
5645 に変更します。もしこれが動作しないときは、お使いのLaTeXエンジンが違うオプションを必要としていないか確認してください(頒布版によっては文法の異なることがあり
5649 \begin_layout Subsubsection*
5650 外部パッケージ(PDFSyncおよびsrcltx)
5653 \begin_layout Standard
5662 パッケージは、PDF出力(pdflatex経由)およびDVI出力での遡及検索を提供します。これを有効にするには、LyXプリアンブルで以下のようにパッケージを読み
5666 \begin_layout Itemize
5668 \begin_inset Flex CharStyle:Code
5671 \begin_layout Plain Layout
5682 \begin_layout Itemize
5684 \begin_inset Flex CharStyle:Code
5687 \begin_layout Plain Layout
5690 usepackage[active]{srcltx}
5698 \begin_layout Standard
5699 と書きます。DVIとPDFの両方の遡及検索を実行できるようにするためには、プリアンブルに以下の行を挿入する方法があります。
5702 \begin_layout LyX-Code
5706 \begin_inset Newline newline
5712 \begin_inset Newline newline
5718 \begin_inset Newline newline
5724 \begin_inset Newline newline
5729 usepackage[active]{srcltx}
5730 \begin_inset Newline newline
5738 \begin_layout Standard
5739 このようにすれば、DVIでもPDF(pdflatex)でも正しいパッケージを使いながら、ファイルを閲覧することができます。
5742 \begin_layout Standard
5743 なお、PDFSyncは、文書の出力レイアウトに干渉する可能性があるので注意してください。したがって、仕上がり文書ではPDFSyncを無効にすることをお勧めします
5747 \begin_layout Subsubsection*
5748 SyncTeXを使った組み込み遡及検索(DVIおよびPDF)
5751 \begin_layout Standard
5752 \begin_inset Flex CharStyle:Code
5755 \begin_layout Plain Layout
5761 の最近のバージョンは、PDFおよびDVI両方の遡及検索を組み込みでサポートしています。このいわゆる
5765 機能は、主に、PDFSyncパッケージをpdftexプログラムへ統合したことと、それをsrc-specialsアプローチへ取り込んだことの成果です。これを使用す
5766 るためには、少なくともTeXLive 2008か最近のMikTeX頒布版が必要です。また、既にSyncTeXサポートを提供しているPDFビューアは少ししかありま
5767 せん(Mac上のSkimとWindows上のSumatraPDF)。
5770 \begin_layout Standard
5771 DVI出力でSyncTeXを有効にするには、
5772 \begin_inset Flex CharStyle:MenuItem
5775 \begin_layout Plain Layout
5776 設定\SpecialChar \menuseparator
5777 ファイル処理\SpecialChar \menuseparator
5784 \begin_inset Flex CharStyle:MenuItem
5787 \begin_layout Plain Layout
5792 \begin_layout Plain Layout
5805 \begin_inset Flex CharStyle:MenuItem
5808 \begin_layout Plain Layout
5813 \begin_layout Plain Layout
5820 eX (plain)->DraftDVI
5826 \begin_inset Flex CharStyle:Code
5829 \begin_layout Plain Layout
5830 latex -synctex=1 $$i
5836 \begin_inset Flex CharStyle:MenuItem
5839 \begin_layout Plain Layout
5844 \begin_layout Plain Layout
5851 eX (pdflatex)->PDF (pdflatex)
5857 \begin_inset Flex CharStyle:Code
5860 \begin_layout Plain Layout
5861 pdflatex -synctex=1 $$i
5866 に変更してください。また、ビューアをSyncTeXで使うのに設定を行う必要があるかどうか、お使いのビューアの取扱説明書をご確認ください
5870 \begin_layout Plain Layout
5871 \begin_inset Flex CharStyle:Code
5874 \begin_layout Plain Layout
5880 オプションは、gzip圧縮を有効にします。お使いのビューアがgzip圧縮をサポートしていない場合には、代わりに
5881 \begin_inset Flex CharStyle:Code
5884 \begin_layout Plain Layout
5898 \begin_layout Subsection
5902 \begin_layout Subsubsection*
5906 \begin_layout Standard
5908 \begin_inset Flex CharStyle:Code
5911 \begin_layout Plain Layout
5917 プログラムを自動的に使うのに必要なフックを、既に提供しているので、
5918 \begin_inset Flex CharStyle:Code
5921 \begin_layout Plain Layout
5927 を使用する場合には、DVI遡及検索を実行するのに他にするべきことはありません。使用中の文書を上記で述べたように設定するだけです(遡及検索は、Ctrl-クリックか
5928 、Mac OS X上ではAlt-クリックで始動します)。
5931 \begin_layout Standard
5932 しかし、何らかの理由で、LyXと通信するのにソケットではなく命名パイプを使用したい場合には、
5933 \begin_inset Flex CharStyle:MenuItem
5936 \begin_layout Plain Layout
5937 設定\SpecialChar \menuseparator
5938 ファイル処理\SpecialChar \menuseparator
5945 \begin_inset Flex CharStyle:Code
5948 \begin_layout Plain Layout
5949 xdvi -editor 'lyxeditor.sh %f %l'
5955 \begin_inset Flex CharStyle:Code
5958 \begin_layout Plain Layout
5964 は適切なスクリプト名)に変更してください。たとえば、最低限のシェルスクリプトは
5967 \begin_layout LyX-Code
5969 \begin_inset Newline newline
5972 LYXPIPE="/path/to/lyxpipe"
5973 \begin_inset Newline newline
5976 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
5977 \begin_inset Newline newline
5980 echo "$COMMAND" > "${LYXPIPE}".in || exit
5981 \begin_inset Newline newline
5984 read < "${LYXPIPE}".out || exit
5987 \begin_layout Standard
5989 \begin_inset Flex CharStyle:Code
5992 \begin_layout Plain Layout
5999 \begin_inset Flex CharStyle:MenuItem
6002 \begin_layout Plain Layout
6003 設定\SpecialChar \menuseparator
6013 \begin_layout Plain Layout
6020 XServerパイプのパスを指定してください
6024 \begin_layout Plain Layout
6026 \begin_inset Flex CharStyle:Code
6029 \begin_layout Plain Layout
6040 \begin_inset Flex CharStyle:Code
6043 \begin_layout Plain Layout
6057 \begin_layout Subsubsection*
6061 \begin_layout Standard
6062 \begin_inset Flex CharStyle:Code
6065 \begin_layout Plain Layout
6066 /Applications/MacDviX_Folder/calleditor.script
6074 \begin_layout LyX-Code
6079 \begin_layout Plain Layout
6086 X.app/Contents/MacOS/lyxeditor "$2" $1
6087 \begin_inset Newline newline
6093 \begin_layout Standard
6094 という行を付け加えてください。Applicationsフォルダ以外の場所にLyXを導入した場合には、それに従って上記の行を修正してください。
6097 \begin_layout Standard
6098 遡及検索は、Alt-クリック(OPTION-クリック)で始動します。
6101 \begin_layout Subsubsection*
6105 \begin_layout Standard
6106 \begin_inset Flex CharStyle:MenuItem
6109 \begin_layout Plain Layout
6110 設定\SpecialChar \menuseparator
6111 ファイル処理\SpecialChar \menuseparator
6112 ファイル書式\SpecialChar \menuseparator
6119 \begin_inset Flex CharStyle:Code
6122 \begin_layout Plain Layout
6123 open -a Skim.app $$i
6129 \begin_inset Flex CharStyle:MenuItem
6132 \begin_layout Plain Layout
6133 Skim\SpecialChar \menuseparator
6134 設定\SpecialChar \menuseparator
6144 \begin_layout Plain Layout
6154 \begin_layout Standard
6155 遡及検索は、COMMAND-SHIFT-クリックで始動します。
6158 \begin_layout Subsubsection*
6162 \begin_layout Standard
6163 \begin_inset Flex CharStyle:MenuItem
6166 \begin_layout Plain Layout
6167 設定\SpecialChar \menuseparator
6168 Okularを設定\SpecialChar \ldots{}
6169 \SpecialChar \menuseparator
6175 で「カスタムテキストエディタ」を選択し、コマンドに
6176 \begin_inset Flex CharStyle:Code
6179 \begin_layout Plain Layout
6188 \begin_layout Standard
6189 遡及検索は、SHIFT-クリックで始動します。
6192 \begin_layout Subsubsection*
6196 \begin_layout Standard
6198 \begin_inset Flex CharStyle:MenuItem
6201 \begin_layout Plain Layout
6202 View\SpecialChar \menuseparator
6208 メニューを選択し、「Inverse DVI Search」タブを選択します。「New\SpecialChar \ldots{}
6209 」ボタンをクリックして開くウィンドウの「Name:」フィールドに「LyX
6210 Editor」(または自分の好きな名称)と入力してください。「\SpecialChar \ldots{}
6211 」というラベルのボタンをクリックしてファイルダイアログを開き、バッチファイル
6212 \begin_inset Flex CharStyle:Code
6215 \begin_layout Plain Layout
6221 (以下参照)のあるディレクトリを見つけます。
6222 \begin_inset Flex CharStyle:Code
6225 \begin_layout Plain Layout
6232 \begin_inset Flex CharStyle:Code
6235 \begin_layout Plain Layout
6242 \begin_inset Flex CharStyle:Code
6245 \begin_layout Plain Layout
6255 を通じてLyXと通信するためのラッパとして使用され、以下のようになっています。
6258 \begin_layout LyX-Code
6260 \begin_inset Newline newline
6263 echo LYXCMD:revdvi:server-goto-file-row:%1 %2>
6272 \begin_inset Newline newline
6286 \begin_layout Standard
6287 LyXで指定したLyXServerパイプパスが、
6288 \begin_inset Flex CharStyle:Code
6291 \begin_layout Plain Layout
6306 \begin_inset Flex CharStyle:Code
6309 \begin_layout Plain Layout
6318 \begin_layout Standard
6319 yapでは、遡及検索はダブルクリックで始動します。
6322 \begin_layout Subsubsection*
6326 \begin_layout Standard
6327 SumatraPDFを遡及検索で使用するためには、
6328 \begin_inset Flex CharStyle:MenuItem
6331 \begin_layout Plain Layout
6332 設定\SpecialChar \menuseparator
6333 ファイル処理\SpecialChar \menuseparator
6334 ファイル書式\SpecialChar \menuseparator
6341 \begin_inset Flex CharStyle:Code
6344 \begin_layout Plain Layout
6345 SumatraPDF -inverse-search
6346 \begin_inset Quotes eld
6350 \begin_inset Quotes erd
6359 \begin_inset Flex CharStyle:Code
6362 \begin_layout Plain Layout
6368 は上記のラッパ)と入力してください。SumatraPDF.exeがコマンドPATHにない場合、フルファイル名を使用してください。
6371 \begin_layout Standard
6375 \begin_layout Subsubsection*
6379 \begin_layout Standard
6380 まずはじめに、yapがWindows環境での既定のDVIビューアになっていることを確認してから、yapを起動し、
6381 \begin_inset Flex CharStyle:MenuItem
6384 \begin_layout Plain Layout
6385 View\SpecialChar \menuseparator
6391 メニューを選択し、「Inverse DVI Search」タブを選択します。「New\SpecialChar \ldots{}
6392 」ボタンをクリックして開くウィンドウの「Name:」フィールドに「LyX
6393 Editor」(または自分の好きな名称)と入力してください。「\SpecialChar \ldots{}
6394 」というラベルのボタンをクリックしてファイルダイアログを開き、バッチファイル
6395 \begin_inset Flex CharStyle:Code
6398 \begin_layout Plain Layout
6404 プログラム(これは、Cygwinでは既定でLyX実行ファイルとともに導入されます)のあるディレクトリを見つけます。
6405 \begin_inset Flex CharStyle:Code
6408 \begin_layout Plain Layout
6415 \begin_inset Flex CharStyle:Code
6418 \begin_layout Plain Layout
6424 と指定してください。これによって、LyXとの通信に
6428 が使用されるようになります。何らかの理由で
6433 \begin_inset Flex CharStyle:Code
6436 \begin_layout Plain Layout
6442 オプションを削除して、LyX設定でLyXServerパイプパスを指定することを忘れないでください。
6445 \begin_layout Standard
6446 yapでは、遡及検索はダブルクリックで始動します。
6449 \begin_layout Subsubsection*
6453 \begin_layout Standard
6454 SumatraPDFを遡及検索で使用するためには、
6455 \begin_inset Flex CharStyle:MenuItem
6458 \begin_layout Plain Layout
6459 設定\SpecialChar \menuseparator
6460 ファイル処理\SpecialChar \menuseparator
6461 ファイル書式\SpecialChar \menuseparator
6468 \begin_inset Flex CharStyle:Code
6471 \begin_layout Plain Layout
6478 \begin_inset Flex CharStyle:Code
6481 \begin_layout Plain Layout
6487 は以下のようなスクリプトです(お使いのコマンドパスに置きます。
6488 \begin_inset Flex CharStyle:Code
6491 \begin_layout Plain Layout
6500 \begin_layout LyX-Code
6502 \begin_inset Newline newline
6506 \begin_inset Newline newline
6509 SumatraPDF -inverse-search "lyxeditor -g %f %l" $(basename $1)
6512 \begin_layout Standard
6513 SumatraPDFは、Windowsネイティブのアプリケーションであり、LyXのCygwin版が使用するPOSIXパスを理解しないので、このラッパスクリプトが
6514 必要となります。SumatraPDF.exeがお使いのコマンドパスにない場合は、上記のスクリプトでPOSIXのフルパスを使用してください。
6515 \begin_inset Flex CharStyle:Code
6518 \begin_layout Plain Layout
6533 \begin_inset Flex CharStyle:Code
6536 \begin_layout Plain Layout
6542 オプションを削除して、LyX設定でLyXServerパイプパスを指定することを忘れないでください。
6545 \begin_layout Standard
6549 \begin_layout Chapter
6553 \begin_layout Section
6557 \begin_layout Standard
6563 \begin_layout Subsection
6567 \begin_layout Standard
6574 Astronomy and Astrophysics
6576 (www.edpsciences.fr/aa/
6577 \begin_inset Flex URL
6580 \begin_layout Plain Layout
6582 http://www.edpsciences.fr/aa/
6587 )に投稿する論文を書く方法を説明します。このパッケージは次の ftpサイトから手にいれることができます。
6590 \begin_layout Standard
6592 \begin_inset Flex URL
6595 \begin_layout Plain Layout
6597 ftp://ftp.edpsciences.org/pub/aa/readme.html
6605 \begin_layout Standard
6606 取扱説明書がこのパッケージについてきます。この節は取扱説明書にとって代わるものではなく、あなたの論文を正しいフォームに直すのを手伝う短いガイドです。このジャーナ
6607 ルの出版社は 2001年1月1日に Springer から EDPへ変わりました。この出版社の変更によりスタイルファイルもすこし変わって、thesaurusコマ
6608 ンドが廃止されました。LyXの aaサポートはこの新しいスタイルファイル(バージョン 5.01)をサポートしています。古いバージョンのスタイルファイルをインストー
6609 ルしている場合は、アップグレードしてください。互換性のために古い(バージョン 4)のレイアウトは
6615 LyXDir/layouts/aapaper.layout
6620 \begin_layout Subsection
6624 \begin_layout Standard
6625 LyXといっしょに配布されているテンプレートから始めることを勧めます。テンプレートを使わない場合は、以下の設定にしてください。
6628 \begin_layout Itemize
6631 Document\SpecialChar \menuseparator
6648 \begin_layout Itemize
6656 のオプションは変えないで、既定のままにしておいてください。全体のレイアウトはマクロがやってくれるので、これを変えないでください。
6659 \begin_layout Subsection
6663 \begin_layout Standard
6664 最初に書くことはへッダに関する情報です。これには次のような 7つの項目があります。
6667 \begin_layout Itemize
6675 \begin_layout Itemize
6683 \begin_layout Itemize
6691 \begin_layout Itemize
6699 \begin_layout Itemize
6704 : [optional] 著者が複数いる場合、抜き刷りのリクエストのために連絡する人。
6707 \begin_layout Itemize
6712 : [optional] 連絡用の e-mailアドレス。
6715 \begin_layout Itemize
6722 Received: <date>; Accepted <date>
6725 \begin_layout Standard
6732 コマンドを入れる必要はありません。へッダが終わったら、LyXが自動的に入れてくれます。各エントリを書く順序は関係ありませんが、上の順序で書くことをすすめます。見
6733 た目がいいのと、出版された場合のレイアウトがそのようになっているからです。
6736 \begin_layout Standard
6737 へッダブロックに脚注をいれる場合には(例えば現住所を脚注に入るような場合です)、
6742 nsert\SpecialChar \menuseparator
6749 を使って普通の脚注を入れてください。LyXがそれを自動的に
6758 \begin_layout Standard
6759 これ以外に、このマクロは LyXが対応していない 3つの LaTeXコマンドを用意しています。
6762 \begin_layout Itemize
6770 \begin_layout Itemize
6781 フィールドにあらわれる順に番号がつけられます。そのため、それと著者名を対応させることが必要なのです。
6784 \begin_layout Itemize
6789 email{address}はコンタクトを取るための e-mailアドレスを入力するのに使います。
6792 \begin_layout Standard
6793 これらの LaTeXコードを使いたい場合には、コマンドを直接 LyXに入力して LaTeXコードとしてマークしてください。/usr/local/share/ly
6794 x/examples/ にある例を見てください。
6797 \begin_layout Subsection
6801 \begin_layout Standard
6802 アブストラクトはへッダブロックのすぐ後ろにこなければなりません。バージョン 5から abstract環境はコマンドへとかわり、1つの段落だけに制限されました。も
6803 う一つ気をつけなければならないのはキーワードを入れる必要があるのですが、それが LyXでは実装されていないことです。そのために手で LaTeXコマンド
6810 を入力し、LaTeXコードとしてマークする必要があります。論文の例を見てください。
6813 \begin_layout Subsection
6817 \begin_layout Standard
6818 A&A paperレイアウトでは文章を構造化するための次の環境がサポートされています。
6821 \begin_layout Itemize
6827 \begin_layout Itemize
6833 \begin_layout Itemize
6839 \begin_layout Itemize
6845 \begin_layout Itemize
6851 \begin_layout Itemize
6857 \begin_layout Itemize
6863 \begin_layout Itemize
6869 \begin_layout Itemize
6875 \begin_layout Itemize
6881 \begin_layout Itemize
6887 \begin_layout Itemize
6893 \begin_layout Subsection
6897 \begin_layout Standard
6902 レイアウトではサポートされていません。いくつかのコマンドはすでに紹介しましたが、次にサポートされていないコマンドのリストを書いておきます。
6905 \begin_layout Itemize
6913 \begin_layout Itemize
6921 \begin_layout Itemize
6929 \begin_layout Itemize
6937 \begin_layout Itemize
6945 \begin_layout Itemize
6953 \begin_layout Itemize
6961 \begin_layout Itemize
6969 \begin_layout Standard
6970 もしこれらのコマンドを使いたい場合は、自分で文章中にコマンドを入れる必要があります。
6972 LaTeXコマンドとしてマークするのを忘れないで下さい。
6975 \begin_layout Subsection
6979 \begin_layout Standard
6982 figure、figure*、table、table*
6984 をサポートしています。そのため、ここでは詳しい説明はしません。ユーザーの手引きを見てください。ただし、表は左揃にしなければならないのを忘れないで下さい。そのため
6990 ayout\SpecialChar \menuseparator
6997 を選択して、alignmentを変えてください。
7000 \begin_layout Standard
7001 一つだけ特別なことがあります。キャプションを図の横に書く場合です。このような図をつくるためには次のようにします。
7004 \begin_layout Enumerate
7010 nsert\SpecialChar \menuseparator
7015 ats\SpecialChar \menuseparator
7018 を使って wide figureフロートをつくります。そして図を右クリックして
7028 \begin_layout Enumerate
7032 \begin_layout Enumerate
7033 カーソルをキャプションの上に移動するために
7040 \begin_layout Enumerate
7044 \begin_layout Enumerate
7057 nsert\SpecialChar \menuseparator
7063 \begin_inset space ~
7068 \SpecialChar \menuseparator
7074 \begin_layout Enumerate
7080 \begin_layout Enumerate
7092 \begin_layout Enumerate
7093 カーソルをキャプションの文の後ろに持っていき、LaTeXモードに変わって閉じ括弧を挿入します 。
7096 \begin_layout Standard
7100 \begin_layout Subsection
7104 \begin_layout Standard
7105 投稿するためには論文は特別なダブルスペースのレイアウトになっていなければなりません。そのためには
7109 オプションを documentclassに与える必要があります。
7132 \begin_layout Subsection
7136 \begin_layout Standard
7141 ディレクトリに LyXで書かれた論文の例が入っています。この論文の例は、もとのマクロパッケージに含まれていたものを LyXで書き直したものです。これを見るとどの
7142 ように使えばいいのかがわかるでしょう。またもとの LaTeXのコードと LyXで書く場合を比べてください。
7145 \begin_layout Section
7149 \begin_layout Standard
7150 \begin_inset Flex CharStyle:Noun
7153 \begin_layout Plain Layout
7162 \begin_layout Subsection
7166 \begin_layout Standard
7167 AASTeXは American Astronomical Societyによって作られた(Lettersと Supplementを含んだ)the
7168 Astrophysical Journal、the Astronomical Journal、それに the Astronomical Society
7169 of the Pacificが発行するジャーナルに投稿するための一連のマクロです。LyXで使うにはマクロのバージョン 5.0(またはそれ以上)が必要です。5.0よ
7170 り前のバージョンは LaTeX2.09といっしょに使うためのもので、LyXでは基本的に使えません。AASTeXパッケージは以下の AASの ftpサイトからダウン
7174 \begin_layout Standard
7176 \begin_inset Flex URL
7179 \begin_layout Plain Layout
7181 ftp://ftp.aas.org/pubs
7189 \begin_layout Standard
7190 完全なユーザーの手引きがこのパッケージの中に含まれていますので、LyXで論文を書き始める前にそれをよく読んでください。LyXは AASTeXコマンドを理解するた
7191 めの必要性を減らすのではなく、入力の手間を減らすだけです。最終的に LaTeXファイルにされた論文が投稿するジャーナルの要求事項に完全に従っているかどうかは、あ
7195 \begin_layout Subsection
7199 \begin_layout Standard
7200 AASTeXテンプレートファイルを使って書き始めることを強くすすめます。
7202 File\SpecialChar \menuseparator
7205 を選択して、新しいファイル名を入力し、それから
7209 テンプレートを選んでください。これは大部分の論文で使われる共通のフィールドを用意しています。単に正しい情報を既存のテキスト(<>を含みます)に上書きしてください
7210 。AASTeXのコマンドと環境の多くは直接 LyXで実行することができますが、いくつかのものはできません。その中でもっとも目につくのは
7222 です。これらのコマンドはテンプレートファイルを開いたとき、赤色で表示されているでしょう。これらのコマンドは、直接 LaTeXコードを入力して、それを
7223 LaTeXコードとしてマークしなければなりません。我々はそのようなコマンドを ERT (Evil Red Text)と呼んでいます。AASTeXドキュメントの
7224 中の必要とされる ERTはできるだけ少なくなるようにはしているのですが、望む水準よりは多くの ERTが必要になっています。
7227 \begin_layout Subsection
7231 \begin_layout Standard
7232 論文を満足する水準で書き終えて、印刷した結果が良好だとしましょう。それでもジャーナルに投稿する前に必要な、いくつかの「後処理」があります。
7235 \begin_layout Enumerate
7236 論文を LaTeXファイルとして出力します。(
7241 ile\SpecialChar \menuseparator
7246 xport\SpecialChar \menuseparator
7256 \begin_layout Enumerate
7257 出力した .texファイルをお気に入りのエディタで編集します。
7261 \begin_layout Enumerate
7271 \begin_layout Enumerate
7276 usepackage...{fontenc}
7284 のすぐ後ろにあります)これを消します。また
7293 \begin_layout Enumerate
7306 の間のものを消去します。ただしあなたが自分で LaTeXのプリアンブルに入れたコマンドは残しておいてください(それらは .texファイルの User
7307 specified LaTeX commandsというコメントのすぐ後にあるはずです)。
7310 \begin_layout Enumerate
7321 を正しい、実際にあるファイル名に変えてください。
7324 \begin_layout Enumerate
7332 \begin_inset space ~
7336 \begin_inset CommandInset ref
7346 \begin_layout Enumerate
7347 編集したファイルに LaTeXを走らせて、正しく処理できるかを確認します。
7350 \begin_layout Enumerate
7351 ファイル名、フォーマットが正しいかどうかを、ジャーナルの要求事項をもう一度読んで確かめます。
7354 \begin_layout Enumerate
7358 \begin_layout Subsection
7362 \begin_layout Standard
7363 ここで各々の AASTeXコマンドを説明するつもりはありません。AASTeX ユーザーの手引き (
7367 )に詳しく書いてあります。そこでここでは LyXで使う場合に必要なコメントを書いておくだけにします。
7370 \begin_layout Subsubsection
7374 \begin_layout Standard
7378 \begin_layout Plain Layout
7390 \begin_layout Standard
7391 以下のコマンドは予想通りに動きます。コマンド名の後ろにあるのはそのコマンドが説明されている AASTeXユーザーの手引きの節番号です。
7485 begin{thebibliography}
7517 (2.14.4, それ以外の場所にも多くあり),
7544 \begin_layout Standard
7545 また次のスタイルオプションも正しく動きます。
7561 (3, 3.1, 3.2)。これらのオプションを使うには、
7563 Layout\SpecialChar \menuseparator
7570 ボックスにオプションを入力してください。
7573 \begin_layout Standard
7577 \begin_layout Plain Layout
7589 \begin_layout Subsubsection
7593 \begin_layout Standard
7594 以下のコマンドは動くのですが、少し説明が必要です。
7597 \begin_layout Itemize
7598 次のコマンドはジャーナルの編集者専用ですが、どうしても必要なら LaTeXのプリアンブルに入れることができます。
7631 \begin_layout Itemize
7632 次のコマンドは LaTeXのプリアンブルに置くことができます。テンプレートファイルのプリアンブルには空の引数をつけてこれらのコマンドが含まれています。
7653 \begin_layout Itemize
7660 (2.3) はそれだけで使うことはできますが、段落の途中で使うことはできません。必要な場合は ERTで使ってください。
7663 \begin_layout Itemize
7670 (2.3) は後ろに{}を追加します。しかしこれはエラーを発生させません。
7673 \begin_layout Itemize
7680 (2.6)はそれだけで使うことはできますが、段落の途中で使うことはできません。必要な場合は ERTで使ってください。
7683 \begin_layout Itemize
7690 (2.8)はクロスリファレンスのタグを挿入することができません。手で入力する必要があります。
7693 \begin_layout Itemize
7709 \begin_layout Itemize
7716 (2.9)は後ろに{}を追加します。しかしこれはエラーを発生させません。
7719 \begin_layout Itemize
7726 (2.10)は後ろに{}を追加します。しかしこれはエラーを発生させません。
7729 \begin_layout Itemize
7736 (2.13.2) -- 最終的な LaTeXファイルで追加的な引数を手で編集しなければなりません。
7739 \begin_layout Subsubsection
7740 実装されてなく、ERTを使わなければならないコマンド
7743 \begin_layout Standard
7747 \begin_layout Plain Layout
7759 \begin_layout Standard
7782 setcounter{equation}
7796 (2.12), Journal name abbreviations (2.12.4),
7832 (2.14.4, 必要な場合は左側のセルの一番目の要素として挿入する。表の中ではどのような LyXの方法も使わない),
7844 (2.14.5), most everything in Misc (2.15)の中のほとんどすべてのもの (
7883 \begin_layout Standard
7887 \begin_layout Plain Layout
7899 \begin_layout Subsubsection
7903 \begin_layout Standard
7904 references (2.12.3)環境と deluxetable (2.14)環境は実装できません。無視することをすすめます。もし絶対に deluxetableを
7905 使う必要があるなら、別のファイルにテキストエディタで編集してそれを
7907 Insert\SpecialChar \menuseparator
7910 を使って LyXファイルに含めるのを推奨します。
7914 ファイルを参照してください。これの例が含まれています。
7917 \begin_layout Subsection
7921 \begin_layout Subsubsection
7925 \begin_layout Standard
7926 LyXに新しいレイアウトと文書クラスを認識させるには少しコツが要ります。もしうまく行かなかったら、次のようにしてみてください。
7929 \begin_layout Enumerate
7930 LaTeXが AASTeXをちゃんと見つけられるか確かめてください。AASTeXパッケージに含まれる sample.tex (table.texでもいいのですが)を
7931 、LaTeXや AASTeXとまったく関係のないディレクトリへコピーしてそれから LaTeXを走らせてみてください。
7934 \begin_layout Enumerate
7941 /usr/.../share/lyx/layouts
7950 \begin_layout Enumerate
7953 Options\SpecialChar \menuseparator
7956 を走らせて、それから LyXを再起動してください。
7959 \begin_layout Enumerate
7965 ile\SpecialChar \menuseparator
7974 Layout\SpecialChar \menuseparator
7975 Document\SpecialChar \menuseparator
7978 で AASTeXがあらわれているでしょうか。
7981 \begin_layout Standard
7982 もし既存の AASTeXで書いた文章で not being able to find the AASTeX layoutという警告を受けたり、You
7983 should not mix title layouts with normal onesというメッセージがでた場合にはキチンとインストールできていません。
7986 \begin_layout Subsubsection
7990 \begin_layout Standard
7991 既定では LyXは表のキャプション/タイトルを表の中心に配置しようとします。これが AASTeXと変な干渉を起こすようです。これを避けるにはキャプションのどこか
7997 ayout\SpecialChar \menuseparator
8015 にしてください。少なくとも私はこの方法でうまく行きます。
8018 \begin_layout Subsubsection
8020 \begin_inset CommandInset label
8029 \begin_layout Standard
8030 2、3の注意があります。1番目は本文中のレファレンスエントリのスペースが少しおかしいことです。参照文献の項目データを入力するときに、最後の著者と年を入れる括弧の
8031 間にスペースを入れないようにしてください。つまり
8042 \begin_layout Standard
8055 をもっと自動的に使えるようにしたいのですが、できていません。それには LyXのソースコードを変える必要があるのです。いまのところ、2つの方法のうちのどちらかを選
8056 ぶ必要があります。a) すべての文献の参照に
8058 Insert\SpecialChar \menuseparator
8061 を使います。これで少なくとも自動的に挿入できます。そして投稿する前に LaTeXファイルを手で編集して
8091 と同じなので、この場合は変える必要はありません)。b) すべての文献の参照を ERTを使って行います。つまり本文中に参照文献のキーを使って
8097 のように挿入して LaTeXコードとしてマークするのです。どちらの方法も使いやすくはないのですが、LyXの参照メカニズムが
8101 を理解するようになるまではどちらかの方法を使う必要があります。
8104 \begin_layout Standard
8105 3番目に参考文献を入力することは、それほどわかりやすいものではありません。一番簡単な方法は文章の最後にいって一番初めの参考文献を入力し、それを
8110 としてマークすることです。マークすると灰色の小さい箱が入力した参考文献の頭にあらわれます。この箱をクリックして残りの情報を入れてください。新しい参考文献を入力す
8111 るには、既存の参考文献の最後にいってリターンキーを押します。これで新しい灰色の箱を持った新しい行が出てきます。
8114 \begin_layout Subsubsection
8118 \begin_layout Standard
8119 AASTeXパッケージの図を扱うメカニズムは、それほどよくありません。ERTで Figure Floatボックスに
8129 \begin_layout Plain Layout
8138 コマンドを入れることはできますが、私はうまくレイアウトできたためしがありません。私のアドバイスは、投稿する論文には本文中に EPSファイルを挿入しないことです。
8139 そして投稿前に印刷する場合には、LyXの標準の EPSファイルの挿入を使います。LyXは
8143 usepackage{graphics}
8145 コマンドを LaTeXのプリアンブルに入れて、図を LaTeX2eの標準的な方法で扱います。AASTeX 5.0を使うにはどうせ LaTeX2eが必要なので、La
8146 TeX2eのよりすぐれた図を扱う方法を使って何が悪いのでしょう。もしだれかが LaTeX2eまたは graphicsパッケージのことで文句を言ったら、Lampo
8147 rt (1994) の本の第2版にそれについて書いてあるということを指摘して、何年も前にアップグレードしなければならなかったのにと言ってやりましょう。
8150 \begin_layout Subsubsection
8154 \begin_layout Standard
8155 実装することができたけれども、実装しないことを選んだものがいくつかあります。例えば、ダブルスペース論文を書いていても LyX上でダブルスペースで表示するようには
8156 していません。また preprintと preprint2スタイルを別のレイアウトにしないことにしました。文章を書く場合はほとんどの時間を manuscript
8157 モードで使うと想定して、ディスクスペースを節約したのです。どうしてもこの私の決定に不服な人のために the Mudgeeraba Creek Emu-Ridin
8158 g and Boomerang-Throwing Associationに掲示してあるルールを掲げておきましょう。
8161 \begin_layout Quotation
8162 「裁判官の判断は群衆の圧倒的な大多数に大声で反対されない限り最終的なものだ。裁判官に話しかけるときや、反対に裁判官が話しかけるときは口汚い言葉を使うべきではない
8166 \begin_layout Subsection
8170 \begin_layout Standard
8171 Donald Knuthの、コンピュータアルゴリズムに関する悪名高い文章を引用しておきましょう、「私はこれが正しいはずだと証明しただけで、これを使ったことはない
8172 」。私は今まで説明したやり方でジャーナルに受理されるような AASTeXの論文が作れると信じてはいますが、今のところ(Jan 25, 2000)私はまだこのレイ
8173 アウトを使って論文を投稿したことがありません。次の数ヵ月で投稿できればいいのですが。
8176 \begin_layout Section
8180 \begin_layout Standard
8181 \begin_inset Flex CharStyle:Noun
8184 \begin_layout Plain Layout
8191 \begin_inset Flex CharStyle:Noun
8194 \begin_layout Plain Layout
8201 \begin_inset VSpace bigskip
8204 AMS LaTeXレイアウトは American Mathematical Societyの刊行物に投稿する数学の論文のためのスタイルです。このレイアウトは特定
8205 のジャーナル用につくられてるわけではありませんが、簡単に特定のジャーナル用にすることができます。各々のジャーナルについての特定の指示については
8206 AMSの文章を参照する必要があります(普通は TeXファイルを一行変えるだけです)。AMSの説明書は Web上の
8207 \begin_inset Flex URL
8210 \begin_layout Plain Layout
8218 \begin_inset Flex URL
8221 \begin_layout Plain Layout
8223 ftp://ftp.ams.org/pub/tex/amslatex/
8228 から手にいれることができます。これらのレイアウトは数学的な文章を書く場合に有効に使えるはずです。今のところ4つの異なった AMS LaTeXのレイアウトがありま
8232 \begin_layout Enumerate
8233 amsart: 標準的な AMSの論文用のレイアウトです。すべての結果とそれに類似した文は
8234 \begin_inset Formula $(n.m)$
8237 の形の番号がつきます。はじめの番号は節を表していて、2番目の番号は節内の何番目の結果(Theorems、Corollaries、Propositions、Def
8238 initions、Remarks等)なのかを表しています。また多くの(すべてではありませんが)環境には番号がつかないバージョンもあります。番号をつけないことも時
8239 折必要となるでしょう。番号のつかない環境は最後にアステリスクがついて区別できるようになっています。
8242 \begin_layout Enumerate
8243 amsart-seq: これは節番号なしで各々のタイプの文には通し番号がつけられます。また多くの(すべてではありませんが)環境には番号がつかないバージョンもあり
8244 ます。番号をつけないことも時折必要となるでしょう。番号のつかない環境は最後にアステリスクがついて区別できるようになっています。
8247 \begin_layout Enumerate
8248 amsart-plain: すべての環境に番号がつかない、より簡潔なレイアウトです。
8251 \begin_layout Enumerate
8252 amsbook: 標準的な AMSの本(実際にはモノグラフですが)用のフォーマットです。番号付は amsartの場合と似ていますが、
8253 \begin_inset Formula $(n.m.p)$
8256 という形です。最初の番号は章を表し、2番目の番号は節を表していて、3番目の番号は節内の何番目の結果(Theorems、Corollaries、Propositi
8257 ons、Definitions、Remarks等)なのかを表しています。また多くの(すべてではありませんが)環境には番号がつかないバージョンもあります。番号をつ
8258 けないことも時折必要となるでしょう。番号のつかない環境は最後にアステリスクがついて区別できるようになっています。
8261 \begin_layout Standard
8262 すべての ams LyXファイルはどちらの番号付の方法を使うかを
8267 ayout\SpecialChar \menuseparator
8274 ダイアログから簡単に変えることができます。
8277 \begin_layout Subsection
8281 \begin_layout Standard
8282 これらのレイアウトは実に多くの環境を用意しています。ほとんどの数学論文、本ではこれらの環境のほとんどは特別な文として設定されています。また AMS
8283 LaTeXを使えば無制限にこのような宣言を増やしていくことができます。しかし AMSは LyXで使うことのできる環境を使うのを推奨しています。(標準的な
8286 sections、bibliography、title、author、date
8288 を除いた)使うことのできる環境は次のものです。
8291 \begin_layout Description
8292 Theorem 定理。これは典型的には主な結果を表す文に使います。はじめに
8296 という言葉がボルドタイプであらわれ、それに自動的に番号がつきます(番号のつかない
8300 もあります)。テキストはイタリックになります。
8303 \begin_layout Description
8304 Corollary これはその前の結果から直接導ける結果を表すのに使います。これも主な結果になることができます。番号がつかない
8311 \begin_layout Description
8312 Lemma 他の結果を導くためのより小さな結果です。
8315 \begin_layout Description
8316 Proposition 議論している理論に(希望的には)何かを付け加えるより弱い結果です。
8319 \begin_layout Description
8320 Conjecture 正当化することなしに与えられた文。作者はどうやって証明したらいいか分からないが、正しいと(少なくとも作者にとっては)思えるものです。
8323 \begin_layout Description
8324 Criterion 必要とされる条件です。
8327 \begin_layout Description
8328 Algorithm 使うことのできる一般的な手続きです。
8331 \begin_layout Description
8332 Axiom 議論しているシステムの中では真だとされる性質、文です。
8335 \begin_layout Description
8336 Definition 定義。画面上でも紙の上でも今まで説明してきた環境とは違うフォントが使われます。見出し(
8337 \begin_inset Quotes eld
8341 \begin_inset Quotes erd
8344 )はまだボルドフェイスですが、テキストはイタリックでなく、直立した文字になります。
8347 \begin_layout Description
8348 Example 例。Definitionと同じようにタイプセットされます。
8351 \begin_layout Description
8355 \begin_layout Description
8359 \begin_layout Description
8363 \begin_layout Description
8364 Remark この環境も新しい定理型です。これは Remarkという言葉をイタリックで、後の部分を直立した文字にします。
8367 \begin_layout Description
8368 Note Remark環境と同じように設定します。
8371 \begin_layout Description
8375 \begin_layout Description
8379 \begin_layout Description
8383 \begin_layout Description
8387 \begin_layout Description
8388 Case 一般に長い議論をいくつかの特定の場合に分けるのに使います。この環境の番号の付け方はこの環境だけのもので、他の環境とは関係のないものになります。
8391 \begin_layout Description
8395 \begin_layout Description
8399 \begin_layout Description
8404 という言葉がイタリックになり、残りの部分は直立した文字になります。この環境の最後には(もちろん他の環境をネストできます)、QEDのシンボル(普通は四角ですがスタ
8408 \begin_layout Description
8409 Address これは著者の(半)永久的な住所です。
8412 \begin_layout Description
8416 \begin_layout Description
8417 Email 著者の e-mailアドレス
8420 \begin_layout Description
8424 \begin_layout Description
8425 Keywords 論文で議論するトピックスを特定するためのキーワード、フレーズ。
8428 \begin_layout Description
8431 Mathematical Reviews
8433 で説明され、公表されている AMS Subject Classificationsでの分類番号。これらは前に紹介した AMSサイトでもオンラインで利用可能。
8436 \begin_layout Description
8440 \begin_layout Description
8444 \begin_layout Description
8448 \begin_layout Standard
8449 これらの環境は自動的に AMS-LaTeXと AMSフォントパッケージを用意してくれます。したがってこれらの環境を使うにはこれらのパッケージがインストールされて
8453 \begin_layout Section
8459 \begin_layout Standard
8460 \begin_inset Flex CharStyle:Noun
8463 \begin_layout Plain Layout
8472 \begin_layout Subsection
8476 \begin_layout Standard
8477 これは American Geophysical Society のいくつかの学術雑誌用のレイアウトファイルです。これを使うには、AGUのクラスファイルと
8478 AGU plus がインストールされている必要があります(これらのファイルは
8479 \begin_inset Flex URL
8482 \begin_layout Plain Layout
8484 ftp://ftp.agu.org/journals/latex/journals
8492 \begin_layout Subsection
8496 \begin_layout Standard
8513 と呼ばれていますが、AGUクラスのLaTeXで対応するものは
8524 \begin_layout Standard
8561 です。これらは論文の属性で、AGUクラスの取扱説明書で定義されているものです。
8564 \begin_layout Standard
8565 おそらく、これはまだ完全ではありません。
8568 \begin_layout Subsection
8572 \begin_layout Standard
8588 \begin_layout Subsection
8592 \begin_layout Itemize
8595 Journal of Geophysical Research
8604 \begin_layout Standard
8605 あなた自身のレイアウトファイルをつくってください。難しくはありません。
8616 \begin_layout Subsection
8620 \begin_layout Standard
8621 新しいレイアウトを使うために、新しい文章をつくるたびに次のことをする必要があります。
8624 \begin_layout Enumerate
8630 layout\SpecialChar \menuseparator
8635 document\SpecialChar \menuseparator
8638 メニューアイテムを使います(AGUに投稿できるのは英語だけです。他の言語は選ばないで下さい)。
8641 \begin_layout Enumerate
8651 (Yes, this is a bug.)
8654 \begin_layout Enumerate
8663 と入力してください(すいません。これはバグです)。
8666 \begin_layout Enumerate
8671 を使ってください。BibTeX インセットの2番目のフィールドに
8675 と入力します。通常の参考文献のスタイルは使わないでください。
8678 \begin_layout Section
8682 \begin_layout Standard
8683 \begin_inset Flex CharStyle:Noun
8686 \begin_layout Plain Layout
8695 \begin_layout Subsection
8699 \begin_layout Standard
8700 Broadwayは演劇を書くためのものです。フォーマットは Hollywoodよりも装飾的で、それほど標準化されていません。このフォーマットはワークショップに向
8704 \begin_layout Subsection
8708 \begin_layout Standard
8712 \begin_layout Subsection
8716 \begin_layout Standard
8721 の名前はラベルとして挿入でき、それ以降はラベルを相互参照で参照して
8725 の名前を挿入できます。相互参照ダイアログには登場人物の現在の配役が表示されます。
8728 \begin_layout Subsection
8732 \begin_layout Standard
8733 USレターサイズで、余白は左 1.6インチ、右 0.75インチ、上 0.5インチ、下 0.75インチ。
8736 \begin_layout Subsection
8740 \begin_layout Standard
8741 次の環境を使うことができます。環境の右に書いてあるキーバインドは broadway.bindを使った場合のものです。
8744 \begin_layout Itemize
8748 \begin_inset Newline newline
8753 これは使わない方がいいのですが、他の環境が使えない場合のために用意してあります。
8756 \begin_layout Itemize
8760 \begin_inset space \hfill{}
8764 \begin_inset Newline newline
8769 舞台の設定と動きの説明に使います。すべて大文字で話し手の名前をはじめに書きます。
8772 \begin_layout Itemize
8776 \begin_inset space \hfill{}
8780 \begin_inset Newline newline
8785 自動的に番号が付きます。番号は画面上ではアラビア数字ですが、ローマ数字で印刷されます。
8788 \begin_layout Itemize
8792 \begin_inset space \hfill{}
8796 \begin_inset Newline newline
8801 ACTのための副題です。ただの中央に置かれたテキストです。
8804 \begin_layout Itemize
8808 \begin_inset space \hfill{}
8812 \begin_inset Newline newline
8817 自動的には番号が付きません。自分で番号を付けてください。これは私がどうすればいいかが分からなかったためです。
8820 \begin_layout Itemize
8824 \begin_inset space \hfill{}
8828 \begin_inset Newline newline
8833 カーテンが上がるときの舞台と動きの設定を説明する Narrativeの特殊ケースです。
8836 \begin_layout Itemize
8840 \begin_inset space \hfill{}
8844 \begin_inset Newline newline
8849 話し手(役者)の肩書き、すべて大文字で中央に置きます。
8852 \begin_layout Itemize
8856 \begin_inset space \hfill{}
8860 \begin_inset Newline newline
8865 話し手への指示。括弧が自動的に挿入されます。画面上には左括弧 ( だけが表示されますが、印刷したものには右括弧も表示されています。この環境は
8872 \begin_layout Itemize
8876 \begin_inset space \hfill{}
8880 \begin_inset Newline newline
8888 \begin_layout Itemize
8892 \begin_inset space \hfill{}
8896 \begin_inset Newline newline
8904 \begin_layout Itemize
8908 \begin_inset space \hfill{}
8914 \begin_layout Itemize
8918 \begin_inset space \hfill{}
8924 \begin_layout Itemize
8928 \begin_inset space \hfill{}
8934 \begin_layout Section
8938 \begin_layout Standard
8943 文書クラスはドイツの慣例に従って手紙を書くのに使います。テンプレートファイルは
8945 .../lyx/share/templates
8947 にあるので、それを出発点に使ってください。
8950 \begin_layout Section
8956 \begin_layout Standard
8957 \begin_inset Flex CharStyle:Noun
8960 \begin_layout Plain Layout
8969 \begin_layout Subsection
8973 \begin_layout Standard
8974 これは European Geophysical Societyの学術雑誌用のレイアウトファイルです。
8978 が必要で、これは EGS のwebサイト
8979 \begin_inset Flex URL
8982 \begin_layout Plain Layout
8992 \begin_layout Subsection
8996 \begin_layout Standard
8999 Right_address、Latex_Title、Affil、Journal、msnumber、FirstAuthor、Received、Accepted
9005 。残念ながら現在のレイアウトファイルはほとんどモジュール化されていません。もっとさまざまな
9009 ファイルを読み込むようにした方がいいと思われます。
9012 \begin_layout Section
9016 \begin_layout Standard
9017 \begin_inset Flex CharStyle:Noun
9020 \begin_layout Plain Layout
9029 \begin_layout Standard
9030 Elsevier Science Publishers B.V.
9031 は出版している色々なジャーナルに論文を投稿するための標準的な LaTeX の文書クラス(
9036 \begin_inset Flex URL
9039 \begin_layout Plain Layout
9041 http://authors.elsevier.com/
9046 に用意しています。説明書、著者への注意などはクラスファイルとともに用意されています。LyX にはこの文書クラスを使うためのレイアウトとテンプレートファイルが含ま
9047 れています。このパッケージのインストールのやり方は他の LaTeXパッケージと同じです。Elsevier の説明書を見てください。
9050 \begin_layout Standard
9059 が用意されています。Elsevierのクラスファイルは主に標準的な
9063 クラスをもとにしていて通常の機能はそのまま使えます。また、AMSの環境に似た多くの数式環境を定義しています。これらのコマンドはすべて Elsevier
9064 の説明書に書いてあり、LyXで使うことができます。
9067 \begin_layout Standard
9068 Elsevier スタイルを使う一番簡単な方法は、LyXに含まれているテンプレートファイルを使うことでしょう。fancy headingsや geometry
9069 パッケージをオプションで使って、Elsevier自身がスタイルファイルで定義している要素を変えないで下さい。Elsevier が説明書で使うように求めているパ
9070 ッケージ以外は使わないのが一番です。基本的に、Elsevier はできるだけクリーンな LaTeXファイルを求めています。彼らは投稿されたファイルのクラスファイ
9071 ルを投稿された雑誌のクラスファイルに入れ替えます。つまり、文章を書くときにフォーマットに凝るなということです。凝ったとしても、発行されるときにはその効果は消えて
9072 います。それ以外のこのレイアウトの使い方は標準の article クラスとほとんど同じです。Elsevierが何を許して、何を許さないのかの詳細は
9073 Elsevier の説明書を読んでください。
9076 \begin_layout Section
9078 \begin_inset CommandInset label
9087 \begin_layout Standard
9088 \begin_inset Flex CharStyle:Noun
9091 \begin_layout Plain Layout
9100 \begin_layout Subsection
9104 \begin_layout Standard
9105 この節では オーバヘッドプロジェクタ用のスライドを作るのに LyXをどう使えばいいのかを説明しています。スライドを作るための文書クラスは2つあります。既定の
9110 TeX slidesクラスです。この節では後者のみを説明します。
9113 \begin_layout Standard
9117 \begin_layout Standard
9118 \begin_inset VSpace bigskip
9124 \begin_layout Standard
9132 \begin_inset Quotes eld
9140 \begin_inset Quotes erd
9148 \begin_layout Standard
9149 \begin_inset VSpace bigskip
9155 \begin_layout Standard
9161 \begin_inset CommandInset ref
9163 reference "sec:slitex"
9167 を見てください。もしあなたのコンピュータに
9173 (slides (FoilTeX))がインストールされていなければ、既定の slidesクラスを使わなければならないでしょう。けれどもそれは foilsほどよく
9177 \begin_layout Standard
9186 のバージョン 2.1と使うように作られています。この LaTeXクラスファイルは、LaTeX2eに対応しています。
9189 \begin_layout Subsection
9193 \begin_layout Standard
9194 この文書クラスを使うには、いうまでもありませんが
9197 \begin_inset space ~
9213 を選択する必要があります。また、このクラスに特有のいくつかの
9216 \begin_inset space ~
9224 \begin_layout Itemize
9237 のオプションは変更しないでください。これらは
9244 \begin_layout Itemize
9245 既定のフォントサイズは 20ptです。オプションで 17pt、25pt、30ptが選べます。
9248 \begin_layout Itemize
9257 です。ただし、すべての数式は通常のローマンフォントが使われます。
9260 \begin_layout Itemize
9265 TeXがサポートする紙のサイズは A4、レターサイズ、それと 35mmスライド用のサイズです。A5、B5、legal、executiveペーパーサイズは使えませ
9269 \begin_layout Itemize
9274 の設定は変えても無視されますので、変えないでください。すべてのフロートはテキストで定義された位置にあらわれます。
9277 \begin_layout Itemize
9289 TeXではユーザが定義するロゴを含めて、フッタとへッダに色々な設定ができます。詳しくはセクション
9290 \begin_inset space ~
9294 \begin_inset CommandInset ref
9296 reference "sec:foilfoot"
9300 を見てください。タイトルページは他のページと扱いが違い、常にページ番号がつかず、また(ロゴが定義されていれば)ページの下の中心にロゴが表示されます。使うことので
9305 \begin_layout Labeling
9306 \labelwidthstring MMMMMMM
9313 最終的なアウトプットにページ番号も他のへッダ、フッタも印刷されません(もちろん脚注は印刷されます)。
9316 \begin_layout Labeling
9317 \labelwidthstring MMMMMMM
9324 ページ番号が一番下の中心につきます。他のへッダ、フッタは表示されません。
9327 \begin_layout Labeling
9328 \labelwidthstring MMMMMMM
9333 ページ番号が右下につきます。他のへッダ、フッタも表示されます。これが既定です。
9336 \begin_layout Labeling
9337 \labelwidthstring MMMMMMM
9350 TeXの作者はページレイアウトが変になる可能性があるので、
9358 \begin_layout Subsubsection
9362 \begin_layout Standard
9374 \begin_layout Labeling
9375 \labelwidthstring MMMMMMx
9380 これは 縦7.33インチ、横11インチの用紙用にページレイアウトを行います。この縦横の比率は35mmスライドと同じで、このオプションを使えば35mmスライドが作
9384 \begin_layout Labeling
9385 \labelwidthstring MMMMMMx
9390 タイトルページを除くすべてのページのへッダの下に横線を入れます。
9393 \begin_layout Labeling
9394 \labelwidthstring MMMMMMx
9399 タイトルページを除くすべてのページのフッタの上に横線を入れます。
9402 \begin_layout Labeling
9403 \labelwidthstring MMMMMMx
9412 の文章を作るごとに自動的に設定されます。このオプションは landscapeに設定されたスライドを回転させるのに dvipsドライバを使うように設定しています。
9415 \begin_layout Labeling
9416 \labelwidthstring MMMMMMx
9421 このオプションは用紙の寸法を landscapeページ用に変えるだけで回転はさせません。そのためこのオプションを使う場合は各ページを回転させる外部プログラムを
9422 使うか、プリンタに landscapeの方向で給紙する必要があります。このオプションはまた
9430 環境の役割を入れ替えることに注意してください(これらの環境については次の節で説明します)。
9433 \begin_layout Labeling
9434 \labelwidthstring MMMMMMx
9442 \begin_layout Labeling
9443 \labelwidthstring MMMMMMx
9451 \begin_layout Subsection
9455 \begin_layout Standard
9456 他のクラスで標準的にサポートされている環境は、
9460 クラスでもサポートされています。それ以外に
9464 TeXが提供している環境と、いくつかの LyXで付け加えられた環境もサポートしています。次の環境は
9468 クラスでサポートされている環境の中で、他のクラスでもサポートされている環境です。
9471 \begin_layout Standard
9475 \begin_layout Plain Layout
9487 \begin_layout Itemize
9493 \begin_layout Itemize
9499 \begin_layout Itemize
9505 \begin_layout Itemize
9511 \begin_layout Itemize
9517 \begin_layout Itemize
9523 \begin_layout Itemize
9529 \begin_layout Itemize
9535 \begin_layout Itemize
9541 \begin_layout Itemize
9547 \begin_layout Itemize
9553 \begin_layout Itemize
9559 \begin_layout Itemize
9565 \begin_layout Itemize
9571 \begin_layout Itemize
9577 \begin_layout Itemize
9583 \begin_layout Itemize
9589 \begin_layout Itemize
9595 \begin_layout Standard
9599 \begin_layout Plain Layout
9611 \begin_layout Standard
9612 節の環境を除くと、すべての主な環境がサポートされているのがわかるでしょう。基本的には一枚のスライドに1つの節が(見出しも本文も)含まれるので、
9616 TeXは新しいスライドを始めるいくつかのコマンドを用意しています。それを以下に書いておきます。
9619 \begin_layout Itemize
9625 \begin_layout Itemize
9631 \begin_layout Standard
9632 LyXはこれらを少し変えた環境を用意しています。それらは、
9635 \begin_layout Itemize
9641 \begin_layout Itemize
9647 \begin_layout Standard
9651 \begin_layout Standard
9652 スライドはしばしばアイデアを説明したり、新しい定理を説明したりするのに使われるので、
9656 TeXはそれらを説明するのに便利な色々な環境を用意しています。
9659 \begin_layout Standard
9663 \begin_layout Plain Layout
9675 \begin_layout Itemize
9681 \begin_layout Itemize
9687 \begin_layout Itemize
9693 \begin_layout Itemize
9699 \begin_layout Itemize
9705 \begin_layout Itemize
9711 \begin_layout Itemize
9717 \begin_layout Itemize
9723 \begin_layout Itemize
9729 \begin_layout Itemize
9735 \begin_layout Itemize
9741 \begin_layout Standard
9745 \begin_layout Plain Layout
9757 \begin_layout Standard
9758 星印のついたバージョンは番号がつかず、星印のないバージョンは番号がつきます。それ以外に以下の LyXが追加した2つの箇条書きのための環境があります。
9761 \begin_layout Itemize
9767 \begin_layout Itemize
9773 \begin_layout Standard
9778 TeX には強力なヘッダとフッタ機能があります。これはプリアンブルで設定するのが一番いいのですが、文章中のどこででも設定できます。もし、文章中でこれらの設定を変
9779 えたい場合には、スライドの一番上、つまり foilhead のすぐ後ろがいいでしょう。
9782 \begin_layout Standard
9790 \begin_layout Standard
9794 \begin_layout Plain Layout
9806 \begin_layout Itemize
9810 \begin_inset space ~
9816 \begin_layout Itemize
9822 \begin_layout Itemize
9826 \begin_inset space ~
9832 \begin_layout Itemize
9836 \begin_inset space ~
9842 \begin_layout Itemize
9846 \begin_inset space ~
9853 \begin_layout Standard
9854 \begin_inset space ~
9861 \begin_layout Standard
9865 \begin_layout Plain Layout
9877 \begin_layout Standard
9878 これ以外にも LyXで直接サポートはいませんが
9882 TeXが用意しているいくつかのコマンドがあります。これらについてはセクション
9883 \begin_inset CommandInset ref
9885 reference "sec:unsuppfoils"
9892 \begin_layout Subsection
9896 \begin_layout Standard
9897 この節は 色々な環境を使っての、一組のスライドの作り方を簡単に紹介します。例を見てみたい場合は
9906 ile\SpecialChar \menuseparator
9920 \begin_layout Subsubsection
9924 \begin_layout Standard
9941 は独立したタイトルページをつくります。もし
9945 環境を使わなかった場合には、LaTeXが今日の日付を挿入してくれます(アウトプットをつくった日付です)。
9948 \begin_layout Subsubsection
9952 \begin_layout Standard
9953 前に書いたように、新しいスライドを始めるには4つの方法があります。ポートレイト(縦長)のスライドを始めるには
9961 使わなければなりません。この2つの環境の違いはスライドのタイトルと本文の間の間隔です。
9964 \begin_layout Standard
9965 ランドスケープ方向(横長)のスライドをつくるには
9973 環境を使います。この2つの環境の違いもタイトルと本文の間の間隔です。どちらの場合も Shortがついたバージョンはタイトルと本文の間が0.5インチ(約1.27cm)
9977 \begin_layout Standard
9978 ランドスケープのスライドを作る場合の一つの問題は、
9982 ドライバをPostScript®出力するのに使うことです。さもないとスライドは回転しません。ただし、
9986 ドライバを持っていなくてもプリンタの給紙方向を変えることで、ランドスケープのスライドをつくることができます。
9989 \begin_layout Subsubsection
9990 Theorem、Lemma、Proof、その他
9993 \begin_layout Standard
9994 LyXの小さなバグのために、これらの環境のうちで同じ環境を続けて使うことができません。2つの同じ環境の間には何か別のものを入れる必要があります。もしこれらの中の
9995 環境で同じものを2つ続けて使うと、2つの環境がくっついて初めの環境が続く形になります。この問題を解決する方法は何かのテキストを2つの環境の間にいれる。または
9996 %だけの LaTeX環境をその2つの間に入れることです。これによって、ちゃんと2つの環境に別れるようになります。これの例が LyXディストリビューションに含ま
10001 に入っています。この問題が起るのは theoremに似た環境のなかで同じものを2つ続けて使う場合だけです。
10004 \begin_layout Subsubsection
10008 \begin_layout Standard
10009 他のクラスにもある箇条書きのための環境をサポートしているだけでなく、2つの新しい箇条書きのスタイルも使えます。この新しいスタイルをここで説明しましょう。他の箇条
10014 を見てください。itemize環境を使う場合にはセクション
10015 \begin_inset CommandInset ref
10017 reference "sec:ブリット"
10024 \begin_layout Standard
10033 です。これらの環境は長所と短所を並べて書くような場合に便利です。
10041 は項目の頭に×印をつけます。これらの環境は
10045 環境のちょっとした応用でつくられています。ただしこれらの環境を使うためには
10049 パッケージがインストールされている必要があります。
10052 \begin_layout Subsubsection
10056 \begin_layout Standard
10061 TeXは図、表のフロートを定義し直して、本文中に入れられたところに図または表を入れます。ページの上方に入れたり、ユーザが指定した場所にいれたりはしません。実際フ
10062 ロートの配置の設定を変えても、無視されるだけです。
10065 \begin_layout Subsubsection
10067 \begin_inset CommandInset label
10069 name "sec:foilfoot"
10076 \begin_layout Standard
10080 \begin_inset space ~
10089 は左のフッタを制御する2つのコマンドです。前者はスライドにグラフィックのロゴを含めるためのコマンドで、既定は「-Typeset by
10093 TeX-」です。後者は聴衆の分類を表すのに使います。例えば Confidential(機密)などと書いておきます。既定では何も設定されていません。
10096 \begin_layout Standard
10100 \begin_inset space ~
10108 \begin_inset space ~
10116 \begin_inset space ~
10121 (左上)を使って文字を入れることができます。
10124 \begin_layout Subsection
10130 \begin_inset CommandInset label
10132 name "sec:unsuppfoils"
10139 \begin_layout Standard
10148 コマンドとしてマークする必要があります。
10151 \begin_layout Subsubsection
10155 \begin_layout Standard
10182 は長さの値です。すべての長さはインチ(in)、ミリメートル(mm)、ポイント(pt)、
10188 のように文章やフォントに対しての相対的なものを使うかをして長さの単位の指定をする必要があります。
10191 \begin_layout Standard
10198 を変えることで調整できます。例えば、すべてのスライドのタイトルを0.5インチ本文に近づけるには次のコマンドをプリアンブルに入れてください。
10204 foilheadskip}{-0.5in}
10207 \begin_layout Standard
10208 フロートの回りのスペースは以下の長さを設定して調整することができます。
10211 \begin_layout Labeling
10212 \labelwidthstring MMMMMMMMMMM
10222 \begin_layout Labeling
10223 \labelwidthstring MMMMMMMMMMM
10233 \begin_layout Labeling
10234 \labelwidthstring MMMMMMMMMMM
10241 キャプションとそれに続く本文の間の長さ
10244 \begin_layout Labeling
10245 \labelwidthstring MMMMMMMMMMM
10252 この長さを調整することでキャプションを周囲のテキストより短くすることができます。
10258 に対する相対的な長さで調整するのがいいでしょう。
10261 \begin_layout Standard
10262 タイトルページに関係する長さもあります。長いタイトルや複数の著者がいる場合に変えたくなるかも知れません。
10265 \begin_layout Labeling
10266 \labelwidthstring MMMMMMMMMMM
10276 \begin_layout Labeling
10277 \labelwidthstring MMMMMMMMMMM
10295 \begin_layout Labeling
10296 \labelwidthstring MMMMMMMMMMM
10306 \begin_layout Labeling
10307 \labelwidthstring MMMMMMMMMMM
10325 \begin_layout Labeling
10326 \labelwidthstring MMMMMMMMMMM
10344 \begin_layout Standard
10345 最後にすべての箇条書きの環境に影響するコマンドを紹介しておきます。
10351 を箇条書きの環境の内側に置くと、項目間のすべての縦方向のスペースが取り除かれます。これはコマンドで長さを表す変数ではないので、
10357 を使う必要がないことに注意してください。
10360 \begin_layout Subsubsection
10362 \begin_inset CommandInset label
10364 name "sec:foilfoot"
10371 \begin_layout Standard
10388 で定義したロゴを特定のページに入れるかどうかをコントロールします。
10394 をプリアンブルに入れた場合は、すべてのスライドにロゴがつきません。特定のスライドにだけロゴをつけたくない場合には、そのスライドの foilheadのすぐ後ろに
10401 を入れて、次の foilheadのすぐ後ろに
10410 \begin_layout Standard
10419 ページスタイルを選んだ場合には、プリアンブルに
10429 を加える必要があります。これ加えることでランドスケープ(横長)のスライドをつくった場合でも、フッタとへッダは正しく配置されます。これは
10437 クラスの間のページレイアウトの衝突を避けるためのものです。
10440 \begin_layout Section
10441 Hollywood(Hollywoodスペック・スクリプト)
10444 \begin_layout Standard
10445 \begin_inset Flex CharStyle:Noun
10448 \begin_layout Plain Layout
10457 \begin_layout Subsection
10461 \begin_layout Standard
10462 これはハリウッドの脚本を書くためのものです。ハリウッドの脚本のフォーマットは読者が内容に焦点を当てやすく、俳優が読みやすくつくられています。脚本の各々のページは
10463 映画の1分でなければなりません。脚本に何も書かれていなければ、スクリーン上で何も見えず、何も聞こえないのです。全体を通して courier 12
10464 ptフォントを使わなければなりません。イタリックは使いません。
10467 \begin_layout Subsection
10471 \begin_layout Standard
10472 話し手の行は文の途中で切ってはいけません。もし話し手の行が次のページに続く場合には、
10476 の名前を繰り返し、そのあとに (Cont'd)とつけます。
10479 \begin_layout Subsection
10483 \begin_layout Standard
10488 の名前はラベルとして挿入でき、それ以降はラベルを相互参照で参照して
10492 の名前を挿入できます。相互参照ダイアログには登場人物の現在の配役が表示されます。これを使って話し手の名前を注釈にも挿入できます。
10495 \begin_layout Subsection
10499 \begin_layout Standard
10500 USレターサイズで、余白は左 1.6インチ、右 0.75インチ、上 0.5インチ、下 0.75インチ。
10503 \begin_layout Subsection
10507 \begin_layout Standard
10508 次の環境が使えます。右に書いてあるキーバインドを使うには、hollywood.bindを使ってください。
10511 \begin_layout Itemize
10515 \begin_inset Newline newline
10520 他の環境が働かない場合に使ってください。できるだけ使うのを避けてください。
10523 \begin_layout Itemize
10529 \begin_inset space \hfill{}
10537 \begin_inset Newline newline
10540 通常このあとに「Sallyは目を覚した」のようなものが続きます。
10543 \begin_layout Itemize
10547 \begin_inset space \hfill{}
10551 \begin_inset Newline newline
10556 新しい INTERIORカメラのセットアップを導入します。常にこの後には DAY、NIGHT、またはその他の必要な照明が定義されます。この行はすべて大文字で書き
10560 \begin_layout Itemize
10564 \begin_inset space \hfill{}
10568 \begin_inset Newline newline
10573 EXTERIORカメラのセットアップを導入します。この行はすべて大文字です。
10576 \begin_layout Itemize
10580 \begin_inset space \hfill{}
10584 \begin_inset Newline newline
10592 \begin_layout Itemize
10596 \begin_inset space \hfill{}
10600 \begin_inset Newline newline
10605 話し手への指示。自動的に括弧()が挿入されます。ただし LyX上で表示されるのは左括弧( のみです。印刷物には右括弧も表示されています。
10608 \begin_layout Itemize
10612 \begin_inset space \hfill{}
10616 \begin_inset Newline newline
10624 \begin_layout Itemize
10628 \begin_inset space \hfill{}
10632 \begin_inset Newline newline
10637 カメラの動きの指示。CUT TO:等。
10640 \begin_layout Itemize
10644 \begin_inset space \hfill{}
10650 \begin_layout Itemize
10654 \begin_inset space \hfill{}
10660 \begin_layout Itemize
10664 \begin_inset space \hfill{}
10670 \begin_layout Itemize
10674 \begin_inset space \hfill{}
10680 \begin_layout Subsection
10684 \begin_layout Itemize
10685 (O.S) --- off screen
10688 \begin_layout Itemize
10689 (V.0) --- voice over
10692 \begin_layout Itemize
10697 \begin_layout Itemize
10702 \begin_layout Itemize
10703 PAN --- camera movement
10706 \begin_layout Itemize
10707 INSERT --- cut to close-up of
10710 \begin_layout Section
10714 \begin_layout Standard
10715 \begin_inset Flex CharStyle:Noun
10718 \begin_layout Plain Layout
10719 Panayotis Papasotiriou
10727 \begin_layout Subsection
10731 \begin_layout Standard
10732 ijpmd パッケージは World Scientificが発行する
10734 International Journal of Modern Physics D
10736 に電子投稿するためのマクロ集です。文書クラス名は
10740 です。このファイルは、著者のための指針とともに
10741 \begin_inset Flex URL
10744 \begin_layout Plain Layout
10746 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
10751 からダウンロードできます。ijmpd パッケージは標準の article パッケージを改造したもので、ほとんどの機能は LyXでサポートされています。私は最近
10754 International Journal of Modern Physics D
10756 に投稿する論文を LyXで書き上げました。
10759 \begin_layout Subsection
10763 \begin_layout Standard
10764 他のパッケージと同じく、論文を書くための一番簡単な方法はテンプレートから始めることです。
10769 ile\SpecialChar \menuseparator
10783 テンプレートを選んでください。そうすると、ほとんどの原稿に共通な部分のみ含んだ、ほとんど何も書いていない文章が表れます。(鍵括弧<>で囲まれた)既存のテキストを
10784 正しい情報に書き換えてください。以下のことは忘れないようにしてください。
10787 \begin_layout Enumerate
10788 LyXでフォントの大きさや文章のページスタイルを変えることはできません。ijmpdパッケージではそのような操作を禁じています。
10791 \begin_layout Enumerate
10792 ijmpdパッケージでは、文章の言語を変えないことが必要です。あなたの論文をプレビューする前に、babelパッケージが使われていないことを確かめてください。その
10798 dit\SpecialChar \menuseparator
10827 をクリックします(これをずっと使うなら
10834 \begin_layout Enumerate
10835 Theorem と Proof という2つの新しい環境が使えます(何に使うかは明らかでしょう)。
10838 \begin_layout Enumerate
10839 付録を論文に加えることができます。LyXは付録を始めるために、 Appendix という特別な環境を用意しています。付録の中には、通常の節、サブ節、サブサブ節を
10843 \begin_layout Enumerate
10844 ijmpdパッケージでは、表の「見出し」の扱いは LyXと大きく異なっています。そのために、LyXでつくった表は正しく印刷されますが、表の見出しは無視されます。
10845 表の見出しが必要な場合には、テーブルフロート全体を別の texファイルにして、それを LyXの文章に(
10850 nsert\SpecialChar \menuseparator
10857 を使って)読み込んでください。ijmpdでのどのようにテーブルフロートをつくるかについては
10861 というファイルを見てください。ijmpdパッケージに含まれています。
10864 \begin_layout Subsection
10868 \begin_layout Standard
10869 論文を投稿する前に、LyXの文章を LaTeX ファイルとして保存して(
10874 ile\SpecialChar \menuseparator
10879 xport\SpecialChar \menuseparator
10886 )、その LaTeX ファイルに次のような変更を加える必要があります。
10889 \begin_layout Enumerate
10899 \begin_layout Enumerate
10912 コマンドの間にあるすべてのものを消す。ただし、あなたが自分自身で LaTeX プリアンブルに加えたものは残しておいてください。
10915 \begin_layout Standard
10920 ファイルを保存して、必要な回数だけ LaTeX にかけてください。 こうして得られた
10924 ファイルもチェックした方がいいでしょう。
10927 \begin_layout Subsection
10931 \begin_layout Standard
10932 オプションで ERTの使用を使用できますが、それはページの見た目に影響する 3つのコマンドに集約されています。
10936 テンプレートを使って論文を書き始めた場合には、必要な ERT はすでに、テンプレートに書かれていて通常はそれを消す必要はありません。一番初めの
10937 ERT を奇数、偶数ページのヘッダに書く情報に書き換えるだけです(著者の名前と論文のタイトルです)。この ERT は
10941 markboth{Authors' Names}{Short Paper's Title}
10946 \begin_layout Section
10950 \begin_layout Standard
10951 \begin_inset Flex CharStyle:Noun
10954 \begin_layout Plain Layout
10963 \begin_layout Subsection
10967 \begin_layout Standard
10968 iopartパッケージは、Institute of Physics(イギリス物理学会)が発行する学術誌へ送る電子原稿を作成するのに使用する文書クラスを提供します
10969 。iopartクラスを使用した論文作成方法の著者向け説明書は、ウェブサイト
10970 \begin_inset Flex URL
10973 \begin_layout Plain Layout
10975 ftp://ftp.iop.org/pub/journals/latex2e
10980 からiopackageとともにダウンロード可能です。
10983 \begin_layout Subsection
10987 \begin_layout Standard
10988 論文を書くもっとも簡単な方法は、LyXの用例ファイルフォルダにある
10992 を土台にすることです。このファイルを開き、新しい名前で保存して、書き始めてください。用例ファイルは、特定の環境の使用法についても説明しています。もっとも重要な助
10996 \begin_layout Itemize
10997 文書がPDF・PS・DVIにコンパイルできるようにするためには、文書設定の
10998 \begin_inset Flex CharStyle:MenuItem
11001 \begin_layout Plain Layout
11008 \begin_inset Flex CharStyle:MenuItem
11011 \begin_layout Plain Layout
11017 オプションが有効になっていないことを確認してください!
11020 \begin_layout Itemize
11021 どのタイトル環境を使うかが、論文の種類を定義しますので、タイトルには以下の環境のうちのいずれかを使用してください。
11025 \begin_layout Itemize
11029 \begin_layout Itemize
11031 \begin_inset Flex CharStyle:MenuItem
11034 \begin_layout Plain Layout
11043 \begin_layout Itemize
11045 \begin_inset Flex CharStyle:MenuItem
11048 \begin_layout Plain Layout
11057 \begin_layout Itemize
11059 \begin_inset Flex CharStyle:MenuItem
11062 \begin_layout Plain Layout
11071 \begin_layout Itemize
11073 \begin_inset Flex CharStyle:MenuItem
11076 \begin_layout Plain Layout
11085 \begin_layout Itemize
11087 \begin_inset Flex CharStyle:MenuItem
11090 \begin_layout Plain Layout
11099 \begin_layout Itemize
11100 Preliminary communication用には
11101 \begin_inset Flex CharStyle:MenuItem
11104 \begin_layout Plain Layout
11113 \begin_layout Itemize
11114 Rapid communication用には
11115 \begin_inset Flex CharStyle:MenuItem
11118 \begin_layout Plain Layout
11127 \begin_layout Itemize
11129 \begin_inset Flex CharStyle:MenuItem
11132 \begin_layout Plain Layout
11142 \begin_layout Itemize
11143 \begin_inset Flex CharStyle:MenuItem
11146 \begin_layout Plain Layout
11152 以外のタイトル環境は、短縮タイトルをつけることもできます。
11155 \begin_layout Itemize
11156 LyXでは直接にサポートされていませんが、一般的なタイトル環境として
11157 \begin_inset Flex CharStyle:MenuItem
11160 \begin_layout Plain Layout
11166 があります。文書が他のタイトル型に合わない場合には、TeXコードでこれを指定することができます。
11169 \begin_layout Standard
11170 特別な表や数式組版に関するヒントなど詳しい情報については、IOP著者ガイドラインを参照してください。
11173 \begin_layout Section
11177 \begin_layout Standard
11178 \begin_inset Flex CharStyle:Noun
11181 \begin_layout Plain Layout
11182 Panayotis Papasotiriou
11190 \begin_layout Subsection
11194 \begin_layout Standard
11195 Kluwerパッケージは、Kluwer Academic Publishersによってつくられた、同社が発行する学術雑誌に電子投稿するためのマクロ集です。同社が
11196 発行する学術雑誌のうちで、(少なくとも私の専門内では)もっともよく知られているものは
11198 Astrophysics and Space Science
11204 ですが、他にも多くの学術雑誌を発行しています(
11205 \begin_inset Flex URL
11208 \begin_layout Plain Layout
11210 http://www.wkap.nl/jrnllist.htm/JRNLHOME
11215 に完全なリストがあります)。Kluwerパッケージは
11216 \begin_inset Flex URL
11219 \begin_layout Plain Layout
11221 http://www.wkap.nl/kaphtml.htm/STYLEFILES
11226 からダウンロードできます。完全なユーザーの手引きもそのパッケージの中に含まれています(別々にダウンロードすることも可能です)。
11229 \begin_layout Standard
11230 LyXはこのパケージの多くの機能をサポートしていますが、すべてではありません。しかし、ERTが必要となるのはいくつかの「変わった」コマンドだけになりました(
11231 \begin_inset CommandInset ref
11233 reference "subsec:kluwer_peculiarities"
11237 を見てください)。最近私は LyX を使って何の問題もなく、
11239 Astrophysics and Space Science
11241 に投稿する論文を書くことができました。
11244 \begin_layout Subsection
11248 \begin_layout Standard
11249 論文を書く一番簡単な方法は、Kluwer のテンプレートファイルを使うことです。Click on
11251 File\SpecialChar \menuseparator
11258 テンプレートを選んでください。これは、通常必要とされるフィールドに短い使い方が書かれただけの(ほとんど)何も書かれていない文章ファイルです。他のテンプレートを
11259 同じように、書いてあるテキストを(<>括弧も含めて)消して、自分の情報を書いていってください。
11262 \begin_layout Subsection
11266 \begin_layout Standard
11267 AASTeXパッケージと同様に、論文を Kluwerの学術誌に投稿する前には次のような後処理をする必要があります。
11270 \begin_layout Enumerate
11276 ile\SpecialChar \menuseparator
11281 xport\SpecialChar \menuseparator
11288 とクリックして、LaTeXファイルとして保存する。
11291 \begin_layout Enumerate
11292 保存した .texファイルをテキストエディタを使って、次のように変える。
11296 \begin_layout Enumerate
11303 コマンドより前にあるコメント行を消去する。
11306 \begin_layout Enumerate
11307 自分で LaTeX プリアンブルに指定したものをのぞいて、
11319 の間のものをコマンド自身も含めて消去する。
11322 \begin_layout Standard
11323 変更した .tex ファイルを保存する。
11327 \begin_layout Enumerate
11328 保存した .tex ファイルに LaTeXを必要な回数(通常は3回)走らせる。
11331 \begin_layout Enumerate
11336 などを使って開き、変なところがないかチェックする(自分自身で間違いをしていない限り大丈夫なはずです)。
11339 \begin_layout Subsection
11340 Kluwerパッケージの「風変わり」な特徴
11341 \begin_inset CommandInset label
11343 name "subsec:kluwer_peculiarities"
11350 \begin_layout Standard
11351 Kluwerパッケージは次のような「風変わりな」特徴があります。
11354 \begin_layout Enumerate
11355 複数の論文を1つの LaTeX ファイルへ入れることができます
11359 \begin_layout Plain Layout
11360 こうなっていた方がいいという理由は、私には思いつきません。
11365 。各々の論文は、article環境に含まれていなければなりません。たとえ1つの論文しか LaTeXファイルに含めない場合にでも、article環境に入れなければ
11378 で終わります。この環境を LyXで実装することは可能でしたが、実装しませんでした。あまり美しくなく、また初心者を混乱させると思ったからです。したがって、これらの
11391 )を直接本文中に入力して、LaTeXコードとしてマークする必要があります(ERTです)。
11394 \begin_layout Enumerate
11395 論文のはじめに入れる情報(タイトル、サブタイトル、著者名、所属など)は openingとよばれる環境に入れる必要があります。これは LyXでは実装されていません
11396 。したがってタイトル、サブタイトルなどは 2つの ERTの行(
11411 \begin_layout Enumerate
11412 パッケージのユーザーズ取扱説明書によると、参考文献の項目は
11433 \begin_layout Standard
11438 テンプレートは、これらの変わった点を考慮して作ってあります。新しい論文をこのテンプレートを使って書きはじめる場合には、なにも特別なことをする必要はありません。
11442 \begin_layout Enumerate
11443 テンプレートに含まれる ERT を消さないでください。
11446 \begin_layout Enumerate
11447 新しい参考文献の項目をつくる場合は、テンプレートに含まれる参考文献の項目の例をコピーして編集してください。
11450 \begin_layout Section
11454 \begin_layout Standard
11455 \begin_inset Flex CharStyle:Noun
11458 \begin_layout Plain Layout
11467 \begin_layout Subsection
11471 \begin_layout Standard
11474 article (koma-script)、report (koma-script)、book
11478 (koma-script)、letter
11486 scrartcl.cls、scrreprt.cls、scrbook.cls、scrlettr.cls
11488 に対応しています。以下ではこれを Koma-Scriptファミリーと呼ぶことにします。これらの文書クラスは、ヨーロッパの活字印刷の慣例にいくつもの点でよりよく合
11491 article.cls、report.cls、book.cls、letter.cls
11496 \begin_layout Itemize
11499 article (koma-script)、report (koma-script)、book (koma-script)
11503 letter (koma-script)
11508 \begin_layout Itemize
11509 見出し、description環境のラベル、
11511 letter (koma-script)
11513 文書クラスのいくつかの要素はボルド sans serifフォントが使われます
11517 \begin_layout Plain Layout
11518 古い cmフォントのボルド sans serifフォントと新しい ecフォントのボルド sans serifフォントの間には大きな違いがあり、特に見出しに使った
11519 場合に違いが目立ちます。比較してみると ec ボルド sans serifフォントの方が細く見えます。ecフォントを使っている場合でもcmフォントの場合と同じよ
11528 という LaTeXパッケージを使うことができます。
11533 。章の見出しの番号付は節見出しと同じように行われます。つまり頭に Chapter\SpecialChar \ldots{}
11534 という行がつきません。またいくつかのオプションを使って、見出しの外観を変えること
11540 ayout\SpecialChar \menuseparator
11559 フィールドにオプションを入れます)。詳しいドイツ語でのオプションの説明が Koma-Scriptの取扱説明書
11566 \begin_layout Itemize
11567 印刷部分をデザインする主なオプションは、
11580 ayout\SpecialChar \menuseparator
11599 フィールドにオプションを入れます)。これらのオプションは
11604 ayout\SpecialChar \menuseparator
11611 ダイアログのオプションと同様に、はっきりと余白を変えることができます。詳しいドイツ語でのこれらのオプションと他の印刷部分に関するオプションの説明が
11619 \begin_layout Itemize
11620 Koma-Scriptファミリの LaTeX文書クラスは、いくつかの追加的なコマンドを定義しています。それらの中で LyXで意味があるものについては対応する段落
11624 \begin_layout Standard
11625 詳しいドイツ語での Koma-Scriptファミリの文書クラスの説明が Koma-Scriptの取扱説明書
11633 \begin_layout Plain Layout
11643 。以下の節では LyXに関係する面だけを説明することにします。
11646 \begin_layout Subsection
11647 article (koma-script), report (koma-script), and book (koma-script)
11650 \begin_layout Standard
11653 article (koma-script)
11657 report (koma-script)
11679 で実装されています。これらは標準的な文書クラス
11691 にあるすべての段落環境を少し変えた形ですべて持っています。例外は LyX特有の
11703 環境以外にもいくつもの新しい段落環境が加えられています。これらは
11705 letter (koma-script)
11707 には含まれていないのに注意してください。
11710 \begin_layout Itemize
11713 Addpart、Addchap、Addsec: これらは Part*、Chapter*、Section*と同等のものですが目次にその項目が挿入されます。Addp
11718 article (koma-script)
11724 \begin_layout Itemize
11741 とまったく同じように働きますが、ランニングへッダを消します。
11747 article (koma-script)
11756 \begin_layout Plain Layout
11763 report (koma-script)
11775 と同じものなので、LyXでは実装されていません。
11785 \begin_layout Itemize
11790 : 次に続く段落のすぐ上に普通の文字サイズで文章の構造を変えない形で見出しをつけます。
11793 \begin_layout Itemize
11802 はキャプションの要素の上または下に配置するための特別のキャプションでスペースの配置を変えてあります(正しい組版のルールに従うなら、つねにキャプションは表の上に置
11807 というクラスオプションを使うと、表には
11815 を使うようになります。これを使うには少なくとも Koma-Script version 2.8q が必要です。
11818 \begin_layout Itemize
11823 : これを使うと章の初めに格言を置くことができます。オプションで
11825 Insert\SpecialChar \menuseparator
11827 \begin_inset space ~
11832 を使うと、その中に格言の著者を入れることができます。格言の著者の間は線で区切られます。これを使うには少なくとも Koma-Script version
11839 article (koma-script)
11844 \begin_layout Standard
11853 とともに文章のタイトル部分を作るのに使います。これらは一番初めの普通の段落よりも前に置かれる必要があります
11857 \begin_layout Plain Layout
11864 コマンドよりも前にこなければなりません。
11869 。これらの中のあるタイプが2度以上使われた場合は、後のものが前のものを上書きします。つまり最後に使ったものだけが有効です。しかし、異なるタイプ、例えば
11878 の順番を変えてもタイプセットされた文章には何の影響も与えません。
11881 \begin_layout Itemize
11898 )の上に文章の主題のための真ん中に置かれた段落をつくります。
11901 \begin_layout Itemize
11918 )の下に出版者の名前を入れる中心揃された段落をつくります。
11921 \begin_layout Itemize
11928 report (koma-script)
11934 ではタイトルページの次に独立したページを献辞のためにつくります。
11936 article (koma-script)
11950 )の下に献辞のための中心揃した段落をつくります。
11953 \begin_layout Itemize
11970 )の上に文章のへッドを入れるための左詰めの段落をつくります。
11973 \begin_layout Itemize
11980 report (koma-script)
11986 で両面印刷をする場合、タイトルページの裏のページの一番上に左詰め段落をつくります。片面印刷の場合や、
11988 article (koma-script)
11993 \begin_layout Itemize
12000 report (koma-script)
12006 で両面印刷をする場合、タイトルページの裏のページの一番下に左詰め段落をつくります。片面印刷の場合や、
12008 article (koma-script)
12013 \begin_layout Itemize
12018 : 段落を含む実際の文章より前に、文章の整形を行わない特別の「汚い」ページをつくります。
12021 \begin_layout Standard
12024 article (koma-script)、report (koma-script)、book (koma-script)
12030 というファイルを読み込みます。このファイルの中にあなたの新しいクラスを定義することができます。s
12034 を自分用のレイアウトディレクトリにコピーして編集してください。
12037 \begin_layout Subsection
12038 letter (koma-script)
12041 \begin_layout Standard
12045 \begin_layout Plain Layout
12057 \begin_layout Standard
12060 letter (koma-script)
12066 で実装されています。これは標準的な文書クラス
12070 にあるすべての環境を少し変えた形で含んでいますが、LyXに特有の
12086 タイプを代わりに使ってください。それ以外にも標準的な文書クラスの場合と違い、
12102 を含んでいます。またそれ以外にも多くの手紙特有の環境が付け加えられています。
12105 \begin_layout Standard
12109 \begin_layout Plain Layout
12121 \begin_layout Standard
12122 この文書クラスで作られた手紙の色々な部分は、多くの LaTeXコマンドで変えることができます(LyXでするには
12127 ayout\SpecialChar \menuseparator
12138 \begin_layout Plain Layout
12139 例えば普通の名前と住所の入った手紙のへッダをつけるにはプリアンブルに次のようなコマンドを入れます。
12142 \begin_layout LyX-Code
12152 \begin_layout LyX-Code
12168 \begin_layout LyX-Code
12178 \begin_layout LyX-Code
12198 。このような LaTeXコマンドの詳しいドイツ語の説明は Koma-Scriptの取扱説明書
12202 に書いてあります。これを参照して自分用の手紙のレイアウトを作ることができます。
12205 \begin_layout Standard
12214 環境は手紙の始めを定義する環境で、すべての手紙に使わなければなりません。これらの環境を強調するために、LyXでは左余白にそれぞれ
12222 という文字が表示されます。一つのファイルにいくつもの手紙を書くのが可能です。
12226 環境は同じ住所を使って新しい手紙を始め、
12246 は通常の段落環境で一つの同じ手紙の中で何回でも使うことができます。
12249 \begin_layout Itemize
12252 Letter: 住所のための段落をつくり、暗黙に手紙の始まりを定義します。
12255 \begin_layout Itemize
12260 : 敬称のための段落をつくり、暗黙に新しい手紙を始めます。
12263 \begin_layout Itemize
12271 \begin_layout Itemize
12279 \begin_layout Itemize
12284 : 配布先のリストのための段落をつくります。
12287 \begin_layout Itemize
12292 : 同封した物を書くための段落をつくります。
12295 \begin_layout Standard
12336 といった環境は情報を入力するための環境で、どのような情報を入れるかのラベルがついていて、文書クラスによって処理されます
12340 \begin_layout Plain Layout
12349 がこれらと同じ入力タイプではないのが不合理に見えるかもしれません。しかし、この2つの環境の特別の役割のために、私はこれらを左余白にマークのある普通の段落環境とし
12358 環境が同じように見える方がいいと思います。
12370 \begin_layout Standard
12371 これらの環境を WYSIWYGの形で実装するのは意味がありません。なぜならつくられた手紙の外観はどの環境を使っているかだけではなく、他の要素にも影響されるからで
12380 環境が同じ手紙に使われたときのみ最終的な手紙にあらわれます。
12384 環境の値は通常手紙のどこにもあらわれません。前に脚注の中で示したやり方で手紙のへッダを変えるときに使われるかもしれません。
12387 \begin_layout Standard
12388 このような入力タイプの環境は、空の段落として使うことができます。これは
12404 環境がある場合には、署名がつきません。
12407 \begin_layout Standard
12408 入力タイプを使うことで手紙のテンプレートもつくることができます。住所、名前などのいつも使う情報だけは書いておき、日付などの変わっていく情報については空の入力タイ
12412 \begin_layout Itemize
12432 \begin_layout Itemize
12437 : 送り手の住所。通常はレターへッドの送り手の名前の下に中央揃の段落で表示されます。
12440 \begin_layout Itemize
12454 \begin_layout Itemize
12462 \begin_layout Itemize
12475 は送り手の住所の下に場所と日付を右詰めの形で挿入します。もし空の
12483 の値に関係なく場所も日付も表示されません。もし
12487 環境が無かった場合には、ファイルが LaTeXで処理された日付が代入されます。
12490 \begin_layout Itemize
12495 : 送り手の返送する場合の住所。送り手の住所の上に小さな sans serifフォントで表示されます。
12498 \begin_layout Itemize
12503 : 特別な手紙の情報。普通は住所の上、返送用の住所の下に下線つきで表示されます。
12506 \begin_layout Itemize
12511 : 追加的な情報。普通は住所の下の右側に表示されます。
12514 \begin_layout Itemize
12519 : 手紙の題名。表題の上に大きな太い sans serifフォントで表示されます。
12522 \begin_layout Itemize
12534 \begin_layout Standard
12560 \begin_inset Quotes eld
12564 \begin_inset Quotes erd
12568 \begin_inset Quotes eld
12572 \begin_inset Quotes erd
12576 \begin_inset Quotes eld
12580 \begin_inset Quotes erd
12584 \begin_inset Quotes eld
12588 \begin_inset Quotes erd
12592 \begin_inset Quotes eld
12596 \begin_inset Quotes erd
12600 \begin_inset Quotes eld
12604 \begin_inset Quotes erd
12607 といったフィールドを含む行をつくります。日付には
12611 の値が使われます。このようなビジネス用のタイプが使われた場合、
12615 の値は手紙にあらわれずに、LaTeX変数
12621 がセットさせるだけになります。通常の住所フィールドの下の右揃での場所と日付の出力は抑制されます。これらのビジネス用のタイプはラベルを持った入力タイプとして実装さ
12629 \begin_layout Itemize
12637 \begin_layout Itemize
12645 \begin_layout Itemize
12653 \begin_layout Itemize
12661 \begin_layout Itemize
12669 \begin_layout Subsection
12670 新しい letter class: letter (koma-script v.2)
12673 \begin_layout Standard
12674 Koma-Script バージョン 2.8は新しい レタークラス
12682 はサポートされなくなりました。これは、LaTeX の側で、全く新しいインターフェイスを持ち、今までのクラスと互換性を持ちません。そのために LyX
12683 は新旧二つのクラスをサポートしています。ただし、できるだけ新しいクラスを使ってください。
12686 \begin_layout Standard
12689 letter (koma-script)
12691 の機能はすべて持っていて、また新しい機能も付け加えられています。基本的な要素は
12711 は新しい手紙を始めます(つまり、一つの文章で複数の手紙を書くことができます)。新しい要素は送り手の
12729 Insert\SpecialChar \menuseparator
12732 を使って)ロゴを入れることができます。
12735 \begin_layout Standard
12736 一番大きな改良点は、ほとんどすべてのニーズを満たすように手紙のレイアウトが設定可能になったことでしょう。これはプリアンブル(
12741 ayout\SpecialChar \menuseparator
12744 \SpecialChar \ldots{}
12745 )かクラスオプションとして特別のスタイルファイル(レタークラスオプション、拡張子は
12753 \begin_layout Plain Layout
12754 KOMAパッケージにはいくつかの既定の *.lco ファイルが含まれています。例えば、
12775 ayout\SpecialChar \menuseparator
12780 ocument\SpecialChar \menuseparator
12796 テンプレートを見てください。詳しい説明は Koma-Script の取扱説明書(
12803 \begin_layout Subsection
12807 \begin_layout Standard
12808 Koma-Script文書クラスを LyXで表示するさいに、LyXの内部構造がいくつかの問題を引き起こします。
12811 \begin_layout Itemize
12816 環境の章番号が章の題名と同じ行ではなく、その上の行に表示されます。これはレイアウトファイルの中の
12820 ラベルタイプに対する LyXの振る舞いのためです。
12823 \begin_layout Itemize
12832 でつけた見出しは本当の LaTeXファイルの目次には挿入されますが、LyXの目次(
12837 iew\SpecialChar \menuseparator
12843 \begin_inset space ~
12847 \begin_inset space ~
12855 \begin_layout Itemize
12860 文書クラスでの段落は段落の間に間隔を開けることによって分けられていて、字下げは使いません。これが通常の振る舞いで、そのために特別な LaTeXコマンドは必要あり
12866 ayout\SpecialChar \menuseparator
12880 ボタンが押された状態になっています。これは
12888 は段落間に間を開ける LaTeXコマンドを挿入するボタンですが、この文書クラスの場合、特別な LaTeXコマンドを挿入する必要がないからです。
12891 \begin_layout Section
12895 \begin_layout Standard
12896 \begin_inset Flex CharStyle:Noun
12899 \begin_layout Plain Layout
12908 \begin_layout Subsection
12912 \begin_layout Standard
12913 このクラスは IEEEがスポンサーになっているカンファレンスに投稿するためのものです。したがって、このクラスを使うには IEEEの Authors
12914 Kitを手に入れることを強くお薦めします。
12918 パッケージと それに付随する bibliographyスタイルファイルはそのキットに含まれています。Authors Kitは通常初めの投稿が受理されたときに
12919 e-mailで送られてきます。その中にはフォーマットに関する制限等の役に立つ情報が色々書いてあります。以下ではあなたがこのキットを手にいれて、読んでいるものと
12923 \begin_layout Subsection
12927 \begin_layout Standard
12928 [AR\SpecialChar \@.
12932 \begin_layout Subsection
12936 \begin_layout Itemize
12942 \begin_layout Itemize
12948 \begin_layout Itemize
12954 \begin_layout Itemize
12960 \begin_layout Itemize
12966 \begin_layout Itemize
12972 \begin_layout Itemize
12978 \begin_layout Itemize
12984 \begin_layout Itemize
12990 \begin_layout Subsection
12994 \begin_layout Standard
12995 主に節番号の表示の仕方のために、画面上と印刷したものの間には小さな違いがあります。画面上では節番号に続くピリオドが表示されません。印刷したものにはちゃんと表示さ
12999 \begin_layout Section
13003 \begin_layout Standard
13004 \begin_inset Flex CharStyle:Noun
13007 \begin_layout Plain Layout
13016 \begin_layout Subsection
13020 \begin_layout Standard
13021 Memoir は非常に強力で着実に改良されている文書クラスです。フィクションとノンフィクションの文学作品用にデザインされています。このクラスの目的は、ユーザーが
13022 文章の組版に対して最大限にコントロールできることです。Memoir は標準の book クラスをベースにしていますが、article クラスをまねることもできま
13026 \begin_layout Standard
13027 Memoir の開発者である Peter Wilson は LaTeX の世界で多くの便利なパッケージの作者として知られています。それらのほとんどは
13028 Memoir に含まれています。そのために、目次、付録、章のデザインなどを簡単にレイアウトすることができます。ただし、LyX はそれらすべての機能をサポートし
13029 ているわけではありません。いくつかのものは将来のバージョンでサポートされるでしょうが
13033 \begin_layout Plain Layout
13035 \begin_inset Flex URL
13038 \begin_layout Plain Layout
13040 lyx-devel@lists.lyx.org
13050 、LyX のフレームワークによる制限のために多くのものはサポートされないでしょう。もちろん、LaTeX コマンド(ERT
13054 \begin_layout Plain Layout
13056 \begin_inset space ~
13060 \begin_inset CommandInset ref
13062 reference "sec:LaTeXコードを挿入する"
13071 )を直接入力することによって、すべての機能を使うことは可能です。その節では、LyX でサポートされている機能だけについて簡単に見ていくことにします。詳しい説明や
13072 、LyX で直接サポートされていない機能については、Memoir クラスの詳しい取扱説明書
13076 \begin_layout Plain Layout
13077 \begin_inset Flex URL
13080 \begin_layout Plain Layout
13082 CTAN:/macros/latex/memoir/memman.pdf
13092 を見てください。この取扱説明書はこのクラスのユーザーの手引きであるだけでなく、よい組版とはどういうものかという総合的な解説やよい組版のすばらしい例を含んでいます
13096 \begin_layout Subsection
13100 \begin_layout Standard
13101 Memoir は標準の book クラスのすべての機能を基本的にサポートしています。しかし、以下のようないくつかの違いがあります。
13104 \begin_layout Description
13105 フォントサイズ: Memoir の方がより広い範囲のフォントサイズが使えます。9、10、11、12、14、17
13108 \begin_layout Description
13109 ページスタイル: fancyhdr パッケージと Memoir の間の一つのコマンドの衝突のため(2つのパッケージが一つのコマンドを同じ名前で定義しているために
13110 、LaTeX を混乱させるのです)、手の込んだページスタイルは使えません。そのかわりに、Memoir はいくつものページスタイルを用意しています(
13112 Layout\SpecialChar \menuseparator
13113 Document\SpecialChar \menuseparator
13115 \begin_inset space ~
13120 を見てください)。それらのページスタイルを章題ページに使いたい場合は、
13126 コマンドを本文かプリアンブルに記述する必要があります(つまり、
13130 chapterstyle{companion}
13135 \begin_layout Description
13136 節分け: 標準的なクラスでは節分けコマンド(chapter、 section、 subsection等)は一つのオプションをとることができます。このオプションで
13137 目次とヘッダーの表示用の題名を指定できます(題名が長い場合などに使います)。LyX では、chapterや sectionの始めのところで
13139 Insert\SpecialChar \menuseparator
13141 \begin_inset space ~
13146 を使って指定できます。Memoir は2つめのオプションを取ることができ、目次用の題名とヘッダー用の題名を異なるものにできます。つまり、本文中の題名、目次用の題
13147 名、ヘッダー用の題名の3種類の題名を使うことができるのです。残念ながら LyXは2つのオプションを取ることをサポートしていません。しかし、この制限は次のようにし
13148 て回避できます。一つめと二つめの項の間に ERTモード(
13152 )で一組の括弧を入れればいいのです。つまり、Short Title インセットに
13171 \begin_layout Description
13172 目次/図、表のリスト: 標準のクラス(とそれ以外の多くのクラス)では、目次、図のリスト、表のリストは自動的に新しいページから始まります。Memoir
13173 はこれらのクラスとは異なり、新しいページで始めたいなら自分でページの区切りを入れる必要があります。
13176 \begin_layout Description
13177 タイトルページ: 理由はわからないのですが、Memoir はタイトルページにページ番号をつけます(標準のクラスでは、タイトルページのスタイルは「empty」、つ
13178 まりページ番号はつきません)。タイトルページにページ番号を付けたくない場合は、プリアンブルに
13182 aliaspagestyle{title}{empty}
13187 \begin_layout Description
13194 Layout\SpecialChar \menuseparator
13195 Document\SpecialChar \menuseparator
13197 \begin_inset space ~
13202 を選んで入力します)、article スタイルをまねることができます。つまり、(脚注、図、表等の)カウンターは新しい章に入ってもリセットされません。また新しい
13203 章は新しいページからはじまりません(ただし、本当の article クラスとは違って、新しいページから始めることもできます)。しかし、parts
13204 は bookクラスと同様に新しいページからはじまります。
13207 \begin_layout Description
13208 Oldfontcommands: 既定では Memoir は LaTeX バージョン 2.09 で使われていた古いフォントコマンド(つまり、
13220 )を使うことを許しません。そのようなコマンドが表れた場合は、エラーが発生して LaTeX が止まります。クラスオプション
13224 を使うと、警告が出るだけになります(少なくとも LaTeX は止まりません)。多くのパッケージ、特に BibTeX のスタイルファイルはまだ古いフォントコマン
13225 ドを使っているために、我々は既定でこのオプションを使うことに決めました。
13228 \begin_layout Subsection
13232 \begin_layout Standard
13233 LyXでサポートされる機能(今のところそれほど多くはありません)を簡単に説明しましょう。詳しくは Memoir の取扱説明書
13237 \begin_layout Plain Layout
13238 \begin_inset Flex URL
13241 \begin_layout Plain Layout
13243 CTAN:/macros/latex/memoir/memman.pdf
13256 \begin_layout Description
13257 Abstract: なぜ abstract が追加された機能なのか不思議かもしれませんが、標準の Bookクラスには abstract は無いのです。しかし、M
13258 emoir にはあります。文章中のどこにでも、また何回でも abstract を使うことができます。
13261 \begin_layout Description
13262 Chapterprecis: 純文学を読んでいて、これを見たことがあるかも知れません。章の内容が簡単にタイトルの下と目次に書いてあるものがあります(つまり、「我
13263 々のヒーローがトロヤに到着する。彼は友人を失うが、新たな友人を得る。」というようなものです)。これが Chapterprecis です。したがって、章の下でのみ
13267 \begin_layout Description
13268 Epigraph: epigraphは章の始めに書かれた、標語やモットーです。epigraph 環境はそのような標語をタイプセットする方法を用意します。標語自身
13269 (テキスト)とその著者(ソース)が短い線で分けられます。この環境はテキストとソースという 2つのオプションを必要とするので、LyXをごまかす必要があります。この
13270 場合は、(TeXモードで)2つのオプションの間に括弧を入れます。
13289 \begin_layout Description
13290 Poemtitle: Memoir は(複雑で抽象的なものも含めて)詩をタイプセットするための多くの機能を持っています。LyXでは、その中のいくつかしかサポート
13291 していません。その一つが poemtitle です。これは詩のための中央におかれたタイトルで、目次にも含められます(verse が詩のための標準的な環境です。M
13292 emoir はverseを拡張した環境を持っていますが、これを使うためには ERT が必要です。この環境は verse環境の中に入れ子にする必要があるのですが、
13293 LyXではそれがサポートされていないからです)。
13296 \begin_layout Description
13297 Poemtitle*: poemtitle と同じですが、目次には加えられません。
13300 \begin_layout Section
13301 Article(mwart)・book(mwbk)・report(mwrep)
13302 \begin_inset OptArg
13305 \begin_layout Plain Layout
13318 \begin_layout Standard
13319 \begin_inset Flex CharStyle:Noun
13322 \begin_layout Plain Layout
13331 \begin_layout Standard
13338 report (mwrep)、book
13358 report.cls、book.cls
13360 を代替するものでいくつかの点でポーランド語の組版ルールによりよくしたがっています。
13363 \begin_layout Standard
13367 \begin_layout Itemize
13372 のようなアステリスクがついたもの)も目次に加えられます。
13375 \begin_layout Itemize
13380 \begin_layout Description
13381 uheadings 線で本文と分けられたヘッダ
13384 \begin_layout Description
13385 myheadings カスタムヘッダ、ヘッダの内容は
13400 \begin_layout Description
13401 myuheadings 線で本文と分けられたカスタムヘッダ
13404 \begin_layout Description
13405 outer ページ番号がページの外側に付きます
13409 \begin_layout Itemize
13414 \begin_layout Description
13415 rmheadings serif のタイトル --- 既定
13418 \begin_layout Description
13419 sfheadings sans serif のタイトル
13422 \begin_layout Description
13423 authortitle タイトルページにまず著者名、その次にタイトルが配置される --- 既定
13426 \begin_layout Description
13427 titleauthor タイトルページにまずタイトル、その次に著者名が配置される
13430 \begin_layout Description
13431 withmarginpar 余白のための場所をページ上で確保
13435 \begin_layout Section
13439 \begin_layout Standard
13452 クラスと同じような機能を提供しますが、節が sans serifになり ヘッディング等が変わっているこちらのレイアウトの方が気に入るかも知れません。
13455 \begin_layout Section
13459 \begin_layout Standard
13465 \begin_layout Standard
13466 \begin_inset VSpace bigskip
13472 \begin_layout Standard
13478 テキストクラスは American Physical Sociey
13481 \begin_inset Formula $\beta$
13484 release of May, 1999)クラスと使います。
13487 \begin_layout Standard
13492 テキストクラス持っています。v3.1は LaTeX 2.09で動くもので時代遅れになっています。LyXは LaTeX2eで動いているので、これを LyXでサポートす
13493 るのは大変でした。RevTeX 4.0からは、より LaTeX2eでうまく動くようにデザインされているので、LyXで
13497 テキストクラスを使うのはずっと簡単になりました。
13500 \begin_layout Standard
13501 ここでの説明は RevTeX 4.0の説明書への追加として考えてください。したがって特有の RevTeXマクロを説明せず、また必要な場合にプリアンブルにどうすれば
13502 コマンドを入れればいいかを知っているものとして説明していきます。
13505 \begin_layout Subsection
13509 \begin_layout Standard
13510 まず、RevTeX 4の READMEに説明しているやり方で RevTeX 4をインストールする必要があります。このパッケージ自体はThe RevTeX
13512 \begin_inset Flex URL
13515 \begin_layout Plain Layout
13517 http://publish.aps.org/revtex4/
13522 から手にいれることができます。LaTeXが見つけることのできる場所にインストールしてください。そして、インストールしたのとは異なる任意のディレクトリで短い
13523 RevTeX 4の文章を LaTeXでコンパイルできるかどうかを確かめてください。この後、LyXを再設定するとクラスファイルを見つけ、RevTeX4テキストク
13527 \begin_layout Standard
13528 おそらく使い始める一番簡単な方法は RevTeX 4の文章を
13532 を使ってインポートするか、またはテンプレートディレクトリにある
13535 \begin_inset space ~
13543 \begin_layout Subsection
13547 \begin_layout Standard
13554 に与える preprintや apsのような追加的なオプションは、
13557 \begin_inset space ~
13565 \begin_inset space ~
13570 フィールドに入れます。RevTeXでは少なくとも一つのオプションが必要なことに注意してください。
13573 \begin_layout Standard
13580 等のようにプリアンブルに入れるものは、
13583 \begin_inset space ~
13591 \begin_layout Subsection
13595 \begin_layout Standard
13596 レイアウトは基本的に RevTeX4.0のコマンドに対応しています。例えば Emailレイアウトは
13602 に対応しています。少なくとも RevTeX 4.0 Betaでは、
13610 はまったく同じものなので、両方を使うことはないことに注意してください
13614 \begin_layout Plain Layout
13615 LyXには両方が含まれています。そのために
13639 \begin_layout Subsection
13643 \begin_layout Standard
13644 RevTeX 4には独特な面があり、これが LyXを混乱させバグを引き起こします。
13647 \begin_layout Standard
13660 環境の外側で使います。LyXでこれと同じ働きをするのは別の Thanksレイアウトです。したがって
13664 レイアウトに脚注を書かないでください。ムチャクチャになる可能性があります。詳しくは RevTeX 4の説明書を見てください。
13667 \begin_layout Standard
13671 \begin_inset space ~
13679 \begin_inset space ~
13696 )レイアウトの間に置かなければなりません。もし
13704 の後ろへ置くと、LaTeXはコンパイルに失敗します。
13707 \begin_layout Subsection
13711 \begin_layout Standard
13712 このレイアウトの主な問題点は Emailや Titleのようなレイアウトに追加的な引数を使うことができないことです。(これはこのレイアウトだけの問題ではありませ
13713 ん。例えば、Sectionレイアウトに追加的な引数を使うことができません)。これはあなたがファイルを LaTeXファイルに変換した後(これは APSに投稿するた
13714 めに変換する必要があります)、テキストエディタを使ってオプションの引数を加える(例えばへッダにランニングタイトルを加える)必要があるということです。これらのレイ
13727 )を使えなくするので、手で書き加える必要があります
13731 \begin_layout Plain Layout
13736 実際、LyX 1.3.0 はいくつかの形の追加オプションをサポートしています。しかし、このレイアウトはこの機能を使うようにまだアップデートされてないのです。
13744 \begin_layout Section
13750 \begin_layout Standard
13751 \begin_inset Flex CharStyle:Noun
13754 \begin_layout Plain Layout
13763 \begin_layout Subsection
13767 \begin_layout Standard
13768 これは Springer Verlagのいくつかの学術雑誌のためのレイアウトファイルです。
13769 \begin_inset Flex URL
13772 \begin_layout Plain Layout
13774 http://www.springer.de/author/tex/help-journals.html
13779 に必要なクラスファイル(LaTeX2e用になりました)とそれに対応する雑誌の一覧があります。このレイアウトファイルはモジュール方式になっています。すべてのジャー
13784 にまとめてあり、各々の雑誌のレイアウトファイル(例えば、
13788 は Journal of Geodesy のためのレイアウトファイルです)にそれが読み込まれます。
13791 \begin_layout Standard
13792 したがって、クラスファイルがサポートする他の Springer の雑誌用のレイアウトファイルをつくるには、
13796 に含まれるアウトラインにしたがうと、あなた自身の
13807 \begin_layout Standard
13808 これは Journal of Geodesyに対してしかちゃんとテストしていません。
13816 は標準的な LyX ディストリビューションに含まれています。関連するクラスファイルを(Springerからダウンロードして)正しいディレクトリにイントールして
13817 、LaTeXがそれらのファイルを探せるように設定し(teTeXの場合は texhashを走らせます)、LyXを再設定してください。これで動くはずです。
13820 \begin_layout Subsection
13824 \begin_layout Standard
13831 \SpecialChar \ldots{}
13837 \begin_layout Standard
13840 Headnote、Dedication、Subtitle、Running_LaTeX_Title、Author_Running、Institute、Mail、O
13841 ffprints、Keywords、Acknowledgements、Acknowledgement
13843 。詳しくは Springerのクラスファイルの説明書を読んでください。
13846 \begin_layout Subsection
13850 \begin_layout Itemize
13862 \begin_layout Itemize
13865 Probability Theory and Related Fields
13871 --- Jean-Marc Lasgouttes
13874 \begin_layout Standard
13875 あなた自身のレイアウトファイルをつくってください。難しくはありません。
13878 \begin_layout Subsection
13882 \begin_layout Standard
13891 は Springerの LaTeX 2.09用のスタイルファイルを使った素人細工のようなレイアウトファイルです。これらのファイルはすでにありません。Jean-Ma
13892 rc Lasgouttesのおかげで LyXのレイアウトファイルのメカニズムをよりよく理解することができました。
13895 \begin_layout Subsection
13899 \begin_layout Standard
13904 よりは少なくなっているとは思いますが。
13907 \begin_layout Standard
13908 制限事項:定理型の環境の番号は表示されません。#が表示されるだけです。
13911 \begin_layout Section
13917 \begin_inset CommandInset label
13926 \begin_layout Standard
13927 \begin_inset Flex CharStyle:Noun
13930 \begin_layout Plain Layout
13939 \begin_layout Subsection
13943 \begin_layout Standard
13944 この節では、LyXでどのようにオーバーへッドプロジェクタ用のスライドをつくるかを説明します。そのための文書クラスには、既定の slideクラスと
13949 TeX slideクラスの2つがあります。この節は既定の slideクラスを説明します。
13952 \begin_layout Standard
13953 間違えないようにもう一度はっきりと言っておきます。
13956 \begin_layout Standard
13957 \begin_inset VSpace bigskip
13963 \begin_layout Standard
13968 \begin_inset Quotes eld
13976 \begin_inset Quotes erd
13982 \begin_layout Standard
13983 \begin_inset VSpace bigskip
13989 \begin_layout Standard
13995 \begin_inset space ~
13999 \begin_inset CommandInset ref
14001 reference "sec:foiltex"
14017 \begin_layout Plain Layout
14018 \SpecialChar \ldots{}
14023 の支持者からは聞いています。けれども私は使ったことがないので、本当かどうか確かめようがありません。
14031 \begin_layout Standard
14032 このクラスは古い SLITeXパッケージを LaTeX2eで改良したものです。すべての LaTeX2eディストリビューションがこのクラス(これから単に
14037 と言うことにします)を持っています。前に言ったように、オーバーへッドプロジェクタ用のスライドをつくるためには
14041 というクラスもあり、よりよいパッケージのようですが、オーバーレイをつくるといったような、
14045 だけができることもあります。詳しくは以下を読んでください。
14048 \begin_layout Subsection
14050 \begin_inset CommandInset label
14052 name "sec:slidesetup"
14059 \begin_layout Standard
14060 この文書クラスを使うにはあたりまえですが、まず初めに
14075 を選ばなければなりません。このクラスについて知っておいた方がいいことがいくつかあります。
14078 \begin_layout Itemize
14091 のオプションは変えないでください。これらのオプションは
14098 \begin_layout Itemize
14110 の振る舞いは、他のクラスと少し違っています。選択肢とそれの説明を書いておきます。
14114 \begin_layout Description
14117 plain 最終的な出力ではページ番号が右下につきます。
14120 \begin_layout Description
14123 headings plainと似ていますが、それ以外にあなたの指定したタイムマーカを印刷します。これが既定です。
14126 \begin_layout Description
14129 empty 最終的な印刷物にはページ番号も、タイムマーカも位置を揃えるための目印も印刷されません。
14133 \begin_layout Itemize
14142 という追加的なオプションを持っています。これを使うには
14162 \begin_layout Standard
14163 このオプションを使うことでタイムマーカを
14167 sに加えることができます。詳しくはセクション
14168 \begin_inset CommandInset ref
14170 reference "sec:slideNote"
14178 \begin_layout Standard
14183 クラスを使うようにするには、テンプレートファイル
14192 ile\SpecialChar \menuseparator
14202 を使ってください。このテンプレートファイルにはこのクラスで使われる特別な段落環境も含まれています。それを次に説明しましょう。
14205 \begin_layout Subsection
14209 \begin_layout Subsubsection
14215 \begin_layout Standard
14220 クラスで文章を書き始めてまず気が付くことは、フォントの大きさと形でしょう。これは
14228 サイズと同じフォントです。このフォントが印刷には使われます。これをスライドを作っているのだという目印にして下さい。印刷したスライドにはもっと大きな文字を使うこと
14229 もできますが、そのかわり書くことのできる量は少なくなります。もちろん、より大きいスクリーンフォントは WYSIWYGではありません。分かるようにしてあるだけです
14233 \begin_layout Standard
14234 次に気が付くことは、段落環境プルダウンボックス(ツールバーの左端です)の内容が変わっていることでしょう。いつも見慣れた環境の多くは無くなっていて、5つの新しい環
14239 クラスがそれらの環境しかサポートしていないためです。
14242 \begin_layout Itemize
14248 \begin_layout Itemize
14254 \begin_layout Itemize
14260 \begin_layout Itemize
14266 \begin_layout Itemize
14272 \begin_layout Itemize
14278 \begin_layout Itemize
14284 \begin_layout Itemize
14290 \begin_layout Itemize
14296 \begin_layout Itemize
14302 \begin_layout Itemize
14308 \begin_layout Standard
14309 これ以外の標準的な環境、例えば節見出し用の環境などは
14316 \begin_layout Standard
14320 \begin_layout Itemize
14326 \begin_layout Itemize
14332 \begin_layout Itemize
14338 \begin_layout Itemize
14344 \begin_layout Itemize
14350 \begin_layout Standard
14351 これらの5つは、LyXの機能のために少し使い方に癖があります。LyXでは空の段落環境に他の段落を入れることはできません。それ自体はなかなかよいデザインなのですが
14352 、これはスライドを始めるのに普通の文しか使えないことを意味します。これを扱うために、ちょっとした LaTeXマジックが必要になります。
14355 \begin_layout Subsubsection
14357 \begin_inset CommandInset label
14359 name "sec:slideQuirk"
14366 \begin_layout Standard
14367 5つの新しい環境すべてに LyXの制約から来る少し変な癖があります。前に指摘したように、LyXは空の環境のなかに別の環境を入れるのを禁じています。これを回避する
14376 で述べられているような段落環境ではありません。
14379 \begin_layout Standard
14392 は「疑似環境」だと考えてください。それらは節の見出しやキャプションのように見えますが、実際は(必要なら前の段落環境を終わって)新しい段落環境を開始します。同様に
14401 は「疑似コマンド」だと考えてください。この2つは何らかのことを行います。
14404 \begin_layout Standard
14419 InvisibleText、VisibleText
14421 の5つの環境に共通の機能は長いラベルです。このラベルに続くテキスト --- 通常の段落環境なら段落の内容にあたります ---は、
14435 InvisibleText、VisibleText
14437 にとってまったく無関係で、LyXは完全にそれを無視します。実際これらの5つの環境は、完全に中身がからのままにしておけるのです。
14440 \begin_layout Standard
14441 長いラベルの後にテキストを入れる必要がないからと言っても、テキストを入れたい場合にはどうしたらいいでしょう。例えばこのスライドについての短い説明等をいれる場合で
14442 す。このような場合は、いつもと同じように説明を入力して
14449 \begin_layout Standard
14450 もしテキスト以外のものを入れようとした場合には、LyXの別の制約に直面します。自然が真空を憎むように、LyXは古い環境に何かを置くまで新しい環境を古い環境のなか
14451 には入れることができません。次のようにしてください。
14454 \begin_layout Itemize
14469 InvisibleText、VisibleText
14474 \begin_layout Itemize
14478 \begin_layout Itemize
14486 \begin_layout Itemize
14501 InvisibleText、VisibleText
14506 \begin_layout Standard
14507 将来の LyXではこんなややこしいことをしなくてもよくなることを祈っているのですが\SpecialChar \ldots{}
14511 \begin_layout Subsection
14518 Overlay、Noteで発表用のスライドを作る
14521 \begin_layout Subsubsection
14529 \begin_layout Standard
14530 この節はどうやれば実際のスライドを作ることができるのかを説明していると思っている人がいるかもしれません。ここでは
14534 クラスがどのように発表用の準備をするのに使うことができるのかを説明しているだけです。内容は自分で考えてください。
14537 \begin_layout Standard
14542 環境を選んで、新しいスライドを作ることを LyXに知らせてください。この環境(疑似環境)のラベルが下線に続く NewSlideという青い文字であらわれます。この
14543 ラベルに続くテキスト、環境が新しいスライドに入ります。簡単でしょう。
14546 \begin_layout Standard
14547 スライドは LyXの中で強制的にページを終えなければならない多分唯一の環境です(これは
14551 ダイアログで設定できます)。必要な内容を入れたら、スライドを終わってください。一枚のスライドに入りきらない内容の場合は、次の新しいスライドにまわされます。しかし
14552 これはしない方がいいでしょう。ページ番号がその新しいスライドにはつかないからです。そのうえ、一枚に収まらないスライドは
14556 を使う場合にうまく行かないかもしれません。
14559 \begin_layout Standard
14572 環境と同じように動きます。これらの環境を選ぶと、線とそれに続くラベル、NewOverlay:または NewNote:が表示されます。ただし色は青でなくピンクにな
14573 り、線も違うものが使われます。ラベルのフォントもこれら3つの環境で異なるものが使われます。
14576 \begin_layout Standard
14581 と同じように内容が1枚のシートに収まらない場合は、新しいシートにまわされます。しかし、これは避けたほうがいいでしょう。
14592 \begin_layout Subsubsection
14595 Overlayを Slideといっしょに使う
14598 \begin_layout Standard
14603 の基本的な機能は重ね合わせて使うスライドを作ることです。例えば、発表でまず図を見せてそれからテキストを見せたいような場合があるでしょう。一つの方法は見せたくない
14604 部分を紙で隠してしまうことですが、これはいつもうまく行くとは限りません。グラフにグラフを重ねる場合などは、見せたくない方を紙で隠すことはできません。別々のスライ
14605 ドをきっちり重なるように作るのは難しいものです。このような場合は
14609 環境を使うことで作業を簡単にすることができます。
14612 \begin_layout Standard
14617 のページ番号はそれの親スライドのページ番号をもらい、それに -a、-bなどを続けます。もちろん、
14625 もちゃんと1枚のスライドに収まるようになってなければなりません。
14633 の一部であると考えた方がいいでしょう。実際、LyXでは
14641 のラベルよりも短くすることでこれを目に見える形で表しています。最後ですが、印刷した場合には親スライドと
14645 の4隅にマークがついているのがわかるでしょう。これは2枚のシートを重ねるのが便利なようについているのです。
14648 \begin_layout Standard
14649 2つのスライドを重ね合わせる場合の一番の問題は、2枚のスライドの内容の配置でしょう。どれだけのスペースを2番目のスライドの図のために残しておくべきか、1枚目のス
14650 ライドの段落が2枚目のスライドの図とテキストの間に入るようにはどのようにしたらいいかという問題です。これを解決するいい方法が
14661 \begin_layout Standard
14670 はコマンドのような段落環境で、その名前の通りそれに続くテキストを各々見えなくしたり、見えるようにします。セクション
14671 \begin_inset CommandInset ref
14673 reference "sec:slideQuirk"
14677 で書いておいたように、この2つの環境の中には何も入れることができません。
14681 を挿入すると、その位置に <Invisible Text Follows>と書いた青いラベルが行の真ん中に表示されます。このラベルに続く文章は、その文章分のスペ
14682 ースは空くのですが何も印刷されません。これは
14693 \begin_layout Standard
14698 の場合は、挿入した位置に <Visible Text Follows>と書いた緑のラベルが行の中央にあらわれます。そして、このラベル以降の文章は普通に印刷されま
14726 \begin_layout Standard
14743 を使って重ね合わせることのできるシートを作る方法が分かったでしょう。
14746 \begin_layout Enumerate
14747 メインのスライド、重ね合わせるものに関わらず表示するものをすべて含んだスライドを作ります。
14750 \begin_layout Enumerate
14770 \begin_layout Enumerate
14782 \begin_layout Enumerate
14794 \begin_layout Enumerate
14818 \begin_layout Standard
14819 これで出来上がりです。重ね合わせるシートができました。
14822 \begin_layout Standard
14827 クラスのデザインによる問題があります。段落の途中を見えなくしたり、見えない段落の途中だけを見えるようにしたりはできないのです。それをするためには、LaTeXコー
14832 \begin_layout Plain Layout
14836 \begin_layout Itemize
14841 invisible \SpecialChar \ldots{}
14845 \begin_layout Itemize
14850 visible \SpecialChar \ldots{}
14854 \begin_layout Plain Layout
14855 で TeXとしてマークする必要があります。見え方を変えたいテキストを括弧の中の(
14867 コマンドの後ろへ)入れてください。TeXとしてマークする方法を知らない場合はユーザーの手引きを見てください。
14875 \begin_layout Subsubsection
14885 \begin_inset CommandInset label
14887 name "sec:slideNote"
14894 \begin_layout Standard
14911 より短く、はでな赤紫色をしていてすぐに気が付くようになっています。そのうえ、印刷した
14916 \begin_inset Quotes eld
14924 \begin_inset Quotes erd
14928 \begin_inset Quotes eld
14936 \begin_inset Quotes erd
14940 \begin_inset Quotes eld
14948 \begin_inset Quotes erd
14951 等がくっついたページ番号がつきます。1つの
14963 のようにいくつものノートをつけることができます。これは長い説明をシートに収まるように分けるのに便利です。
14966 \begin_layout Standard
14975 について、話したいことを何でも書いておくことです。また、特定の
14979 についてのメモとして使うこともできます。その場合はタイムマーカを使いたくなるかもしれません。今のところ、LyXの
14987 TeX の機能であるタイムマーカをサポートしていません。使いたい場合は LaTeXコードを書く必要があります。
14990 \begin_layout Standard
14991 タイムマーカを使うには、追加的なクラスオプション
14996 \begin_inset CommandInset ref
14998 reference "sec:slidesetup"
15002 を見てください)。このオプションはタイムマーカ機能を起動して、すべての
15006 の左下にタイムマーカを印刷します。タイムマーカの記述には
15018 という LaTeXコマンドを使います。この2つのコマンドの引数は秒で計られた時間です。
15024 はタイムマーカを与えられた時間にセットします。
15030 は指定された量だけタイムマーカを増やします。タイムマーカと
15034 sをこのように使うと、特定のスライドにどのくらいの時間を使うことができるのかを思い出すことができます。
15037 \begin_layout Standard
15038 最後に一つの機能の説明をしておきましょう。印刷するときは
15050 sは普通の紙に印刷したいでしょう。しかし、
15054 は親スライドのすぐ後に印刷されます。どうしたらいいのでしょう。
15057 \begin_layout Standard
15058 幸いなことに、印刷をコントロールする2つの LaTeXコマンドがあります。2つともプリアンブルに記述する必要があるコマンドです。
15086 のみを印刷します。この2つのコマンドを両方ともプリアンブルに書いてコメントアウトしておくといいでしょう。最終的に印刷するときになってどちらかのコメントをはずせば
15095 のコメントをはずして *-slide.psという名前のファイルに出力し、それからまたコメントマークをつけて今度は
15107 という名前のファイルに出力して、それらのファイルをプリンタに送るという方法を使っています。
15110 \begin_layout Standard
15123 コマンドに与えることもできます。詳しくは何かいい LaTeXの本を見てください。
15126 \begin_layout Subsection
15134 \begin_layout Standard
15148 ile\SpecialChar \menuseparator
15150 \begin_inset space ~
15154 \begin_inset space ~
15163 から選んでください。このテンプレートは
15191 の例も含まれています。そしてプリアンブルは次のようになっています。
15194 \begin_layout LyX-Code
15195 % Uncomment to print out only slides and overlays
15198 \begin_layout LyX-Code
15202 \begin_layout LyX-Code
15208 \begin_inset Newline newline
15214 \begin_layout LyX-Code
15215 % Uncomment to print out only notes
15218 \begin_layout LyX-Code
15222 \begin_layout LyX-Code
15230 \begin_layout Standard
15231 最後に一言いっておくと、私は LaTeX2eの SLITeX emulationクラス(標準的な LaTeX2eクラスの一つです)をサポートするためにこのクラス
15232 を作りました。他にもスライドの準備をする
15237 \begin_inset CommandInset ref
15239 reference "sec:foiltex"
15247 (まだ LyXではサポートしていません
15251 \begin_layout Plain Layout
15257 )などのLaTeX2eパッケージがあります。私はそれらを使ったことがないので分かりません。自分で試してみて、どのクラスを使うのかを決めてください。
15260 \begin_layout Chapter
15261 ソフトウェアを追加する必要がある LyX機能
15264 \begin_layout Section
15268 \begin_layout Standard
15269 \begin_inset Flex CharStyle:Noun
15272 \begin_layout Plain Layout
15281 \begin_layout Subsection
15285 \begin_layout Standard
15286 \begin_inset Flex CharStyle:Code
15289 \begin_layout Plain Layout
15301 \begin_layout Plain Layout
15302 LaTeX頒布版としてMiKTeXを使用している場合には、
15303 \begin_inset Flex CharStyle:Code
15306 \begin_layout Plain Layout
15318 \begin_inset Flex CharStyle:MenuItem
15321 \begin_layout Plain Layout
15332 \begin_inset Flex CharStyle:MenuItem
15335 \begin_layout Plain Layout
15346 \begin_inset Flex CharStyle:Code
15349 \begin_layout Plain Layout
15358 \begin_inset CommandInset href
15360 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
15367 \begin_layout Standard
15372 パッケージは、LaTeXのいくつかの構成物が直感的でなく、すぐに忘れてしまうのに欲求不満を感じていた
15373 \begin_inset Flex CharStyle:Noun
15376 \begin_layout Plain Layout
15383 によって書かれたプログラムです。このプログラムはLaTeXファイルの上を走り、ファイルの整合性をチェックして、いくつかのよくあるエラーを見つけ出します。別の技術
15384 的な言い方をすると、これはLaTeX用の
15391 \begin_layout Standard
15392 ところでLyXは正しいLaTeXファイルをつくるのに、なぜLaTeXの文法チェッカーがLyXに必要なのでしょう。それは
15396 がCプログラムの文法チェックをするだけでなくタイプエラーに対応するため意味もチェックするように、
15400 は文法上のエラーだけでなく、よくある写植上のエラーも見つけてくれるからです。次の例を見てください。このようなエラーを見つけてくれます。
15403 \begin_layout Itemize
15405 \begin_inset Newline newline
15408 ...のかわりに\SpecialChar \ldots{}
15412 \begin_layout Itemize
15414 \begin_inset Newline newline
15420 \begin_layout Itemize
15421 よくある省略形の後ろのスペースを正規のスペースにする:
15422 \begin_inset Newline newline
15427 is too wide spacing.
15430 \begin_layout Itemize
15431 文章が大文字で終わっているときに、文の終りのスペースに直す:
15432 \begin_inset Newline newline
15436 And this is wrong spacing.
15439 \begin_layout Itemize
15440 ラベルやそれに似たコマンドの前のスペース:
15441 \begin_inset Newline newline
15444 ラベルとテキストの間にスペースがある場合、ラベルが別のページに行ってしまう可能性があります。
15445 \begin_inset CommandInset label
15455 \begin_layout Plain Layout
15456 この脚注は別のページに行く可能性があります。
15461 そうなるとラベルと本文が離れすぎてしまいます。
15464 \begin_layout Itemize
15465 レファレンスの前にハードスペースのかわりにスペース:
15466 \begin_inset Newline newline
15469 運が悪ければ、レファレンスされたテキストとレファレンス番号の間で行が変わります。セクション
15470 \begin_inset CommandInset ref
15472 reference "sec:chktex"
15479 \begin_layout Itemize
15481 \begin_inset Formula $\times$
15485 \begin_inset Newline newline
15489 \begin_inset Formula $2\times2$
15495 \begin_layout Standard
15496 これ以外にも色々な間違いを探してくれます。文章を仕上げるのに非常に価値のあるツールです。スペルチェックが終わって、文章の微調整をする前にはかならず使った方がいい
15500 \begin_layout Subsection
15504 \begin_layout Standard
15507 ツール\SpecialChar \menuseparator
15510 を選ぶだけです。そうすると書いている文章のLaTeXファイルが生成され、
15514 がそのLaTeXファイルをチェックします。
15518 からの警告があった場合は、エラーボックスが LyXの文章中に挿入されます。エラーボックスは間違いのある場所の近くに挿入され、メニューアイテムの
15519 \begin_inset Flex CharStyle:MenuItem
15522 \begin_layout Plain Layout
15523 移動\SpecialChar \menuseparator
15537 で簡単にエラーの場所を見つけることができます。エラーボックスを開けるにはマウスでクリックするか、
15553 のショートカットキーを使います。警告を読んで、間違いを直してください。警告の意味が分からない場合は無視しても大丈夫です。画面上の文章と
15557 が扱う文章の間にギャップがあるために変な警告がでる場合があるのです。
15560 \begin_layout Standard
15569 をこの文章に走らせてみると、些細なことで多くの警告がでるのがわかるでしょう。しかし、これはコンピュータが敏感すぎるだけで、ほとんどが気にすることはない誤警報です
15573 \begin_layout Subsection
15577 \begin_layout Standard
15582 は無駄な警告を出しすぎると感じることがあります。そういう場合は
15586 が出す警告の種類を調整することができます。またひどい状況の場合の別の選択は、
15587 \begin_inset Flex CharStyle:MenuItem
15590 \begin_layout Plain Layout
15591 表示\SpecialChar \menuseparator
15597 を使ってすべての警告を消してしまうことです。
15600 \begin_layout Standard
15605 は非常に多くの面を調整できるのですが、それですべての問題が解決するとは思わないでください。LyXは
15613 \begin_layout Plain Layout
15624 Edit\SpecialChar \menuseparator
15626 \begin_inset space ~
15630 \begin_inset space ~
15640 から内部の構造と一致する行番号を得ることができるようなある種の特別なLaTeXファイルを生成するのですが、それでもいくつかの警告は正しい位置にあらわれません。こ
15641 れを解消するには2つの方法があります。
15644 \begin_layout Itemize
15645 \begin_inset Flex CharStyle:MenuItem
15648 \begin_layout Plain Layout
15655 \begin_inset Flex CharStyle:MenuItem
15658 \begin_layout Plain Layout
15659 出力\SpecialChar \menuseparator
15669 を起動するコマンドラインを調整するか、グローバルな
15674 \begin_inset Flex CharStyle:Code
15677 \begin_layout Plain Layout
15678 /usr/local/share/chktexrc
15683 です)を調整します。どの警告がコマンドラインから有効、無効にできるかは以下の節を見てください。
15686 \begin_layout Itemize
15687 \begin_inset Flex CharStyle:MenuItem
15690 \begin_layout Plain Layout
15691 ファイル\SpecialChar \menuseparator
15692 エクスポート\SpecialChar \menuseparator
15698 を使って文章をLaTeXファイルに変換して、それに
15702 を走らせます。この方法では警告に対応する場所を LyXの画面上で見つけるのがすこし面倒ですが、可能でしょう。
15705 \begin_layout Standard
15708 \begin_inset Flex CharStyle:MenuItem
15711 \begin_layout Plain Layout
15721 で警告を有効、無効にするやり方を説明しましょう。メッセージを無効にするには、
15729 を使ってください。以下でイタリックで書いてあるメッセージは既定で無効になっています。既定の設定は "
15731 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
15736 \begin_layout Standard
15741 のオプションを使わないでください。LyXがそれ以外のいくつかのコマンドラインパラメータを特定の方法で使って
15748 \begin_layout Enumerate
15752 Command terminated with space.
15755 \begin_layout Enumerate
15758 Non-breaking space (
15759 \begin_inset Quotes eld
15767 \begin_inset Quotes erd
15770 ) should have been used.
15773 \begin_layout Enumerate
15777 You should enclose the previous parenthesis with
15778 \begin_inset Quotes eld
15786 \begin_inset Quotes erd
15792 \begin_layout Enumerate
15795 Italic correction (
15796 \begin_inset Quotes eld
15806 \begin_inset Quotes erd
15809 ) found in non-italic buffer.
15812 \begin_layout Enumerate
15815 Italic correction (
15816 \begin_inset Quotes eld
15826 \begin_inset Quotes erd
15829 ) found more than once.
15832 \begin_layout Enumerate
15836 No italic correction (
15837 \begin_inset Quotes eld
15847 \begin_inset Quotes erd
15853 \begin_layout Enumerate
15857 \begin_inset Quotes eld
15865 \begin_inset Quotes erd
15869 \begin_inset Quotes eld
15877 \begin_inset Quotes erd
15883 \begin_layout Enumerate
15886 Wrong length of dash may have been used.
15889 \begin_layout Enumerate
15893 \begin_inset Quotes eld
15901 \begin_inset Quotes erd
15905 \begin_inset Quotes eld
15913 \begin_inset Quotes erd
15919 \begin_layout Enumerate
15923 \begin_inset Quotes eld
15931 \begin_inset Quotes erd
15937 \begin_layout Enumerate
15941 \begin_inset Quotes eld
15949 \begin_inset Quotes erd
15952 to achieve an ellipsis.
15955 \begin_layout Enumerate
15958 Inter-word spacing (
15959 \begin_inset Quotes eld
15969 \begin_inset Quotes eld
15972 ) should perhaps be used.
15975 \begin_layout Enumerate
15978 Inter-sentence spacing (
15979 \begin_inset Quotes eld
15989 \begin_inset Quotes erd
15992 ) should perhaps be used.
15995 \begin_layout Enumerate
15998 Could not find argument for command.
16001 \begin_layout Enumerate
16005 \begin_inset Quotes eld
16013 \begin_inset Quotes erd
16019 \begin_layout Enumerate
16022 Math mode still on at end of LaTeX file.
16025 \begin_layout Enumerate
16029 \begin_inset Quotes eld
16037 \begin_inset Quotes erd
16040 doesn't match the number of
16041 \begin_inset Quotes eld
16049 \begin_inset Quotes erd
16055 \begin_layout Enumerate
16058 You should use either
16061 \begin_inset Quotes eld
16069 \begin_inset Quotes erd
16074 as an alternative to
16075 \begin_inset Quotes eld
16083 \begin_inset Quotes erd
16089 \begin_layout Enumerate
16096 " (ASCII 39) instead of "" (ASCII 180).
16099 \begin_layout Enumerate
16102 User-specified pattern found.
16105 \begin_layout Enumerate
16108 This command might not be intended.
16111 \begin_layout Enumerate
16118 \begin_layout Enumerate
16136 \begin_layout Enumerate
16139 Delete this space to maintain correct page references.
16142 \begin_layout Enumerate
16146 You might wish to put this between a pair of
16147 \begin_inset Quotes eld
16155 \begin_inset Quotes erd
16161 \begin_layout Enumerate
16164 You ought to remove spaces in front of punctuation.
16167 \begin_layout Enumerate
16170 Could not execute LaTeX command.
16173 \begin_layout Enumerate
16182 in front of small punctuation.
16185 \begin_layout Enumerate
16193 may look prettier here.
16196 \begin_layout Enumerate
16200 Multiple spaces detected in output.
16203 \begin_layout Enumerate
16206 This text may be ignored.
16209 \begin_layout Enumerate
16215 \begin_inset Quotes eld
16220 to begin quotation, not
16227 \begin_layout Enumerate
16234 to end quotation, not
16237 \begin_inset Quotes eld
16245 \begin_layout Enumerate
16251 \begin_layout Enumerate
16254 You should perhaps use
16255 \begin_inset Quotes eld
16263 \begin_inset Quotes erd
16269 \begin_layout Enumerate
16272 You should put a space in front of/after parenthesis.
16275 \begin_layout Enumerate
16278 You should avoid spaces in front of/after parenthesis.
16281 \begin_layout Enumerate
16285 You should not use punctuation in front of/after quotes.
16288 \begin_layout Enumerate
16291 Double space found.
16294 \begin_layout Enumerate
16297 You should put punctuation outside inner/inside display math mode.
16300 \begin_layout Enumerate
16303 You ought to not use primitive TeX in LaTeX code.
16306 \begin_layout Enumerate
16309 You should remove spaces in front of
16310 \begin_inset Quotes eld
16318 \begin_inset Quotes erd
16324 \begin_layout Enumerate
16327 \begin_inset Quotes eld
16335 \begin_inset Quotes erd
16338 is normally not followed by
16339 \begin_inset Quotes eld
16347 \begin_inset Quotes erd
16353 \begin_layout Standard
16354 将来的にはLyXにこのツール(それとよく似たツール
16358 )のためのより使いやすいインターフェイスを用意できればと考えています。しかし今の状態でもまったく役に立たないということはないでしょう。ある程度の長さの文章に使っ
16359 てみてください。きっとびっくりしますよ。
16362 \begin_layout Section
16366 \begin_layout Standard
16367 \begin_inset Flex CharStyle:Noun
16370 \begin_layout Plain Layout
16371 Lars Bullik Bjønnes
16377 \begin_inset Flex CharStyle:Noun
16380 \begin_layout Plain Layout
16389 \begin_layout Subsection
16393 \begin_layout Standard
16394 私の友人がLyXをグループプロジェクトに使おうとしましたが、LyXがバージョン管理またはファイルロック機能を持っていないためにLyXを使うのをあきらめました。こ
16395 れが私がLyXでRCS(将来的にはCVSやSCCSも)をサポートしようと考えた理由です。LyXは今ではもっとも基本的なRCSコマンドをサポートしています。もしあ
16396 なたがより複雑なことをしたい場合はxterm上で自分で行う必要があります。
16399 \begin_layout Standard
16400 LyXのバージョン管理機能を使う前にrcsintro(manファイルです。
16404 で読めます)を読んでください。このファイルには基本的なRCSの機能のすべてが説明してあります。特にRCSディレクトリに関するコメントと、マスターRCSファイル(
16408 で終わっているファイルです)の概念に気をつけてください。
16411 \begin_layout Standard
16412 LyXの実装にあたってはGNU RCSパッケージの最新のバージョンを使うことを想定しています。古いバージョンを使っている場合は動くかどうか保証できません。
16415 \begin_layout Subsection
16419 \begin_layout Standard
16420 以下の節ではLyXでサポートされているRCSコマンドを説明します。それらのコマンドは
16421 \begin_inset Flex CharStyle:MenuItem
16424 \begin_layout Plain Layout
16425 ファイル\SpecialChar \menuseparator
16431 の下位メニューにあります。LyXは、RCS 5.7に対して試験されています。
16434 \begin_layout Subsubsection
16440 \begin_layout Standard
16441 あなたの書いている文章がバージョン管理の下にないならば、これがメニューにあらわれる唯一の項目です。もし文章がバージョン管理の下にあるならば、
16442 \begin_inset Flex CharStyle:MenuItem
16445 \begin_layout Plain Layout
16454 \begin_layout Standard
16455 このコマンドはあなたの文章をRCSに登録します。このコマンドを実行すると対話的にその文章の最初の説明を入れるように頼んできます。そしてその文章はRead-Onl
16457 \begin_inset Flex CharStyle:MenuItem
16460 \begin_layout Plain Layout
16466 を実行する必要があります。バージョン管理の管理下にある文章はミニバッファのファイル名の後ろに [RCS:<version> <locker>]が付きます。
16469 \begin_layout Standard
16470 このコマンドは次のRCSコマンドを実行します:
16472 ci -q -u -i -t-"<initial description>" <file-name>
16475 \begin_layout Standard
16483 \begin_layout Subsubsection
16489 \begin_layout Standard
16490 ファイルの編集が終わると、その変更をチェックインします。これを実行すると変更についての説明を求められ、それは履歴ログに記録されます。そしてバージョンナンバーは上
16491 がり、変更がマスターRCSファイルに反映され、その文章はアンロックされ Read-Onlyモードになります。
16494 \begin_layout Standard
16497 ci -q -u -m"<description>" <file-name>
16500 \begin_layout Subsubsection
16506 \begin_layout Standard
16507 このコマンドは文章をロックして編集できるようにします。そして文章をあなただけが読み書きできるようにします。しばらく文章を編集して、それが終わったらチェックインし
16508 てください。文章がロックされるとステータスラインが変わります。
16511 \begin_layout Standard
16514 co -q -l <file-name>
16517 \begin_layout Subsubsection
16523 \begin_layout Standard
16524 このコマンドは最後のチェックイン以降のすべての変更を破棄します。変更を破棄する前には警告がでます。
16527 \begin_layout Standard
16530 co -f -u<version> <file-name>
16533 \begin_layout Subsubsection
16539 \begin_layout Standard
16540 これは最後のチェックインがなされなかったようにします。LyXに読み込まれる文章は変わりませんが、マスターRCSファイルから最後のチェックインの変更が取り除かれま
16544 \begin_layout Standard
16547 rcs -o<version> <file-name>
16550 \begin_layout Subsubsection
16556 \begin_layout Standard
16557 RCSドキュメントの完全なヒストリーが表示されます。これは
16568 \begin_layout Subsection
16572 \begin_layout Standard
16573 LyXは、現在CVSを一部サポートしています。そのコマンドは、
16574 \begin_inset Flex CharStyle:MenuItem
16577 \begin_layout Plain Layout
16578 ファイル\SpecialChar \menuseparator
16587 \begin_layout Subsubsection
16591 \begin_layout Standard
16592 お使いの文書が改訂管理下に置かれていなければ、メニューにはこの項目だけが表示されます。もし改訂管理が有効ならば、
16599 \begin_layout Standard
16600 本コマンドは、既に文書のあるディレクトリをCVS管理下に置いている場合に
16605 \begin_inset Flex CharStyle:Code
16608 \begin_layout Plain Layout
16614 ファイルが存在する場合にのみ)、お使いの文書をCVSに登録します。つまり、アーカイブはご自分でチェックアウトしなくてはなりません。
16617 \begin_layout Standard
16618 すると、文書の最初の説明文を入力するように促されます。登録したファイルは、まだコミットされたわけではないことに注意してください。
16621 \begin_layout Standard
16623 \begin_inset Flex CharStyle:Code
16626 \begin_layout Plain Layout
16628 \begin_inset Quotes erd
16632 \begin_inset Quotes erd
16636 \begin_inset Quotes eld
16640 \begin_inset Quotes erd
16651 \begin_layout Standard
16653 \begin_inset Flex CharStyle:Code
16656 \begin_layout Plain Layout
16665 \begin_layout Subsubsection
16669 \begin_layout Standard
16670 ファイルの編集を終えたら、変更をコミットします。このとき、変更の説明文を入れるよう促されます。その後、変更がコミットされます。
16673 \begin_layout Standard
16675 \begin_inset Flex CharStyle:Code
16678 \begin_layout Plain Layout
16680 \begin_inset Quotes erd
16684 \begin_inset Quotes erd
16688 \begin_inset Quotes eld
16692 \begin_inset Quotes erd
16703 \begin_layout Subsubsection
16707 \begin_layout Standard
16708 これは、最後のチェックイン以降、文書に加えられた変更をすべて廃棄します。変更が廃棄される前に警告が表示されます。最初にファイルが削除され、次にCVSアップデート
16712 \begin_layout Standard
16714 \begin_inset Flex CharStyle:Code
16717 \begin_layout Plain Layout
16719 \begin_inset Quotes eld
16723 \begin_inset Quotes erd
16734 \begin_layout Subsubsection
16738 \begin_layout Standard
16739 これは、CVS文書の全履歴を表示します。
16740 \begin_inset Flex CharStyle:Code
16743 \begin_layout Plain Layout
16745 \begin_inset Quotes eld
16749 \begin_inset Quotes erd
16760 \begin_layout Subsection
16764 \begin_layout Standard
16765 LyXは、現在SVNを一部サポートしています。そのコマンドは、
16766 \begin_inset Flex CharStyle:MenuItem
16769 \begin_layout Plain Layout
16770 ファイル\SpecialChar \menuseparator
16776 下位メニューにあります。レポジトリへのアクセスに、ssh経由のパスワード保護アクセスを使用している場合には、端末ウィンドウでの入力を促されます。LyXは、SVN
16777 1.5および1.6に対して試験されています
16781 \begin_layout Plain Layout
16782 ほとんどのコマンドは、1.4でも動作します。第
16783 \begin_inset CommandInset ref
16785 reference "sub:レポジトリからSVN同期"
16797 \begin_layout Subsubsection
16801 \begin_layout Standard
16802 お使いの文書が改訂管理下に置かれていなければ、メニューにはこの項目だけが表示されます。もし改訂管理が有効ならば、
16809 \begin_layout Standard
16810 本コマンドは、既に文書のあるディレクトリをSVN管理下に置いている場合に
16815 \begin_inset Flex CharStyle:Code
16818 \begin_layout Plain Layout
16824 ファイルが存在する場合にのみ)、お使いの文書をSVNに登録します。つまり、アーカイブはご自分でチェックアウトしなくてはなりません。
16827 \begin_layout Standard
16828 すると、文書の最初の説明文を入力するように促されます。登録したファイルは、まだコミットされたわけではないことに注意してください。
16831 \begin_layout Standard
16833 \begin_inset Flex CharStyle:Code
16836 \begin_layout Plain Layout
16838 \begin_inset Quotes eld
16842 \begin_inset Quotes erd
16853 \begin_layout Standard
16855 \begin_inset Flex CharStyle:Code
16858 \begin_layout Plain Layout
16867 \begin_layout Subsubsection
16871 \begin_layout Standard
16872 ファイルの編集を終えたら、変更をコミットします。このとき、変更の説明文を入れるよう促されます。その後、変更がコミットされます。
16875 \begin_layout Standard
16880 \begin_layout Plain Layout
16881 ロックが有効になっていない場合です。第
16882 \begin_inset CommandInset ref
16884 reference "sub:SVNファイルロック"
16894 \begin_inset Flex CharStyle:Code
16897 \begin_layout Plain Layout
16899 \begin_inset Quotes erd
16903 \begin_inset Quotes erd
16907 \begin_inset Quotes eld
16911 \begin_inset Quotes erd
16922 \begin_layout Subsubsection
16926 \begin_layout Standard
16927 このファイルの変更点をレポジトリから取得して更新します。すべての干渉点は、手動で解決しなくてはならないので、この機能を使う前にSVNのマージ法と干渉解決法を理解
16931 \begin_layout Standard
16936 \begin_layout Plain Layout
16943 \begin_inset Flex CharStyle:Code
16946 \begin_layout Plain Layout
16947 svn update --non-interactive
16948 \begin_inset Quotes eld
16952 \begin_inset Quotes erd
16963 \begin_layout Subsubsection
16967 \begin_layout Standard
16968 これは、最後のチェックイン以降、文書に加えられた変更をすべて廃棄します。変更が廃棄される前に警告が表示されます。
16971 \begin_layout Standard
16973 \begin_inset Flex CharStyle:Code
16976 \begin_layout Plain Layout
16978 \begin_inset Quotes eld
16982 \begin_inset Quotes erd
16993 \begin_layout Subsubsection
16994 \begin_inset CommandInset label
16996 name "sub:レポジトリからSVN同期"
17000 レポジトリを使ったローカルディレクトリの同期
17004 \begin_layout Plain Layout
17006 \begin_inset Formula $\geqq1.5$
17009 でのみ動作することに注意してください。
17017 \begin_layout Standard
17018 上記の各コマンドはすべて、共通の短所を持っています。すなわち、これらのコマンドは現在の文書しか取り扱わないのです。もし、作業中の文書に図を含めたり、外部
17019 \begin_inset Flex CharStyle:Code
17022 \begin_layout Plain Layout
17028 ファイルを取り込んだりすれば、管理はずっと複雑になります。そこでLyXは、文書のおいてあるツリー全体の更新をサポートします
17032 \begin_layout Plain Layout
17033 すべての外部ファイルが、文書と同じディレクトリかそれ以下のサブディレクトリに来るようにファイル構造を構成する必要があります。
17038 。これは、subversion管理を知らなかったりレポジトリに新しい素材をコミットする勇気のない人たちと共同作業をする羽目になったときに、ひじょうに役に立ちます
17042 \begin_layout Standard
17043 \begin_inset Flex CharStyle:Code
17046 \begin_layout Plain Layout
17052 コマンドは、ディレクトリ全体を更新し、マージに衝突が発生した場合には、ローカル版は保存されるので、意図しないデータロスが発生しません。ローカルな変更が発見された
17053 場合には、更新が開始される前にユーザに警告が与えられます。
17056 \begin_layout Labeling
17057 \labelwidthstring 00.00.0000
17059 \begin_inset space ~
17063 \begin_inset Newline newline
17067 \begin_inset Flex CharStyle:Code
17070 \begin_layout Plain Layout
17071 svn diff $path(変更が発見された場合には通知します)
17072 \begin_inset Newline newline
17075 svn update --accept mine-full $path
17083 \begin_layout Standard
17085 \begin_inset Flex CharStyle:Code
17088 \begin_layout Plain Layout
17097 \begin_layout Subsubsection
17101 \begin_layout Standard
17102 これは、SVN文書の全履歴を表示します。
17103 \begin_inset Flex CharStyle:Code
17106 \begin_layout Plain Layout
17108 \begin_inset Quotes eld
17112 \begin_inset Quotes erd
17123 \begin_layout Subsubsection
17125 \begin_inset CommandInset label
17127 name "sub:SVNファイルロック"
17134 \begin_layout Standard
17135 別々の改訂管理システム間でファイルを交換しようとすると、二人のユーザが同じ文書(の一部)を編集している場合、マージが衝突する問題を引き起こします。そのような衝突
17136 が発生した場合、手動で解決しなくてはならなくなりますが、その合理的な解決法としては、与えられた時間に一人のユーザだけがファイルを編集することが許されるように保証
17137 するための、何らかのロック機構を導入することが考えられます。
17140 \begin_layout Standard
17141 SVNには、このように相互に排他的なファイルアクセスを提供する機構が二つあります。ロックと、
17142 \begin_inset Flex CharStyle:Code
17145 \begin_layout Plain Layout
17151 svnファイル特性に依拠した書き込み権限の自動設定(第
17152 \begin_inset CommandInset ref
17154 reference "sub:自動ロック特性"
17162 \begin_layout Plain Layout
17163 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
17168 。ある文書について、この特性が検出されたときには、LyXは自動的に文書編集にSVNロックを使用するようになり、チェックイン・チェックアウト機構はRCSと同じ枠組
17169 みに切り替わります。これは特に、LyXでのファイルの使われ方に以下の二つのモードがあることを意味します。
17172 \begin_layout Itemize
17173 非ロック状態。読み込まれたファイルは、読み込み専用モードになります。編集するためには、チェックアウトする必要があります。
17177 を行うと、レポジトリからの更新と、書き込みロックの獲得が行われます。ロックの獲得ができないと、非ロック状態から出ることができません。
17180 \begin_layout Itemize
17181 ロック状態。読み込まれたファイルは、「通常の」編集モードになります。他のユーザには、このファイルを編集する許可が与えられません。
17185 を行うと、変更のコミットと書き込みロックの解放が行われます。文書に変更が加えられなかった場合には、コミットは実行されず
17189 \begin_layout Plain Layout
17190 コミットは実行されないのに、コミットメッセージを入力するよう促されますが、驚かないでください。
17195 、書き込みロックの解放のみが行われます。
17198 \begin_layout Standard
17202 \begin_layout Labeling
17203 \labelwidthstring 00.00.0000
17205 \begin_inset Flex CharStyle:Code
17208 \begin_layout Plain Layout
17210 \begin_inset Quotes erd
17214 \begin_inset Quotes erd
17218 \begin_inset Quotes eld
17222 \begin_inset Quotes erd
17231 \begin_inset Newline newline
17235 \begin_inset Flex CharStyle:Code
17238 \begin_layout Plain Layout
17240 \begin_inset Quotes eld
17244 \begin_inset Quotes erd
17255 \begin_layout Labeling
17256 \labelwidthstring 00.00.0000
17258 \begin_inset Flex CharStyle:Code
17261 \begin_layout Plain Layout
17263 \begin_inset Quotes eld
17267 \begin_inset Quotes erd
17276 \begin_inset Newline newline
17280 \begin_inset Flex CharStyle:Code
17283 \begin_layout Plain Layout
17285 \begin_inset Quotes eld
17289 \begin_inset Quotes erd
17300 \begin_layout Subsubsection
17302 \begin_inset CommandInset label
17311 \begin_layout Standard
17313 \begin_inset Flex CharStyle:Code
17316 \begin_layout Plain Layout
17322 ファイルに対する書き込み権限の自動設定は、
17323 \begin_inset Flex CharStyle:MenuItem
17326 \begin_layout Plain Layout
17327 ファイル\SpecialChar \menuseparator
17328 バージョン管理\SpecialChar \menuseparator
17334 で行うことができます。このコマンドは、SVNサーバでファイルがロックされていないときのみ使用可能状態になります(つまり、使用するにはチェックアウトが必要です)。
17337 \begin_layout Standard
17341 \begin_layout Labeling
17342 \labelwidthstring 00.00.0000
17344 \begin_inset Flex CharStyle:Code
17347 \begin_layout Plain Layout
17348 svn propset svn:needs-lock ON
17349 \begin_inset Quotes eld
17353 \begin_inset Quotes erd
17364 \begin_layout Labeling
17365 \labelwidthstring 00.00.0000
17367 \begin_inset Flex CharStyle:Code
17370 \begin_layout Plain Layout
17371 svn propdel svn:needs-lock
17372 \begin_inset Quotes eld
17376 \begin_inset Quotes erd
17387 \begin_layout Subsubsection
17391 \begin_layout Standard
17392 現在のところ、LyXから直接、文書改訂に関する情報を得る方法はありません。SVNの機能を使って実現する方法はありますが、それらの方法はどれも、それぞれの短所があ
17396 \begin_layout Standard
17397 一つの方法は、SVNキーワードを使用する方法です
17401 \begin_layout Plain Layout
17402 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
17407 。簡単に言えば、ファイルキーワード特性を設定して、文書中にキーワードERT
17411 \begin_layout Plain Layout
17412 これは、LyXがキーワードタグの途中で改行してしまわないことを確実にするための、簡単な方法です。
17421 \begin_layout Plain Layout
17428 )を貼り付けるのです。このようにして、SVNクライアントは、各更新やコミットの後に自動的に改訂番号を代入することができるのです(例
17432 \begin_layout Plain Layout
17439 )。このアプローチにはいくつか問題があります。第一に、TeXの世界では「$」文字は数式を表すのに使われるので、LyX中の
17440 \begin_inset Formula $Rev$
17444 \begin_inset Formula $Rev:59$
17447 になってしまいます。その他のId・Date・Authorなどといったキーワードも同様です。第二に、SVN出力は使用中のロケールに依存するので、Dateが用いられ
17448 ると、SVNは、問題を引き起こすような文字列を容易に生成してしまいます。第三に、文書中には、番号だけでなく「Rev:59」という文字列全体が表示されてしまいます
17449 。Subversionがユーザ定義のキーワードを実装するまでは、このアプローチを信頼性を持って使用したり、LyXがこれを直接サポートすることは、難しそうです。
17452 \begin_layout Standard
17453 もう一つの方法は、自製の外部素材ひな型を書いて、文書の組版時に、
17454 \begin_inset Flex CharStyle:Code
17457 \begin_layout Plain Layout
17464 \begin_inset Flex CharStyle:Code
17467 \begin_layout Plain Layout
17473 コマンドの出力を解析させ、その結果を返させることです。
17476 \begin_layout Subsection
17480 \begin_layout Quote
17481 ユーザが、かなり早いうちに自分自身でコマンドライン操作を理解できないのであれば、TortoiseSVNを使った方が賢明でしょう。---P.
17486 \begin_layout Subsubsection
17490 \begin_layout Standard
17491 LyXを導入して、Subversionレポジトリへのアクセス権を持っている他に、ユーザはSubversionクライアントプログラムを導入する必要があります。クラ
17492 イアントプログラムのWindows用インストーラは
17493 \begin_inset CommandInset href
17496 target "http://www.collab.net/nonav/downloads/subversion/"
17501 \begin_inset CommandInset href
17504 target "http://tortoisesvn.tigris.org/"
17508 も導入することを考えるでしょう。これはSubversionの操作をWindows Explorerのコンテクスト(右クリック)メニューに統合します。LyX外部で
17509 行う操作は、一般的にExplorerコンテクストメニューを使った方が便利です。TortoiseSVNは、LyX自身が使用するクライアントプログラムの代わりとは成
17513 \begin_layout Subsubsection
17514 文書をSubversion管理下に置くには
17517 \begin_layout Standard
17518 LyX文書をSubversionのバージョン管理下に置く前に、その親ディレクトリをバージョン管理下に置かなくてはなりません。文書を、既にレポジトリに存在するプロ
17519 ジェクトに追加する際には、新規文書が置かれることになるディレクトリへ、プロジェクトをチェックアウトすることによって実現します。プロジェクト自体がバージョン管理下
17520 にない場合(たとえばこの文書が新規プロジェクトの最初のファイルである場合)には、このディレクトリをレポジトリにインポートしなくてはなりません。これは、LyXの外
17521 部で行います。インポートもチェックアウトも共に、TortoiseSVNを使えば、Explorerのコンテクストメニューから簡単に終えることができます。あるいは、
17522 DOSプロンプトでコマンドライン・クライアントを使って成し遂げることもできます。TortoiseSVNを使ったプロジェクトのインポート手続きを下記で説明します。
17523 レポジトリは既に存在し、新規プロジェクトを
17524 \begin_inset Flex CharStyle:Code
17527 \begin_layout Plain Layout
17535 で開始するものとします。Subversionクライアントプログラムを使うための情報を得るには、DOSシェルで
17536 \begin_inset Flex CharStyle:Code
17539 \begin_layout Plain Layout
17548 \begin_layout Enumerate
17550 \begin_inset Flex CharStyle:Code
17553 \begin_layout Plain Layout
17562 \begin_inset Flex CharStyle:MenuItem
17565 \begin_layout Plain Layout
17566 TortoiseSVN\SpecialChar \menuseparator
17572 を選択してください。必要であれば、レポジトリのURLを調整し、OKをクリックしてください。
17575 \begin_layout Enumerate
17576 新規プロジェクトフォルダを置くレポジトリレベル(多くの場合最上位レベル)を右クリックし、
17577 \begin_inset Flex CharStyle:MenuItem
17580 \begin_layout Plain Layout
17581 Create folder\SpecialChar \ldots{}
17587 をクリックしてください。プロジェクトフォルダの名称を入力してOKをクリックしてください。必要であればログファイル用のメッセージを入力し、再びOKをクリックしてく
17588 ださい。新規プロジェクトフォルダがレポジトリに現れるはずです。最後にOKを再度クリックして、レポジトリブラウザを終了してください。
17591 \begin_layout Enumerate
17593 \begin_inset Flex CharStyle:Code
17596 \begin_layout Plain Layout
17605 \begin_inset Flex CharStyle:MenuItem
17608 \begin_layout Plain Layout
17609 SVN Checkout\SpecialChar \ldots{}
17615 を選択してください。レポジトリにたった今作成した、プロジェクトフォルダのURLを選択し、チェックアウトディレクトリを
17616 \begin_inset Flex CharStyle:Code
17619 \begin_layout Plain Layout
17627 に設定してから、OKをクリックしてください。フォルダが空でないことを警告されますが、OKをクリックして進んでください。すると、
17628 \begin_inset Flex CharStyle:Code
17631 \begin_layout Plain Layout
17640 \begin_inset Flex CharStyle:Code
17643 \begin_layout Plain Layout
17652 \begin_layout Enumerate
17653 LyXで文書を新規作成するか開くかして、
17654 \begin_inset Flex CharStyle:MenuItem
17657 \begin_layout Plain Layout
17658 ファイル\SpecialChar \menuseparator
17659 バージョン管理\SpecialChar \menuseparator
17665 をクリックします。ログメッセージを入力してOKをクリックし、文書をバージョン管理にコミットしてください。
17668 \begin_layout Standard
17670 \begin_inset Flex CharStyle:MenuItem
17673 \begin_layout Plain Layout
17674 ファイル\SpecialChar \menuseparator
17680 メニューのすべての機能が使用できるようになります。Windows ExplorerのTortoiseSVNコンテクストメニューか、コマンドプロンプトでのSubv
17681 ersionクライアントプログラムを使用して、文書をチェックイン・チェックアウトしたり、履歴を見たりといったことができるようになります。
17684 \begin_layout Subsubsection
17685 Windows下でSVNと共にSSHトンネルを使うには
17688 \begin_layout Standard
17689 Linuxに較べて、WindowsでSVNクライアントをSSH経由で通信するようにさせるのは、かなり厄介な仕事です。どのようにクライアント側を設定すればよいか、
17690 少なくとも幾分かのヒントをお示しするつもりですが、sshとWindowsコマンドラインの知識が前もって必要であり、それと共にかなりの量のフラストレーションが溜ま
17694 \begin_layout Enumerate
17695 前節で述べたように、Windows用のSVNクライアントを入手してください。これが新規の導入である場合には、何らかのSVNコマンド(たとえば
17696 \begin_inset Flex CharStyle:Code
17699 \begin_layout Plain Layout
17705 )を実行して、configファイル群を生成させてください。これらは後で変更を加える必要があります。
17708 \begin_layout Enumerate
17709 Windows用のsshクライアントを選んでください。選択肢はたくさんありますが、ここではPutty tools
17713 \begin_layout Plain Layout
17714 \begin_inset Flex URL
17717 \begin_layout Plain Layout
17719 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
17729 のものを使用することとしましょう。クライアントが接続の度にパスワードを訊いてこないように、接続を自動化する必要があります。簡単にするために、追加的なパスワード保
17730 護などを加えないキーのみを使用することとします。
17734 \begin_layout Enumerate
17735 \begin_inset Flex CharStyle:Code
17738 \begin_layout Plain Layout
17744 を使ってキーを生成します。.ppkプライベートキーファイルを保存し、パブリックキーファイルはサーバ側に置きます。SVNサーバがLinuxで走っている場合、このパブ
17745 リックキーの書式はLinuxのopensshと互換性がないために、「Public key for pasting into OpenSSH authorized
17746 _keys file:」編集フィールドから、直接サーバの
17747 \begin_inset Flex CharStyle:Code
17750 \begin_layout Plain Layout
17751 ~/.ssh/authorized_keys
17757 \begin_inset Flex CharStyle:Code
17760 \begin_layout Plain Layout
17766 ファイルにコピー&ペーストを行わなくてはならないことに注意してください。
17769 \begin_layout Enumerate
17770 Puttyのplinkを入手してください。SVNのconfigファイル
17774 \begin_layout Plain Layout
17775 正確なパスはWindowsのバージョンに依りますが、通常は
17776 \begin_inset Flex CharStyle:Code
17779 \begin_layout Plain Layout
17782 Documents and Settings
17796 \begin_inset Flex CharStyle:Code
17799 \begin_layout Plain Layout
17815 \begin_inset Flex CharStyle:Code
17818 \begin_layout Plain Layout
17824 セクションにsshコマンドを設定してください。例:
17825 \begin_inset Flex CharStyle:Code
17828 \begin_layout Plain Layout
17829 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
17838 \begin_layout Plain Layout
17839 通常、正確なコマンドを機能させるには長い時間がかかり、それは多くの物事に依存します。たとえば、リモートサーバがPuttyなどの既定セッションとして保存されないよ
17840 うにしてください。うまく行かない場合には、まずSVNなしでplink経由の接続を試してください。
17849 \begin_layout Enumerate
17850 SVNアーカイブをチェックアウトしてください。例:
17851 \begin_inset Flex CharStyle:Code
17854 \begin_layout Plain Layout
17855 svn co svn+ssh://user@server/repository_path
17863 \begin_layout Subsection
17867 \begin_layout Standard
17868 vcコマンド機構が最近になって付け加えられたおかげで、LyXのパワーユーザは、改訂管理のための自製コマンドを作ることができるようになりました。
17871 \begin_layout Standard
17872 たとえば、以下のようにして、二つのTortoiseSVNコマンドを直接統合することができます。
17875 \begin_layout Description
17877 \begin_inset Flex CharStyle:Code
17880 \begin_layout Plain Layout
17881 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
17889 \begin_layout Description
17891 \begin_inset Flex CharStyle:Code
17894 \begin_layout Plain Layout
17895 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
17903 \begin_layout Section
17907 \begin_layout Standard
17908 \begin_inset Flex CharStyle:Noun
17911 \begin_layout Plain Layout
17917 (kayvan@sylvan.com)改訂
17918 \begin_inset Flex CharStyle:Noun
17921 \begin_layout Plain Layout
17922 Edmar Wienskoski Jr.
17927 (edmar-w-jr@technologist.com)原文
17930 \begin_layout Subsection
17934 \begin_layout Standard
17935 この節の目的は、どのようにLyXを文芸的プログラミング(literate programming)に使うかを説明することです。ここではあなたがこのプログラミング
17936 テクニックを使っていて、tanglingやweavingが何を意味するかを知っているものとして説明します。知らない場合は以下の節にあるウェブリンクをたどってくだ
17937 さい。古い開発の歴史から、最新のツールに関するものまで様々な文章があります。
17940 \begin_layout Standard
17945 Xリソースファイルを書き換えることができることも前提にしています。そうでない場合はLyXの他の取扱説明書で調べてください。
17948 \begin_layout Subsection
17952 \begin_layout Standard
17953 文芸的プログラミング FAQからの抜粋です。
17956 \begin_layout Quotation
17957 文芸的プログラミングは、人間が読むのに適した形でのドキュメントとソースの組合わせです。実際、文芸的プログラムは楽しい読み物でなければならず、またそうするように勧
17958 められています。一般に文芸的プログラムでは、同じファイルの中でドキュメントとソースが結合しています。そして文芸的プログラム用のツールが、そのファイルを読むことの
17959 できるドキュメントとコンパイルできるソースをつくるように解析します。文芸的プログラミングの WEBスタイルは D.E.
17960 Knuthが彼の TeXタイプセットソフトウエアを開発中に作ったものです。
17963 \begin_layout Standard
17967 \begin_layout Quotation
17968 文芸的プログラミングはコメントを多くするのとどう違うのでしょう?
17971 \begin_layout Quotation
17972 3つの際立った違いがあります。重要な順にあげていくと、
17976 \begin_layout Itemize
17980 \begin_layout Itemize
17984 \begin_layout Itemize
17985 ドキュメントのタイプセット、特に図と数式
17989 \begin_layout Standard
17990 興味がわいてきたでしょう。次の節に進みましょう。
17993 \begin_layout Subsubsection
17997 \begin_layout Standard
18001 \begin_layout Quote
18002 Literate Programming FAQ
18003 \begin_inset Flex URL
18006 \begin_layout Plain Layout
18008 http://shelob.ce.ttu.edu/daves/lpfaq/faq.html
18016 \begin_layout Standard
18020 \begin_layout Standard
18021 このFAQには23(二十三です)の異なった文芸的プログラミング用のツールがのっています。いくつかのツールはあるプログラミング言語に特化したものですが、一般的に使
18022 えるものもあります。私はいくつかの理由からNOWEBを選びました。
18025 \begin_layout Itemize
18026 ドキュメントを LaTeXと htmlで出力できる。
18029 \begin_layout Itemize
18030 開放的な構造を持っている。つまり、新しいフィルタを加えたり、自分が必要な特別な処理を行える。
18033 \begin_layout Itemize
18034 すでに利用可能なよく選ばれたフィルタがある。(htmlはその一つです)。
18037 \begin_layout Itemize
18041 \begin_layout Standard
18042 Nowebのウェブページは次のところです。
18045 \begin_layout Quote
18047 \begin_inset Flex URL
18050 \begin_layout Plain Layout
18052 http://www.cs.virginia.edu/~nr/noweb/
18060 \begin_layout Standard
18061 ここから色々な興味深いリンクが張られていて、またいくつかの文芸的プログラミングの例もあります。
18064 \begin_layout Subsection
18068 \begin_layout Standard
18069 LyXは文芸的プログラミングをサポートするために、汎用のLyXのコンバータメカニズムを使っています。したがって、LyXのコンバータの設定を変えることによってNo
18070 web以外の文芸プログラミングのツールを使うことができます。
18073 \begin_layout Subsubsection
18074 ドキュメントとコードの生成(weavingとtangling)
18077 \begin_layout Paragraph
18081 \begin_layout Standard
18082 NowebとLyXのインストールに成功すると次の3つの新しい文書クラスが利用できるようになります。
18085 \begin_layout Itemize
18089 \begin_layout Itemize
18093 \begin_layout Itemize
18097 \begin_layout Standard
18098 文芸的プログラムをつくる場合にはこの中から文書クラスを選んでください。
18101 \begin_layout Standard
18102 文芸的プログラムはこれらのクラスに限定されないことに注意してください。他のスタイル(例えばletter)から新しいクラスをつくることも、Article
18103 (AMS)等のクラスのバリエーションと組み合わせて作ることもできます。この3つのクラスでカバーできない特別なことがしたい場合には、LyXの開発者用のメーリング
18104 リスト(lyx-devel@lists.lyx.org)に連絡してください。新しいエントリを加えるようにするか、どうすれば自分でできるかをお教えします
18108 \begin_layout Plain Layout
18109 実に簡単です。4行入ったファイルをつくって、自動設定を走らせるだけです。
18114 。またNoweb以外の文芸プログラム用のツールを使う場合も、新しい文書クラスをつくる必要があります。
18117 \begin_layout Paragraph
18121 \begin_layout Standard
18122 LyXでコードを入力するにはSCRAP
18126 \begin_layout Plain Layout
18127 Nowebでの名前はChunkです。歴史的な理由から、別の文芸プログラムツールNuwebで使われているscrapという名前を使っています。私がNowebに乗り換
18133 環境を使ってください。Nowebは次のように scrapを区切ります。
18136 \begin_layout LyX-Code
18140 \begin_layout LyX-Code
18144 \begin_layout LyX-Code
18148 \begin_layout LyX-Code
18152 \begin_layout LyX-Code
18156 \begin_layout Standard
18157 問題は<<と@の間にあるものを完全にそのままの形で扱わなければならないことです。つまりLyXはこの間に書かれたものへのどんな変更も禁止しなくてははなりません。こ
18158 れはScrapと呼ぶ特別なレイアウトで扱われます。この環境は通常の段落のようですが、自由に空白を入れることができます。
18161 \begin_layout Standard
18162 Scrap段落環境の欠点は、連続したコードの段落の間に空行がソースコードにも印刷したドキュメントにも入ることです。これを回避するためには、Scrap環境の中の改
18163 行には(ctrl-return)を使ってください。上の例では次のようにします
18167 \begin_layout Plain Layout
18168 印刷したバージョンを読んでいる場合にはこの例と上の例の違いが分かりません。
18176 \begin_layout LyX-Code
18178 \begin_inset Newline newline
18182 \begin_inset Newline newline
18186 \begin_inset Newline newline
18190 \begin_inset Newline newline
18196 \begin_layout Standard
18197 この環境はうまく働きます。不便な点は普通のリターンのかわりにctrl-returnを使わなければならないことです
18201 \begin_layout Plain Layout
18202 これは改善しなければならない点でしょう。
18210 \begin_layout Standard
18211 また、Scrapの中に Noweb の %def を使うことができます。これを使うことで Nowebのidentifierの相互参照に項目を加えることができます
18215 \begin_layout LyX-Code
18217 \begin_inset Newline newline
18220 def some_function(args):
18221 \begin_inset Newline newline
18224 "This is the doc string for this function."
18225 \begin_inset Newline newline
18228 print "My args: ", args
18231 \begin_layout LyX-Code
18232 @ %def some_function
18235 \begin_layout Standard
18236 これをどのように使って、その結果相互参照がどうなるかは
18238 LIBDIR/examples/listerrors.lyx
18240 の中の文芸pythonプログラムを見るとよくわかります。
18243 \begin_layout Paragraph
18247 \begin_layout Standard
18248 新しい文章ファイルを正しい文書クラスでつくり、その中にコードとテキストも入れました。これをどうやって印刷したらいいのでしょう。簡単です。
18249 \begin_inset Flex CharStyle:MenuItem
18252 \begin_layout Plain Layout
18253 表示\SpecialChar \menuseparator
18259 等を選ぶだけです。普通の文章の場合と同じで、特別なことは必要ありません。
18262 \begin_layout Standard
18263 LyXの内部で何が起っているかを説明しておきましょう。
18266 \begin_layout Enumerate
18267 \begin_inset Flex CharStyle:MenuItem
18270 \begin_layout Plain Layout
18271 表示\SpecialChar \menuseparator
18277 が選ばれると、LaTeXファイルがつくられます。
18281 \begin_layout Standard
18282 ドキュメントが文芸プログラミング用のクラスであった場合には、拡張子に(
18283 \begin_inset Flex CharStyle:MenuItem
18286 \begin_layout Plain Layout
18292 パネルで設定した)文芸プログラム用のものがつけられます。それ以外は .texが拡張子に使われます。
18296 \begin_layout Enumerate
18297 違いがファイル名だけなのに注意してください。LyXによる特別な処理は必要ありません。Scrap環境でコードを入力するのだけがポイントです。
18300 \begin_layout Enumerate
18301 ドキュメントが文芸プログラムクラスなら、LyXは内部の LyX から Noweb のコンバータを使い、それからNowebからLaTeXのコンバータ
18305 \begin_layout Plain Layout
18311 dit\SpecialChar \menuseparator
18318 パネルの Conversion タブで設定できます。
18323 を使って LaTeX ファイルを生成します。
18327 \begin_layout Standard
18328 それ以外の場合はこのステップを飛ばします。
18332 \begin_layout Enumerate
18333 最後にLaTeXが実行され、普通の文章と同じ後処理が行われます。
18336 \begin_layout Standard
18337 様々なコンバータから走らせるコマンドを変えることによって、特定の文芸プログラム用のソフトウエアにしばられないようになっています。
18340 \begin_layout Paragraph
18344 \begin_layout Standard
18345 ビルドメニューが選ばれた場合や、それに対応するツールバーのボタンが押された場合、上のステップ1と同様にLaTeXファイルが生成されます。それからLyXは
18349 のコンバータを起動します。通常は、このコンバータは(他のコンバータと同じように)2つの部分からできています。
18352 \begin_layout Enumerate
18353 コンバータプログラム。このプログラムは、一つのフォーマットから他のフォーマットへの変換を行います(この場合は、Nowebフォーマットからプログラムの疑似フォーマ
18357 \begin_layout Enumerate
18358 エラーログパーサー。これはエラーメッセージをLyXが理解できる形へ書き直します。これによって、LyXはファイルバッファの正しい位置へエラーボックスを配置すること
18362 \begin_layout Standard
18363 はじめのパートのために、「変換子」設定で、
18364 \begin_inset Quotes eld
18372 \begin_inset Quotes erd
18375 と指定します。これは基本的に、LyXが
18379 (プログラムかスクリプト名)を(一般にはLyXの一時ファイル用のディレクトリにつくられる)Nowebファイルの名前とともに起動することを意味しています。
18382 \begin_layout Standard
18383 以下にbuild-scriptの一例を書いておきます。パスが通っているディレクトリに置いて使います。
18386 \begin_layout LyX-Code
18390 \begin_layout LyX-Code
18394 \begin_layout LyX-Code
18395 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 sh
18398 \begin_layout Standard
18399 コンバータの設定の次の部分はFlagsです。これを
18400 \begin_inset Quotes eld
18405 originaldir,parselog=listerrors
18408 \begin_inset Quotes erd
18415 が出すすべてのエラーを listerrors プログラムに渡します。
18418 \begin_layout Standard
18419 コンバータコードがlisterrorsプログラムを探す順序は、はじめに
18430 \begin_layout Paragraph
18434 \begin_layout Standard
18435 LyXとNowebの統合の最後の部分は、
18436 \begin_inset Quotes eld
18440 \begin_inset Quotes erd
18443 scrapです。一般に、あなたのプログラムの構築操作の説明それ自身をscrapに入れて文章中に含めなければなりません。上の例のnoweb用のbuild-scr
18444 iptでは、scrapを見つけるのにnotangleコマンドを使い、shを使って起動します。
18447 \begin_layout Standard
18448 以下に典型的なscrapがどのようなものかを書いておきます。
18451 \begin_layout LyX-Code
18453 \begin_inset Newline newline
18457 \begin_inset Newline newline
18461 \begin_inset Newline newline
18464 if [ -z "${NOWEB_SOURCE}" ]
18465 \begin_inset Newline newline
18469 \begin_inset Newline newline
18472 NOWEB_SOURCE=myfile.nw
18473 \begin_inset Newline newline
18477 \begin_inset Newline newline
18481 code to extract files ...]
18482 \begin_inset Newline newline
18486 code to compile files ...]
18487 \begin_inset Newline newline
18493 \begin_layout Standard
18496 LIBDIR/examples/listerrors.lyx
18500 LIBDIR/examples/Literate.lyx
18502 を見てください。この2つのファイルには異なる実装のlisterrorsプログラムが含まれていて、これまで説明してきた各々の部分が全体としてどのようになるかをわか
18505 LIBDIR/examples/noweb2lyx.lyx
18507 も見てください。面白いことに、これらの3つのファイルは、Python、C、Perlが各々使われていて、LyXの文芸プログラミングのサポートがプログラム言語に依存
18511 \begin_layout Subsubsection
18515 \begin_layout Standard
18516 すべての文芸プログラムのための設定は、
18517 \begin_inset Flex CharStyle:MenuItem
18520 \begin_layout Plain Layout
18521 ツール\SpecialChar \menuseparator
18527 パネルの「変換子」タブですることができます。重要な部分を見ておきましょう。
18530 \begin_layout Description
18532 \begin_inset space ~
18536 \begin_inset Quotes eld
18540 \begin_inset Quotes erd
18544 \begin_inset space ~
18547 format 書式タブで設定します。ここで、Noweb特有の設定を行います。
18559 に設定してください。これによって、LyXに変換プロセスの第一段階でつくられるファイルに
18563 という拡張子をつけることを指示します。
18566 \begin_layout Description
18568 \begin_inset space ~
18576 \begin_inset space ~
18579 format これは空にしてください。この項目のただひとつの目的は変換の最終的なフォーマットを指定することです(これが設定されていると、このフォーマットからの変
18583 \begin_layout Description
18592 このコンバータは、weavingの段階を行います。Nowebの場合は、
18593 \begin_inset Quotes eld
18598 noweave -delay -index $$i > $$o
18601 \begin_inset Quotes erd
18607 \begin_layout Description
18616 これは、tanglingを行います。以前に説明したように、
18621 \begin_inset Quotes eld
18626 originaldir,parselog=listerrors
18629 \begin_inset Quotes erd
18635 \begin_layout Subsubsection
18639 \begin_layout Standard
18640 ddd/gdbまたは他のデバッガで使えるserver-goto-file-rowという関数が新たにLyXサーバに実装されました。
18643 \begin_layout Standard
18644 ddd/gdbでデバッグしているとき、一つのキーストロークで現在実行している位置でテキストエディタを起動できます。既定のdddの設定ではShift-Ctrl-V
18646 \begin_inset Flex CharStyle:MenuItem
18649 \begin_layout Plain Layout
18650 ツール\SpecialChar \menuseparator
18651 設定\SpecialChar \menuseparator
18658 \begin_inset Flex CharStyle:MenuItem
18661 \begin_layout Plain Layout
18667 エントリを変えると変えることができます。
18670 \begin_layout Standard
18671 新しいLyXサーバの関数と、このdddの機能を使うために
18672 \begin_inset Flex CharStyle:MenuItem
18675 \begin_layout Plain Layout
18684 \begin_layout LyX-Code
18685 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
18688 \begin_layout Standard
18689 こうしておくとdddを使っていてプログラムの編集したい場所があったとき、(dddのウインドウで)Shift-Ctrl-Vを押すだけでdddはLyXサーバに情報を
18690 送り、LyXは同じファイルを表示し、カーソルはdddが示した場所へあらわれます。これでもうデバッグの最中に推測しながらスクロールして場所を探す必要がなくなります
18694 \begin_layout Standard
18695 この機能が動くにはLyXサーバが利用可能でなければなりません(既定ではLyXサーバーは使えないようになっています)。LyXサーバを使えるようにするには、
18698 \begin_inset Flex CharStyle:MenuItem
18701 \begin_layout Plain Layout
18714 \begin_inset Flex CharStyle:MenuItem
18717 \begin_layout Plain Layout
18730 \begin_inset Flex CharStyle:MenuItem
18733 \begin_layout Plain Layout
18746 \begin_inset Quotes eld
18751 /home/<your-home-directory>/.lyx/lyxpipe
18754 \begin_inset Quotes erd
18760 \begin_layout Standard
18765 』のLyXサーバの説明を読んでください。
18768 \begin_layout Subsubsection
18772 \begin_layout Standard
18773 ツールバーに加えることのできる6つの新しいボタンがあります。そのうちの5つのボタンは段落環境へのショートカットです。
18793 環境用のボタンを用意しています。最後の一つはファイルメニューの Build Programエントリへのショートカットです。
18796 \begin_layout Standard
18797 LyXはツールバーで使うためのいくつものボタンを用意しています。私のツールバーはこの6つのショートカットに
18798 \begin_inset Flex CharStyle:MenuItem
18801 \begin_layout Plain Layout
18802 表示\SpecialChar \menuseparator
18803 更新\SpecialChar \menuseparator
18810 \begin_inset Flex CharStyle:MenuItem
18813 \begin_layout Plain Layout
18814 表示\SpecialChar \menuseparator
18823 \begin_layout LyX-Code
18827 \begin_layout LyX-Code
18831 \begin_layout LyX-Code
18832 Icon "layout Standard"
18835 \begin_layout LyX-Code
18836 Icon "layout Section"
18839 \begin_layout LyX-Code
18840 Icon "layout LaTeX"
18843 \begin_layout LyX-Code
18844 Icon "layout LyX-Code"
18847 \begin_layout LyX-Code
18848 Icon "layout Scrap"
18851 \begin_layout LyX-Code
18855 \begin_layout LyX-Code
18859 \begin_layout LyX-Code
18860 Icon "buffer-typeset"
18863 \begin_layout LyX-Code
18864 Icon "build-program"
18867 \begin_layout LyX-Code
18871 \begin_layout LyX-Code
18875 \begin_layout LyX-Code
18879 \begin_layout LyX-Code
18883 \begin_layout LyX-Code
18887 \begin_layout Subsubsection
18891 \begin_layout Standard
18893 \begin_inset Flex CharStyle:MenuItem
18896 \begin_layout Plain Layout
18902 で変えることができます。まず変えたいと思うのはLaTeXフォントカラーでしょう。既定では赤になっていますが、ScrapはLaTeXフォントを使い、文芸的プログラ
18903 ミングでは多くのScrapがあるためにそれらがすべて赤では疲れてしまいます。
18904 \begin_inset Flex CharStyle:MenuItem
18907 \begin_layout Plain Layout
18908 操作性\SpecialChar \menuseparator
18917 \begin_layout Standard
18918 次にすることは画面の改行文字を見えなくすることです。改行文字の色を背景の色と同じにすることで改行文字を見えなくできます。私は改行文字を背景の色に似ているが少し違
18919 う色にすることを勧めます。こうすると、改行文字があるのはわかりますが、じゃまにならないでしょう。
18922 \begin_layout Chapter
18924 \begin_inset CommandInset label
18933 \begin_layout Standard
18934 LyXは強力な道具ですが、TeX/LaTeXでできることをすべてサポートしているわけではありません。しかし、ツールバーのTeXボタンを押したり、LaTeXプリア
18935 ンブルに追加するのをためらわなければ、多くのTeXやLaTeXのトリックを使うことができます。この節ではそのようなトリック、ヒント、アイデアを紹介します。まず家
18936 で、あまり重要でない文章で試してください。自分の博士論文でまず試そうとは考えない方がいいでしょう。
18939 \begin_layout Standard
18940 この節で紹介するものの多くは、通常のLaTeXディストリビューションにはあまり入っていないファイルを使います。teTeXを使っている場合には、ほとんどのファイル
18941 は含まれていますが、それでもいくつかは近くのCTANアーカイブからダウンロードする必要があります。しばしば、同じことをするのにいくつもの方法があったり、同じこと
18942 をするいくつものLaTeXファイルがあります。ここで紹介しているのは、いくつもの方法を比べてその中で我々が推薦するものではなく、単にあることをある特定のファイル
18946 \begin_layout Section
18950 \begin_layout Standard
18951 \begin_inset Flex CharStyle:Noun
18954 \begin_layout Plain Layout
18955 Lars Gullik Bjønnes
18963 \begin_layout Subsection
18967 \begin_layout Standard
18972 \begin_layout Plain Layout
18977 パッケージの使い方を説明した見事な章でした。ただし、この取扱説明書にそのまま載せるには長すぎました。そのために重要な節のみを選んであります。もとの章(ほとんど物
18980 examples/multicol.lyx
18987 の目的は、LyXの文章でどのようにLaTeXパッケージ
18991 を使うことができるのかを説明することです。LyXは
18995 パッケージをサポートしていないので、ちょっとしたトリックが必要です。この節を読むとどのようなトリックか明らかになるはずです。
18998 \begin_layout Subsection
19002 \begin_layout Standard
19007 パッケージでは同じページ内で一段組みと多段組みを切り替えることができます。脚注も(ほとんどの場合)正しく扱われますが、カラムの下ではなくページの下におかれます。
19008 しかし、LaTeXのフロートメカニズムは現在の実装では部分的に使うことができなくなっています。今のところこの環境の範囲では、ページ幅のフロートしか使えません。
19011 \begin_layout Subsection
19015 \begin_layout Subsubsection
19019 \begin_layout Standard
19020 二段組みを使いたい場合には、二段組みのレイアウトを始めたい場所にLaTeXモードで
19024 begin{multicols}{2}
19026 を挿入してください。そして二段組みを終わりたい場所に
19035 \begin_layout Standard
19039 \begin_layout Plain Layout
19043 begin{multicols}{2}
19051 \begin_layout Standard
19056 The Adventure of the Empty House
19059 \begin_inset Newline newline
19064 Sir Arthur Conan Doyle
19067 \begin_layout Standard
19070 It was in the spring of the year 1894 that all London was interested, and
19071 the fashionable world dismayed, by the murder of the Honourable Ronald
19072 Adair under most unusual and inexplicable circumstances.
19073 The public has already learned those particulars of the crime which came
19074 out in the police investigation, but a good deal was suppressed upon that
19075 occasion, since the case for the prosecution was so overwhelmingly strong
19076 that it was not necessary to bring forward all the facts.
19077 Only now, at the end of nearly ten years, am I allowed to supply those
19078 missing links which make up the whole of that remarkable chain.
19079 The crime was of interest in itself, but that interest was as nothing to
19080 me compared to the inconceivable sequel, which afforded me the greatest
19081 shock and surprise of any event in my adventurous life.
19082 Even now, after this long interval, I find myself thrilling as I think
19083 of it, and feeling once more that sudden flood of joy, amazement, and increduli
19084 ty which utterly submerged my mind.
19085 Let me say to that public, which has shown some interest in those glimpses
19086 which I have occasionally given them of the thoughts and actions of a very
19087 remarkable man, that they are not to blame me if I have not shared my knowledge
19088 with them, for I should have considered it my first duty to do so, had
19089 I not been barred by a positive prohibition from his own lips, which was
19090 only withdrawn upon the third of last month.
19093 \begin_layout Standard
19097 \begin_layout Plain Layout
19109 \begin_layout Subsubsection
19113 \begin_layout Standard
19114 二段以上の多段組みをする場合も同じようにできます。
19117 \begin_layout Standard
19121 \begin_layout Plain Layout
19125 begin{multicols}{3}
19133 \begin_layout Standard
19136 It can be imagined that my close intimacy with Sherlock Holmes had interested
19137 me deeply in crime, and that after his disappearance I never failed to
19138 read with care the various problems which came before the public.
19139 And I even attempted, more than once, for my own private satisfaction,
19140 to employ his methods in their solution, though with indifferent success.
19141 There was none, however, which appealed to me like this tragedy of Ronald
19143 As I read the evidence at the inquest, which led up to a verdict of willful
19144 murder against some person or persons unknown, I realized more clearly
19145 than I had ever done the loss which the community had sustained by the
19146 death of Sherlock Holmes.
19147 There were points about this strange business which would, I was sure,
19148 have specially appealed to him, and the efforts of the police would have
19149 been supplemented, or more probably anticipated, by the trained observation
19150 and the alert mind of the first criminal agent in Europe.
19151 All day, as I drove upon my round, I turned over the case in my mind and
19152 found no explanation which appeared to me to be adequate.
19153 At the risk of telling a twice-told tale, I will recapitulate the facts
19154 as they were known to the public at the conclusion of the inquest.
19157 \begin_layout Standard
19161 \begin_layout Plain Layout
19173 \begin_layout Standard
19174 三段組み以上も可能ですが、読みにくくなり実用的ではないでしょう。
19177 \begin_layout Subsubsection
19181 \begin_layout Standard
19182 カラムの中にカラムを入れることもできます。
19185 \begin_layout Standard
19189 \begin_layout Plain Layout
19193 begin{multicols}{2}
19201 \begin_layout Standard
19204 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
19205 at that time governor of one of the Australian colonies.
19206 Adair's mother had returned from Australia to undergo the operation for
19207 cataract, and she, her son Ronald, and her daughter Hilda were living together
19211 \begin_layout Standard
19215 \begin_layout Plain Layout
19219 begin{multicols}{2}
19227 \begin_layout Standard
19230 The youth moved in the best society--had, so far as was known, no enemies
19231 and no particular vices.
19232 He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
19233 had been broken off by mutual consent some months before, and there was
19234 no sign that it had left any very profound feeling behind it.
19235 For the rest {sic} the man's life moved in a narrow and conventional circle,
19236 for his habits were quiet and his nature unemotional.
19237 Yet it was upon this easy-going young aristocrat that death came, in most
19238 strange and unexpected form, between the hours of ten and eleven-twenty
19239 on the night of March 30, 1894.
19242 \begin_layout Standard
19246 \begin_layout Plain Layout
19258 \begin_layout Standard
19261 Ronald Adair was fond of cards--playing continually, but never for such
19262 stakes as would hurt him.
19263 He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
19264 It was shown that, after dinner on the day of his death, he had played
19265 a rubber of whist at the latter club.
19266 He had also played there in the afternoon.
19271 The evidence of those who had played with him-- Mr.
19272 Murray, Sir John Hardy, and Colonel Moran--showed that the game was whist,
19273 and that there was a fairly equal fall of the cards.
19274 Adair might have lost five pounds, but not more.
19275 His fortune was a considerable one, and such a loss could not in any way
19277 He had played nearly every day at one club or other, but he was a cautious
19278 player, and usually rose a winner.
19279 It came out in evidence that, in partnership with Colonel Moran, he had
19280 actually won as much as four hundred and twenty pounds in a sitting, some
19281 weeks before, from Godfrey Milner and Lord Balmoral.
19282 So much for his recent history as it came out at the inquest.
19285 \begin_layout Standard
19289 \begin_layout Plain Layout
19301 \begin_layout Standard
19302 より複雑な形でカラムの中にカラムを入れる例や、へッダのスペース、縦のカラムを分ける線の入れ方などの例は、ファイル
19304 examples/multicol.lyx
19309 \begin_layout Section
19311 \begin_inset OptArg
19314 \begin_layout Plain Layout
19323 \begin_layout Standard
19324 \begin_inset Flex CharStyle:Noun
19327 \begin_layout Plain Layout
19334 \begin_inset VSpace bigskip
19340 \begin_layout Standard
19342 \begin_inset Flex CharStyle:MenuItem
19345 \begin_layout Plain Layout
19351 段落環境での番号の付け方はアラビア数字で始まり、アルファベットの大文字で終わります。違う番号の付け方をしたい場合にはどうしたらいいのでしょうか。次の例を見てくだ
19355 \begin_layout LyX-Code
19365 \begin_layout LyX-Code
19375 \begin_layout LyX-Code
19385 \begin_layout LyX-Code
19395 \begin_layout Standard
19396 これは番号の付け方をまず大文字のローマ数字、次に大文字のアルファベット、アラビア数字、小文字のアルファベットにします。
19399 \begin_layout Standard
19400 前の例にはもう少しおまけがついていて、番号の後に点が入ります。例えば初めのレベルのレベルは
19401 \begin_inset Quotes eld
19405 \begin_inset Quotes erd
19408 のようになります。読みやすいように、番号の付け方を説明するのに<
19409 \begin_inset Quotes eld
19413 \begin_inset Quotes erd
19417 \begin_inset space ~
19421 \begin_inset Quotes erd
19425 \begin_inset Quotes erd
19429 \begin_inset space ~
19433 \begin_inset Quotes erd
19437 \begin_inset Quotes erd
19441 \begin_inset space ~
19445 \begin_inset Quotes eld
19449 \begin_inset Quotes erd
19452 >のような表示方法を使うことにしましょう。
19455 \begin_layout Standard
19456 例を見て分かるように、各々のネストのレベルにラベルコマンド
19462 \SpecialChar \ldots{}
19473 \SpecialChar \ldots{}
19478 があります。使うことのできる番号印刷用のコマンドは
19508 の5つでカウンタを一つ引数として取ります。これらの前または後ろに好きな文字を加えることができます。ただしスペースを加える必要はありません。
19511 \begin_layout Standard
19512 これらの機能を使った例をお見せしましょう。
19515 \begin_layout LyX-Code
19529 \begin_layout LyX-Code
19541 \begin_layout LyX-Code
19551 \begin_layout LyX-Code
19561 \begin_layout Standard
19563 \begin_inset Quotes eld
19567 \begin_inset Quotes erd
19571 \begin_inset space ~
19575 \begin_inset Quotes erd
19579 \begin_inset Quotes erd
19583 \begin_inset space ~
19587 \begin_inset Quotes erd
19591 \begin_inset Quotes erd
19595 \begin_inset space ~
19599 \begin_inset Quotes eld
19603 \begin_inset Quotes erd
19609 \begin_layout Section
19613 \begin_layout Standard
19614 \begin_inset Flex CharStyle:Noun
19617 \begin_layout Plain Layout
19624 \begin_inset VSpace bigskip
19630 \begin_layout Standard
19635 \begin_layout Plain Layout
19641 tmpfont}{cmr17 scaled 2500}{
19653 \begin_layout Standard
19658 \begin_layout Plain Layout
19669 hose of you who like the style of old books probably also like
19670 \begin_inset Quotes eld
19674 \begin_inset Quotes erd
19677 ---those large capital letters which begin each new chapter or section.
19681 \begin_layout Standard
19682 昔の本のスタイルが好きならこの例のように、dropped capitalsも多分好きでしょう。これは新しい章、または節が大きな大文字で始まるものです。これをLy
19683 X/LaTeXで実現するのは(少しはplain TeXを知る必要はありますが)簡単ですが、この節の初めのTeXモードを見てもらうと分かるように多くの仕事と繰り返
19687 \begin_layout Standard
19691 \begin_layout Plain Layout
19697 bigdrop{-1em}{3}{ptmri}{T}+
19702 こちらの方が簡単でしょう。CTANにある
19710 )パッケージを使えば簡単にこのような文字をあなたの文章に入れることができます。このパッケージは teTeXに含まれていないのでこの文章の中でお見せできませんが、
19711 この段落を新しい文章にコピーして、先頭の
19721 usepackage{dropcaps}
19723 を加えると、Times Roman ItalicのTが3行文の高さで余白に1emでた形で印刷されます(TeXが探せるディレクトリに
19727 があることを確認してください)。最初の引数は字下げの量です。この例では負ですから余白に突き出します。2番目の引数は行数で表した文字の高さです。3番目の引数はフォ
19728 ント名です。tfmファイルも持つ物なら何でも動きます(
19730 .../texmf/fonts/tfm
19732 ディレクトリで色々探してみてください)。私が気に入っているは
19736 で、これはdropped capital用に特にデザインされたドイツ文字のフォントです。4番目の引数が使う文字です。
19755 \begin_layout Section
19759 \begin_layout Standard
19760 \begin_inset Flex CharStyle:Noun
19763 \begin_layout Plain Layout
19770 \begin_inset VSpace bigskip
19776 \begin_layout Standard
19780 \begin_layout Plain Layout
19792 \begin_layout Standard
19796 \begin_layout Plain Layout
19805 \begin_layout Plain Layout
19819 \begin_layout Standard
19824 \begin_layout Plain Layout
19835 \begin_layout Plain Layout
19844 \begin_layout Plain Layout
19853 \begin_layout Plain Layout
19862 \begin_layout Plain Layout
19871 \begin_layout Plain Layout
19880 \begin_layout Plain Layout
19889 \begin_layout Plain Layout
19898 \begin_layout Plain Layout
19907 \begin_layout Plain Layout
19916 \begin_layout Plain Layout
19925 \begin_layout Plain Layout
19934 \begin_layout Plain Layout
19943 \begin_layout Plain Layout
19952 \begin_layout Plain Layout
19961 \begin_layout Plain Layout
19970 \begin_layout Plain Layout
19979 \begin_layout Plain Layout
19988 \begin_layout Plain Layout
19997 \begin_layout Plain Layout
20003 長方形の段落の形を変えたい場合があるでしょう。そういう場合は楽しいTeXコマンド
20009 を使いましょう。この例で分かるように適当に行の長さを設定することで好きな形の段落が作れます。馬鹿げているように見えるかもしれませんが、dropped
20010 capitalを最終調整したり、長方形ではない図のまわりを文章で囲ったりするのにこのような手作業が必要なのです。
20013 \begin_layout Standard
20014 \begin_inset VSpace bigskip
20021 parshape numlines #1indent #1length #2indent #2length \SpecialChar \ldots{}
20028 は段落をつくる行数です。その段落の本文がこれより短い場合はそこで終わり、長い場合には最後の行の定義がそれ以後も使われます。
20036 エントリは左余白からの字下げの量と、字下げされたところからの行の長さを指定します。この形は現在の段落にだけ適応されて、次の段落では通常の形にリセットされます。
20039 \begin_layout Standard
20043 \begin_layout Plain Layout
20055 \begin_layout Section
20059 \begin_layout Standard
20060 見てきたように、この節には有用な例も馬鹿げた例も入っています。たとえば、最後の節のように段落の形を変えることが必要な人がそれほどいるとは思えませんが、重要な点は
20061 、TeXやLaTeXでどのようにすればいいかを理解する気があれば、ほとんどすべてをLyXの中でできるということです。TeXは、すばらしく強力な組版システムであり
20062 、LyXはそれをバックエンドとして使用しているので、そのすべての力があなたの前に利用可能なのです。Happy LyXing!