1 #LyX 2.0 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 % used for multi-column text
42 % extra space for tables
43 \newcommand{\extratablespace}[1]{\noalign{\vskip#1}}
47 \options fleqn,bibliography=totoc,index=totoc,BCOR7.5mm,titlepage,captions=tableheading
48 \use_default_options false
54 \maintain_unincluded_children false
57 InsetLayout CharStyle:MenuItem
66 \newcommand*{\menuitem}[1]{{\sffamily #1}}
71 \language_package default
72 \inputencoding JIS-pLaTeX
76 \font_typewriter default
77 \font_default_family default
78 \use_non_tex_fonts false
85 \default_output_format default
87 \bibtex_command default
88 \index_command default
93 \pdf_author "LyXプロジェクトチーム"
94 \pdf_subject "LyX拡張機能取扱説明書"
95 \pdf_keywords "LyX、取扱説明書、文書化、拡張"
97 \pdf_bookmarksnumbered true
98 \pdf_bookmarksopen false
99 \pdf_bookmarksopenlevel 1
100 \pdf_breaklinks false
104 \pdf_pdfusetitle false
105 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue, pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
115 \paperorientation portrait
124 \paragraph_separation indent
125 \paragraph_indentation default
126 \quotes_language english
129 \paperpagestyle headings
130 \tracking_changes false
131 \output_changes false
141 \begin_inset Newline newline
145 \begin_inset Newline newline
158 \begin_layout Plain Layout
159 このファイルは主にRichard Heckによって管理されています。コメントをされたい場合や誤りを発見された場合には、LyX文書化メーリングリスト
160 \begin_inset Flex Code
163 \begin_layout Plain Layout
167 <lyx-docs@lists.lyx.org>
172 に英文にてお知らせ下さい。この文書の翻訳は、当初人見光太郎氏が行った貢献に基づいています。
180 \begin_layout Standard
181 \begin_inset CommandInset toc
182 LatexCommand tableofcontents
189 \begin_layout Chapter
193 \begin_layout Standard
202 』の第二部です。この文書を別部とした理由は、単純に『
210 』が、ほとんどの文書を作成する上で必要な基本機能をすべて説明してしまっているためです。一方で、LyXプロジェクトチームは、LyXを各設定ファイルと外部パッケージ
211 によって拡張可能な状態にしておくことを長期的な目標にしています。つまり、あるLaTeXパッケージをサポートしたい場合に、LyX自身に変更を加えることなく、当該パ
212 ッケージ用のレイアウトファイル(ないしモジュール)を作成すればいいようにしているのです。すでにこのような形で、いくつもの新機能がユーザーによって追加されています
213 。この取扱説明書は、そのような形での貢献を文書化する冊子として位置付けられています。
216 \begin_layout Standard
217 この取扱説明書では、ファックスのサポート・バージョン管理・SGMLサポートのような、正しく機能するためには追加的なソフトウェアを必要とする特殊機能についても説明
218 しています。さらに、LaTeXの強力な機能を直接使って文書を美しく仕上げるための、LaTeXツールやテクニックを述べた章も収録しています。つきつめれば、LyXと
219 はあくまでWYSIWYMたることを企図しているため、LaTeXの全機能の一部へのインタフェースは用意するものの、すべてを用意することはないでしょう。
222 \begin_layout Standard
227 』をお読みでなかったら、この取扱説明書から読みはじめるのは誤りです。『
231 』には、全取扱説明書に共通の表記法と書式が説明されていますので、まずそれからお読みください。さらに、この取扱説明書を読もうとする前に、『
235 』をよくお読みになって、LyXの全基本機能を習得してください。
238 \begin_layout Standard
239 この取扱説明書の取り上げられている話題は、LyXがLaTeXにどう関わっているかに強く関係していますので、まず次章では、LyXの内部動作がどうなっているか、Ly
240 Xに希望するLaTeXコードを正確に生成させるにはどうしたらいいかを収録しています。本章は、あきらかに熟練LyXユーザー向けの章となっています。
243 \begin_layout Chapter
247 \begin_layout Section
251 \begin_layout Standard
261 は、TeX熟練者とLaTeXに興味のある方向けの章です。ここでは、LyXとLaTeXが、印刷可能な出力を生成するのに、どのように協働しているのかを説明します。全
262 取扱説明書中で本章だけは、LaTeXのことを多少なりともご存知であることを前提とします。
265 \begin_layout Standard
293 なフロントエンド」と呼ばれていましたが、いまではこれは正しくありません。LaTeXのフロントエンドは、いくつも出回っています
297 \begin_layout Plain Layout
307 有名なものとしては、Linux上のTeXmakerとkile、OSX上のTeXshopなどがあります。もちろんviとemacsのLaTeXモードも含まれます。
312 。これらは、基本的にLaTeXを走らせる機能を有し、編集中のファイルのエラーを表示する機能を持ったテキストエディタです。LyXも、エディタであり、LaTeXを走
313 らせる機能を有し、ファイル中のエラーを指摘しますが、それ以上にもっともっと多くのことをしてくれます。
331 LyXを効果的に使うのに、LaTeXの知識が必要とされないことが挙げられます。またLyXは、それ自身、いくつかの拡張をLaTeXに加えています。時間のあるときに
332 でも、いちど以下の手順を試してみてください。まず
342 \begin_inset Flex MenuItem
345 \begin_layout Plain Layout
372 \begin_inset Flex MenuItem
375 \begin_layout Plain Layout
378 エクスポート\SpecialChar \menuseparator
403 \begin_inset Flex MenuItem
406 \begin_layout Plain Layout
409 表示\SpecialChar \menuseparator
425 \begin_inset Flex Code
428 \begin_layout Plain Layout
436 ファイルのプリアンブルをご覧ください。LyXによって特別に定義された新しいマクロが複数定義されていることに気づかれるはずです
445 。これらのマクロは、文書中で使用する機能に応じて、自動的に定義されます。
448 \begin_layout Standard
458 自動的にLaTeXを実行するコマンドが、以下のようにいくつかあります。
461 \begin_layout Itemize
462 \begin_inset Flex MenuItem
465 \begin_layout Plain Layout
468 表示\SpecialChar \menuseparator
479 \begin_layout Itemize
482 \begin_inset Flex MenuItem
485 \begin_layout Plain Layout
488 表示\SpecialChar \menuseparator
489 更新\SpecialChar \menuseparator
500 \begin_layout Itemize
503 \begin_inset Flex MenuItem
506 \begin_layout Plain Layout
511 \SpecialChar \menuseparator
522 \begin_layout Itemize
525 \begin_inset Flex MenuItem
528 \begin_layout Plain Layout
533 \SpecialChar \menuseparator
544 \begin_layout Standard
554 これらは、最後にLaTeXを実行してからファイルに変更が加えられた場合のみ、LaTeXを実行します。
557 \begin_layout Standard
567 LyXが編集中のファイルをLaTeXにかけるとき、LyXは以下の段階をふみます。
570 \begin_layout Enumerate
580 文書をLaTeXに変換し、ファイルの拡張子を
581 \begin_inset Flex Code
584 \begin_layout Plain Layout
600 \begin_inset Flex Code
603 \begin_layout Plain Layout
621 \begin_layout Enumerate
632 \begin_inset Flex Code
635 \begin_layout Plain Layout
650 ファイルに対して(必要に応じて複数回)LaTeXを実行し、LaTeXファイルをコンパイルするのに必要な他のコマンド(
651 \begin_inset Flex Code
654 \begin_layout Plain Layout
670 \begin_inset Flex Code
673 \begin_layout Plain Layout
691 \begin_layout Enumerate
704 \begin_layout Standard
724 \begin_inset Flex MenuItem
727 \begin_layout Plain Layout
730 表示\SpecialChar \menuseparator
745 を使用して実行した場合には、LyXはこの後、DVIビューアを実行してDVIファイルを表示します。
746 \begin_inset Flex MenuItem
749 \begin_layout Plain Layout
759 表示\SpecialChar \menuseparator
765 を使用した場合には、LyXはさらに以下の段階をふみます。
768 \begin_layout Itemize
778 \begin_inset Flex Code
781 \begin_layout Plain Layout
819 \begin_layout Itemize
829 \begin_inset Flex Code
832 \begin_layout Plain Layout
840 などのPostScript®ビューアを実行して、PostScript®
852 \begin_layout Standard
853 LyXは、他の書式を表示したりエクスポートしたりする際にも、同様のことを行います。
856 \begin_layout Section
860 \begin_layout Standard
864 \begin_inset Flex MenuItem
867 \begin_layout Plain Layout
870 ファイル\SpecialChar \menuseparator
871 インポート\SpecialChar \menuseparator
886 コマンドを使用すると、LaTeXファイルを
902 LyXにインポートすることができます。このコマンドは、
912 \begin_inset Flex Code
915 \begin_layout Plain Layout
942 \begin_inset Flex Code
945 \begin_layout Plain Layout
956 \begin_inset Flex Code
959 \begin_layout Plain Layout
967 を生成します。LyXは、この変換したファイルを開きます
971 \begin_layout Plain Layout
972 \begin_inset Flex Code
975 \begin_layout Plain Layout
981 は、もちろんコマンドラインから実行することもできます。
989 \begin_layout Standard
992 \begin_inset Flex Code
995 \begin_layout Plain Layout
1012 は、文法的に正しいLaTeXファイルのほとんどを変換することができますが、すべてを変換できるわけではありません。
1022 \begin_inset Flex Code
1025 \begin_layout Plain Layout
1042 は、理解不能な部分はTeXコードボックスの形で残しますので、ファイルを
1052 \begin_inset Flex Code
1055 \begin_layout Plain Layout
1072 で変換したのち、TeXコードボックスを探して、手動で正しく編集してください。
1075 \begin_layout Standard
1085 TeXコードボックスがなにかご存じなければ、次節をお読みください。
1088 \begin_layout Section
1090 \begin_inset CommandInset label
1092 name "sec:LaTeXコードを挿入する"
1099 \begin_layout Standard
1109 どのLyX文書にもつねにTeXコードを挿入することが可能であるというきわめて単純な理由によって、LaTeXにできることは、つねにLyXでも行うことができます。一
1110 方、LyXは、すべてのLaTeX構成物をLyX内に表示できるわけではなく、将来的にもそうならないでしょう。かりにLaTeXコマンドをLyX文書に挿入する必要が出
1112 \begin_inset Flex Code
1115 \begin_layout Plain Layout
1140 \begin_inset Flex MenuItem
1143 \begin_layout Plain Layout
1146 挿入\SpecialChar \menuseparator
1164 \begin_layout Standard
1165 以下は、LaTeXコマンドをLyX文書中に挿入する例です。コードは以下のようになっているとしましょう。
1168 \begin_layout LyX-Code
1172 \begin_inset Newline newline
1177 begin{minipage}{5cm}
1178 \begin_inset Newline newline
1182 \begin_inset Newline newline
1186 \begin_inset Newline newline
1190 \begin_inset Newline newline
1194 \begin_inset Newline newline
1198 \begin_inset Newline newline
1204 \begin_inset Newline newline
1208 \begin_inset Newline newline
1213 begin{minipage}{5cm}
1214 \begin_inset Newline newline
1220 \begin_inset Newline newline
1225 begin{minipage}{5cm}
1226 \begin_inset Newline newline
1231 \begin_inset Newline newline
1237 \begin_inset Newline newline
1243 \begin_inset Newline newline
1249 \begin_inset Newline newline
1257 \begin_layout LyX-Code
1261 \begin_layout Standard
1263 \begin_inset Flex Code
1266 \begin_layout Plain Layout
1272 ボックスが、この段落の直後にあります。この取扱説明書をLyX上でご覧になっていれば、TeXコード差込枠のみが見えるはずです。印刷した取扱説明書をご覧であれば、実
1276 \begin_layout Standard
1280 \begin_layout Plain Layout
1287 \begin_layout Plain Layout
1291 begin{minipage}{5cm}
1294 \begin_layout Plain Layout
1296 これは、ミニページ環境の例です。これには、(フロートでない)図表を含め、ほとんど何でも入れることができます。
1301 \begin_layout Plain Layout
1306 \begin_layout Plain Layout
1310 begin{minipage}{5cm}
1313 \begin_layout Plain Layout
1320 \begin_layout Plain Layout
1324 begin{minipage}{5cm}
1327 \begin_layout Plain Layout
1335 \begin_layout Plain Layout
1342 \begin_layout Plain Layout
1349 \begin_layout Plain Layout
1361 \begin_layout Standard
1371 TeXコードを使用する方法に加えて、複雑なLaTeXコードを含む部分を別ファイルとして作成しておき、そのファイルをインクルードするのに
1372 \begin_inset Flex MenuItem
1375 \begin_layout Plain Layout
1385 挿入\SpecialChar \menuseparator
1386 ファイル\SpecialChar \menuseparator
1392 を使用する方法もあります(取り込みの型として
1393 \begin_inset Flex Code
1396 \begin_layout Plain Layout
1411 を選択しなくてはなりません)。この方法をとる場合には、.texファイルが正しく動作することが
1429 場合のみに限った方がよいでしょう。さもないと、LaTeXエラーを追跡するたいへんな作業を行わなくてはならなくなります。
1432 \begin_layout Standard
1442 最後に、いくつか強調しておくべきことがあります。
1445 \begin_layout Itemize
1455 LyXは、あなたのLaTeXコードが正しいかどうかを
1476 \begin_layout Itemize
1486 車輪の再発明をしないようにご注意ください。
1489 \begin_layout Standard
1499 二番目の点に関して、LyXはひじょうにたくさんの機能を装備しており、その数は増えつづけています。ご自身でLaTeXコードを書かなくてはならないと思い込む前に、L
1500 yXがこれこれの機能をもっていないことを、取扱説明書で確実に確かめてください。さらに世の中には、封筒のラベルから美しい複数ページにわたる表を作るものまで、ありと
1501 あらゆることを行う膨大な数のLaTeXパッケージが存在します。
1511 \begin_inset CommandInset href
1514 target "http://www.ctan.org/"
1528 \begin_inset CommandInset ref
1530 reference "chap:Special-features"
1537 \begin_layout Standard
1547 もし、文書中で例外的に手の込んだことをなさりたければ、かならず良いLaTeX関連書籍を参考とするようにしてください。『
1565 』の参考文献に多くのLaTeX関連書籍が引用されています。
1568 \begin_layout Section
1572 \begin_layout Subsection
1576 \begin_layout Standard
1586 すでにLaTeXについてご存知であれば、ここでプリアンブル(前置文)が何に向いているか説明する必要はないでしょう。もしご存じなければ、以下の説明で大まかな理解は
1587 得られるはずです。詳しくはLaTeX関連書籍をご参照ください。いずれにしても、以下でLyX文書のLaTeXプリアンブルで何ができるか、または何をする必要がないか
1588 説明をしますので、以下の各要点はお読みになった方が良いでしょう。
1591 \begin_layout Standard
1601 LaTeXプリアンブルは、LaTeX文書のいちばん始め、本文の
1619 の部分に来ます。ここでは以下のことを行います。
1622 \begin_layout Itemize
1632 文書クラス(ドキュメントクラス)の宣言。
1633 \begin_inset Newline newline
1636 これはLyXがすでに行ってくれています。もしあなたが熟達したLaTeX使いであり、自作の文書クラスを使いたい場合には、取扱説明書『
1654 』をご覧になれば、LyXに自作文書クラスへの仲介を行わせるにはどうすればよいかの情報があります。
1657 \begin_layout Itemize
1668 \begin_inset Newline newline
1671 LaTeXパッケージは、パッケージがプリアンブルで宣言された場合のみ、文書中で利用可能となる、追加コマンド群を提供します。例えば
1690 \begin_inset Flex Code
1693 \begin_layout Plain Layout
1701 パッケージは、すべての段落の最初の行を字下げします。他にも、ラベルや宛名書き、余白設定等の様々なパッケージがあります。
1704 \begin_layout Itemize
1715 \begin_inset Newline newline
1718 LaTeXのカウンタと変数の中には、プリアンブルでグローバルに
1738 、望んだ効果を持たないものがあります。(文書中で設定したり再設定したりすることのできる変数もあります。)余白は、プリアンブルで設定しなくてはならない変数の代表例
1739 です。他には、箇条書きに付けるラベル書式が挙げられます。じつは、この設定は文書中どこでもできるのですが、プリアンブルでいちどだけ設定するのが望ましい方法です。
1742 \begin_layout Itemize
1753 \begin_inset Flex Code
1756 \begin_layout Plain Layout
1774 \begin_inset Flex Code
1777 \begin_layout Plain Layout
1795 \begin_inset Newline newline
1798 ユーザー定義コマンドは、文書中で頻出するLaTeXコマンドの短縮形です。このようなコマンドを宣言するには、プリアンブルが適した場所ですが、どこで宣言することも
1816 です(もちろんコマンドが初めて使用される場所よりも前です)。あまりないことではありますが、お使いの文書中に生のLaTeXコードがあふれている場合には便利でしょう
1820 \begin_layout Standard
1831 \begin_inset Flex Code
1834 \begin_layout Plain Layout
1849 ファイルのプリアンブルに、それ自身の定義を追加します。これによって、LyXの生成するLaTeXファイルの可搬性を高めています。
1852 \begin_layout Subsection
1856 \begin_layout Standard
1866 LyXがLaTeXファイルのプリアンブルに追加するコマンドは、つねに同じです。これは、LyX自体にパッチを当てないかぎり変更できないようになっています。しかしな
1868 \begin_inset Flex MenuItem
1871 \begin_layout Plain Layout
1881 文書\SpecialChar \menuseparator
1888 \begin_inset Flex MenuItem
1891 \begin_layout Plain Layout
1906 の項から、プリアンブルに追加をすることはできます。LyXは、
1916 \begin_inset Flex MenuItem
1919 \begin_layout Plain Layout
1936 ダイアログ内のすべてのものを、LyX埋込みのプリアンブルに付け加えます。ご自身の宣言をプリアンブルに追加する前に、あなたがしようとしていることをLyXがすでにサ
1937 ポートしていないかどうか確認してください(車輪の再発明をしないように、とはすでに申しあげたことです)。
1948 プリアンブルコードが正しいことを確認してください。
1950 LyXは、プリアンブルをチェックしません。
1960 \begin_inset Flex Code
1963 \begin_layout Plain Layout
1980 」といったエラーが出ることでしょう。このようなエラーが出たときは、プリアンブルを再確認してください。
1983 \begin_layout Subsection
1987 \begin_layout Standard
1997 以下は、プリアンブルに追加できるものとその効果を示す例です。
2000 \begin_layout Subsubsection
2004 \begin_layout Standard
2033 \begin_inset Flex Code
2036 \begin_layout Plain Layout
2056 \begin_inset Flex Code
2059 \begin_layout Plain Layout
2078 というページ位置を制御する2つの変数があります。その機能は名前から明らかなとおりです。これらの変数は、ラベルを印刷するときなどに便利です。往々にして、印刷用紙の
2079 寸法とそのうち実際に印字可能な範囲は同じではありません。ここに
2080 \begin_inset Flex Code
2083 \begin_layout Plain Layout
2103 \begin_inset Flex Code
2106 \begin_layout Plain Layout
2121 \begin_layout Standard
2131 \begin_inset Flex Code
2134 \begin_layout Plain Layout
2154 \begin_inset Flex Code
2157 \begin_layout Plain Layout
2176 の既定値はともに0ポイント、つまりページをシフトしません。残念ながら、DVIドライバによってはつねにページをシフトすることがあるようです。我々には、どうしてその
2177 ようなことをするのか、そしてシスアドがどうしてそれを修正しないのか理解できませんが、もし個人的に管理できないシステムでLyXを使用していて、シスアドがお馬鹿さん
2179 \begin_inset Flex Code
2182 \begin_layout Plain Layout
2202 \begin_inset Flex Code
2205 \begin_layout Plain Layout
2224 が役に立ちます。かりに、上余白と左余白がつねに0.5インチずつ大きすぎるものとしましょう。その場合は、以下をプリアンブルに追加するとよいでしょう。
2227 \begin_layout LyX-Code
2235 \begin_layout LyX-Code
2243 \begin_layout Standard
2256 \begin_layout Subsubsection
2260 \begin_layout Standard
2270 いま、たくさんの宛名ラベルを印刷をしたいものとしましょう。ラベルシートを印刷するために便利な
2271 \begin_inset Flex Code
2274 \begin_layout Plain Layout
2282 というLaTeXパッケージが、お近くのCTANアーカイブで入手可能です。お使いのシステムには、既定ではこのパッケージは導入されていないかもしれません。ご自身でお
2283 確かめください。また、このパッケージの取扱説明書を読まれたいかもしれませんが、それもご自身にお任せします。これは使用例ですので、このパッケージをどう使うかの例だ
2287 \begin_layout Standard
2298 \begin_inset Flex Code
2301 \begin_layout Plain Layout
2309 文書クラスを使用していることをご確認ください。次に、以下のような設定をプリアンブルに追加しなければなりません。
2312 \begin_layout LyX-Code
2318 \begin_layout LyX-Code
2324 \begin_layout LyX-Code
2330 \begin_layout LyX-Code
2336 \begin_layout LyX-Code
2342 \begin_layout LyX-Code
2348 \begin_layout LyX-Code
2354 \begin_layout Standard
2373 Avery®ラベルシートのストック5360
2382 番を使用する場合の設定です。これで、各宛名を
2383 \begin_inset Flex Code
2386 \begin_layout Plain Layout
2406 \begin_inset Flex Code
2409 \begin_layout Plain Layout
2428 で囲めば、宛名ラベルの印刷をすることができます。本機能およびその他の機能に関しては、
2429 \begin_inset Flex Code
2432 \begin_layout Plain Layout
2443 \begin_layout Standard
2453 そのうち誰かが、このパッケージを直接サポートするLyXレイアウトファイルを作ってくれるかもしれません。その誰かはあなたかもしれません。
2456 \begin_layout Subsubsection
2460 \begin_layout Standard
2490 段落の最初の行を字下げするように教育されています。そのために彼らの他の変な習慣と同じく、いつものようにすべての段落の最初の行を下げるまで、アメリカ人はごちゃごち
2507 \begin_layout Standard
2517 もちろん、これは標準的な組版ルールではありません。書籍では、典型的には、他の段落のあとにくる段落
2535 字下げを行ないます。一行めを字下げをするそもそもの目的は、隣接する段落から区別するためです。したがって、図のあとや節の最初の段落など、先行する段落がない場合には
2539 \begin_layout Standard
2549 けれどもあなたが典型的なアメリカ人なら(ユーーモアですって!)、そのような小難しいことはかまわずに、いつもどおりの字下げをせずにはいられないでしょう!プリアンブ
2553 \begin_layout LyX-Code
2556 usepackage{indentfirst}
2559 \begin_layout Standard
2569 もしお使いのTeX頒布版が脳死状態でなければ、このパッケージが入っているはずなので、建国の父たちが意図したように、すべての段落が字下げされます。
2572 \begin_layout Subsubsection
2576 \begin_layout Standard
2586 この文書のプリアンブルを見てみると、どのような高度な設定ができるか、おおまかな理解が得られるでしょう。また第
2596 \begin_inset CommandInset ref
2598 reference "chap:Special-features"
2611 章には、他の例や、LaTeXの各種の「汚い技」があります。
2614 \begin_layout Section
2618 \begin_layout Standard
2628 LyXがLaTeXを呼び出す際、LyXはLaTeXに、かりにエラーがあったとしても楽観的に無視して先に進むように指示します。その後LyXは、LaTeXの実行ログ
2629 ファイルを事後処理用に使います。ログファイルを分析したのち、LyXはエラーを一覧表示するダイアログを表示します。エラーのうちどれかをクリックすると、LyXファイ
2630 ル中、そのエラーの発生した場所に表示を移動します
2634 \begin_layout Plain Layout
2644 正確にいうと、通常は、です。ログファイルの分析は難しい仕事ですので、LyXはつねに正しい行に連れて行ってくれるとは限りません。ときには、LaTeXがある行にエラ
2645 ーがあると報告したとしても、実際のエラーはそれよりも前であることもあります。これは、プログラムで閉じ括弧を忘れたときに似ていなくもありません。エラーは表示されま
2646 すが、実際にエラーのある場所よりも後ろでエラーが報告されるのです。
2663 \begin_layout Standard
2673 人によっては、ログファイルを直接ご覧になりたいかもしれません。これは、
2674 \begin_inset Flex MenuItem
2677 \begin_layout Plain Layout
2687 文書\SpecialChar \menuseparator
2693 で見ることができます。エラーメッセージや警告には、よく見かけるものがいくつかありますので、それらをここに収録しておきます。ここにないエラーや警告に関しては、La
2697 \begin_layout Itemize
2700 \begin_inset Flex Code
2703 \begin_layout Plain Layout
2721 \begin_inset Newline newline
2724 これで始まるメッセージは、LaTeXコード自体を「デバッグ」するための警告メッセージです。相互参照や参考文献を追加したり変更した場合に、もう一度LaTeXを実行
2725 する必要があることを知らせるために、このようなメッセージが表示されます。このメッセージは、だいたいにおいて無視しても大丈夫です。
2728 \begin_layout Itemize
2731 \begin_inset Flex Code
2734 \begin_layout Plain Layout
2752 \begin_inset Newline newline
2755 LaTeXがフォントを見つけられなかったと言う警告メッセージです。多くの場合、このメッセージの後に、LaTeXが使用した代替フォントに関する情報が続きます。これ
2759 \begin_layout Itemize
2769 \begin_inset Flex Code
2772 \begin_layout Plain Layout
2783 \begin_inset Newline newline
2804 この警告を吐き出します。これは、一行が長すぎて右余白にはみ出してしまったという警告ですが、ほとんどの場合、最終出力を見ても判別できないくらい(せいぜい1ポイント
2805 か2ポイント)です。あるいは1文字か2文字右余白に出ているくらいです。LaTeXは、どんな文書を書いても、少なくとも一つはこのメッセージを出すようです。
2806 \begin_inset Newline newline
2809 このメッセージは無視しても大丈夫です。何か行が長すぎるような問題があれば、目で見ればわかります。出力を目で確認してください
2813 \begin_layout Plain Layout
2815 \begin_inset Flex MenuItem
2818 \begin_layout Plain Layout
2819 文書\SpecialChar \menuseparator
2825 で「draft」オプションを指定する方法もあります。こうすると、LaTeXは、overfullの発生した行の余白に黒い四角を描画します。
2833 \begin_layout Itemize
2836 \begin_inset Flex Code
2839 \begin_layout Plain Layout
2850 \begin_inset Newline newline
2862 これは上の警告と違ってあまり出てきません。なぜだかは分かりませんが、LaTeXは1行を短めにする印字するよりは、長めにする方が好きなようです。
2865 \begin_layout Itemize
2866 \begin_inset Flex Code
2869 \begin_layout Plain Layout
2882 \begin_inset Flex Code
2885 \begin_layout Plain Layout
2898 \begin_inset Newline newline
2910 ページ区切りに問題があったという警告です。この場合も、出力を目で確認してください。何か問題があれば、見てすぐわかります。
2913 \begin_layout Itemize
2916 \begin_inset Flex Code
2919 \begin_layout Plain Layout
2923 \begin_inset Quotes els
2927 \begin_inset Quotes ers
2945 \begin_inset Newline newline
2948 ファイル「Xxxx」が、システムに導入されていません。これは通常、文書が必要としているLaTeXパッケージに、導入済でないものがある場合に現れます。プリアンブル
2950 \begin_inset Flex Code
2953 \begin_layout Plain Layout
2963 コマンドも使用していないとすれば、LyXが読み込もうしているパッケージに存在しないものがあるということです。
2973 \begin_inset Flex MenuItem
2976 \begin_layout Plain Layout
2977 ヘルプ\SpecialChar \menuseparator
2992 を使用して、LyXが認識しているパッケージの一覧を得てください。このファイルは、(
2993 \begin_inset Flex MenuItem
2996 \begin_layout Plain Layout
3006 ツール\SpecialChar \menuseparator
3012 を使用して)LyXの再設定を行うたびに更新され、どのパッケージが検出されたか、それらのパッケージが何をするものかを表示します。
3013 \begin_inset Newline newline
3026 \begin_inset Flex Code
3029 \begin_layout Plain Layout
3048 コマンドを使っていて、肝心のパッケージが導入されていない場合には、ご自身で導入する必要があります。
3051 \begin_layout Itemize
3054 \begin_inset Flex Code
3057 \begin_layout Plain Layout
3060 LaTeX Error: Unknown option
3075 \begin_inset Newline newline
3078 このように始まるエラーメッセージは、パッケージに誤ったあるいは未定義のオプションが指定されていることを伝えようとするものです。パッケージの取扱説明書をご確認くだ
3082 \begin_layout Itemize
3085 \begin_inset Flex Code
3088 \begin_layout Plain Layout
3091 Undefined control sequence
3106 \begin_inset Newline newline
3109 お使いの文書にLaTeXコードを挿入した際、打ち間違いをしてしまうと、このようなメッセージが表示されます。あるいは、パッケージを読み込ませるのを忘れたのかもしれ
3110 ません。いずれにしても、このメッセージは、あなたが未定義のコマンドを使用したことを示しています。
3113 \begin_layout Standard
3123 これ以外にも、エラーメッセージや警告メッセージがあります。一般に、読んで意味がすぐにわかるものは、LaTeXのメッセージです。何を言っているのかさっぱりわからな
3124 いものもありますが、通常これらは、TeXのメッセージであり、それが何を意味しているのか、どのように解読すればいいのか、
3142 手がかりがありません。誰もわからないのです。
3145 \begin_layout Standard
3155 エラーメッセージが表示された場合は、つねに以下のチェックリストにしたがった方がよいでしょう。
3158 \begin_layout Enumerate
3168 ご自分で挿入したLaTeXコードに打ち間違いがないかどうか確かめる。
3171 \begin_layout Enumerate
3181 打ち間違いがなければ、コマンドを正しく使ったかどうか確かめる。
3184 \begin_layout Enumerate
3194 文書のもっともはじめの部分にエラーボックスが多数積み上がった場合には---特に
3195 \begin_inset Flex Code
3198 \begin_layout Plain Layout
3215 が表示されているならば---、プリアンブルにエラーがあることを意味します。プリアンブルのデバックを行ってください。
3218 \begin_layout Enumerate
3228 プリアンブルに何も追加せず、文書にLaTeXコードをまったく挿入しなかった場合には、LaTeX頒布版自体をまず疑ってください。導入されていないパッケージを探しだ
3232 \begin_layout Enumerate
3242 導入されていないパッケージはなかったものとしましょう。LyXを微調整するオプションを使用していますか。特に、手動で
3243 \begin_inset Flex Code
3246 \begin_layout Plain Layout
3250 \begin_inset space ~
3259 \begin_inset Flex Code
3262 \begin_layout Plain Layout
3280 \begin_inset Flex Code
3283 \begin_layout Plain Layout
3300 などをたくさん挿入するなど、微調整オプションを
3318 していませんか。適切な段落環境を使用する代わりに、これらを使用してその場をしのごうとしていませんか。
3321 \begin_layout Enumerate
3331 微調整オプションはまったく使用しておらず、規則に乗っ取って作業していたものとしましょう。何か曲芸のようなことをしようとはしていませんか。数式や表中で、たとえば表
3332 のセルに図を入れるなど、おかしなことをしようとしていませんか。
3335 \begin_layout Enumerate
3336 LaTeXが改行位置を見つけられないほど長い一節がありませんか。既定では、改行するために単語間に空白をたくさん追加することを、LaTeXはかなり嫌います。可能で
3337 あれば、問題が生じないように段落を修正するのが望ましいでしょう。それが難しければ、LaTeXが改行しやすく(sloppy)なるように、その部分を
3340 \begin_inset Flex Code
3343 \begin_layout Plain Layout
3358 \begin_layout Enumerate
3368 入れ子の階層を深くしすぎていませんか。LyXは、(今のところ)環境の入れ子の階層が制限内にあるかチェックしません。かりに、環境を17段の入れ子にしたりしていたら
3369 、それが原因です(LaTeXの上限は5段です)。
3372 \begin_layout Enumerate
3382 エラーメッセージは発生しないけれども、出力がひどいものとしましょう。図表が幅が広すぎたり長すぎてページに収まらない場合には、
3386 \begin_layout Enumerate
3399 \begin_layout Enumerate
3412 \begin_layout Standard
3426 \begin_layout Enumerate
3427 他に出力におかしいところがあり、曲芸をやろうとしたり微調整オプションでしのごうとしたりはしていないとすれば、何がおかしいのか確定的なことは言えません。
3430 \begin_layout Standard
3458 LyXのバグを発見したのかもしれません‥‥。
3461 \begin_layout Chapter
3465 \begin_layout Section
3466 BibTeXによる参照文献のカスタマイズ
3469 \begin_layout Standard
3478 の節に説明があります。以下の各小節では、LyXでサポートされている参考文献の特別な機能について説明することとします。
3481 \begin_layout Subsection
3485 \begin_layout Standard
3486 標準のBibTeXは、引用された著作を参照するのに、([12]のように)数字を使用します。しかし、多くの科学分野で、これとは異なる引用様式が用いられています。も
3487 っともよく見られるのは、著者-出版年様式(例:Knuth 1984a)です。LyXは、この様式を提供する2つのパッケージ
3488 \begin_inset Flex Code
3491 \begin_layout Plain Layout
3498 \begin_inset Flex Code
3501 \begin_layout Plain Layout
3507 をサポートしています。これらのパッケージには、それぞれ長所短所がありますが、ここでは詳細に立ち入る紙幅がありません。単純な著者-出版年様式(あるいは著者-番号)
3509 \begin_inset Flex Code
3512 \begin_layout Plain Layout
3518 用スタイルファイルのうちどれかを使用したい場合には、定評のある
3519 \begin_inset Flex Code
3522 \begin_layout Plain Layout
3528 パッケージがおそらくよい選択でしょう。短縮タイトルによる参照や
3533 \begin_inset Flex Code
3536 \begin_layout Plain Layout
3542 パッケージの利用を考えるとよいかもしれません。
3545 \begin_layout Standard
3546 LyXでの両パッケージの取扱い方は、ほぼ同じです。
3547 \begin_inset Flex MenuItem
3550 \begin_layout Plain Layout
3551 文書\SpecialChar \menuseparator
3558 \begin_inset Flex MenuItem
3561 \begin_layout Plain Layout
3568 \begin_inset Flex MenuItem
3571 \begin_layout Plain Layout
3578 \begin_inset Flex MenuItem
3581 \begin_layout Plain Layout
3587 オプションを選択してください。これらのパッケージによって、引用ダイアログに機能が追加され、参照の様式が選択できるようになります(「Knuth 1984」、「Kn
3588 uth (1984)」、「Knuth, 1984」、「1984」など)。両パッケージは、専用にデザインされたスタイルファイルを必要とすることに注意してください。
3589 両者ともそれ自身のスタイルファイルを同梱していますが、他にもたくさんの追加スタイルファイルがありますし、
3590 \begin_inset Flex Code
3593 \begin_layout Plain Layout
3599 に至っては、対話的なスタイルファイルビルダーさえ存在します
3603 \begin_layout Plain Layout
3604 \begin_inset Flex URL
3607 \begin_layout Plain Layout
3609 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/
3622 \begin_layout Subsection
3626 \begin_layout Standard
3627 場合によっては、参考文献をいくつかの節に分ける必要があることがあります。たとえば、あなたが歴史家であるとすれば、出典と学術文献を分ける機能は、おそらく「必需品」
3628 でさえあります。残念ながら、BibTeX自身ではこのようなことができません。しかし、適切なLaTeXパッケージの助けを借りると、BibTeXをこのような必要性を
3632 \begin_layout Standard
3633 LyXは、このようなパッケージの一つである
3634 \begin_inset Flex Code
3637 \begin_layout Plain Layout
3647 \begin_layout Plain Layout
3648 \begin_inset Flex URL
3651 \begin_layout Plain Layout
3653 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/
3663 をそのままでサポートします。このパッケージの長所は、(
3664 \begin_inset Flex Code
3667 \begin_layout Plain Layout
3673 のような他のパッケージと比較すると)新規の引用コマンドを定義する必要がないことです。そのかわりに、参考文献の違う節には、その節向けの項目を収録した別の参考文献デ
3674 ータベースを用意する必要があります。たとえば、参考文献を「出典」の節と「学術文献」の節に分けたい場合には、それぞれの参考文献データベース、たとえば
3675 \begin_inset Flex Code
3678 \begin_layout Plain Layout
3685 \begin_inset Flex Code
3688 \begin_layout Plain Layout
3697 \begin_layout Standard
3698 \begin_inset Flex MenuItem
3701 \begin_layout Plain Layout
3702 文書\SpecialChar \menuseparator
3709 \begin_inset Flex MenuItem
3712 \begin_layout Plain Layout
3719 \begin_inset Flex MenuItem
3722 \begin_layout Plain Layout
3728 をチェックしてください。すると、参考文献の各節に一つずつ、複数の参考文献を挿入することができます。上記の例では、BibTeX参考文献
3729 \begin_inset Flex Code
3732 \begin_layout Plain Layout
3739 \begin_inset Flex Code
3742 \begin_layout Plain Layout
3748 を挿入します。各節に同じスタイルを用いるか異なるスタイルを用いるかは自由です。くわえて、参考文献の節に、指定したデータベースの「引用されたすべての参照」を載せる
3749 (これが既定です)か、「引用されなかったすべての参照」を載せるか、あるいは「すべての参照」を載せるかを選択することができます。これは、もし参考文献を「本文に引用
3750 された出典」・「本文に引用されていない出典」・「学術文献」の三つの節に分割したい場合に、便利でありましょう。各節の見出しは、通常の節や小節として入れることができ
3752 \begin_inset Flex Code
3755 \begin_layout Plain Layout
3761 は、参考文献用の見出しを取り除いてしまいますので、手動でこれを追加しなくてはなりません(たとえば章*や節*などをお使いください)。
3764 \begin_layout Subsection
3768 \begin_layout Standard
3769 文書の節ごとあるいは章ごとの参考文献など、複数の参考文献はBibTeX自身ではサポートされていません。しかしながら、もし若干の
3770 \begin_inset Flex Code
3773 \begin_layout Plain Layout
3780 \begin_inset CommandInset ref
3782 reference "sec:LaTeXコードを挿入する"
3786 節を参照)を利用することを厭わなければ、LyXで節分けされた参考文献を作るのに使用されている(前節を参照)
3787 \begin_inset Flex Code
3790 \begin_layout Plain Layout
3796 パッケージが、この課題を解決する簡単な方法を提供します
3800 \begin_layout Plain Layout
3802 \begin_inset Flex Code
3805 \begin_layout Plain Layout
3812 \begin_inset Flex Code
3815 \begin_layout Plain Layout
3829 \begin_layout Standard
3831 \begin_inset Flex MenuItem
3834 \begin_layout Plain Layout
3835 文書\SpecialChar \menuseparator
3842 \begin_inset Flex MenuItem
3845 \begin_layout Plain Layout
3852 \begin_inset Flex MenuItem
3855 \begin_layout Plain Layout
3861 を有効にしてください。つぎに文書中において、参考文献(BibTeX参考文献本体を含む)の入った節を
3862 \begin_inset Flex Code
3865 \begin_layout Plain Layout
3874 \begin_inset Flex Code
3877 \begin_layout Plain Layout
3885 のあいだにはさまなくてはなりません(これらのコマンドはTeXコードとして挿入する必要があります)。参考文献には、現在位置の
3886 \begin_inset Flex Code
3889 \begin_layout Plain Layout
3895 において引用されたすべての参照が含まれることになります。
3899 この方法を用いる場合には、すべての参照はいずれかの
3900 \begin_inset Flex Code
3903 \begin_layout Plain Layout
3910 \begin_inset Flex Code
3913 \begin_layout Plain Layout
3922 \begin_layout Section
3926 \begin_layout Subsection
3930 \begin_layout Standard
3931 たくさんの節を含んだ大きなファイルで作業をする場合、文書をいくつかのファイルに分割した方が往々にして便利ですし、場合によっては、表部分にはしょっちゅう変更が加え
3932 られるけれども、その前の文章はつねに同じであるようなケースもあるでしょう。このような場合には、複合文書を利用することを、まずご検討ください。たとえば、科学論文は
3933 通常、導入部・所見・結果・議論・結論の五つの節から成ります。これら各節を別々のLyXファイルにして、タイトル・著者・概要・参考文献等と、これら五つのインクルード
3937 \begin_layout Plain Layout
3942 「取り込む」の意です。原語「include」に対する訳語として、プログラミング用語の「インクルードする」以外に適語がないので、ここではプログラミング用語をそのま
3948 ファイルを持つ、もう一つ別の「マスター」ファイルを作成するようにすることができます。これらの各ファイルは、単にマスターファイルにインクルードされるだけでなく、単
3949 独でも出力したり印刷したりすることのできる完全なLyXファイルであるように注意することが重要です。しかも、これらの各ファイルは、同じ文書クラスでなくてはなりませ
3950 ん。articleクラスとbookクラスを混在させるようなことはなさらないでください。LaTeXファイルをインクルードすることもできますが、このファイルにはプリ
3963 t}行は削除しておかなければなりません)。さもないと、DVIファイルを作成する際にエラーが発生するでしょう。
3966 \begin_layout Standard
3969 挿入\SpecialChar \menuseparator
3970 ファイル\SpecialChar \menuseparator
3973 で簡単にファイルをインクルードすることができます。このメニューを選んでクリックすると、カーソルの現在位置に小さな枠が挿入されます。この枠をクリックすると、ダイア
3974 ログが現れるので、そこでインクルードするファイルとインクルード方法を選択することができます。
3977 \begin_layout Standard
3978 ファイル選択ボックスは、いまや自明でしょう。インクルード方法には、「include」・「input」・「verbatim」の三つがあります。「include」と
3979 「input」の違いは、正確にはLaTeXの達人にしか意味のないものですが、ほとんどの人にとって意味のある違いといえば、「include」されたファイルは新規頁
3980 から組版されるのに対し、「input」されたファイルは現在のページから組版される点です。
3983 \begin_layout Standard
3984 一般に、マスターファイルは、組版前に完全なLaTeXファイルに変換されますが、インクルードされるファイルは、プリアンブル情報をまったく持たないLaTeXファイル
3988 \begin_layout Standard
3989 「verbatim」インクルードファイルでは、ファイルの内容がそのまま(つまり「
3990 \begin_inset Flex Code
3993 \begin_layout Plain Layout
3999 」モードで)固定幅タイプライタフォントで組版されます。通常、このファイルの空白は、通常のLyXでの空白の取扱いとは違って、連続した複数の空白がそのまま出力される
4000 ものの、単なる見えない空白です。ただし、
4003 \begin_inset Flex MenuItem
4006 \begin_layout Plain Layout
4016 チェックボックスを有効にすると、空白が存在することを明確にするために空白の印が出力されます。
4019 \begin_layout Subsection
4023 \begin_layout Standard
4024 \begin_inset Box Shadowbox
4034 height_special "totalheight"
4037 \begin_layout Plain Layout
4038 この節の内容は、すでに古くなっています。既定のマスター文書についてと、マスターが開いているときに子文書をどう開くかについて記述する必要があります。[[要修正]]
4046 \begin_layout Standard
4047 異なるファイル間に相互参照を設定することも可能です。まず、すべての関係するファイルを開いてください。例として、2つのファイルを扱う場合を考え、各ファイルをA・B
4048 と呼びます。BがAにインクルードされるファイルだとします。Aにラベルを入れて、Bで参照したいとしましょう。文書Bで相互参照ダイアログを開いて、使用する「バッファ
4052 \begin_layout Subsection
4056 \begin_layout Standard
4057 \begin_inset Box Shadowbox
4067 height_special "totalheight"
4070 \begin_layout Plain Layout
4071 この節も更新が必要です。この点に関する内容がwikiにあるので、それをここにコピーすることも可か。
4079 \begin_layout Standard
4080 すべての子文書の全文献項目を含んだ参考文献一覧をコピーし、それをコメントに変更してください。このようにすることで、LyXは.bibファイルを見つけることができ、参
4081 考文献一覧を見えるようにせずとも簡単に参照を挿入することができるようになります。
4084 \begin_layout Standard
4085 参考文献一覧がコメントにあるために、LaTeXはそれを使用しないので、参照は[1]のようには表示されないで[?]のように表示されます。ひとつの解決法として、コメ
4086 ントをインクルードするLaTeXパッケージの
4087 \begin_inset Flex Code
4090 \begin_layout Plain Layout
4096 を使用して、ファイルを別々に処理する方法があります。そのためには、すべての子文書のプリアンブルに以下を書き加えてください。
4099 \begin_layout LyX-Code
4105 \begin_layout LyX-Code
4108 includecomment{comment}
4111 \begin_layout Standard
4112 \begin_inset Flex URL
4115 \begin_layout Plain Layout
4117 http://wiki.lyx.org/FAQ/Unsorted#toc31
4125 \begin_layout Section
4129 \begin_layout Standard
4130 既定のページレイアウトは、どちらかといえば素っ気ないものです。
4131 \begin_inset Flex Code
4134 \begin_layout Plain Layout
4140 文書クラスの場合には、ページの下の真ん中にページ番号がつくだけです。この取扱説明書はKOMA-scriptのbookクラスなので、すこしは凝ってますが、ほんとう
4145 』に述べられているように、文書ページスタイルを「装飾的(fancy)」に設定する必要があります。この節では、望んだとおりの効果を得るために、LaTeXプリアンブ
4146 ルに挿入する必要のあるLaTeXコードについて解説します。
4149 \begin_layout Standard
4150 ページへッダは、「left(左)」・「center(中央)」・「right(右)」と命名された3つのフィールドに分けられています。フッタも同様に3つのフィールド
4151 に分類されています。これらのフィールドをもっとも簡単に設定するLaTeXコマンドには、
4154 \begin_inset Flex Code
4157 \begin_layout Plain Layout
4172 \begin_inset Flex Code
4175 \begin_layout Plain Layout
4190 \begin_inset Flex Code
4193 \begin_layout Plain Layout
4206 \begin_inset Flex Code
4209 \begin_layout Plain Layout
4217 などがあります。かりに、各ページの左上端に自分の名前を入れたいものとしましょう。次のようなコマンドをプリアンブルに入れるだけです。
4220 \begin_layout Standard
4228 \begin_layout Standard
4229 これで自分の名前が左上に現れます。フィールドに取り除きたい既定の内容がある場合(往々にして中央のフッタにはページ番号が入ります)には、空の引数を持つコマンドを入
4233 \begin_layout Standard
4239 \begin_inset Newline newline
4247 \begin_layout Standard
4248 もっと美しくしてみましょう。節番号を「第‥節」という言葉といっしょに(第3節のように)左上に入れ、ページ番号を(4ページのように)右上に、自分の名前を左下に、日
4249 付を右下に入れます。以下のコマンドをプリアンブルに入れます。
4252 \begin_layout Standard
4262 \begin_layout Standard
4270 \begin_layout Standard
4280 \begin_layout Standard
4288 \begin_layout Standard
4296 \begin_layout Standard
4306 \begin_layout Standard
4310 \begin_inset Flex Code
4313 \begin_layout Plain Layout
4330 \begin_inset Flex Code
4333 \begin_layout Plain Layout
4345 は、それぞれLaTeXの節カウンタおよびページカウンタを取得するもので、これによって現在の節番号とページ番号を印字します。
4346 \begin_inset Flex Code
4349 \begin_layout Plain Layout
4364 \begin_layout Standard
4365 へッダ下またはフッタ上に描かれる罫線の太さも変更することができます。もし罫線が必要なければ、太さを0にしてください。ヘッダ罫線は、既定では0.4ptの太さであり、
4366 フッタ罫線は0ptです。太さを変更するには、
4369 \begin_inset Flex Code
4372 \begin_layout Plain Layout
4379 headrulewidth}{0.4pt}
4389 \begin_inset Flex Code
4392 \begin_layout Plain Layout
4399 footrulewidth}{0.4pt}
4409 \begin_layout Standard
4410 \begin_inset Flex Code
4413 \begin_layout Plain Layout
4418 thispagestyle{empty}
4424 \begin_inset Flex Code
4427 \begin_layout Plain Layout
4432 thispagestyle{plain}
4438 \begin_inset Flex Code
4441 \begin_layout Plain Layout
4446 thispagestyle{fancy}
4451 のようなコマンドを使えば、各ページごとにへッダ・フッタ設定を有効にしたり無効にしたりすることができます。設定を変更したいページに、これらのコマンドをTeXコード
4452 として挿入してください。実は、タイトルページは、その後のページは大域的に装飾的(fancy)に設定されていれば装飾的(fancy)になるにもかかわらず、既定でプ
4453 レーン(plain)になるように設定されているのです。
4456 \begin_layout Standard
4457 奇数ページの左上だけに何かを挿入するなど、もっと複雑なコマンドもあるのですが、詳しい解説は
4458 \begin_inset Flex Code
4461 \begin_layout Plain Layout
4469 パッケージの取扱説明書をご参照ください(
4470 \begin_inset Flex Code
4473 \begin_layout Plain Layout
4482 \begin_layout Standard
4483 最後の例として、へッダやフッタに画像を挿入できることを取り上げましょう。会社のロゴをページ左上に入れたいものとします。たとえば、
4486 \begin_layout Standard
4495 includegraphics{logo.eps}}}
4498 \begin_layout Standard
4500 とすれば、これを実現できます(文書中に他に画像を挿入していない場合には、
4501 \begin_inset Newline newline
4505 \begin_inset Flex Code
4508 \begin_layout Plain Layout
4514 usepackage{graphics}
4519 をプリアンブルに宣言する必要があります)。
4522 \begin_layout Section
4524 \begin_inset CommandInset label
4533 \begin_layout Standard
4539 \begin_layout Subsection
4543 \begin_layout Standard
4544 LyXには、ブリットの形が216個準備されていて、簡単なダイアログから呼び出すことができます。このダイアログを使えば、箇条書き(記号)の各階層で使うブリットの形
4545 を変更することができます。この設定は文書全体に共通なので、段落ごとに別のブリットを指定することはできません
4549 \begin_layout Plain Layout
4550 正確には可能ですが、手動で行う必要があります。
4558 \begin_layout Subsection
4562 \begin_layout Standard
4564 \begin_inset Flex MenuItem
4567 \begin_layout Plain Layout
4568 文書\SpecialChar \menuseparator
4575 \begin_inset Flex MenuItem
4578 \begin_layout Plain Layout
4587 \begin_layout Standard
4588 そのダイアログに、ブリットの形の一覧表があります。
4589 \begin_inset Flex MenuItem
4592 \begin_layout Plain Layout
4598 と書いてあるドロップダウンメニューで、6つの各ブリット形パネルを切り替えることができます。また、一覧表左の
4599 \begin_inset Flex MenuItem
4602 \begin_layout Plain Layout
4608 パネルは、変更したい階層を選択するものです。
4609 \begin_inset Flex MenuItem
4612 \begin_layout Plain Layout
4618 では、指定したいLaTeX表現を入力することができます。任意のブリットを指定した場合には、そのコマンドが必要とするパッケージをLaTeXプリアンブルで指定する必
4622 \begin_layout Standard
4623 6つのパネルは、それぞれが必要とするパッケージによって分類されています。下記は、フォント名とLaTeXパッケージの対応表です。
4626 \begin_layout Standard
4628 \begin_inset Tabular
4629 <lyxtabular version="3" rows="7" columns="2">
4630 <features tabularvalignment="middle">
4631 <column alignment="center" valignment="top" width="0pt">
4632 <column alignment="center" valignment="top" width="0pt">
4634 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4637 \begin_layout Plain Layout
4643 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4646 \begin_layout Plain Layout
4663 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4666 \begin_layout Plain Layout
4674 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4677 \begin_layout Plain Layout
4695 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4698 \begin_layout Plain Layout
4713 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4716 \begin_layout Plain Layout
4733 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4736 \begin_layout Plain Layout
4751 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4754 \begin_layout Plain Layout
4771 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4774 \begin_layout Plain Layout
4789 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4792 \begin_layout Plain Layout
4809 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4812 \begin_layout Plain Layout
4827 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4830 \begin_layout Plain Layout
4847 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4850 \begin_layout Plain Layout
4865 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4868 \begin_layout Plain Layout
4891 \begin_layout Standard
4892 LyXは、ユーザーが導入されていないパッケージのブリットを使用したとしても、警告を発しません。ファイルを閲覧したり印刷したりしようとしたときにLaTeXエラーが
4893 出るようならば、パッケージが導入されていない可能性が大です
4897 \begin_layout Plain Layout
4898 LyXが、パッケージがなくてもブリットを使用することを許すのは、編集をここで行ったとしても、別のところへエクスポートする可能性があるからです。
4906 \begin_layout Subsection
4910 \begin_layout Standard
4911 変更したいブリット階層を選んで、ブリットの形と大きさを選んでください。何らかの変更を加えたとしても、LyX上には反映されませんが、文書の表示を行えば確認されます
4915 \begin_layout Plain Layout
4920 段落ごとに異なるブリットの形を使いたいならば、TeXコードを使って少し手を汚す必要があります。この場合も、ブリット選択ダイアログを使えば、さまざまな形のLaTe
4921 Xコードを確認することができるので手助けとなるでしょう。任意に設定した段落をつくるには、以下のような選択肢があります。
4924 \begin_layout Plain Layout
4928 \begin_layout Plain Layout
4944 \begin_layout Plain Layout
4948 \begin_layout Plain Layout
4970 \begin_layout Itemize
4971 特定の階層の新しいブリット形を指定するには、LaTeXコマンド
4972 \begin_inset Flex Code
4975 \begin_layout Plain Layout
4985 を使用します。あとで現在のブリット形に戻すことができるように、現在のブリット形を保存しておく必要もあります。ここで使っている箇条書きでは、第1階層のブリットを変
4986 更するために、以下のLaTeXコードが使用されています。
4990 \begin_layout LyX-Code
5002 \begin_layout LyX-Code
5021 \begin_layout Itemize
5023 \begin_inset Flex Code
5026 \begin_layout Plain Layout
5034 コマンドの一部にローマ数字で指定されていることに注意してください。
5037 \begin_layout Itemize
5041 \begin_layout Plain Layout
5054 各項目のブリットを指定するには、角括弧で囲んだブリット形を、行頭に
5055 \begin_inset Flex Code
5058 \begin_layout Plain Layout
5064 として挿入してください。たとえば、この項目の行頭には
5067 \begin_inset Flex Code
5070 \begin_layout Plain Layout
5089 \begin_layout Plain Layout
5093 \begin_layout Plain Layout
5109 \begin_layout Plain Layout
5110 文書全体で使用するブリット形が有効であるようにするために、labelitemを元の設定に戻す必要があります。そのためには、以下のようにします。
5113 \begin_layout LyX-Code
5130 \begin_layout Chapter
5134 \begin_layout Standard
5135 LyX has long supported the export of documents to various web-friendly formats,
5137 Before verson 2.0, however, HTML export was always accomplished by the use
5138 of external converters.
5142 \begin_layout Plain Layout
5143 For details on the use of external converters with LyX, see the
5147 section of the Customization manual.
5152 These fall into two large groups: there are converters that use LaTeX as
5153 an intermediate format, such as
5154 \begin_inset Flex Code
5157 \begin_layout Plain Layout
5166 \begin_inset Flex Code
5169 \begin_layout Plain Layout
5178 \begin_inset Flex Code
5181 \begin_layout Plain Layout
5189 , relying upon LyX to produce the LaTeX; and there is a converter that works
5190 directly on LyX files,
5191 \begin_inset Flex Code
5194 \begin_layout Plain Layout
5203 All of these have different advantages and disadvantages.
5207 \begin_layout Standard
5208 The LaTeX-based converters have the advantage that, in principle, they know
5209 everything about the exported document that LaTeX does.
5210 Such converters do not care, for example, if a certain block of code was
5211 produced by LyX or was Evil Red Text.
5212 These converters know about
5213 \begin_inset Flex Code
5216 \begin_layout Plain Layout
5224 files, counters, and references, and can often make use of the
5225 \begin_inset Flex Code
5228 \begin_layout Plain Layout
5236 files generated by BibTeX.
5237 On the other hand, LaTeX is a very hard language to parse---it is sometimes
5238 said that only TeX itself understands TeX---and LaTeX-based converters
5239 will often choke on what seem to be quite simple constructs; complex ones
5240 can throw them completely, and as of this writing, for example, the
5244 manual will not export with
5245 \begin_inset Flex Code
5248 \begin_layout Plain Layout
5256 , though the others will.
5257 The other issue concerns how math is handled.
5258 These converters typically convert the formulae into little pictures that
5259 are then linked from the HTML document.
5260 Since these are actually generated by LaTeX, they are accurate.
5261 But they do not scale well, and just getting them to look as if they are
5262 actually meant to be in your document---so that the font sizes seem to
5263 be roughly the same---can be a challenge.
5266 \begin_layout Standard
5268 \begin_inset Flex Code
5271 \begin_layout Plain Layout
5280 \begin_inset CommandInset href
5282 name "http://elyxer.nongnu.org/"
5283 target "http://elyxer.nongnu.org/"
5287 ) solves some of these problems.
5288 In particular, the formulae it produces scale perfectly, since it renders
5289 math using a combination of HTML and CSS rather than converting the formulae
5291 But even moderately complex formula are rendered less well than with
5292 \begin_inset Flex Code
5295 \begin_layout Plain Layout
5303 ; this reflects the limitations of HTML.
5307 \begin_layout Plain Layout
5309 \begin_inset Flex Code
5312 \begin_layout Plain Layout
5320 can also use jsMath and MathJax for equations, but this setting is only
5321 available globally and requires one to have access to a server that runs
5327 More importantly (as of version 1.1.1, at least),
5328 \begin_inset Flex Code
5331 \begin_layout Plain Layout
5339 has limited support for math macros and no support for user-defined paragraph
5340 or character styles.
5341 These limitations make
5342 \begin_inset Flex Code
5345 \begin_layout Plain Layout
5353 unsuitable for many of the documents LyX users produce.
5354 In principle, of course, these problems could be solved, but the LyX developers
5355 have decided to follow a different path and have made LyX itself capable
5356 of writing XHTML, just as it is capable of writing LaTeX, DocBook, and
5360 \begin_layout Standard
5361 As of this writing, XHTML output remains under development and should probably
5363 \begin_inset Quotes eld
5367 \begin_inset Quotes erd
5374 \begin_layout Plain Layout
5376 \begin_inset Flex Code
5379 \begin_layout Plain Layout
5382 development/HTML.notes
5387 , which can be found in the LyX source tree or
5388 \begin_inset CommandInset href
5390 name "accessed online"
5391 target "http://www.lyx.org/trac/browser/lyx-devel/trunk/development/HTML/HTML.notes"
5395 , usually contains up-to-date information about the state of XHTML output.
5396 See also the list of XHTML bugs on
5397 \begin_inset CommandInset href
5399 name "the bug tracker"
5400 target "http://www.lyx.org/trac/query?status=reopened&status=assigned&status=new&max=0&component=xhtml+export&order=id&col=id&col=summary&col=reporter&col=keywords&keywords=%21%7Efixedintrunk&desc=1"
5409 Still, the developers have chosen this approach because it has several
5410 potential advantages over the other two.
5413 \begin_layout Standard
5414 These advantages are primarily due to the fact that the XHTML output routines,
5415 since they are part of LyX, know everything LyX knows about the document
5420 \begin_layout Plain Layout
5421 Another advantage is that, since these routines are internal to LyX, they
5422 are immune to changes in LyX's file format, or to changes in the semantics
5428 So they know about the table of contents (as displayed in the outline),
5429 about the counters associated with different paragraph styles, and about
5430 user-defined styles.
5431 The XHTML output routines know what LyX knows about internationalization,
5432 too, so they will output
5433 \begin_inset Quotes eld
5437 \begin_inset Quotes erd
5441 \begin_inset Quotes eld
5445 \begin_inset Quotes erd
5448 , depending upon the language in effect at the time.
5452 \begin_layout Standard
5453 Quite generally, the output routines know what LyX knows about document
5454 layout, that is, about how the document is to be rendered on screen.
5455 We use this information when we output the document as XHTML.
5460 generates CSS style information corresponding to the layout information
5461 it uses to render the document on screen: if section headings are supposed
5462 to be sans-serif and bold as seen in LyX, then (by default) they will be
5463 sans-serif and bold when viewed in a web browser, too.
5464 And this is true not just for pre-defined styles, like Section, but for
5465 any style, including user-defined styles.
5466 Indeed, the XHTML output routines make no distinction between user-defined
5467 paragraph and character styles and LyX's own pre-defined styles: in each
5468 case, everything LyX knows about the styles is contained in the layout
5470 And much the same is true as regards pre-defined textual insets, such as
5471 footnotes, and various custom insets.
5475 \begin_layout Standard
5476 The result is that XHTML output can be customized and extended in exactly
5477 the same way LaTeX output can be customized and extended: through layout
5479 See chapter five of the
5483 manual for the details.
5486 \begin_layout Standard
5487 The remainder of this chapter contains more detailed information on XHTML
5488 output, its limitations, and ways to work around those limitations.
5491 \begin_layout Section
5492 Math Output in XHTML
5495 \begin_layout Standard
5496 LyX offers four choices for how math is rendered.
5497 These have various advantages and disadvantages:
5500 \begin_layout Itemize
5502 \begin_inset Newline newline
5505 MathML is a dialect of XML designed specifically for mathematics on the
5506 web, and it typically renders very well in browsers that support it.
5507 The disadvantage is that not all browsers support MathML, and support is
5508 not complete even in the Gecko-based browsers, such as Firefox.
5509 \begin_inset Newline newline
5512 If LyX is unable to render a formula as MathML---for example, if the formula
5514 \begin_inset Flex Code
5517 \begin_layout Plain Layout
5525 package or ERT---then it will instead output the formula as an image.
5529 \begin_layout Itemize
5531 \begin_inset Newline newline
5535 \begin_inset Flex Code
5538 \begin_layout Plain Layout
5546 outputs math as HTML, styled by CSS.
5550 \begin_layout Plain Layout
5551 LyX has borrowed some of the CSS for its HTML output from
5552 \begin_inset Flex Code
5555 \begin_layout Plain Layout
5568 For simple formulae, this can work quite well, though with more complicated
5569 formulae it tends to break down.
5570 Still, this method has the advantage that it is very widely supported and
5571 so it may be appropriate for documents that contain only a little, fairly
5573 \begin_inset Newline newline
5576 If Lyx is unable to render a formula as HTML---for example, if the formula
5578 \begin_inset Flex Code
5581 \begin_layout Plain Layout
5589 package or ERT---then it will instead output the formula as an image.
5593 \begin_layout Itemize
5595 \begin_inset Newline newline
5599 \begin_inset Flex Code
5602 \begin_layout Plain Layout
5610 , LyX will output formulae as images, the very same images, in fact, that
5611 are used for instant preview.
5615 \begin_layout Plain Layout
5616 Instant preview does
5620 have to be on for images to be output, however.
5625 The advantage to this method is that the images are simply generated by
5626 LaTeX, so they are very accurate.
5627 The disadvantage, as mentioned earlier, is that these are bitmapped images,
5628 so they do not scale terribly well, and one cannot copy them, etc.
5629 (As of this writing, there are also problems about equation numbering.
5631 \begin_inset CommandInset href
5634 target "http://www.lyx.org/trac/ticket/6894"
5639 \begin_inset Newline newline
5642 The size of the images can be controlled by setting the
5643 \begin_inset Quotes eld
5647 \begin_inset Quotes erd
5651 \begin_inset Flex MenuItem
5654 \begin_layout Plain Layout
5657 Document\SpecialChar \menuseparator
5658 Settings\SpecialChar \menuseparator
5668 \begin_layout Plain Layout
5669 For those who want to know, this controls the resolution of the image in
5670 dots per inch and is based upon a default of 75 dpi.
5676 \begin_inset Newline newline
5679 If LyX for some reason fails to create an image for a formula (e.g., if a
5680 required LaTeX package is not installed), then it will fall back to outputing
5684 \begin_layout Itemize
5686 \begin_inset Newline newline
5689 Finally, LyX will happily output math as LaTeX.
5690 As well as being the output of last resort, this method can be used with
5692 \begin_inset CommandInset href
5695 target "http://www.math.union.edu/~dpvc/jsMath/"
5699 , which uses JavaScript to render LaTeX embedded in HTML documents.
5700 LyX wraps the LaTeX in either a
5701 \begin_inset Flex Code
5704 \begin_layout Plain Layout
5712 (for inline formulas) or
5713 \begin_inset Flex Code
5716 \begin_layout Plain Layout
5724 (for displayed formulas) with
5725 \begin_inset Flex Code
5728 \begin_layout Plain Layout
5736 , as is required for jsMath.
5739 \begin_layout Standard
5740 One of these output methods must be selected under
5741 \begin_inset Flex MenuItem
5744 \begin_layout Plain Layout
5747 Document\SpecialChar \menuseparator
5748 Settings\SpecialChar \menuseparator
5755 By default, LyX outputs MathML.
5756 This is a document-wide setting, therefore.
5759 \begin_layout Standard
5760 Eventually, LyX will offer the user the option to select an alternate output
5761 method for a particular inset, say, one that isn't being rendered very
5766 \begin_layout Plain Layout
5767 That said, since LyX falls back to images if the inset contains ERT, then
5768 one can force output as an image by putting some harmless ERT into the
5770 \begin_inset Formula $a=b\relax$
5781 \begin_layout Section
5782 Bibliography and Citations
5785 \begin_layout Standard
5786 XHTML output fully supports bibliographies and citations.
5790 \begin_layout Standard
5791 Citation labels are generated by the same machinery that generates LyX's
5792 on-screen labels, so the labels will look in the output much as they do
5793 in LyX, though better.
5794 If you are using numerical citations, then LyX will output numerical labels,
5795 such as [1] or [17], rather than simply showing the citation key in square
5796 brackets, as it does on-screen.
5797 If you are using author-year citations, then LyX will add lowercase letters
5798 to the years, just as BibTeX does, if it finds more than one citation for
5799 a given author-year combination.
5800 The labels will be printed with the bibliography entries.
5801 Note that there is, at present, no way to customize the appearance of the
5802 labels, for example, to choose between square brackets and parentheses.
5805 \begin_layout Standard
5806 Bibliography output is handled by the same machinery that handles the presentati
5807 on of reference information in the citation dialog, so you will see in the
5808 XHTML output pretty much what you would see if you were to look at a given
5809 entry in the citation dialog.
5810 The formatting can be customized in your layout file or, preferably, in
5816 manual for the details.
5819 \begin_layout Standard
5820 The main defect at present is that cross-referenced information is printed
5821 with every entry with which it is associated.
5822 So you can see things like this:
5827 \begin_inset Quotes eld
5830 Context and Logical Form
5831 \begin_inset Quotes erd
5836 Language in Context: Selected Essays
5838 (Oxford: Oxford University Press, 2007), pp.
5844 \begin_inset Quotes eld
5847 Semantics in Context
5848 \begin_inset Quotes erd
5853 Language in Context: Selected Essays
5855 (Oxford: Oxford University Press, 2007), pp.
5859 \begin_layout Standard
5860 This should be fixed before long.
5863 \begin_layout Standard
5864 There is no support at present for sectioned bibliographies.
5865 If you have multiple bibliographies, then LyX will print the same bibliography
5869 \begin_layout Section
5873 \begin_layout Standard
5874 LyX will happily export indexes as XHTML, but with certain limitations at
5878 \begin_layout Standard
5879 Index export will be most reliable when you do not attempt to use the fancy
5880 constructs that are described in the section on indexes in the
5888 \begin_layout Plain Layout
5889 The main issue here is that LyX itself does not really handle these.
5890 It just lets you enter what you would have to enter in raw LaTeX.
5895 We'll describe how they are handled using the subsection headings from
5899 \begin_layout Itemize
5900 Grouping Index Entries (aka, sub-entries): LyX makes an effort to support
5901 these, but the entries must be separated by
5902 \begin_inset Quotes eld
5906 \begin_inset Quotes erd
5909 , that is, there must be spaces around the exclamation point.
5910 This is because it is otherwise too difficult to check for escaped exclamation
5911 points, ones in math, and so forth.
5914 \begin_layout Itemize
5915 Page Ranges: There is no support at all for page ranges, since these make
5916 no sense with XHMTL.
5917 Instead, you will just get two index entries, one at either end.
5920 \begin_layout Itemize
5921 Cross-referencing: There is no support for cross-referencing.
5922 If LyX finds an entry containing the
5923 \begin_inset Quotes eld
5926 |see\SpecialChar \ldots{}
5928 \begin_inset Quotes erd
5931 construct, it is just dropped, and the rest is treated as an ordinary index
5935 \begin_layout Itemize
5936 Index Entry Order: LyX does support attempts to fix the sorting order.
5937 It will take what is before the first `@' it finds and use that for sorting,
5938 taking what follows the first `@' to be the actual entry.
5939 At present, LyX does not check for escaped `@', so do not try to index
5943 \begin_layout Itemize
5944 Index Entry Layout: You can format entries by using the text style dialog,
5945 or by using any other method available within LyX itself.
5946 There is no support for constructs like:
5947 \begin_inset Quotes eld
5951 \begin_inset Quotes erd
5955 Indeed, if LyX finds a pipe symbol, `|', in an entry, it will delete it
5956 and everything that follows it.
5959 \begin_layout Itemize
5960 Multiple Indexes: There is no support for multiple indexes.
5961 Rather, all index entries will be printed as one large index.
5962 To avoid our printing several versions of the index, we print only the
5963 main index, so make sure you have one.
5966 \begin_layout Section
5967 Nomenclature and Glossary
5970 \begin_layout Standard
5971 There is at present no support for glossaries.
5972 Adding it would be fairly trivial, and welcome.
5975 \begin_layout Chapter
5979 \begin_layout Section
5983 \begin_layout Standard
5984 「LyXサーバー」を使用すると、他のプログラムが、LyXと通信したり、LyXコマンドを実行させたり、LyXの内部状態に関する情報を取得したりすることができるよう
5985 になります。これは熟練したユーザー向けの機能ですが、便利なはずです。たとえば、LyXサーバーに書き込むことによって、JabRefのような参考文献管理ソフトが、L
5986 yXに文献引用を「押し込む」ことが可能となります。
5989 \begin_layout Standard
5992 LyXサーバーはWindowsでは機能しない
5998 \begin_layout Plain Layout
5999 これが不可能でなければならない理由はありません。しかし、いまのところ、Windows向け開発者でこの機能を実装しようとする者がいないのです。
6007 \begin_layout Section
6011 \begin_layout Standard
6012 LyXサーバーは、名前をつけたパイプの対を利用することで機能します。パイプは、通常
6013 \begin_inset Flex Code
6016 \begin_layout Plain Layout
6022 の下に作られ(Windowsを除く。Windowsでは、名前を付けた
6027 \begin_inset Flex Code
6030 \begin_layout Plain Layout
6042 に特別なオブジェクトとして置かれます)、「
6043 \begin_inset Flex Code
6046 \begin_layout Plain Layout
6053 \begin_inset Flex Code
6056 \begin_layout Plain Layout
6062 」という名前がついています。外部プログラムは、
6063 \begin_inset Flex Code
6066 \begin_layout Plain Layout
6073 \begin_inset Flex Code
6076 \begin_layout Plain Layout
6083 \begin_inset Flex MenuItem
6086 \begin_layout Plain Layout
6087 ツール\SpecialChar \menuseparator
6094 \begin_inset Flex Code
6097 \begin_layout Plain Layout
6098 /home/myhome/lyxpipe
6104 \begin_inset Flex Code
6107 \begin_layout Plain Layout
6121 」などに設定することができます。サーバーを開始するためには、これを
6128 \begin_layout Standard
6130 \begin_inset Flex Code
6133 \begin_layout Plain Layout
6140 \begin_inset Flex Code
6143 \begin_layout Plain Layout
6149 」を付け加えます。パイプがすでに存在していれば、LyXは他のLyXプロセスがすでに実行中であると判断して、サーバーを開始しません。POSIX(Unix型)システ
6150 ムでは、なんらかの理由で、LyXが終了する際に使用されていない「古い」パイプが削除されずに残ったりすると、LyXはこれを削除しようとします。何らかの理由でこれが
6151 失敗した場合、手動でパイプを削除したのちに、LyXを再起動する必要があります。Windowsでは、プログラムが終了したりクラッシュしたりすると、OSがパイプを削
6152 除するので、「古い」パイプが残ることはありません。
6155 \begin_layout Standard
6156 サーバーを使用するLyXプロセスを複数起動するには、それぞれのプロセスに、別のユーザーディレクトリを使用させたり、別々の
6157 \begin_inset Flex Code
6160 \begin_layout Plain Layout
6166 ファイルを使用させるなど、別々の設定を使用する必要があります。
6169 \begin_layout Standard
6170 クライアントプログラムを開発しようとされているのであれば、LyXサーバーからのデバッグ情報を有効にすると便利かもしれません。そのためには、Lyxを
6171 \begin_inset Flex Code
6174 \begin_layout Plain Layout
6183 \begin_layout Standard
6184 C言語で書かれた完全なサンプルクライアントが、ソース頒布版の
6185 \begin_inset Flex Code
6188 \begin_layout Plain Layout
6189 development/lyxserver/server_monitor.c
6197 \begin_layout Standard
6199 \begin_inset Flex Code
6202 \begin_layout Plain Layout
6203 src/client/lyxclient
6208 にあるコマンドラインベースのクライアントがあります。
6211 \begin_layout Section
6215 \begin_layout Standard
6216 LyXコールを発行するには、クライアントはASCIIテキスト行を入力パイプに書き込みまなくてはなりません。この行は、以下の書式を持ちます。
6233 \begin_layout Description
6234 クライアント名 は、クライアントが自由に選べる名前です。これが用いられるのは、クライアントが他の要求クライアントから結果を見分けることができるように、LyXが返
6235 答をする際、クライアント名をエコーするときだけです。
6238 \begin_layout Description
6239 関数 は、LyXに実行させたい関数です。これは、ミニバッファで使用するコマンドと同じです。
6242 \begin_layout Description
6243 引数 は、一部の関数のみに効力を持つオプションの引数です(たとえば、「自己挿入」LFUNは、現在のカーソル位置に引数を文章として挿入します)。
6246 \begin_layout Standard
6247 LyXからの返答は、出力パイプに送り出され、
6264 \begin_layout Standard
6273 は、コマンド要求からそのままエコーされますが、
6277 はコマンド実行の結果に依存した、多少なりとも有用な情報です。「font-state」のような一部のコマンドは、LyXの内部状態に関する情報を返しますが、空のデー
6278 タ応答を返すものもあります。空のデータ返答は、コマンド実行が無事終わったことを意味します。
6281 \begin_layout Standard
6299 \begin_layout Standard
6304 には、なぜコマンドが失敗したかの説明が入っているはずです。
6307 \begin_layout Standard
6311 \begin_layout LyX-Code
6312 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
6313 \begin_inset Newline newline
6316 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
6317 \begin_inset Newline newline
6320 read a <~/.lyxpipe.out
6321 \begin_inset Newline newline
6327 \begin_layout Section
6331 \begin_layout Standard
6332 LyXは、発生しているイベントを、非同期的にクライアントに通知することができます。いまのところ、ユーザーがあるキー列を関数「notify」に割り当てているときの
6333 み、LyXはこの通知を行います。LyXが送る文字列の書式は
6337 \begin_inset Flex Code
6340 \begin_layout Plain Layout
6351 \begin_layout Standard
6356 は、ユーザーが実際に打鍵したキー列の印字表現になります。
6359 \begin_layout Standard
6360 この機構は、LyXのコマンド群を拡張してマクロを実装するのに使用することができます。なんらかのキー列を「notify」に割り当ててください。それから出力パイプで
6361 待機するクライアントを起動し、キー列に応じたコマンドを読み込み、一つないし複数のLyXコマンドを発行するLyX要求とLyXコールを使用する関数を開始するのです。
6364 \begin_layout Section
6368 \begin_layout Standard
6369 LyXは、セッション管理に使用することができる単純なプロトコルを実装しています。メッセージは、すべて
6382 \begin_layout Standard
6387 は「hello」ないし「bye」です。クライアントから「hello」を受け取ると、LyXはメッセージを聴いていることをクライアントに伝えるために返答をし、LyX
6388 が終了することをクライアントに伝えるのには、LyXが「bye」を送信します。
6391 \begin_layout Section
6395 \begin_layout Standard
6400 \begin_layout Plain Layout
6401 PDFの遡及検索機能を提供しているビューアには、KDE/Linux上のOkularとMac OS X上のSkim、Windows上のSumatraPDFがありま
6407 には、遡及検索(reverse searchないしinverse searchと呼ばれます)機能を提供しているものがあります。これを使えば、DVI/PDF出力の
6408 特定の場所をクリックすることによって、LyXの文書中で対応する行にカーソルを移動させることができます。これを実現するためには、ビューアはLyXと情報交換を行う必
6413 )を使用するか、LyXが作業ディレクトリに生成するUNIXドメインソケット(
6418 \begin_inset Flex Code
6421 \begin_layout Plain Layout
6427 プログラムがLyXと通信するのに使用している方法です)ことで、LyXサーバを経由して実現することができます。場合によっては、ビューアとLyXを橋渡しする補助スク
6428 リプトを必要とすることがあるかもしれませんが、それ以外は、ビューアはLyXと直接通信することができます。これは、選んだビューアと基本ソフトに依存します。また、必
6429 要とされるビューアの設定法と遡及検索が実際に行われる方法とにも依存します。したがって、下記では個々のビューア毎の遡及検索の設定の仕方を説明することとします。その
6430 前に、DVI/PDF出力で遡及検索を有効にするためには、一般に何が必要とされるかを説明します。
6433 \begin_layout Subsection
6434 \begin_inset CommandInset label
6443 \begin_layout Standard
6445 \begin_inset Flex MenuItem
6448 \begin_layout Plain Layout
6449 文書\SpecialChar \menuseparator
6450 出力\SpecialChar \menuseparator
6456 を有効にすれば、LyXがすべて自動的に処理を行ってくれます。その場合、LyXは自動的に、PDFの場合はSyncTeXマクロを、DVIの場合はsrcltxパッケー
6458 \begin_inset Flex Code
6461 \begin_layout Plain Layout
6467 ツールバーでも簡単にアクセスすることができます。
6470 \begin_layout Standard
6471 \begin_inset Flex Code
6474 \begin_layout Plain Layout
6481 \begin_inset Flex Code
6484 \begin_layout Plain Layout
6490 を読み込むと、時折、組版に影響を与えることがありますので、仕上がりの組版においてはこれらを無効にしてください。
6493 \begin_layout Standard
6494 また、設定で自製マクロを指定することもできるので、何か特別な調整が必要な場合には、次節の手動有効化をお読みください。
6497 \begin_layout Subsection
6501 \begin_layout Standard
6502 LaTeXは、遡及検索のために複数の方法を提供しています。ある方法は
6503 \begin_inset Flex Code
6506 \begin_layout Plain Layout
6512 プログラムに組み込まれており、他の方法は外部パッケージとして提供されています。どちらを選択するかは、お使いのLaTeX頒布版が既に特定の方法を提供しているか(組
6513 み込みによる方法は比較的新しいものです)と、お使いのビューアがそれに対応しているかに依存します。使用可能な方法を以下に述べます。
6516 \begin_layout Subsubsection*
6517 src-special経由のDVI組み込み検索(DVIのみ)
6520 \begin_layout Standard
6521 この方法は、DVIファイルに遡及検索に必要な情報を追加するものです。これは、かなり前のLaTeXから利用可能となっており(比較的最近のLaTeX頒布版はすべて対
6522 応しています)、安定して動作します。これを有効にするには、
6523 \begin_inset Flex MenuItem
6526 \begin_layout Plain Layout
6527 設定\SpecialChar \menuseparator
6528 ファイル処理\SpecialChar \menuseparator
6535 \begin_inset Flex MenuItem
6538 \begin_layout Plain Layout
6543 \begin_layout Plain Layout
6556 \begin_inset Flex MenuItem
6559 \begin_layout Plain Layout
6564 \begin_layout Plain Layout
6571 eX (plain)->DraftDVI
6577 \begin_inset Flex Code
6580 \begin_layout Plain Layout
6581 latex -src-specials $$i
6586 に変更します。もしこれが動作しないときは、お使いのLaTeXエンジンが違うオプションを必要としていないか確認してください(頒布版によっては文法の異なることがあり
6590 \begin_layout Subsubsection*
6591 外部パッケージ(PDFSyncおよびsrcltx)
6594 \begin_layout Standard
6603 パッケージは、PDF出力(pdflatex経由)およびDVI出力での遡及検索を提供します。これを有効にするには、LyXプリアンブルで以下のようにパッケージを読み
6607 \begin_layout Itemize
6609 \begin_inset Flex Code
6612 \begin_layout Plain Layout
6623 \begin_layout Itemize
6625 \begin_inset Flex Code
6628 \begin_layout Plain Layout
6631 usepackage[active]{srcltx}
6639 \begin_layout Standard
6640 と書きます。DVIとPDFの両方の遡及検索を実行できるようにするためには、プリアンブルに以下の行を挿入する方法があります。
6643 \begin_layout LyX-Code
6647 \begin_inset Newline newline
6653 \begin_inset Newline newline
6659 \begin_inset Newline newline
6665 \begin_inset Newline newline
6670 usepackage[active]{srcltx}
6671 \begin_inset Newline newline
6679 \begin_layout Standard
6680 このようにすれば、DVIでもPDF(pdflatex)でも正しいパッケージを使いながら、ファイルを閲覧することができます。
6683 \begin_layout Standard
6684 なお、PDFSyncは、文書の出力レイアウトに干渉する可能性があるので注意してください。したがって、仕上がり文書ではPDFSyncを無効にすることをお勧めします
6688 \begin_layout Subsubsection*
6689 SyncTeXを使った組み込み遡及検索(DVIおよびPDF)
6692 \begin_layout Standard
6693 \begin_inset Flex Code
6696 \begin_layout Plain Layout
6702 の最近のバージョンは、PDFおよびDVI両方の遡及検索を組み込みでサポートしています。このいわゆる
6706 機能は、主に、PDFSyncパッケージをpdftexプログラムへ統合したことと、それをsrc-specialsアプローチへ取り込んだことの成果です。これを使用す
6707 るためには、少なくともTeXLive 2008か最近のMikTeX頒布版が必要です。また、既にSyncTeXサポートを提供しているPDFビューアは少ししかありま
6708 せん(Mac上のSkimとWindows上のSumatraPDF)。
6711 \begin_layout Standard
6712 DVI出力でSyncTeXを有効にするには、
6713 \begin_inset Flex MenuItem
6716 \begin_layout Plain Layout
6717 設定\SpecialChar \menuseparator
6718 ファイル処理\SpecialChar \menuseparator
6725 \begin_inset Flex MenuItem
6728 \begin_layout Plain Layout
6733 \begin_layout Plain Layout
6746 \begin_inset Flex MenuItem
6749 \begin_layout Plain Layout
6754 \begin_layout Plain Layout
6761 eX (plain)->DraftDVI
6767 \begin_inset Flex Code
6770 \begin_layout Plain Layout
6771 latex -synctex=1 $$i
6777 \begin_inset Flex MenuItem
6780 \begin_layout Plain Layout
6785 \begin_layout Plain Layout
6792 eX (pdflatex)->PDF (pdflatex)
6798 \begin_inset Flex Code
6801 \begin_layout Plain Layout
6802 pdflatex -synctex=1 $$i
6807 に変更してください。また、ビューアをSyncTeXで使うのに設定を行う必要があるかどうか、お使いのビューアの取扱説明書をご確認ください
6811 \begin_layout Plain Layout
6812 \begin_inset Flex Code
6815 \begin_layout Plain Layout
6821 オプションは、gzip圧縮を有効にします。お使いのビューアがgzip圧縮をサポートしていない場合には、代わりに
6822 \begin_inset Flex Code
6825 \begin_layout Plain Layout
6839 \begin_layout Subsection
6843 \begin_layout Subsubsection*
6847 \begin_layout Standard
6849 \begin_inset Flex Code
6852 \begin_layout Plain Layout
6858 プログラムを自動的に使うのに必要なフックを、既に提供しているので、
6859 \begin_inset Flex Code
6862 \begin_layout Plain Layout
6868 を使用する場合には、DVI遡及検索を実行するのに他にするべきことはありません。使用中の文書を上記で述べたように設定するだけです(遡及検索は、Ctrl-クリックか
6869 、Mac OS X上ではAlt-クリックで始動します)。
6872 \begin_layout Standard
6873 しかし、何らかの理由で、LyXと通信するのにソケットではなく命名パイプを使用したい場合には、
6874 \begin_inset Flex MenuItem
6877 \begin_layout Plain Layout
6878 設定\SpecialChar \menuseparator
6879 ファイル処理\SpecialChar \menuseparator
6886 \begin_inset Flex Code
6889 \begin_layout Plain Layout
6890 xdvi -editor 'lyxeditor.sh %f %l'
6896 \begin_inset Flex Code
6899 \begin_layout Plain Layout
6905 は適切なスクリプト名)に変更してください。たとえば、最低限のシェルスクリプトは
6908 \begin_layout LyX-Code
6910 \begin_inset Newline newline
6913 LYXPIPE="/path/to/lyxpipe"
6914 \begin_inset Newline newline
6917 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
6918 \begin_inset Newline newline
6921 echo "$COMMAND" > "${LYXPIPE}".in || exit
6922 \begin_inset Newline newline
6925 read < "${LYXPIPE}".out || exit
6928 \begin_layout Standard
6930 \begin_inset Flex Code
6933 \begin_layout Plain Layout
6940 \begin_inset Flex MenuItem
6943 \begin_layout Plain Layout
6944 設定\SpecialChar \menuseparator
6954 \begin_layout Plain Layout
6961 XServerパイプのパスを指定してください
6965 \begin_layout Plain Layout
6967 \begin_inset Flex Code
6970 \begin_layout Plain Layout
6981 \begin_inset Flex Code
6984 \begin_layout Plain Layout
6998 \begin_layout Subsubsection*
7002 \begin_layout Standard
7003 \begin_inset Flex Code
7006 \begin_layout Plain Layout
7007 /Applications/MacDviX_Folder/calleditor.script
7015 \begin_layout LyX-Code
7020 \begin_layout Plain Layout
7027 X.app/Contents/MacOS/lyxeditor "$2" $1
7028 \begin_inset Newline newline
7034 \begin_layout Standard
7035 という行を付け加えてください。Applicationsフォルダ以外の場所にLyXを導入した場合には、それに従って上記の行を修正してください。
7038 \begin_layout Standard
7039 遡及検索は、Alt-クリック(OPTION-クリック)で始動します。
7042 \begin_layout Subsubsection*
7046 \begin_layout Standard
7047 \begin_inset Flex MenuItem
7050 \begin_layout Plain Layout
7051 設定\SpecialChar \menuseparator
7052 ファイル処理\SpecialChar \menuseparator
7053 ファイル書式\SpecialChar \menuseparator
7060 \begin_inset Flex Code
7063 \begin_layout Plain Layout
7064 open -a Skim.app $$i
7070 \begin_inset Flex MenuItem
7073 \begin_layout Plain Layout
7074 Skim\SpecialChar \menuseparator
7075 設定\SpecialChar \menuseparator
7085 \begin_layout Plain Layout
7095 \begin_layout Standard
7096 遡及検索は、COMMAND-SHIFT-クリックで始動します。
7099 \begin_layout Subsubsection*
7103 \begin_layout Standard
7104 \begin_inset Flex MenuItem
7107 \begin_layout Plain Layout
7108 設定\SpecialChar \menuseparator
7109 Okularを設定\SpecialChar \ldots{}
7110 \SpecialChar \menuseparator
7116 で「カスタムテキストエディタ」を選択し、コマンドに
7117 \begin_inset Flex Code
7120 \begin_layout Plain Layout
7129 \begin_layout Standard
7130 遡及検索は、SHIFT-クリックで始動します。
7133 \begin_layout Subsubsection*
7137 \begin_layout Standard
7139 \begin_inset Flex MenuItem
7142 \begin_layout Plain Layout
7143 View\SpecialChar \menuseparator
7149 メニューを選択し、「Inverse DVI Search」タブを選択します。「New\SpecialChar \ldots{}
7150 」ボタンをクリックして開くウィンドウの「Name:」フィールドに「LyX
7151 Editor」(または自分の好きな名称)と入力してください。「\SpecialChar \ldots{}
7152 」というラベルのボタンをクリックしてファイルダイアログを開き、バッチファイル
7153 \begin_inset Flex Code
7156 \begin_layout Plain Layout
7162 (以下参照)のあるディレクトリを見つけます。
7163 \begin_inset Flex Code
7166 \begin_layout Plain Layout
7173 \begin_inset Flex Code
7176 \begin_layout Plain Layout
7183 \begin_inset Flex Code
7186 \begin_layout Plain Layout
7196 を通じてLyXと通信するためのラッパとして使用され、以下のようになっています。
7199 \begin_layout LyX-Code
7201 \begin_inset Newline newline
7204 echo LYXCMD:revdvi:server-goto-file-row:%1 %2>
7213 \begin_inset Newline newline
7227 \begin_layout Standard
7228 LyXで指定したLyXServerパイプパスが、
7229 \begin_inset Flex Code
7232 \begin_layout Plain Layout
7247 \begin_inset Flex Code
7250 \begin_layout Plain Layout
7259 \begin_layout Standard
7260 yapでは、遡及検索はダブルクリックで始動します。
7263 \begin_layout Subsubsection*
7267 \begin_layout Standard
7268 SumatraPDFを遡及検索で使用するためには、
7269 \begin_inset Flex MenuItem
7272 \begin_layout Plain Layout
7273 設定\SpecialChar \menuseparator
7274 ファイル処理\SpecialChar \menuseparator
7275 ファイル書式\SpecialChar \menuseparator
7282 \begin_inset Flex Code
7285 \begin_layout Plain Layout
7286 SumatraPDF -inverse-search
7287 \begin_inset Quotes eld
7291 \begin_inset Quotes erd
7300 \begin_inset Flex Code
7303 \begin_layout Plain Layout
7309 は上記のラッパ)と入力してください。SumatraPDF.exeがコマンドPATHにない場合、フルファイル名を使用してください。
7312 \begin_layout Standard
7316 \begin_layout Subsubsection*
7320 \begin_layout Standard
7321 まずはじめに、yapがWindows環境での既定のDVIビューアになっていることを確認してから、yapを起動し、
7322 \begin_inset Flex MenuItem
7325 \begin_layout Plain Layout
7326 View\SpecialChar \menuseparator
7332 メニューを選択し、「Inverse DVI Search」タブを選択します。「New\SpecialChar \ldots{}
7333 」ボタンをクリックして開くウィンドウの「Name:」フィールドに「LyX
7334 Editor」(または自分の好きな名称)と入力してください。「\SpecialChar \ldots{}
7335 」というラベルのボタンをクリックしてファイルダイアログを開き、バッチファイル
7336 \begin_inset Flex Code
7339 \begin_layout Plain Layout
7345 プログラム(これは、Cygwinでは既定でLyX実行ファイルとともに導入されます)のあるディレクトリを見つけます。
7346 \begin_inset Flex Code
7349 \begin_layout Plain Layout
7356 \begin_inset Flex Code
7359 \begin_layout Plain Layout
7365 と指定してください。これによって、LyXとの通信に
7369 が使用されるようになります。何らかの理由で
7374 \begin_inset Flex Code
7377 \begin_layout Plain Layout
7383 オプションを削除して、LyX設定でLyXServerパイプパスを指定することを忘れないでください。
7386 \begin_layout Standard
7387 yapでは、遡及検索はダブルクリックで始動します。
7390 \begin_layout Subsubsection*
7394 \begin_layout Standard
7395 SumatraPDFを遡及検索で使用するためには、
7396 \begin_inset Flex MenuItem
7399 \begin_layout Plain Layout
7400 設定\SpecialChar \menuseparator
7401 ファイル処理\SpecialChar \menuseparator
7402 ファイル書式\SpecialChar \menuseparator
7409 \begin_inset Flex Code
7412 \begin_layout Plain Layout
7419 \begin_inset Flex Code
7422 \begin_layout Plain Layout
7428 は以下のようなスクリプトです(お使いのコマンドパスに置きます。
7429 \begin_inset Flex Code
7432 \begin_layout Plain Layout
7441 \begin_layout LyX-Code
7443 \begin_inset Newline newline
7447 \begin_inset Newline newline
7450 SumatraPDF -inverse-search "lyxeditor -g %f %l" $(basename $1)
7453 \begin_layout Standard
7454 SumatraPDFは、Windowsネイティブのアプリケーションであり、LyXのCygwin版が使用するPOSIXパスを理解しないので、このラッパスクリプトが
7455 必要となります。SumatraPDF.exeがお使いのコマンドパスにない場合は、上記のスクリプトでPOSIXのフルパスを使用してください。
7456 \begin_inset Flex Code
7459 \begin_layout Plain Layout
7474 \begin_inset Flex Code
7477 \begin_layout Plain Layout
7483 オプションを削除して、LyX設定でLyXServerパイプパスを指定することを忘れないでください。
7486 \begin_layout Standard
7490 \begin_layout Section
7494 \begin_layout Standard
7495 前方検索を有効にするためには、生成されたPDF/DVI出力ファイルに、TeXソースに関する情報を追加する必要があります。これは、第
7496 \begin_inset CommandInset ref
7498 reference "sub:遡及検索"
7502 節に述べられている方法で実行することができます。
7505 \begin_layout Standard
7507 \begin_inset Flex MenuItem
7510 \begin_layout Plain Layout
7511 設定\SpecialChar \menuseparator
7512 出力\SpecialChar \menuseparator
7518 で自分の使うビューアを利用するように、LyXを設定する必要があります。ただし、yap・xdvi・okular・Sumatra PDFなど、一部のビューアしかこの
7523 \begin_layout Plain Layout
7524 Sumatraの場合には、http://www.istri.fr/zip/CMCDDE.zipからダウンロードできるCMCDDEが必要です。
7529 。Evinceやxpdfなどの他のビューアでは、少なくとも、ファイルの特定頁を読み込み直したり、指し示したりすることができますが、これらの場合にはsynctex
7530 の外部コールを使用することができます。設定ダイアログに用意されている用例をよく研究してください。設定中で置き換えられる値は以下の通りです。
7531 \begin_inset Flex Code
7534 \begin_layout Plain Layout
7541 \begin_inset Flex Code
7544 \begin_layout Plain Layout
7551 \begin_inset Flex Code
7554 \begin_layout Plain Layout
7560 は書き出された出力ファイルを指します(一時ディレクトリにどちらが存在するかに依存してdviあるいはpdf)。
7563 \begin_layout Standard
7564 閲覧時には、一時ディレクトリに.dviファイルがあるか.pdfファイルがあるか(特定の文書を閲覧するのにどの書式を使用したか)によって、適当なプレビュー書式をLyX
7568 \begin_layout Chapter
7572 \begin_layout Section
7576 \begin_layout Standard
7582 \begin_layout Subsection
7586 \begin_layout Standard
7593 Astronomy and Astrophysics
7595 (『天文学と宇宙物理学』:www.edpsciences.fr/aa/
7596 \begin_inset Flex URL
7599 \begin_layout Plain Layout
7601 http://www.edpsciences.fr/aa/
7606 )に投稿する論文を執筆するためのLyXの使用法を説明します。このパッケージは、FTPサイト
7609 \begin_layout Standard
7611 \begin_inset VSpace medskip
7615 \begin_inset Flex URL
7618 \begin_layout Plain Layout
7620 ftp://ftp.edpsciences.org/pub/aa/readme.html
7626 \begin_inset VSpace medskip
7632 \begin_layout Standard
7637 \begin_layout Standard
7638 このパッケージには取扱説明書がついていますが、本節は、本来の取扱説明書の代わりとなることを意図したものではなく、あなたの論文を正しい様式に整えるための小さな案内
7642 \begin_layout Standard
7643 この学術誌の出版元は、2001年1月1日以降、Springer社からEDP Science社に変更されていることにご注意ください。この出版社の変更によって、th
7644 esaurusコマンドの廃止など、スタイルファイルに若干の変更が加わっています。LyXのaaクラスは、スタイルファイルの最新版(第5.01版)をサポートしています
7645 。もし古い版が装備されている場合には、更新してください。互換性のために、古い(第4版)レイアウトは、
7651 $LyXDir/layouts/aapaper.layout
7656 \begin_layout Subsection
7660 \begin_layout Standard
7661 LyXとともに頒布されている例示用のひな型を土台として、書き始めることをお勧めします。ひな型を使用しない場合には、以下の設定にしてください。
7664 \begin_layout Itemize
7667 文書\SpecialChar \menuseparator
7674 を選択してください(まぁ、これは自明ですね)。
7677 \begin_layout Itemize
7682 オプションは変更しないで、既定値のままに設定しておいてください。全体のレイアウトはマクロが行うので、何も変更してはいけません。
7685 \begin_layout Subsection
7689 \begin_layout Standard
7690 最初に入力すべきものは、へッダ情報です。ヘッダ情報には、以下の7つの項目があり、いくつかは必須ではありません。
7693 \begin_layout Itemize
7701 \begin_layout Itemize
7709 \begin_layout Itemize
7717 \begin_layout Itemize
7725 \begin_layout Itemize
7730 :[非必須]著者が複数いる場合、抜き刷りの送付を依頼するのに連絡すべき人を記す。
7733 \begin_layout Itemize
7738 :[非必須]連絡用の電子メールアドレス。
7741 \begin_layout Itemize
7748 Received: <日付>; Accepted <日付>
7753 \begin_layout Standard
7760 コマンドは、へッダが終了した場所に、LyXが自動的に入れてくれるので、手動で挿入する必要はありません。各項目の順序は関係ありませんが、見た目のためと、実際の文書
7761 のレイアウトに合わせるために、上記の順序を維持しておくと良いでしょう。
7764 \begin_layout Standard
7765 現住所の付記などのために、へッダ部に脚注を挿入したい場合には、
7767 挿入\SpecialChar \menuseparator
7770 を使用して標準の脚注を挿入してください。この場合には、LyXは自動的に
7779 \begin_layout Standard
7780 これらのトピックの他に、このマクロは、LyXが対応していない、以下の3つのLaTeXコマンドを使用します。
7783 \begin_layout Itemize
7784 複数の著者名あるいは所属名を区切るための
7791 \begin_layout Itemize
7802 フィールドに現れる順に番号が付けられるので、各著者に番号マーカーを置く必要があります。
7805 \begin_layout Itemize
7812 は、至急連絡用に電子メールアドレスを付記します。
7815 \begin_layout Standard
7816 いずれの場合にも、LyX中に対応したコマンドを入力し、LaTeXコードとしてマークしてください。
7817 \begin_inset Flex Code
7820 \begin_layout Plain Layout
7829 \begin_layout Subsection
7833 \begin_layout Standard
7834 概要は、へッダ部の直後に置きます。第5版から、概要は環境からコマンドに変更され、一段落に限るという制限が加えられました。さらに、ここにはキーワードを含む項目を入
7835 れなくてはなりません。これは、まだLyXでは実装されていないため、LaTeXコマンド
7841 を手動で入力し、LaTeXコードとしてマークする必要があります。用例にある論文を参照してください。
7844 \begin_layout Subsection
7848 \begin_layout Standard
7849 A&A論文用レイアウトでは、文章を構造化するために、以下の環境がサポートされています。
7852 \begin_layout Itemize
7858 \begin_layout Itemize
7864 \begin_layout Itemize
7870 \begin_layout Itemize
7876 \begin_layout Itemize
7882 \begin_layout Itemize
7888 \begin_layout Itemize
7894 \begin_layout Itemize
7900 \begin_layout Itemize
7906 \begin_layout Itemize
7912 \begin_layout Itemize
7918 \begin_layout Itemize
7924 \begin_layout Subsection
7928 \begin_layout Standard
7933 レイアウトでは、まだサポートされていないコマンドがあります。そのうちいくつかは既に紹介しましたが、網羅するために、以下にすべて列挙しておきます。
7936 \begin_layout Itemize
7944 \begin_layout Itemize
7952 \begin_layout Itemize
7960 \begin_layout Itemize
7968 \begin_layout Itemize
7976 \begin_layout Itemize
7984 \begin_layout Itemize
7992 \begin_layout Itemize
8000 \begin_layout Standard
8001 これらのコマンドのいずれかを使いたい場合には、自分で入力する必要があります。
8003 これをLaTeXコマンドとしてマークすることを忘れないで下さい。
8006 \begin_layout Subsection
8010 \begin_layout Standard
8027 をサポートしていますので、ここでは詳しい説明はしません。
8031 をご覧ください。ただ、表は左揃えにしなくてはならないことに注意して下さい。そうするためには、表を選択して、
8033 編集\SpecialChar \menuseparator
8039 \begin_layout Standard
8040 一つだけ、特別なものがあります。それは、図横にキャプションを配置する図です。この図を作成するには、以下のようにしなくてはなりません。
8043 \begin_layout Enumerate
8046 挿入\SpecialChar \menuseparator
8047 フロート\SpecialChar \menuseparator
8050 を使って、幅広の図フロートを作成します。それから、図フロートのラベルを右クリックして
8051 \begin_inset Flex MenuItem
8054 \begin_layout Plain Layout
8055 設定\SpecialChar \ldots{}
8076 \begin_layout Enumerate
8080 \begin_layout Enumerate
8085 を押して、カーソルをキャプションの上に移動します。
8088 \begin_layout Enumerate
8092 \begin_layout Enumerate
8095 挿入\SpecialChar \menuseparator
8098 \SpecialChar \menuseparator
8118 \begin_layout Enumerate
8121 挿入\SpecialChar \menuseparator
8127 \begin_layout Enumerate
8139 \begin_layout Enumerate
8140 カーソルをキャプション文の後ろに移動し、
8142 挿入\SpecialChar \menuseparator
8145 を選択して、別のTeX差込枠を挿入し、その中に閉じ括弧を入力します 。
8148 \begin_layout Standard
8152 \begin_layout Subsection
8156 \begin_layout Standard
8157 投稿用には、論文を特別なダブルスペースレイアウトに整形しなくてはなりません。このためには、文書クラスに
8161 オプションを与える必要があります。これは、
8163 文書\SpecialChar \menuseparator
8170 クラスオプションフィールドを使って行うことができます。この欄に
8177 \begin_layout Subsection
8181 \begin_layout Standard
8186 ディレクトリには、LyXで書かれた例示用論文が収録されています。これは、元のマクロパッケージの例示用論文をLyX用に直したものです。これはヒントを得るために使用
8187 したり、元の LaTeXコードとLyXでの書き方の比較に使ったりしてください。
8190 \begin_layout Section
8194 \begin_layout Standard
8202 \begin_layout Subsection
8206 \begin_layout Standard
8207 AASTeXは、American Astronomical Society(アメリカ天文学会)が発行するAstrophysical Journal(宇宙物理学雑
8208 誌)同誌のLettersとSupplementを含む)・Astronomical Journal(天文学雑誌)・Publications of
8209 the Astronomical Society of the Pacific(太平洋天文学会誌)三誌への電子投稿を可能にするために、同学会が作成したマクロ集
8210 です。LyXは、これらの文書を生成する上で、なかでも数式・引用・画像処理能力において、優れたツールであることが認識されています。LyXは、同マクロ第5.0版以降を
8211 必要としており、できればここで説明されている第5.2版以降が望まれます。第5.0版未満の版は、LaTeX2.09で使用するよう企図されているため、根本的にLyXとは互
8212 換性がありません。AASTeXパッケージは、以下のAASTeXウェブサイトからダウンロードできるでしょう。
8215 \begin_layout Standard
8217 \begin_inset VSpace medskip
8221 \begin_inset Flex URL
8224 \begin_layout Plain Layout
8226 http://www.journals.uchicago.edu/AAS/AASTeX
8232 \begin_inset VSpace medskip
8238 \begin_layout Standard
8239 パッケージ中には、完備したユーザーの手引きが収録されていますので、LyXで論文を書き始める前に、その中身を完全に理解しておく必要があります。LyXは、AASTe
8240 Xの全コマンドを理解する必然性をなくすものではなく、すべてを手入力する苦労を減らすだけです。仕上がりのLaTeX文書が、論文を投稿しようとしているジャーナルの要
8241 求事項に完全に合致していることを確認するのは、あなたの責任です。
8244 \begin_layout Subsection
8248 \begin_layout Standard
8249 論文を書き始めるには、AASTeXひな型ファイルを土台に始めることを強くお勧めします。
8250 \begin_inset Flex MenuItem
8253 \begin_layout Plain Layout
8254 ファイル\SpecialChar \menuseparator
8260 をクリックして、新しいファイル名を入力し、ひな型
8264 を選んでください。これには、論文原稿のほとんどに共通して使われるフィールドが書き込まれています。書き込まれている文字列(括弧
8268 を含む)を正しい情報で上書きしてください。AASTeXコマンド・AASTeX環境の多くは、LyX中で直接実行することができますが、特に
8280 のようにできないものもあります。この二つのコマンドは、ひな型ファイルを開いたとき、赤色に表示されているのですぐ目に入ることでしょう。このようなコマンドは、直接L
8281 aTeXコードを入力して、それをTeXコードとしてマークしなければなりません。このようなコマンドは、TeXコードあるいはEvil Red Text(邪悪な赤い文
8282 )と呼ばれます。AASTeX文書に必要とされる TeXコードを最小にするよう努力はしていますが、まだ望まれるほどにはなっていません。
8285 \begin_layout Subsection
8289 \begin_layout Standard
8290 論文を満足する水準で書き終え、プレビューや印刷が正しく為されているとしても、まだ学術誌に投稿する前にしなくてはならない「後処理」が残されています。
8293 \begin_layout Enumerate
8294 論文を LaTeXファイルとして書き出します(
8296 ファイル\SpecialChar \menuseparator
8297 書き出し\SpecialChar \menuseparator
8303 \begin_layout Enumerate
8312 \begin_layout Enumerate
8319 コマンドよりも前のコメント行を削除します。
8322 \begin_layout Enumerate
8327 usepackage...{fontenc}
8344 \begin_layout Enumerate
8345 LaTeXプリアンブル中に意図的に置いたコマンド(
8349 ファイル中、「User specified LaTeX commands」というコメントの直後にあります)を除いて、
8361 の間のもの(これらのコマンドを含む)をすべて削除します。
8365 \begin_layout Enumerate
8366 編集後のファイルを LaTeXにかけて、正しく処理されることを確認します。
8369 \begin_layout Enumerate
8370 学術誌の要求事項を再読して、ファイル名と書式が正しいことを確認します。
8373 \begin_layout Enumerate
8377 \begin_layout Subsection
8381 \begin_layout Standard
8386 )に、各AASTeXコマンドの詳しい説明があるので、ここでは、各コマンドの使用法の詳細な説明は行いません。そこで、ここではユーザーの手引きに現れるとおりに一覧を
8387 列挙して、必要なところだけコメントを加えることにしましょう。
8390 \begin_layout Subsubsection
8394 \begin_layout Standard
8395 これらは期待通りに動作するので、ここでは列挙するだけにして、コマンドの説明されている節を挙げておきます。
8495 begin{thebibliography}
8503 (2.13.2)・全引用コマンドとその派生(2.13.2)・一般的なgraphicx図コマンド(2.14.1)・
8554 \begin_layout Standard
8555 以下のスタイルオプションも正しく動作します。
8576 \begin_inset Flex MenuItem
8579 \begin_layout Plain Layout
8580 文書\SpecialChar \menuseparator
8597 \begin_layout Subsubsection
8601 \begin_layout Standard
8602 以下のコマンドは動作しますが、若干の説明が必要です。
8605 \begin_layout Itemize
8606 以下の項目は、学術誌の編集者向けに取ってあるものですが、どうしても必要ならば、LaTeXプリアンブルに入れることができます。
8637 \begin_layout Itemize
8638 以下の項目は、LaTeXのプリアンブルに置くことができるもので、これらは、ひな型ファイルには、空の引数と共に含まれています。
8659 \begin_layout Itemize
8666 (2.3)―「単独で」使うことはできますが、段落の途中で使うことはできません。埋め込む必要がある場合には、TeXコードを使用してください。
8669 \begin_layout Itemize
8676 (2.3)―後ろに{}が付記されます。これはエラーの原因にはなりません。
8679 \begin_layout Itemize
8686 (2.6)―「単独で」使うことはできますが、段落の途中で使うことはできません。埋め込む必要がある場合には、TeXコードを使用してください。
8689 \begin_layout Itemize
8696 (2.8)―相互参照用タグを挿入することはできません。手動でタグ名を入力する必要があります。
8699 \begin_layout Itemize
8715 \begin_layout Itemize
8722 (2.9)―後ろに{}が付記されます。これはエラーの原因にはなりません。
8725 \begin_layout Itemize
8732 (2.11)―後ろに{}が付記されます。これはエラーの原因にはなりません。
8735 \begin_layout Itemize
8742 (2.14.2)―文章のはじめにカーソルを置いて
8743 \begin_inset Flex MenuItem
8746 \begin_layout Plain Layout
8747 挿入\SpecialChar \menuseparator
8753 を選択すれば、非必須のファイル名引数を挿入することができます。「短縮タイトル」とありますが、
8759 が必要とする型の非必須引数を挿入します。望むらくはいつの日か改名されることでしょう。
8762 \begin_layout Itemize
8769 (2.17.1)―非必須パラメータとしてカタログIDを取る以外は、
8778 \begin_layout Itemize
8785 (2.17.1)―非必須パラメータとしてカタログIDを取る以外は、
8794 \begin_layout Subsubsection
8795 実装されていないため、TeXコードを使用するもの
8798 \begin_layout Standard
8821 setcounter{equation}
8823 (2.12)・学術誌名略語(2.12.4)・
8859 (2.15.4:入れたい場所の後ろに、左側セルの最初の要素として挿入する。表中では、LyXの方法は使わないでください)・
8871 (2.15.5)・補遺(2.17)の大半(
8922 \begin_layout Subsubsection
8926 \begin_layout Standard
8927 references(2.12.3)環境とdeluxetable(2.14)環境は、少なくとも意味のあるような形で実装することができないので、無視してください。もし、
8928 絶対に、どうしても、deluxetableを使う必要があるならば、テキストエディタで別ファイルとして編集し、
8929 \begin_inset Flex MenuItem
8932 \begin_layout Plain Layout
8933 挿入\SpecialChar \menuseparator
8935 \begin_inset Formula $\text{\textipa{}}$
8938 \SpecialChar \menuseparator
8944 を使用して、LyXファイルに読み込むことを推奨します。この実例は、
8951 \begin_layout Subsection
8955 \begin_layout Subsubsection
8959 \begin_layout Standard
8960 LyXに、新しいレイアウトと文書クラスを認識させるには若干コツが要ります。もしうまく行かなかったら、次のようにしてみてください。
8963 \begin_layout Enumerate
8964 LaTeXが、AASTeXを検出できることを確認してください。AASTeX頒布版に含まれる
8972 でも可)を、LaTeXやAASTeXとまったく関係のないディレクトリにコピーして、
8979 \begin_layout Enumerate
8991 \begin_layout Enumerate
8994 ツール\SpecialChar \menuseparator
8997 を再度実行し、LyXを再起動してください。
9000 \begin_layout Enumerate
9001 ひな型ではなく、通常の新規ファイルを開いてください。AASTeXが、
9003 文書\SpecialChar \menuseparator
9009 \begin_layout Standard
9010 既存のAASTeX文書を処理する際に、AASTeXレイアウトを見つけられないとか、「タイトルレイアウトと通常のレイアウトを混在させないでください」といった警告が
9011 出るようであれば、正しい導入が行われていません。
9014 \begin_layout Subsubsection
9018 \begin_layout Standard
9019 既定では、LyXは、表のキャプションやタイトルを中央揃えにしようと試みます。これはAASTeXと悪い相互干渉を発生させるようですので、キャプションやタイトルのど
9022 編集\SpecialChar \menuseparator
9033 に設定してください。私のところではこれで解決しました。
9036 \begin_layout Subsubsection
9040 \begin_layout Standard
9041 若干の注意があります。(1)文献項目の本文中の空白取りが少しおかしくなることがあるようです。書誌情報を入力する際には、最後の著者と、著作年を入れる括弧の間にスペ
9054 ではだめです。(2)書誌情報の入力の仕方は、必ずしも自明ではありません。もっとも簡単な方法は、文書の最後に、最初の書誌情報をまず書き込み、それを
9058 環境としてマークすることです。すると、入力したものの前に、小さな灰色のボックスが現れます。このボックスをクリックして、残りの情報を入力してください。新しい参考文
9059 献を追加するには、既存の参考文献の後ろでリターンを押します。すると、新しいボックスの付いた新規行が出てくるので、後は同様にしてください。
9062 \begin_layout Subsubsection
9066 \begin_layout Standard
9067 AASTeXには、自前の図関連コマンド(たとえば
9073 )がありますが、私は(既定のgraphicxを使った)LaTeXの標準図コマンドの方がずっと好きです。望めば、図フロートボックスに、TeXコードで
9079 等のコマンドを挿入することはできますが、私には正しいレイアウトを得ることができた試しがありません。標準の画像コマンドを使えば、LyXは、
9083 usepackage{graphics}
9085 コマンドをLaTeXプリアンブルに挿入し、図をLaTeX2eの標準的な方法で取り扱って、文章の中にちりばめます。現在、ApJは、ちょうどこのようにして作成した図
9086 を受け入れていますが、AJはまだ「すべてを末尾に積み上げる」方法を使用しているかもしれません。
9089 \begin_layout Subsubsection
9093 \begin_layout Standard
9094 「素敵な」ものの中には、実装することも可能だったけれども、あえて実装しなかったものがあります。たとえば、紙の原稿ではダブルスペースであったとしても、LyXウィン
9095 ドウ中で、文章をダブルスペースにする意味はないと考えました。また、preprint様式とpreprint2様式を、独立したレイアウトにすることもしませんでした。
9096 いずれにしても、執筆時間のほとんどを、平の原稿モードで使うのがほとんどですから、これらの機能でディスクスペースを消費しないことにしました。
9099 \begin_layout Subsection
9103 \begin_layout Standard
9104 これまでに進んできた道のりは、長い人も短い人もいることでしょう。私には、ApJとAJに発表した論文がありますが、その努力の98%はLyX上で為されました。残りの
9105 2%が、LaTeXでの後処理と若干の後片付けです。投稿の過程では何のトラブルもなく、これらの学術誌が通常の投稿原稿と違う点に気づくことはなかったでしょう。ですか
9109 \begin_layout Section
9113 \begin_layout Standard
9123 \begin_inset VSpace bigskip
9126 AMS LaTeXレイアウトは、American Mathematical Society(アメリカ数学会)の刊行物に投稿する数学論文用のスタイルです。レイアウ
9127 トは、特定の学術誌向けに仕立てられてはいませんが、簡単にそうすることができます。各学術誌毎の指示については、AMSの説明書をご参照ください(通常は、TeX出力中
9128 の一行を変更する必要があるだけです)。AMSの説明書は、ウェブWeb上の
9129 \begin_inset Flex URL
9132 \begin_layout Plain Layout
9140 \begin_inset Flex URL
9143 \begin_layout Plain Layout
9145 ftp://ftp.ams.org/pub/tex/amslatex/
9150 から入手することができます。これらのレイアウトは、数学的な文章を書くのであれば、どんなときでも適切かつ有用であるはずです。
9153 \begin_layout Standard
9154 基本となるAMS LaTeXレイアウトには、以下の二つがあります。
9157 \begin_layout Itemize
9158 amsart:標準のAMS article書式。
9161 \begin_layout Itemize
9162 amsbook:標準のAMS book(実際はモノグラフ)書式。
9165 \begin_layout Standard
9166 これらのレイアウトには、それ自身では、AMSクラスを使用するのに必要最低限のものしか含まれていません。特に、定理や補題などを設定するのに使用される「theore
9167 m」環境は、何一つ含まれていません。これらは、代わりに
9168 \begin_inset Flex Code
9171 \begin_layout Plain Layout
9177 モジュールに収録されており、AMSクラスのいずれかを選択すると、このモジュールが既定で読み込まれるようになっています(これは別のクラスでも使用することができ、別
9178 のものに変えたいときは取り除くこともできます)。少し使用頻度の低いものとしては、
9179 \begin_inset Flex Code
9182 \begin_layout Plain Layout
9188 モジュールがあり、これは手動で読み込む必要があります。
9191 \begin_layout Standard
9192 既定では、定理類は、文書を通して連番が振られますが、これは
9193 \begin_inset Flex Code
9196 \begin_layout Plain Layout
9202 モジュールを読み込めば変更することができ、
9203 \begin_inset Flex Code
9206 \begin_layout Plain Layout
9213 \begin_inset Flex Code
9216 \begin_layout Plain Layout
9222 を用いても変更することができます。これらを用いると、出力は
9223 \begin_inset Formula $n.m$
9226 のようになり、最初の数字は節番号(または章番号)、次の数字はそれまで同節内(章内)に現れた出力の全数を表します。大半の環境は、連番なしでも用いることができます。
9227 連番なしのものは、環境名の後ろにアスタリスクを付けたもので表されます。連番なしの出力
9232 \begin_inset Flex Code
9235 \begin_layout Plain Layout
9244 \begin_layout Standard
9245 これらのモジュールは、AMSクラスで使用する
9250 \begin_inset Flex Code
9253 \begin_layout Plain Layout
9259 モジュールや上述の他のモジュールは、他のクラス、たとえば
9260 \begin_inset Flex Code
9263 \begin_layout Plain Layout
9270 \begin_inset Flex Code
9273 \begin_layout Plain Layout
9280 \begin_inset Flex Code
9283 \begin_layout Plain Layout
9292 \begin_layout Subsection
9296 \begin_layout Standard
9297 これらのレイアウトが提供している環境を列挙すると、長い一覧となります。AMS-LaTeXでは、実のところ、「theorem」環境の派生型を際限なく定義していくこ
9298 とが可能です。しかし、AMSは、LyXで利用可能になっている環境のみを使用することを推奨しています。
9301 \begin_layout Standard
9302 \begin_inset Flex Code
9305 \begin_layout Plain Layout
9312 \begin_inset Flex Code
9315 \begin_layout Plain Layout
9322 \begin_inset space ~
9326 \begin_inset Flex Noun
9329 \begin_layout Plain Layout
9336 \begin_inset Flex Noun
9339 \begin_layout Plain Layout
9346 \begin_inset Flex Noun
9349 \begin_layout Plain Layout
9356 \begin_inset Flex Noun
9359 \begin_layout Plain Layout
9366 \begin_inset Flex Noun
9369 \begin_layout Plain Layout
9376 \begin_inset space ~
9380 \begin_inset space ~
9386 \begin_layout Description
9390 \begin_layout Description
9391 現在の住所 住所と別に指定されているときには、著者の投稿時の仮初めの住所です。
9394 \begin_layout Description
9398 \begin_layout Description
9402 \begin_layout Description
9403 キーワード 論文中で論じられているトピックを識別するためのキーワードやキーフレーズ。
9406 \begin_layout Description
9409 Mathematical Reviews
9411 に説明が公表されているAMS Subject Classificationsの分類番号を指します。上述したAMSのウェブサイトでも、オンラインで見ることができま
9415 \begin_layout Description
9419 \begin_layout Description
9423 \begin_layout Description
9427 \begin_layout Standard
9429 \begin_inset Flex Code
9432 \begin_layout Plain Layout
9439 \begin_inset Flex Code
9442 \begin_layout Plain Layout
9448 モジュールの両方で提供され、後者の場合には、星付き(連番なし)版と星なし(連番)版の両方が提供されます。
9449 \begin_inset Flex Code
9452 \begin_layout Plain Layout
9458 モジュールでは、同環境の星付き版だけが提供されます。
9461 \begin_layout Theorem
9462 これは、通常、得られた主要な結果を叙述するのに使用されます。
9465 \begin_layout Corollary*
9466 これは直前の叙述から比較的直接に導き出せる結果を叙述するのに使います。これも主要な結果であることがあります。
9470 他の叙述を証明するために必要とされる、比較的小さな結果です。
9473 \begin_layout Proposition
9474 議論されている一般的な理論に(希望的には)何かを付け加えるような、主要ではない結果です。
9477 \begin_layout Conjecture
9478 正当化を与えずに述べられた叙述で、著者には証明法がわからないけれども、正しいと(少なくとも著者にとっては)思われるものです。
9481 \begin_layout Definition*
9482 これは自明でしょう。この環境のフォントは、前述の環境とは異なるフォントが使用されます。
9485 \begin_layout Problem
9486 これが何を指すかは必ずしも特定されていません。ご自分で解明してください。
9489 \begin_layout Exercise*
9494 この環境もtheorem型、通常は重要性の低い所見に用いられます。
9497 \begin_layout Claim*
9498 より大きな結果の証明を与える途中で、しばしば用いられます。
9502 一般的に、これらはある条件の特定の場合を取り上げて、長い議論を区切るのに用いられます。
9506 ケースの連番の枠組みは、それ自身で独立していて、他の連番の叙述とは区別されます。
9510 この環境の最後には、証了記号(通常は四角ですがスタイルによって変わります)が置かれます。この環境の中に別の環境を入れたい------たとえばケース環境など---
9511 ---場合で、証了記号は証明環境の終わりにのみ現れるようにしたい場合には、他の環境は証明環境の中に入れ子にしなくてはなりません。入れ子に関する情報については、
9522 \begin_layout Standard
9524 \begin_inset Flex Code
9527 \begin_layout Plain Layout
9536 \begin_layout Criterion*
9540 \begin_layout Algorithm*
9544 \begin_layout Axiom*
9545 議論されている系内部で真と仮定される性質や命題です。
9548 \begin_layout Condition*
9549 議論の現在の文脈で仮定されている条件を述べるのに、よく用いられます。
9556 \begin_layout Notation*
9560 \begin_layout Summary
9564 \begin_layout Acknowledgement*
9565 謝辞(acknowledgement)です。
9568 \begin_layout Conclusion*
9573 命題と同様の用いられ方をしますが、だいたい長くないものに使われるようです。
9576 \begin_layout Standard
9577 さらに、AMSクラスは、AMS LaTeXパッケージとAMSフォントパッケージを自動的に提供します。これらの環境を使用するためには、お使いのシステム上で利用可能
9581 \begin_layout Section
9587 \begin_layout Standard
9595 \begin_layout Subsection
9599 \begin_layout Standard
9600 これはAmerican Geophysical Society(アメリカ地球物理学会) の各学術誌向けのレイアウトファイルです。AGU発行のクラスファイルおよび
9602 \begin_inset Flex URL
9605 \begin_layout Plain Layout
9607 ftp://ftp.agu.org/journals/latex/journals
9612 にあります)が導入されていることが必要です。
9615 \begin_layout Subsection
9619 \begin_layout Standard
9628 は、定義し直されています。LyXの画面では、依然として
9636 と表示されますが、AGUクラスにおけるLaTeXの対応物は、
9647 \begin_layout Standard
9684 があります。これらは、ほとんど草稿用属性で、AGUクラス説明書で説明されています。
9687 \begin_layout Standard
9688 おそらく、これはまだ恐ろしく不完全です。
9691 \begin_layout Subsection
9695 \begin_layout Standard
9704 (Plate)が新しいフロートです。また、
9711 \begin_layout Subsection
9715 \begin_layout Itemize
9718 Journal of Geophysical Research
9727 \begin_layout Standard
9728 ここにあなたの作ったものを加えてください。難しくはありません。
9739 \begin_layout Subsection
9743 \begin_layout Standard
9744 新しいレイアウトを使うためには、新規文書の作成時に以下の手順を行う必要があります。
9747 \begin_layout Enumerate
9754 ツール\SpecialChar \menuseparator
9757 メニュー項目で行うことができます(AGUの論文は常に英語ですよね。ですから他の言語は
9764 \begin_layout Enumerate
9769 と入力してください(すみません、これはバグです)。
9772 \begin_layout Enumerate
9773 BibTeX差込枠の2番目のフィールドに
9781 を使用していることを確認してください。標準スタイルはうまく動作しません。
9784 \begin_layout Section
9788 \begin_layout Standard
9796 \begin_layout Subsection
9800 \begin_layout Standard
9801 Broadwayは演劇を書くためのものです。書式はHollywoodよりも装飾的で、それほど標準化されていません。この書式はワークショップに向いているでしょう。
9804 \begin_layout Subsection
9808 \begin_layout Standard
9812 \begin_layout Subsection
9816 \begin_layout Standard
9821 の名前をラベルとして挿入し、名前を挿入する際には、このラベルを相互参照してください。相互参照ダイアログには、登場人物の現在の配役が表示されます。
9824 \begin_layout Subsection
9828 \begin_layout Standard
9829 USレター寸法で、余白は左1.6インチ、右0.75インチ、上0.5インチ、下0.75インチです。
9832 \begin_layout Subsection
9836 \begin_layout Standard
9837 以下の環境を使うことができます。右に記してあるキー割当ては、broadway.bindを使った場合のものです。
9840 \begin_layout Itemize
9844 \begin_inset Newline newline
9849 これは使わなくていいはずですが、他の環境が当てはまらない場合のためにここに挙げておきます。
9852 \begin_layout Itemize
9856 \begin_inset space \hfill{}
9860 \begin_inset Newline newline
9865 舞台設定と動作の説明に用います。最初に話者名をすべて大文字で書いておきます。
9868 \begin_layout Itemize
9872 \begin_inset space \hfill{}
9876 \begin_inset Newline newline
9881 自動的に連番が振られます。連番は、画面上ではアラビア数字ですが、出力ではローマ数字です。
9884 \begin_layout Itemize
9888 \begin_inset space \hfill{}
9892 \begin_inset Newline newline
9897 幕の副題です。単に中央揃えの文になります。
9900 \begin_layout Itemize
9904 \begin_inset space \hfill{}
9908 \begin_inset Newline newline
9913 自動的に連番は振られませんので、手動で番号を付けてください。これは私がどうすればいいか分からなかったためです。
9916 \begin_layout Itemize
9920 \begin_inset space \hfill{}
9924 \begin_inset Newline newline
9929 ト書きの特殊な場合で、カーテンが上がるときの舞台設定と動作を説明します。
9932 \begin_layout Itemize
9936 \begin_inset space \hfill{}
9940 \begin_inset Newline newline
9945 話者(役者)の配役です。すべて大文字で中央揃えに置かれます。
9948 \begin_layout Itemize
9952 \begin_inset space \hfill{}
9956 \begin_inset Newline newline
9961 話者への指示です。括弧は自動的に挿入されます。画面上には左括弧(のみが表示されますが、印字出力には両方の括弧が表示されます。この環境は、
9968 \begin_layout Itemize
9972 \begin_inset space \hfill{}
9976 \begin_inset Newline newline
9984 \begin_layout Itemize
9988 \begin_inset space \hfill{}
9992 \begin_inset Newline newline
10000 \begin_layout Itemize
10004 \begin_inset space \hfill{}
10010 \begin_layout Itemize
10014 \begin_inset space \hfill{}
10020 \begin_layout Itemize
10024 \begin_inset space \hfill{}
10030 \begin_layout Section
10034 \begin_layout Standard
10039 は、ドイツの慣習に則った書簡の組版を行うのに用いられます。ひな型ファイルが
10041 .../lyx/share/templates
10043 にあるので、それを土台として使用してください。
10046 \begin_layout Section
10052 \begin_layout Standard
10060 \begin_layout Subsection
10064 \begin_layout Standard
10065 これはEuropean Geophysical Society(欧州地球物理学会)の学術誌向けのレイアウトファイルです。必要とされる
10070 \begin_inset Flex URL
10073 \begin_layout Plain Layout
10075 http://www.copernicus.org/
10083 \begin_layout Subsection
10087 \begin_layout Standard
10124 があります。現在のレイアウトファイルは、残念ながらほとんどモジュール化されておらず、さまざまな
10128 ファイルを読み込む形に変えた方が便利になると思われます。
10131 \begin_layout Section
10135 \begin_layout Standard
10138 See the LyX template file
10143 It contains all infos you need.
10146 \begin_layout Section
10148 \begin_inset CommandInset label
10157 \begin_layout Standard
10165 \begin_layout Subsection
10169 \begin_layout Standard
10170 本節では、プレゼンテーション用のスライドを作るための、LyXの使用法を解説します。スライドを作ることのできる文書クラスには、slides・FoilTeX・sem
10171 inar・beamer・powerdotといったクラスがありますが、本節では、そのうちslidesの解説を行います。
10174 \begin_layout Standard
10175 誤解のないように、わかりやすく明確に、もう一度言っておきます。
10178 \begin_layout Standard
10179 \begin_inset VSpace bigskip
10185 \begin_layout Standard
10191 presentation (FoilT
10197 \begin_layout Plain Layout
10215 \begin_layout Standard
10216 \begin_inset VSpace bigskip
10222 \begin_layout Standard
10225 transparencies (slides)
10228 \begin_inset CommandInset ref
10230 reference "sec:slitex"
10234 節をご覧ください。お使いのコンピュータに
10240 presentation (FoilT
10244 \begin_layout Plain Layout
10264 \begin_layout Standard
10269 クラスは、LaTeX2eの一部として含まれているLaTeXクラスファイル
10273 の第2.1版とともに使われるように設計されています。
10276 \begin_layout Subsection
10280 \begin_layout Standard
10281 いうまでもなく、この文書クラスを使うには、
10283 文書\SpecialChar \menuseparator
10284 設定\SpecialChar \menuseparator
10293 presentation (FoilT
10297 \begin_layout Plain Layout
10310 ダイアログ中には、以下のように、このクラスに特有の設定がいくつかあることを知っておかなくてはなりません。
10313 \begin_layout Itemize
10326 オプションは変更しないでください。これらは
10333 \begin_layout Itemize
10334 既定のフォント寸法は20ptであり、17pt・25pt・30ptを選択することも可能です。
10337 \begin_layout Itemize
10346 ですが、数式ではすべて、通常のローマン体が使用されます。
10349 \begin_layout Itemize
10351 \begin_inset space \thinspace{}
10354 mmスライド用の特殊寸法の他、A4とレター大の用紙寸法をサポートします。A5・B5・リーガル・エグゼクティブ大の用紙寸法はサポートしていません。
10357 \begin_layout Itemize
10362 の設定は無視されますので、わざわざ変更する必要はありません。フロートはすべて、本文中で定義された位置に表示されます。
10365 \begin_layout Itemize
10370 の設定は、若干異なった挙動を示します。FoilTeXでは、ユーザ定義のロゴをはじめ、フッタとへッダに広範な設定ができます。詳細については第
10371 \begin_inset CommandInset ref
10373 reference "sec:foilfoot"
10377 節をご覧ください。タイトルページは、文書中の他のページとは異なった取扱がなされ、ページ番号は
10381 付けられず、(ロゴが定義されていれば)ロゴは、
10385 ページ下部中央に表示されます。使用できるページ様式とその挙動は、以下の通りです。
10389 \begin_layout Labeling
10390 \labelwidthstring MMMMMMM
10397 最終出力には、ページ番号をはじめ、へッダ・フッタが出力されません(もちろん脚注は除きます)。
10400 \begin_layout Labeling
10401 \labelwidthstring MMMMMMM
10408 最終出力には、ページ番号がページ下部の中央に出力されますが、他のへッダ・フッタは出力されません(脚注除く)。
10411 \begin_layout Labeling
10412 \labelwidthstring MMMMMMM
10417 ページ番号が右下隅に出力されます。追記したへッダ・フッタも出力されます。これが既定値です。
10420 \begin_layout Labeling
10421 \labelwidthstring MMMMMMM
10430 パッケージを使えるようにします。ただし、FoilTeXパッケージの作者は、ページレイアウトが崩れる可能性があるので、これを使用することは勧めないと言及しています
10435 \begin_layout Subsubsection
10439 \begin_layout Standard
10444 ダイアログの任意設定クラスオプションボックスで使うことができます。
10447 \begin_layout Labeling
10448 \labelwidthstring MMMMMMx
10453 これは、ページレイアウトを縦7.33インチ横11インチに設定します。これは35
10454 \begin_inset space \space{}
10457 mmスライドの縦横比にほぼ等しく、このメディアを作る作業が若干易しくなります。
10460 \begin_layout Labeling
10461 \labelwidthstring MMMMMMx
10466 タイトルページを除くすべてのページのへッダの下に罫線を入れます。
10469 \begin_layout Labeling
10470 \labelwidthstring MMMMMMx
10475 タイトルページを除くすべてのページのフッタの上に罫線を入れます。
10478 \begin_layout Labeling
10479 \labelwidthstring MMMMMMx
10488 文書を作成する度に自動的に設定されます。このオプションは、横向きに設定されたページを回転させるのに、dvipsドライバを使うようFoilTeXに指示します。
10491 \begin_layout Labeling
10492 \labelwidthstring MMMMMMx
10497 このオプションは、用紙寸法を横向きページ大に変更するだけで、回転は行いません。したがって、このオプションを使う場合は、各ページを回転させる外部プログラムを使用
10498 する、プリンタに用紙を横向きに給紙する必要があります。また、このオプションは、
10506 環境の役割を逆転させることに注意してください(これらの環境については次節で説明します)。
10509 \begin_layout Labeling
10510 \labelwidthstring MMMMMMx
10518 \begin_layout Labeling
10519 \labelwidthstring MMMMMMx
10527 \begin_layout Subsection
10531 \begin_layout Standard
10532 他のクラスで標準的にサポートされている環境は、
10536 クラスでもサポートされています。それ以外に、FoilTeXが提供している環境と、LyXが付け加えた環境があります。以下の環境は、他のクラスと共通の環境です。
10539 \begin_layout Standard
10543 \begin_layout Plain Layout
10547 begin{multicols}{2}
10555 \begin_layout Itemize
10561 \begin_layout Itemize
10567 \begin_layout Itemize
10573 \begin_layout Itemize
10579 \begin_layout Itemize
10585 \begin_layout Itemize
10591 \begin_layout Itemize
10597 \begin_layout Itemize
10603 \begin_layout Itemize
10609 \begin_layout Itemize
10615 \begin_layout Itemize
10621 \begin_layout Itemize
10627 \begin_layout Itemize
10633 \begin_layout Itemize
10639 \begin_layout Itemize
10645 \begin_layout Itemize
10651 \begin_layout Itemize
10657 \begin_layout Itemize
10663 \begin_layout Standard
10667 \begin_layout Plain Layout
10679 \begin_layout Standard
10680 つまり、節区切りを除けば、主な環境のすべてです。一枚のスライドは、基本的にタイトルと本文を備えた自己完結した節なので、
10684 TeXは新しいスライドを始める以下のようなコマンドを備えています。
10687 \begin_layout Itemize
10693 \begin_layout Itemize
10696 横置きスライドタイトル(Rotatefoilhead)
10699 \begin_layout Standard
10700 LyXは、以下のような、これらを若干修正した環境も用意しています。
10703 \begin_layout Itemize
10706 スライドタイトル(小)(ShortFoilhead)
10709 \begin_layout Itemize
10712 横置きスライドタイトル(小)(ShortRotatefoilhead)
10715 \begin_layout Standard
10719 \begin_layout Standard
10720 スライドは、アイデアを説明したり、新しい定理を説明したりするのにしばしば使われるので、
10724 TeXはそれらを説明するのに便利な環境を幅広く用意しています。
10727 \begin_layout Standard
10731 \begin_layout Plain Layout
10735 begin{multicols}{2}
10743 \begin_layout Itemize
10749 \begin_layout Itemize
10755 \begin_layout Itemize
10761 \begin_layout Itemize
10767 \begin_layout Itemize
10773 \begin_layout Itemize
10779 \begin_layout Itemize
10785 \begin_layout Itemize
10791 \begin_layout Itemize
10797 \begin_layout Itemize
10803 \begin_layout Itemize
10809 \begin_layout Standard
10813 \begin_layout Plain Layout
10825 \begin_layout Standard
10826 星付き版は連番が振られず、星なし版は連番が振られます。他に、LyXで追加された以下の2つの箇条書き環境があります。
10829 \begin_layout Itemize
10835 \begin_layout Itemize
10841 \begin_layout Standard
10842 FoilTeXには、強力なヘッダ機能とフッタ機能があり、これらはプリアンブルで設定するのが最良ですが、文章中のどこでも設定することができます。もし文書中でこれら
10843 の設定を変更したい場合には、スライドの一番上、foilheadの直後で行うのが良いでしょう。
10846 \begin_layout Standard
10847 この目的のためには、以下のコマンドスタイルがあります(
10852 \begin_layout Standard
10856 \begin_layout Plain Layout
10860 begin{multicols}{2}
10868 \begin_layout Itemize
10874 \begin_layout Itemize
10880 \begin_layout Itemize
10886 \begin_layout Itemize
10892 \begin_layout Itemize
10899 \begin_layout Standard
10900 \begin_inset space ~
10907 \begin_layout Standard
10911 \begin_layout Plain Layout
10923 \begin_layout Standard
10924 FoilTeXが提供しているコマンドで、LyXが直接サポートしていないコマンドもありますが、これらの説明と使い方については、第
10925 \begin_inset CommandInset ref
10927 reference "sec:unsuppfoils"
10934 \begin_layout Subsection
10938 \begin_layout Standard
10939 この節は、様々な環境を使ってスライドの組を作る方法を簡単に紹介します。スライド組の例をご覧になりたい場合は、LyXの
10950 \begin_layout Subsubsection
10954 \begin_layout Standard
10975 は独立したページにタイトルを作成します。
10979 環境を使用しなかった場合には、LaTeXは(出力を生成し直したときにはいつも)その時点の日付を挿入します。
10982 \begin_layout Subsubsection
10986 \begin_layout Standard
10987 前述のように、新しいスライドを開始するには、4つの方法があります。縦向きのスライドを開始するには、
10993 スライドタイトル(小)(ShortFoilhead)
10995 を使用します。両環境の違いは、スライドタイトル(foilhead)とスライド本文の間の余白の違いです。
10998 \begin_layout Standard
11001 横向きスライドタイトル(Rotatefoilhead)
11005 ShortRotatefoilhead)
11007 環境を使用して生成します。ここでも両環境の違いは、タイトルと本文の間の余白のみです。どちらの場合も、(小)と記された版は、タイトルと本文の間の余白が、0.5インチ
11011 \begin_layout Standard
11012 横向きのスライドをサポートする際、一つ問題となるのは、スライドを回転させようと思うと、PostScript出力を生成するのに
11016 ドライバを使用することを要求してしまうことです。もしスライドをプリンタに横に給紙することができれば、
11020 ドライバを持っていなくても、横向きのスライドをつくることができます ;-)
11023 \begin_layout Subsubsection
11027 \begin_layout Standard
11028 LyX中の小さなバグによって、これらの環境の同じ型をお互いに直接続けて置くことはできません。これらは何かによって分離されなくてはなりません。仮に二つ続けて置いて
11029 も、2つの環境をマージしたかのように、前の環境が延長されるだけです。この問題を回避するにはどうすればよいのでしょうか。最も簡単な方法は、二つの環境の間に何か文章
11034 」だけから成るLaTeX環境を置くことです。これによって、LyXは2つの別々の環境を生成するように強制され、正しいLaTeX出力を得ることができます。LyX頒布
11035 版に含まれる用例ファイルに例があります。この問題は、二つの同じ定理型環境を立て続けに置こうとした場合にのみ発生することに注意してください。
11038 \begin_layout Subsubsection
11042 \begin_layout Standard
11043 他のクラスでも共通にサポートされている箇条書き様式すべてに加えて、二つの新しい様式を使用することができます。ここでは、その新しい様式のみを説明することにします。
11044 他の箇条書き環境について詳しく知りたい場合には、
11048 をご覧ください。記号による箇条書きを使用したい場合には、上記第
11049 \begin_inset CommandInset ref
11051 reference "sec:ブリット"
11059 の節も、読まれることが望ましいでしょう。
11062 \begin_layout Standard
11071 の二つの新しい様式は、チェック印や×印を箇条書きのラベルに使用する専用の環境を提供することで、予定一覧や正誤一覧を作りやすくするように設計されたものです。これら
11076 の派生型を専用に用意したものに過ぎません。ただし、これらは、
11080 パッケージが導入済であることを要求します。
11083 \begin_layout Subsubsection
11087 \begin_layout Standard
11088 FoilTeXでは、図表フロートは、本文中の挿入箇所にこれらが正確に表示されるように再定義されており、ページの上部やユーザー指定場所に押しのけたりはしないように
11089 なっています。たとえフロート配置の設定に変更を加えたとしても、単に無視されます。
11092 \begin_layout Subsubsection
11094 \begin_inset CommandInset label
11096 name "sec:foilfoot"
11103 \begin_layout Standard
11112 の二つは、左フッタ文を制御するものです。前者は、グラフィックスのロゴをスライドに入れるためのもので、既定値は「-Typeset by
11116 TeX-」となっています。後者は、「機密事項」などのように、聴衆に秘密区分を提示することを意図しています。既定値では、何も設定されていません。
11119 \begin_layout Standard
11132 (左上)を使って文字を入れることができます。
11135 \begin_layout Subsection
11141 \begin_inset CommandInset label
11143 name "sec:unsuppfoils"
11150 \begin_layout Standard
11162 \begin_layout Subsubsection
11166 \begin_layout Standard
11189 は、変更したい長さに付けられている名前で置き換え、
11193 は、その長さの値で置き換えます。長さはすべて、インチ(in)・ミリメートル(mm)・ポイント(pt)のような長さ単位か、
11199 のように文書比あるいはフォント基準の長さで指定する必要があります。
11202 \begin_layout Standard
11209 で指定される長さを調節することによって、スライドタイトルとスライド本文の間の余白を変更することができます。たとえば、スライドタイトルをすべて0.5
11210 \begin_inset space \space{}
11213 inだけスライド本文に近づけるには、プリアンブルに
11219 foilheadskip}{-0.5in}
11224 \begin_layout Standard
11225 フロート周囲の余白は、以下の長さを設定することで調整することができます。
11228 \begin_layout Labeling
11229 \labelwidthstring MMMMMMMMMMM
11239 \begin_layout Labeling
11240 \labelwidthstring MMMMMMMMMMM
11250 \begin_layout Labeling
11251 \labelwidthstring MMMMMMMMMMM
11261 \begin_layout Labeling
11262 \labelwidthstring MMMMMMMMMMM
11269 この長さを調整することでキャプションを、周囲の本文より短くすることができます。
11275 に対する相対的な長さで調整するのが最も良いでしょう。
11278 \begin_layout Standard
11279 以下のようなタイトルページ関連の長さもあり、タイトルが長い場合や、著者が複数いる場合に使うと便利かもしれません。
11282 \begin_layout Labeling
11283 \labelwidthstring MMMMMMMMMMM
11293 \begin_layout Labeling
11294 \labelwidthstring MMMMMMMMMMM
11312 \begin_layout Labeling
11313 \labelwidthstring MMMMMMMMMMM
11327 \begin_layout Labeling
11328 \labelwidthstring MMMMMMMMMMM
11346 \begin_layout Labeling
11347 \labelwidthstring MMMMMMMMMMM
11365 \begin_layout Standard
11366 最後に紹介する長さ関連コマンドは、箇条書き環境すべてに使用できるものです。
11372 を箇条書き環境の内側に置くと、項目間の垂直余白がすべて取り除かれます。これは長さではなくコマンドなので、上述のもののように
11378 を使う必要がないことに注意してください。
11381 \begin_layout Subsubsection
11385 \begin_layout Standard
11402 で定義したロゴを特定のページに入れるかどうかを制御します。
11408 をプリアンブルに入れると、全スライドからロゴが取り除かれます。特定のスライドにのみロゴを付けたくない場合は、当該ページのスライドタイトルの直後に直接
11414 を置き、次のスライドタイトルの直後に直接
11423 \begin_layout Standard
11432 ページ様式を使用することを選択した場合には、横置きページのヘッダとフッタが回転後も正しく配置されるように、プリアンブルに
11446 パッケージが提供するページレイアウトと
11450 クラスの提供するページレイアウトの間に衝突が発生するためです。
11453 \begin_layout Section
11454 Hollywood(Hollywoodスペック・スクリプト)
11457 \begin_layout Standard
11465 \begin_layout Subsection
11469 \begin_layout Standard
11470 脚本を正しい書式で書くことは、ハリウッドにおける「通過儀礼」です。ハリウッドの脚本は、読み手が内容に集中できるようにし、俳優にとっても読みやすくかつ親しみやすい
11471 ように設計されています。脚本の1ページは、映画の1分でなければならず、銀幕上で見えたり聞こえたりしないものは、脚本に混入してはなりません。また、全体を通してCo
11473 \begin_inset space \space{}
11476 ptフォントを使わなければならず、イタリック体は用いてはいけません。
11479 \begin_layout Subsection
11483 \begin_layout Standard
11488 あってはなりません。もし話者行の塊が、次頁にまたがる場合には、
11492 名を再度書き、その後に(Cont'd)と加えます。
11495 \begin_layout Subsection
11499 \begin_layout Standard
11504 名はラベルとして挿入し、話者名を挿入するには、そのラベルを相互参照してください。相互参照ダイアログは、登場人物の現在の配役を表示することになります。これは、ト書
11505 きに話者名を挿入するのにも使用することができます。
11508 \begin_layout Subsection
11512 \begin_layout Standard
11513 USレター寸法で、左余白1.6インチ・右余白0.75インチ・上余白0.5インチ・下余白0.75インチです。
11516 \begin_layout Subsection
11520 \begin_layout Standard
11521 以下の環境が利用可能です。右に示されているキー割当てを使用するには、hollywood.bindを使用してください。
11524 \begin_layout Itemize
11528 \begin_inset Newline newline
11533 他の環境が動作しない場合に使用しますが、これを使うことは避けるようにしてください。
11536 \begin_layout Itemize
11538 \begin_inset space \hfill{}
11546 \begin_inset Newline newline
11549 通常、この後には「Sallyは目を覚ますと」のように続きます。
11552 \begin_layout Itemize
11556 \begin_inset space \hfill{}
11560 \begin_inset Newline newline
11565 新しい屋内(INTERIOR)カメラの設定を指定します。この後には、かならずDAYやNIGHTなどを指定して、必要な照明を定義します。この行はすべて大文字で書き
11569 \begin_layout Itemize
11573 \begin_inset space \hfill{}
11577 \begin_inset Newline newline
11582 屋外(EXTERIOR)カメラの設定を指定します。この行はすべて大文字で書きます。
11585 \begin_layout Itemize
11589 \begin_inset space \hfill{}
11593 \begin_inset Newline newline
11601 \begin_layout Itemize
11605 \begin_inset space \hfill{}
11609 \begin_inset Newline newline
11614 への指示。自動的に括弧()が挿入されますが、LyX上で表示されるのは、左括弧( のみです。印刷出力には右括弧も表示されます。
11617 \begin_layout Itemize
11621 \begin_inset space \hfill{}
11625 \begin_inset Newline newline
11633 \begin_layout Itemize
11637 \begin_inset space \hfill{}
11641 \begin_inset Newline newline
11646 カメラの動きの指示。例:CUT TO:。
11649 \begin_layout Itemize
11653 \begin_inset space \hfill{}
11659 \begin_layout Itemize
11663 \begin_inset space \hfill{}
11669 \begin_layout Itemize
11673 \begin_inset space \hfill{}
11679 \begin_layout Itemize
11683 \begin_inset space \hfill{}
11689 \begin_layout Subsection
11693 \begin_layout Itemize
11697 \begin_layout Itemize
11701 \begin_layout Itemize
11706 \begin_layout Itemize
11711 \begin_layout Itemize
11712 PAN — camera movement
11715 \begin_layout Itemize
11716 INSERT — cut to close-up of
11719 \begin_layout Section
11723 \begin_layout Standard
11726 Panayotis Papasotiriou
11731 \begin_layout Subsection
11735 \begin_layout Standard
11738 International Journal of Modern Physics C
11740 への電子投稿を可能にするためのマクロ集です。同様に、ijpmdパッケージは、
11742 International Journal of Modern Physics D
11744 へ投稿する現行を作成するためのものです。両誌ともWorld Scientific社の刊行です。対応する文書クラス名は、それぞれ
11752 です。これらのファイルは、著者のための指針とともに、
11753 \begin_inset Flex URL
11756 \begin_layout Plain Layout
11758 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
11764 \begin_inset Flex URL
11767 \begin_layout Plain Layout
11769 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
11774 の各サイトからダウンロードすることができます。両パッケージは、標準「article」パッケージの修正版であり、両者は(一部を除き)ほぼ同一です。LyXは、これら
11775 のパッケージのほとんどの機能をサポートしています。私は両誌へ投稿する論文をLyXで書き上げましたが、何らの問題も生じませんでした。
11778 \begin_layout Subsection
11782 \begin_layout Standard
11783 通常と同じく、論文を書く上で最も易しい方法は、ひな型を使って書き始めることです。
11785 ファイル\SpecialChar \menuseparator
11796 を選択してください。すると、原稿で良く使用されるフィールドを含んだ、ほぼ空の文書ができますので、既存のフィールド(鍵括弧
11800 を含む)を正しい情報で置き換えてください。以下の各点にご留意ください。
11803 \begin_layout Enumerate
11804 両パッケージでは、フォント寸法や文書のページ様式を変更することが禁じられているので、LyX中でこれらを変更することはできません。
11807 \begin_layout Enumerate
11808 文書言語は変更してはいけません。論文をプレビューする前に、babelパッケージが使用されていないことを確認してください。これは、
11810 ツール\SpecialChar \menuseparator
11825 をクリックすれば、設定することができます(この変更を固定するなら
11832 \begin_layout Enumerate
11833 キーワードを定義するに際しては、「キーワード」様式を用いなくてはなりません。
11836 \begin_layout Enumerate
11837 ijmpcパッケージが提供する「分類コード」様式は、PACS番号のような分類コードを定義するのに使用することができます。この機能は、ijmpdパッケージではサポ
11838 ートされていませんので、ご注意ください。
11841 \begin_layout Enumerate
11842 「定義」「ステップ」「例」「注記」「記法」「定理」「証明」「系」「補題」「命題」「命題(Prop)」「問題」「主張」「予想」といった新しい環境を使用することがで
11843 きます。これらの使い方は、大凡自明でしょう。LyXは、これらの環境をすべてサポートし、それぞれについて、適切なラベルと文字様式および連番スキームを使用します。
11846 \begin_layout Enumerate
11847 両パッケージは、単純な引用を使用しますので、natbibパッケージは使用してはなりません。LyX中では、引用参照は通常通り表示されますが、出力では上付き文字とし
11848 て表示されます。引用に通常の本文を使用したい場合には、「See Ref.
11849 \begin_inset space \space{}
11865 \begin_layout Enumerate
11866 両パッケージには、「謝辞」環境がありません。謝辞を置くには、「節*」環境を使用してください。
11869 \begin_layout Enumerate
11878 であれば、入れることができます。LyX上では、「付録領域」という特別な環境があり、これを使って付録の開始位置を指定することができます。この環境は空のままにしてお
11879 かなくてはなりません。この環境は、LaTeXコマンドを書き出すだけで、実際に出力は行いません。LyX上では、青字で「Appendix」という単語が表示され、この
11880 箇所より後の節はすべて付録であることを明示します。「付録領域」は、最初の付録の前に
11884 ことに注意してください。さもなくば、出力中において、付録はすべて通常の節として連番が振られてしまいます。
11887 \begin_layout Enumerate
11888 ijmpcおよびijmpdパッケージは、表キャプションを実装するのに
11892 コマンドを使用します。そのため、LyXが作成した表は正しく印字されますが、そのキャプションは無視されます。しかし、TeXコードを少し使えば、この問題を回避して、
11893 キャプションを望み通り印字することができるようになります。そうするには、表フロートを通常通り作成して、キャプションを削除し、代わりにTeXコードで
11899 (ママ)と入れます。そこに表の内容を入れて、直後をTeXコード
11903 で閉じてください。このからくりがどのように実装されているかを見るには、ひな型ファイルに入っている表の例を精査してみてください。別の方法としては、表キャプションが
11908 ファイルに収め、このファイルをLyX文書に取り込んでください(
11910 挿入\SpecialChar \menuseparator
11911 ファイル\SpecialChar \menuseparator
11914 )。表フロートの作り方についての詳細は、各パッケージに含まれている
11925 \begin_layout Subsection
11929 \begin_layout Standard
11930 論文を投稿する前には、LyX文書をLaTeXファイルに書き出し(
11932 ファイル\SpecialChar \menuseparator
11933 書き出し\SpecialChar \menuseparator
11940 \begin_layout Plain Layout
11941 実は、LaTeX (plain)とpdflatexとの間で選択ができます。論文を準備するのにpdflatexを使用しようとするのであれば、取り込んである画像がP
11942 DF形式に変換され、pdflatexで使用できるように、pdflatexオプションを指定しなくてはなりません。
11951 ファイルに以下の変更を加える必要があります。
11954 \begin_layout Enumerate
11961 コマンドより前にあるコメント行を削除する。
11964 \begin_layout Enumerate
11965 自身で明示的にLaTeXプリアンブルに置いたコマンドを除き、
11977 コマンドの間にあるものをすべて削除する。
11980 \begin_layout Standard
11985 ファイルを保存し、必要な回数LaTeXで処理してください。それによって得られた
11989 文書も確認された方がよろしいでしょう。
11992 \begin_layout Subsection
11996 \begin_layout Standard
11997 TeXコードを使用するのは、2つのコマンドに限られ、これらは文書の最初に置かれなくてはなりません。論文をひな型
12005 を使用して書き始めた場合には、これら必要なTeXコードは、すでに書き込まれています。通常、これらを削除する必要はありません。2つのうち1番めのTeXコードのみが
12006 、奇数ページおよび偶数ページの上部に印字する情報(それぞれ著者名と論文の短縮タイトル)を指定するために、修正する必要があります。このTeXコードは、
12010 markboth{著者名}{論文の短縮タイトル}
12015 \begin_layout Section
12019 \begin_layout Standard
12027 \begin_layout Subsection
12031 \begin_layout Standard
12032 iopartパッケージは、Institute of Physics(イギリス物理学会)発行の学術誌へ電子的に投稿する原稿を作成するための文書クラスを提供していま
12033 す。iopartクラスを使用した論文作成方法の著者用説明書は、ウェブサイト
12034 \begin_inset Flex URL
12037 \begin_layout Plain Layout
12039 ftp://ftp.iop.org/pub/journals/latex2e
12044 からiopartパッケージとともにダウンロード可能です。
12047 \begin_layout Subsection
12051 \begin_layout Standard
12052 論文を書くもっとも簡単な方法は、LyXの用例ファイルフォルダにある
12056 を土台にすることです。このファイルを開き、新しい名前で保存して、書き始めてください。この用例ファイルは、特定の環境の使用法についても説明しています。もっとも重要
12057 な助言として、以下の点にご注意ください。
12060 \begin_layout Itemize
12061 文書がPDF・PS・DVIにコンパイルできるようにするためには、文書設定の
12069 関連オプションが有効になっていないことを確認してください!
12072 \begin_layout Itemize
12073 タイトル環境の選択如何によって、論文の種類が定義されます。種類毎に以下の環境をタイトルに使用してください。
12077 \begin_layout Itemize
12083 \begin_layout Itemize
12089 \begin_layout Itemize
12095 \begin_layout Itemize
12101 \begin_layout Itemize
12107 \begin_layout Itemize
12115 \begin_layout Itemize
12116 Preliminary communication用には
12121 \begin_layout Itemize
12122 Rapid communication用には
12127 \begin_layout Itemize
12134 \begin_layout Itemize
12139 以外のタイトル環境には、すべて短縮タイトルをつけることもできます。
12142 \begin_layout Itemize
12143 LyXでは直接にサポートされていませんが、一般的なタイトル環境として
12147 があります。執筆する文書が、他のタイトル型にそぐわない場合には、TeXコードでこれを指定することができます。
12150 \begin_layout Standard
12151 特別な表や数式組版に関するヒントなど、詳しい情報については、IOP著者用ガイドラインを参照してください。
12154 \begin_layout Section
12158 \begin_layout Standard
12161 Panayotis Papasotiriou
12166 \begin_layout Subsection
12170 \begin_layout Standard
12171 Kluwerパッケージは、Kluwer Academic Publishers社が発行する学術誌への電子投稿を可能にするために、同社が作成したマクロ集です。同社
12172 の発行誌のうち、(少なくとも私の専門内で)もっともよく知られているものは、
12174 Astrophysics and Space Science
12180 (『太陽系物理学』)ですが、他にも多くの学術誌があります(
12181 \begin_inset Flex URL
12184 \begin_layout Plain Layout
12186 http://www.wkap.nl/jrnllist.htm/JRNLHOME
12191 に全覧があります)。Kluwerパッケージは、
12192 \begin_inset Flex URL
12195 \begin_layout Plain Layout
12197 http://www.wkap.nl/kaphtml.htm/STYLEFILES
12202 からダウンロードできます。完全なユーザーの手引きも同パッケージ内に収録されています(個別にダウンロードすることも可能です)。
12205 \begin_layout Standard
12206 LyXは、このパッケージの機能の多くをサポートしていますが、すべてではありません。しかし、TeXコードを必要とするのは、パッケージ中のいくつかの「変わった」コマ
12208 \begin_inset CommandInset ref
12210 reference "subsec:kluwer_peculiarities"
12214 参照)。最近、私はLyXを使って書いた論文を
12216 Astrophysics and Space Science
12218 に投稿しましたが、何らの問題も発生しませんでした。
12221 \begin_layout Subsection
12225 \begin_layout Standard
12226 論文を書き始めるには、ひな型ファイルKluwerを使うのが最も簡単です。
12228 ファイル\SpecialChar \menuseparator
12235 を選択してください。これは、原稿に通常必要となる各フィールドと、それらの使用法が短く書かれただけの、(ほとんど)何も書かれていない文書です。他のテンプレートと同
12240 を含む)正しい情報で上書きしてください。
12243 \begin_layout Subsection
12247 \begin_layout Standard
12248 AASTeXパッケージと同様、論文を投稿する前に、以下のような「後処理」を行う必要があります。
12251 \begin_layout Enumerate
12254 ファイル\SpecialChar \menuseparator
12255 書き出し\SpecialChar \menuseparator
12258 をクリックして、論文をLaTeXファイルに書き出す。
12261 \begin_layout Enumerate
12266 ファイルに、テキストエディタを使用して、以下のような変更を加える。
12270 \begin_layout Enumerate
12277 コマンドより前にあるコメント行を削除する。
12280 \begin_layout Enumerate
12281 意図的にLaTeXプリアンブルに加えたコマンドを除き、
12293 の間にあるものを、これらのコマンドも含め、すべて削除する。
12296 \begin_layout Standard
12305 \begin_layout Enumerate
12310 ファイルを必要な回数(通常3回以内)だけLaTeXにかける。
12313 \begin_layout Enumerate
12322 などを使って開き、問題がないか確認する(間違いをしていない限り問題ないはずです)。
12325 \begin_layout Subsection
12326 Kluwerパッケージの「風変わり」な特徴
12327 \begin_inset CommandInset label
12329 name "subsec:kluwer_peculiarities"
12336 \begin_layout Standard
12337 Kluwerパッケージには、以下のような「風変わりな」特徴があります。
12340 \begin_layout Enumerate
12341 複数の論文を1つのLaTeXファイルへ入れることができます
12345 \begin_layout Plain Layout
12346 わざわざこんなことをする必要はないでしょう。
12351 。各論文は、「article」環境で囲まなくてはなりません。残念ながら、1つの論文だけを書く場合でも、この環境を省略することはできません。つまり、各論文は
12363 で終わります。この環境をLyXに実装することも可能でしたが、醜い上に初心者を混乱させる可能性があるので、実装することはしませんでした。したがって、これらの命令(
12375 )は、直接本文中に入力して、LaTeXコード(「TeXコード」のことです)としてマークする必要があります。
12378 \begin_layout Enumerate
12379 論文の冒頭に置く情報(タイトル・サブタイトル・著者名・所属・ヘッダ用タイトル・ヘッダ用著者名・概要・キーワード)は、「opening」とよばれる環境に入れなくて
12380 はなりません。これはLyXでは実装されていませんので、タイトルやサブタイトルなどは、2つのTeXコード行(
12395 \begin_layout Enumerate
12396 ユーザーの手引きによれば、参考文献の各項目のラベルは、
12419 \begin_layout Standard
12424 は、これらの風変わりな点がすべて考慮されています。このひな型を使用して、論文を新たに書きはじめる場合には、特別なことを行う必要はありません。以下の点にのみ留意し
12428 \begin_layout Enumerate
12429 ひな型にあるTeXコードを削除しないでください。
12432 \begin_layout Enumerate
12433 新しい参考文献項目を入力する場合には、ひな型に例示されている参考文献項目をコピーして、必要に応じて修正してください。
12436 \begin_layout Section
12440 \begin_layout Standard
12448 \begin_layout Subsection
12452 \begin_layout Standard
12455 article (koma-script)
12459 report (koma-script)
12477 は、それぞれKoma-ScriptファミリーのLaTeX文書クラス
12493 に対応しています。これらは、標準文書クラス
12509 の代替物であり、これらよりも多くの点でヨーロッパに於ける活版印刷の慣例に合致します。
12512 \begin_layout Itemize
12515 article (koma-script)
12519 report (koma-script)
12527 letter (koma-script)
12532 \begin_layout Itemize
12533 見出しや箇条書き(記述)環境のラベル、および
12535 letter (koma-script)
12537 文書クラスの要素の多くでは、ボールド体サンセリフフォントが使われます
12541 \begin_layout Plain Layout
12542 ボールド体サンセリフフォントには、古いcmフォントと新しいecフォントの間に大きな違いがあり、特に見出しの表示の違いが際立ちます。比較すると、ecボールドサンセ
12543 リフフォントの方が、少し細く見えます。ecフォントを使用する際に「通常の」外観が欲しい場合には、
12556 。章見出しの連番は、節見出しの連番と同様に行われ、別行立てで「 Chapter\SpecialChar \ldots{}
12557 」という行がつきません。さらに、多くのオプションによって、見出しの外観を修正するこ
12560 文書\SpecialChar \menuseparator
12567 フィールドで指定します)。これらのオプションの独語での詳細な説明が、Koma-Scriptの取扱説明書
12574 \begin_layout Itemize
12575 Koma-Script文書クラスで、印字部分をデザインする主な方法は、
12583 オプションを使う方法です(LyXでは、
12585 文書\SpecialChar \menuseparator
12592 フィールドで指定します)。これらのオプションは
12594 文書\SpecialChar \menuseparator
12597 ダイアログのオプションと同様に、ページ余白を明示的に変更することができます。これらとその他印字領域オプションのドイツ語での詳細な説明が、Koma-Script取
12605 \begin_layout Itemize
12606 Koma-ScriptファミリーのLaTeX文書クラスには、多くの追加コマンドが定義されています。それらのうち、LyXで意味を持つものは、対応する段落環境として
12610 \begin_layout Standard
12611 Koma-ScriptファミリーのLaTeX文書クラスに関する独語の詳細な説明が、Koma-Script取扱説明書
12619 \begin_layout Plain Layout
12629 。以下の各節では、LyXに関係する側面のみ説明致します。
12632 \begin_layout Subsection
12633 article (koma-script)・report (koma-script)・book (koma-script)
12636 \begin_layout Standard
12639 article (koma-script)
12643 report (koma-script)
12665 によって実装されています。これらは、対応する標準文書クラス
12677 の段落環境を、若干の修正を加えた上ですべて含んでいますが、LyX固有の
12681 環境は例外であり、同じ機能を持つ新しい
12689 環境以外にも、新しい段落環境が多く追加されています。これらは、
12691 letter (koma-script)
12693 には含まれていないのでご注意ください。
12696 \begin_layout Itemize
12721 と同等の働きをしますが、加えて目次に項目が表示されるようになります。
12731 article (koma-script)
12736 \begin_layout Itemize
12753 とまったく同等に動作しますが、加えてランニングへッダを取り除きます。
12759 article (koma-script)
12765 \begin_layout Plain Layout
12772 report (koma-script)
12784 と同一なので、LyXでは実装されていません。
12792 \begin_layout Itemize
12797 :これは文書構造に現れない形で、続く段落の直上に標準文字寸法の見出しを付けます。
12800 \begin_layout Itemize
12809 は、ある要素の上部ないし下部にキャプションを配置する際、位置に応じて正しく余白取りを行う特別なキャプションです(組版規則に厳密に従うならば、表キャプションは、つ
12810 ねに表の上に置くべきでしょう)。また、クラスオプション
12814 を用いれば、キャプションを指定すると、表には
12822 が適用されるようになります。これを使用するためには、Koma-Script第2.8q版以上が必要です。
12825 \begin_layout Itemize
12830 :これは、章頭などに警句を置くのに用いることができます。オプション引数(
12832 挿入\SpecialChar \menuseparator
12835 )を用いれば、格言の作者を入れることができます。格言と作者の間は、線で区切られます。これを使用するためには、Koma-Script第2.8q版以上が必要です。
12841 article (koma-script)
12846 \begin_layout Standard
12859 とともに文書のタイトル領域を形成します。これらは、最初の「通常の」段落よりも前に置かれる必要があります
12863 \begin_layout Plain Layout
12870 コマンドよりも前に現れなくてはなりません。
12875 。これらの環境が2度以上使用された場合には、後に使用されたものが前のものを上書きします。つまり最後に使用したもののみが有効になります。しかしながら、
12887 のような異なる環境の順序を変更しても、生成された文書には何の効果も生じません。
12890 \begin_layout Itemize
12907 )の上に、文書の主題用の中央揃えの段落を生成します。
12910 \begin_layout Itemize
12927 )の下に、出版社名用の中央揃えの段落を生成します。
12930 \begin_layout Itemize
12937 report (koma-script)
12943 では、タイトル頁の次に、献辞用の中央揃えの段落を独立した頁として生成します。
12945 article (koma-script)
12959 )の下に献辞用の中央揃えの段落を生成します。
12962 \begin_layout Itemize
12979 )の上に、文書頭書き用の左揃えの段落を生成します。
12982 \begin_layout Itemize
12989 report (koma-script)
12995 の両面印刷において、扉裏上部に左揃え段落を生成します。片面印刷や、
12997 article (koma-script)
13002 \begin_layout Itemize
13009 report (koma-script)
13015 の両面印刷において、扉裏下部に左揃え段落を生成します。片面印刷や、
13017 article (koma-script)
13022 \begin_layout Itemize
13027 :実際の文書の前に、整形を行わない段落から成る、特殊な「汚い」ページを生成します。
13030 \begin_layout Standard
13033 article (koma-script)
13037 report (koma-script)
13047 ファイルを読み込みます。このファイルは、ユーザ環境を定義する場所として想定されています。s
13051 を、個人用レイアウトディレクトリにコピーして編集してください!
13054 \begin_layout Subsection
13055 letter (koma-script)
13058 \begin_layout Standard
13062 letter (koma-script)
13068 で実装されています。このレイアウトファイルには、対応する標準文書クラス
13072 の全段落環境が、部分的に変更を加えた形で収録されていますが、LyX固有環境の
13088 環境に置き換えられています。それ以外にも、標準文書クラスとは異なり、標準環境の
13104 が収録されています。さらに、新しいletter固有環境がたくさん追加されています。
13107 \begin_layout Standard
13108 この文書クラスで作成した書簡の外観は、様々なLaTeXコマンドをLaTeXプリアンブルに置くことで制御することができます
13112 \begin_layout Plain Layout
13113 例えば、名前と住所の入った書簡ヘッダの標準的外観は、きわめて頑固です。「普通の」へッダは、プリアンブル中に以下のようなコマンドを入れることで生成することができま
13117 \begin_layout LyX-Code
13127 \begin_layout LyX-Code
13143 \begin_layout LyX-Code
13153 \begin_layout LyX-Code
13169 \begin_layout LyX-Code
13177 。これらのLaTeXコマンドのドイツ語での詳細な説明は、Koma-Scriptの取扱説明書
13181 にあります。この方法で、書簡の著者は、個人用書簡レイアウトを作ることができます。
13184 \begin_layout Standard
13193 環境は、書簡の冒頭部を定義するもので、すべての書簡で使用しなくてはなりません。LyX文書クラスでは、これらの環境を強調するために、左余白にそれぞれ
13201 という文字が表示されます。同一ファイル中には、複数の書簡を書くことができます。
13205 環境は、同じ受取人への書簡を新しく書き出すものであり、
13209 環境は、新しい受取人を生成するものです。
13225 は、通常の段落環境なので、同一の書簡中でも何度も使用することができます。
13228 \begin_layout Itemize
13233 :受取人のための段落をつくり、暗黙に書簡の開始を定義します。
13236 \begin_layout Itemize
13241 :敬称のための段落をつくり、暗黙に新しい書簡を開始します。
13244 \begin_layout Itemize
13252 \begin_layout Itemize
13260 \begin_layout Itemize
13268 \begin_layout Itemize
13276 \begin_layout Standard
13317 は、情報入力を促すラベルの付いた入力環境で、文書クラスが適切な処理を行います
13321 \begin_layout Plain Layout
13330 が、これらのような入力環境でないのは、矛盾しているように感じられるかもしれません。しかしながら、これら2つの環境は特別の意味を持っているために、これらは左余白に
13331 一文字をマークした通常の段落環境として実装しました。さらに、
13339 環境が著しく異なって見えると対称性が損なわれることになるのも理由の一つです。
13351 \begin_layout Standard
13352 生成された書簡の実際の外観は、特定の環境の使い方だけではなく、他の要素にも依存するため、これらの環境をWYSIWYGとして実装することには、あまり意味がありませ
13357 環境で入力した署名は、標準的な挙動では、同じ書簡に
13361 環境も使用されているときのみ、書簡の出力に現れます。
13365 環境に入力された値は、標準的な挙動では、書簡の出力には全く表示されません。書簡のヘッダを自由にデザインできることは、前出の脚注で示してあります。
13368 \begin_layout Standard
13369 入力環境は、空の段落として使うことができます。これは、たとえば
13377 環境を全く使用しない場合は、標準的な挙動では、
13381 環境の値が署名として使用されますが、空の
13385 環境を作成しておくと、署名の値は無定義となりません。
13388 \begin_layout Standard
13389 入力環境を使用すると、個人データ(名前や住所など)が既に入力された入力環境と、後から入力するデータの入力環境を備えた、書簡のひな型を作成することができます。
13392 \begin_layout Itemize
13397 :送り主の名前。標準的な挙動では、書簡のヘッダ部にスモールキャップ体の中央揃えの段落として表示されます。
13400 \begin_layout Itemize
13420 \begin_layout Itemize
13425 :送り主の住所。標準的な挙動では、書簡ヘッダの送り主の名前の下に中央揃えの段落として表示されます。
13428 \begin_layout Itemize
13433 :送り主の電話番号。標準的な挙動では、LaTeX変数
13442 \begin_layout Itemize
13450 \begin_layout Itemize
13463 は、標準的な挙動では、受取人フィールドの下に、単一の右揃え行として場所と日付を生成します。空の
13471 の値如何に関わらず、場所も日付も表示されません。
13475 環境を使用しない場合には、書簡を出力した日付が使用されます。
13478 \begin_layout Itemize
13483 :送り主の返送先住所。標準的な挙動では、受取人の上に小文字のサンセリフ体フォントで表示されます。
13486 \begin_layout Itemize
13491 :特別便の情報。標準的な挙動では、受取人フィールドの上かつ返送先住所の下に、下線付きで表示されます。
13494 \begin_layout Itemize
13499 :追加情報。標準的な挙動では、受取人フィールドの下の右側に表示されます。
13502 \begin_layout Itemize
13507 :書簡の題名。標準的な挙動では、主題の上に大きなボールド体サンセリフフォントで表示されます。
13510 \begin_layout Itemize
13522 \begin_layout Standard
13525 Yourref・Yourmail・Myref・顧客・インボイス
13531 行の上に「Your ref.」・「Your letter of」・「Our ref.」・「Customer no.」・「Invoice no.」・「Date」といったフ
13532 ィールド行を持つ、ビジネス書簡を作成します。日付フィールドには、
13536 環境の値が使用されます。しかしながら、これらの「ビジネス書簡環境」の一つを使用した場合には、
13540 の値は書簡には表示されなくなり、LaTeX変数
13546 が設定させるだけになります。通常時に、受取人フィールドの下に右揃えで出力される場所と日付の出力は、抑制されます。これらのビジネス環境は、ラベル付きの入力環境とし
13554 \begin_layout Itemize
13562 \begin_layout Itemize
13570 \begin_layout Itemize
13578 \begin_layout Itemize
13586 \begin_layout Itemize
13594 \begin_layout Subsection
13595 新しいletterクラス:letter (koma-script v.2)
13598 \begin_layout Standard
13602 \begin_inset VSpace medskip
13608 \begin_layout Standard
13610 Koma-Script第2.8版では、新しいletterクラス
13618 は廃止されてサポート対象外となりました。これは—LaTeX側で—全く新しいインターフェイスを持っており、旧クラスとは互換性がありません。したがって、LyXは両者
13619 をサポートしていますが、新しい方のクラスを使用することを推奨します。
13622 \begin_layout Standard
13625 letter (koma-script)
13627 と同一の機能に加えて、新しい機能をいくつかサポートしています。基本となる項目は、
13647 は別の書簡を新しく開始します(つまり一文書あたり複数の書簡を書くことができます)。新しく付け加えられた項目は、送り主の
13665 挿入\SpecialChar \menuseparator
13672 を入れることができるようになった点です。
13675 \begin_layout Standard
13676 しかしながら、もっとも大きな改善は、書簡のレイアウトを、ほとんどどんなニーズにも合わせて設定できるようになった点でしょう。これはプリアンブルか、クラスオプション
13677 として読み込まれる特別なスタイルファイル(「レタークラスオプション」、拡張子
13685 \begin_layout Plain Layout
13690 ファイルがいくつか収録されています。たとえば、ドイツの組版規則に則った
13704 文書\SpecialChar \menuseparator
13705 設定\SpecialChar \menuseparator
13706 文書クラス\SpecialChar \menuseparator
13713 を加えることで読み込むことができます。
13718 。用例としては、LyXに収録されているひな型
13722 をご覧ください。詳細な解説は、Koma-Script取扱説明書(
13729 \begin_layout Subsection
13733 \begin_layout Standard
13734 Koma-Script文書クラスをLyX上に表示する上で、LyXの内部処理が若干の問題を生じめます。
13737 \begin_layout Itemize
13742 環境の章番号は、章見出しと同じ行ではなく、その上に表示されます。これは、レイアウトファイル中の
13746 ラベル型に対するLyXの内部処理が原因です。
13749 \begin_layout Itemize
13758 環境の見出しは、「本当の」LaTeXの目次には追加されますが、LyXの目次(
13765 \begin_layout Itemize
13770 文書クラスでの段落は、垂直スペースによる段落区切りで表示され、字下げはされません。これが標準的な挙動となっていて、特別なLaTeXコマンドは必要ありません。しか
13773 文書\SpecialChar \menuseparator
13776 ダイアログでは、対応するラジオボタンは
13784 は、隙間を空けるために、文書にLaTeXコマンドをつねに追加するようになっていますが、この文書クラスの場合には、そのような挙動が望まれないためです。
13787 \begin_layout Section
13791 \begin_layout Standard
13799 \begin_layout Subsection
13803 \begin_layout Standard
13804 Memoirは、非常に強力で、着実に改良が加えられている文書クラスであり、フィクションとノンフィクションの文学作品用に設計されています。その目的は、ユーザーに、
13805 文書の組版に関して最大限の裁量を得させることにあります。Memoirは、標準bookクラスに基づいていますが、articleクラスをエミュレートすることもできま
13809 \begin_layout Standard
13810 Memoir開発者であるPeter Wilsonは、LaTeXの世界での、多くの便利なパッケージの作者として知られていますが、それらのほとんどは、Memoirに
13811 統合されました。このため、章のデザインや、目次や付録などのレイアウトを、はるかに簡単に行うことができます。しかしながら、LyXは、これらすべての素晴らしい機能を
13812 ネイティブでサポートしているわけではありません。これらのうちいくつかは、将来のリリースで追加されるかもしれませんが
13816 \begin_layout Plain Layout
13818 \begin_inset Flex URL
13821 \begin_layout Plain Layout
13823 lyx-devel@lists.lyx.org
13833 、LyXのフレームワークが持つ制約のために、おそらく決して追加されることのないと考えられるものも多数あります。もちろん、ネイティブなLaTeXコマンド(TeXコ
13838 \begin_layout Plain Layout
13840 \begin_inset CommandInset ref
13842 reference "sec:LaTeXコードを挿入する"
13851 )の助けを借りれば、全機能を使用できます。この節では、LyXがネイティブにサポートしている機能についてのみ、列挙するものとします。詳細な説明(および他の機能)に
13852 ついては、Memoirクラスの詳しい取扱説明書
13856 \begin_layout Plain Layout
13858 \begin_inset Flex URL
13861 \begin_layout Plain Layout
13863 CTAN:/macros/latex/memoir/memman.pdf
13873 をご覧になることをお勧めします。この取扱説明書は、本クラスのユーザーの手引きであるのみに留まらず、良い組版に関する包括的な解説であり、それ自身が良い組版の傑出し
13877 \begin_layout Subsection
13881 \begin_layout Standard
13882 Memoirは、基本的に、標準bookクラスの全機能をサポートしています。しかしながら、以下に示すような若干の違いがあります。
13885 \begin_layout Description
13886 フォント寸法: Memoirでは、9・10・11・12・14・17と、より広い範囲のフォント寸法が使用可能です。
13889 \begin_layout Description
13890 ページ様式: Memoirパッケージとfancyhdrパッケージとのコマンドの衝突のため(両パッケージは同じ名前のコマンドを定義しているため、LaTeXが混乱さ
13891 せられます)、fancyページ様式は使用できません。その代わり、Memoirには、多くの独自のページ様式が付属してきます(
13893 文書\SpecialChar \menuseparator
13894 設定\SpecialChar \menuseparator
13897 参照)。これらを章題ページに使用したい場合には、コマンド
13903 を、本文またはプリアンブルに記述する必要があります(例えば、
13907 chapterstyle{companion}
13912 \begin_layout Description
13913 節分け: 標準クラスでは、節分けコマンド(章・節・小節等)は、非必須引数を一つ取ることができます。これを用いて、目次やヘッダ用に別のタイトルを指定することができ
13914 ます(たとえば、タイトルが長すぎる場合などに用います)。LyXでは、章や節の始めで
13916 挿入\SpecialChar \menuseparator
13919 を使えば、これを指定することができます。一方、Memoirでは、第2の非必須引数を取ることができ、目次用のタイトルとヘッダ用のタイトルの指定を分離しています。こ
13920 れを使えば、本文用と目次用とヘッダ用のタイトルの3種類を指定することができます。この機能を使用したい場合には、2つの非必須引数を入力して、最初のものに目次用、次
13921 のものにヘッダ用短縮タイトルを入れてください。
13924 \begin_layout Description
13925 目次・図一覧・表一覧: 標準クラス(および他の多くのクラス)では、目次と図一覧および表一覧は、自動的に新規頁に置かれます。Memoirは、これとは別の方針を採り
13926 ます。改頁を行いたい場合は、手動で頁区切りを入れなくてはなりません。
13929 \begin_layout Description
13930 タイトル頁: 理由は不明ですが、Memoirはタイトルページに丁付けを行います(標準クラスでは、タイトルページは「empty」様式、すなわち丁付けを行いません)
13931 。タイトル頁に丁付けを行いたくない場合には、プリアンブルに
13935 aliaspagestyle{title}{empty}
13940 \begin_layout Description
13947 文書\SpecialChar \menuseparator
13948 設定\SpecialChar \menuseparator
13951 で入力)と、article様式をエミュレートできます。すなわち、(脚注・図・表等の)カウンタは、章毎にリセットされず、次の章は頁を改めず(ただし、「本物の」ar
13952 ticleクラスとは違って、頁を改めることも可)、部はbookクラスと同様に、独立の頁を使用します。
13955 \begin_layout Description
13956 Oldfontcommands: LaTeX旧2.09版で使用されていた旧いフォントコマンド(
13968 など)は、Memoirにおいては、既定では使用することができません。Memoirがこれらのコマンドを検知すると、エラーを発してLaTeXを停止させます。しかし、
13973 を指定すると、これらのコマンドが容認され、エラーの代わりに警告を発するのみとなります(これによって、少なくともLaTeXは停止しなくなります)。まだ、多くのパッ
13974 ケージと、就中多くのBibTeXスタイルファイルが、これらのコマンドを使用しているので、我々はこのオプションを既定で使うこととしました。
13977 \begin_layout Subsection
13981 \begin_layout Standard
13982 LyXでサポートされる機能(今のところそれほど多くはありません)を簡単に説明しましょう。詳しくはMemoirの取扱説明書
13986 \begin_layout Plain Layout
13987 \begin_inset Flex URL
13990 \begin_layout Plain Layout
13992 CTAN:/macros/latex/memoir/memman.pdf
14005 \begin_layout Description
14006 概要: 概要が、追加された機能として扱われているのを不思議に思われるかもしれませんが、bookクラスとしては追加された機能なのです。通常bookクラスには概要は
14007 ないのですが、memoirにはあります。これは、どこでも何回でも自由に使うことができます。
14010 \begin_layout Description
14011 章要約: この古い組版様式はご覧になったことがあるかも知れません。章の内容が、見出しの下と目次に要約されているものです(たとえば、「我らが英雄がトロヤに到着する
14012 。彼は友人を失うが、新たな友人を得る。」など)。章要約(chapterprecis)はこれを行います。したがって、章要約は章の下でのみ意味を持ちます。
14015 \begin_layout Description
14016 題辞: 題辞(epigraph)は章頭の、気の利いた標語やモットーです。題辞環境は、そのような標語を組む洗練された方法を提供します。標語本体(本文)とその著者(
14017 出典)は、短い線で区切られます。この環境には二つの引数(本文と出典)が必要なので、ここでもLyXを少しだます必要があります。ここでは、2つの引数の間に、
14027 のように、(TeXモードで)波括弧を入れなくてはなりません。
14030 \begin_layout Description
14031 詩題: Memoirには(複雑で隠喩的なものも含めて)詩を組版するための多くの機能がありますが、LyXは、そのうちいくつかしかサポートしていません。詩題はその一
14032 つです。これは詩用の中央揃えタイトルで、目次にも表示されます(詩句が詩の標準環境です。Memoirには、詩句の拡張版もありますが、これらを使うためにはTeXコー
14033 ドを使用しなくてはなりません。これらの環境は通常の詩句環境の中に入れ子にしなくてはならないのですが、LyXではそれができないためです)。
14036 \begin_layout Description
14037 詩題*: 目次に現れない他は詩題と同じです。
14040 \begin_layout Section
14041 Article(mwart)・book(mwbk)・report(mwrep)
14042 \begin_inset Argument
14045 \begin_layout Plain Layout
14058 \begin_layout Standard
14066 \begin_layout Standard
14073 report (mwrep)・book
14103 を代替するものであり、多くの点で、ポーランド語の組版慣習によく適合しています。
14106 \begin_layout Standard
14110 \begin_layout Itemize
14118 \begin_layout Itemize
14123 \begin_layout Description
14127 \begin_layout Description
14143 \begin_layout Description
14144 myuheadings 分離線付きカスタムヘッダ
14147 \begin_layout Description
14152 \begin_layout Itemize
14157 \begin_layout Description
14158 rmheadings セリフ体見出し --- 既定
14161 \begin_layout Description
14162 sfheadings サンセリフ体見出し
14165 \begin_layout Description
14166 authortitle タイトルページは、著者名・タイトルの順で配置 --- 既定
14169 \begin_layout Description
14170 titleauthor タイトルページは、タイトル・著者名の順で配置
14173 \begin_layout Description
14174 withmarginpar ページ上に余白のための場所を確保
14178 \begin_layout Section
14182 \begin_layout Standard
14195 機能を提供しますが、サンセリフ体の節見出し・ヘッディング等を持つこちらのレイアウトの方が気に入るかも知れません。
14198 \begin_layout Section
14202 \begin_layout Standard
14208 \begin_layout Standard
14209 \begin_inset VSpace bigskip
14215 \begin_layout Standard
14220 \begin_inset space ~
14225 テキストクラスは、アメリカ物理学会のRevTeX 4.0(1999年5月の
14226 \begin_inset Formula $\beta$
14232 \begin_layout Standard
14233 LyXには、RevTeX 3.1で動作する
14237 テキストクラスもあります。しかしながら、第3.1版はLaTeX 2.09で動作するものであり、基本的に時代遅れなものになっています。LyXはLaTeX2eを必要とす
14238 ることから、第3.1版はLyXとうまく協調しないことを意味しますが、動作するようには調整してあります。RevTeX 4.0は、LaTeX2eで素直に動作するようにデ
14242 \begin_inset space ~
14247 テキストクラスの組で使用するのは、たいへん簡単です。
14250 \begin_layout Standard
14251 この取扱説明書は、RevTeX 4.0の説明書の
14255 として使用されることを前提としています。したがって、ここではRevTeX固有マクロの説明はせず、必要な場合にはプリアンブルに何と書けば良いかを知っているものとし
14259 \begin_layout Subsection
14263 \begin_layout Standard
14264 RevTeX 4パッケージのREADMEファイルにあるとおり、ともかくRevTeX 4を導入しなくてはなりません。パッケージは、The RevTeX
14266 \begin_inset Flex URL
14269 \begin_layout Plain Layout
14271 http://publish.aps.org/revtex4/
14276 から入手することができます。これをLaTeXが検出することのできる場所に導入してください。それから、適当に選んだディレクトリ(もといクラスファイルを導入したのと
14277 は異なるディレクトリ)で簡単なRevTeX 4文書を LaTeXでコンパイルできるかどうか確認してください。この後、LyXを再初期設定すると、クラスファイルを検
14278 出し、RevTeX4テキストクラスが使用できるようになるはずです。
14281 \begin_layout Standard
14286 を使ってRevTeX 4文書を読み込むか、またはひな型ディレクトリにある
14289 \begin_inset space ~
14294 のひな型を使うのが、おそらく一番簡単な方法でしょう。
14297 \begin_layout Subsection
14301 \begin_layout Standard
14308 に与える「preprint」や「aps」のような非必須引数は、他のクラス同様、
14310 文書\SpecialChar \menuseparator
14311 設定\SpecialChar \menuseparator
14318 フィールドに入れます。RevTeXでは、少なくとも一つの非必須引数が必要なことに注意してください。
14321 \begin_layout Standard
14328 など他のプリアンブルは、他のクラス同様、
14330 文書\SpecialChar \menuseparator
14331 設定\SpecialChar \menuseparator
14337 \begin_layout Subsection
14341 \begin_layout Standard
14342 レイアウトは、基本的にRevTeX4.0のコマンドに対応しています。たとえば、Emailレイアウトは、
14348 に対応しています。(少なくともRevTeX 4.0 Beta現在では)
14356 はまったく同じものなので、両方を使う必要はありません
14360 \begin_layout Plain Layout
14385 \begin_layout Subsection
14389 \begin_layout Standard
14390 RevTeX 4には、バグを引き起こしがちなために、気をつけなくてはならない特殊な面がいくつかあるため、LyXではさらに気をつけなくてはなりません。
14393 \begin_layout Standard
14410 に来なくてはなりません。LyXでは、独立した
14418 レイアウトに脚注を付けてしまうと、おかしなことが起こる可能性があります。詳細については、RevTeX 4の取扱説明書をご覧ください。
14421 \begin_layout Standard
14442 )レイアウトの間に置かなければなりません。
14450 の後に置いてしまうと、LaTeXはコンパイルに失敗します。
14453 \begin_layout Subsection
14457 \begin_layout Standard
14458 このレイアウトの主な問題点は、電子メールやタイトルのようなレイアウトに非必須引数を用いることができないことです(これはこのレイアウトだけの問題ではありません。例
14459 えば、節レイアウトも非必須引数を使用することができません)。これは、たとえばページヘッダにヘッダ用タイトルを設定したい場合などには、ファイルをLaTeXファイル
14460 に変換した後に(これは最終的にAPSに原稿を送る際には行わなくてはなりません)、テキストエディタを使ってLaTeXファイルを編集し、非必須引数を書き加えなくては
14461 ならないということです。これらのレイアウトがないと、
14473 )は使えませんので、対応するレイアウトは存在せず、手動で書き加える必要があります
14477 \begin_layout Plain Layout
14482 実は、LyX 1.3.0 では非必須引数を一部サポートしているのですが、このレイアウトは、まだこの機能を使うようにはアップデートされていないのです。
14490 \begin_layout Section
14496 \begin_layout Standard
14504 \begin_layout Subsection
14508 \begin_layout Standard
14509 これは、Springer Verlag社発行のいくつかの学術誌で使用されている書式のレイアウトファイルです。
14510 \begin_inset Flex URL
14513 \begin_layout Plain Layout
14515 http://www.springer.de/author/tex/help-journals.html
14520 に必要なクラスファイル(LaTeX2e用になりました)とそれに対応する学術誌の一覧があります。このレイアウトはモジュール式になっています。つまり、全ジャーナル共
14525 に実装されており、各誌個別のレイアウトファイル(たとえばJournal of Geodesy用の
14532 \begin_layout Standard
14533 このことは、上記の学術誌一覧にある他のSpringer誌のサポートを実装するためには、
14548 \begin_layout Standard
14549 このレイアウトは、Journal of Geodesyに対してのみ、充分な試験が為されています。
14557 は、標準LyX頒布版に収録済みです。関連するクラスファイルを(Springerからダウンロードして)適切なディレクトリに導入し、LaTeXを再設定した後(teT
14558 eXの場合は、必要に応じてroot権限で
14562 を実行します)、LyXを再初期設定すれば、動作するはずです。
14565 \begin_layout Subsection
14569 \begin_layout Standard
14578 ・\SpecialChar \ldots{}
14586 \begin_layout Standard
14597 サブタイトル・ヘッダ用LaTeXタイトル・ヘッダ用著者名・所属機関・メール・オフプリント・キーワード・謝辞(acknowledgements)・謝辞(ackno
14600 。詳しくは Springerのクラスファイルの説明書を読んでください。
14603 \begin_layout Subsection
14607 \begin_layout Itemize
14619 \begin_layout Itemize
14622 Probability Theory and Related Fields
14628 --- Jean-Marc Lasgouttes
14631 \begin_layout Standard
14632 あなた自身のレイアウトファイルをつくってください。難しくはありません。
14635 \begin_layout Subsection
14639 \begin_layout Standard
14648 は SpringerのLaTeX 2.09用のスタイルファイルを使った素人細工のようなレイアウトファイルです。これらのファイルはすでにありません。Jean-Mar
14649 c Lasgouttesのおかげで LyXのレイアウトファイルのメカニズムをよりよく理解することができました。
14652 \begin_layout Subsection
14656 \begin_layout Standard
14661 よりは少なくなっているとは思いますが。
14664 \begin_layout Standard
14665 制限事項:定理環境の環境の番号は表示されません。#が表示されるだけです。
14668 \begin_layout Section
14677 \begin_layout Plain Layout
14678 (訳註)この節の内容は、全般的に古くなっています。
14684 \begin_inset CommandInset label
14693 \begin_layout Standard
14701 \begin_layout Subsection
14705 \begin_layout Standard
14706 本節では、オーバーへッドプロジェクタ用のスライドをつくるのに、LyXをどのように使えばよいかを説明します。これを行う文書クラスには、既定のslideクラスと
14710 スライドクラスの2つがあります。本節は前者について説明を行います。
14713 \begin_layout Standard
14714 誤解のないように、正しく明確に、もう一度言っておきます。
14717 \begin_layout Standard
14718 \begin_inset VSpace bigskip
14724 \begin_layout Standard
14729 \begin_inset Quotes eld
14734 transparencies (slides)
14737 \begin_inset Quotes erd
14747 \begin_layout Standard
14748 \begin_inset VSpace bigskip
14754 \begin_layout Standard
14760 \begin_inset CommandInset ref
14762 reference "sec:foiltex"
14782 \begin_layout Plain Layout
14783 \SpecialChar \ldots{}
14788 の支持者からは聞いています。けれども私は使ったことがないので、本当かどうか確かめようがありません。
14796 \begin_layout Standard
14797 このクラスは、旧SLITeXパッケージをLaTeX2e用に改良したものです。LaTeX2e頒布版すべてが、このクラス(以下では単に「
14801 」と述べることにします)を含んでいるので、あなたもお持ちのはずです。前述の
14805 のように、同じくオーバーへッドプロジェクタ用のスライドを生成しながら、このクラスよりも良い仕事をするクラスもあります。しかしながら、オーバーレイを生成するなど、
14810 ならばできることもあります。詳しくは以下をお読みください。
14813 \begin_layout Subsection
14815 \begin_inset CommandInset label
14817 name "sec:slidesetup"
14824 \begin_layout Standard
14825 当然ながら、この文書クラスを使用するには、
14827 文書\SpecialChar \menuseparator
14832 transparencies (slides)
14834 」を選択しなくてはなりません。このクラスについて、以下のように、特に知っておいた方が良いことがいくつかあります。
14837 \begin_layout Itemize
14846 の各オプションは、あえて変更する必要はありません。これらのオプションは、
14850 クラスではサポートされていないので、効果がありません。
14853 \begin_layout Itemize
14858 オプションは、このクラスでは少し異なった振る舞いをします。各選択肢とその機能は、以下の通りです。
14862 \begin_layout Description
14863 プレーン(plain) 最終出力の右下隅にページ番号が付きます。
14866 \begin_layout Description
14871 と同様ですが、それ以外にあなたが指定したタイムマーカーをすべて出力します。これが既定値です。
14874 \begin_layout Description
14875 空 最終出力には、ページ番号もタイムマーカーも位置揃えマーカーも出力されません。
14879 \begin_layout Itemize
14888 というオプションがあります。これを使用するには、
14900 \begin_layout Standard
14905 にタイムマーカーを加えることができます。詳細は、第
14906 \begin_inset CommandInset ref
14908 reference "sec:slideNote"
14916 \begin_layout Standard
14921 クラスを用いた文書を自動的にセットアップするには、ひな型ファイル「
14925 」を使用することもできます(新規ファイルを開く際に
14927 ファイル\SpecialChar \menuseparator
14930 を使用してください)。ひな型ファイルには、このクラスが使用する特別な段落環境の用例も含まれています。これらについては、以下で説明します。
14933 \begin_layout Subsection
14937 \begin_layout Subsubsection
14943 \begin_layout Standard
14948 文書を開いたときにまず気付くのは、フォント寸法とフォント族の違いでしょう。ここでは、
14956 寸法が用いられており、出力でもこのフォントが使用されます。これは、現在スライドを作成中であることの「目印」だと考えてください。出力スライドは大きなフォントを使用
14957 するため、書ける場所は少なくなります。もちろん、既定の大きな画面フォントはWYSIWYGではなく、スライドであることの目印に過ぎません。
14960 \begin_layout Standard
14961 次に気付くのは、(ツールバー左端の)段落環境プルダウンボックスが変わっていることでしょう。通常見かける環境の多くがなくなって、代わりに5つの新しい環境が入ってい
14966 クラスが、標準段落環境のうち以下のものしかサポートしていないためです。
14969 \begin_layout Itemize
14975 \begin_layout Itemize
14981 \begin_layout Itemize
14987 \begin_layout Itemize
14993 \begin_layout Itemize
14999 \begin_layout Itemize
15005 \begin_layout Itemize
15011 \begin_layout Itemize
15017 \begin_layout Itemize
15023 \begin_layout Itemize
15029 \begin_layout Itemize
15035 \begin_layout Standard
15036 これ以外の標準的な環境、例えば節見出し用の環境などは
15043 \begin_layout Standard
15047 \begin_layout Itemize
15053 \begin_layout Itemize
15059 \begin_layout Itemize
15065 \begin_layout Itemize
15071 \begin_layout Itemize
15077 \begin_layout Standard
15078 これら5つの環境は、LyXの「機能」のために使い方に癖があります。ご存じのように、LyXでは、空の段落環境に他の環境を入れることができません。それ自体は素晴らし
15079 いデザインなのですが、これは、スライドを平文以外では書き始めることができないことを意味します。これを取り扱うためには、ちょっとした「LaTeXマジック」が必要に
15083 \begin_layout Subsubsection
15085 \begin_inset CommandInset label
15094 \begin_layout Standard
15095 5つの新しい環境にはすべて、LyX現行版の制約に由来する癖があります。いま述べたように、LyXでは、環境を別の環境で開始することが禁止されています。これを回避す
15104 』で述べられているような段落環境ではなくなっています。
15107 \begin_layout Standard
15120 は「疑似環境」だとお考えください。これらは節見出しや「
15124 」のように見えますが、実際には(必要なら前段落を終了して)新しい段落環境を開始します。同様に、
15132 も「疑似コマンド」とお考えください。この2つは特定のアクションを行います。
15135 \begin_layout Standard
15156 の5環境に共通しているのは、長めのラベルを持つことです。このラベルに続く文章—通常は段落環境の内容になるはずですが—は、
15176 では、まったく意味がなく、LyXはこの部分を完全に無視します。これらの5つの環境の内容は、完全に空のままにしておいて構いません。
15179 \begin_layout Standard
15188 とはいえ、何か書いておきたいこともあるかもしれません。たとえば、スライドの内容に関する短い説明などがそうでしょう。この場合、いつもどおり説明用のコメントを入力し
15196 \begin_layout Standard
15197 一方、説明文を入れたくない場合には、LyXの制約に直面します。自然が真空を憎むように、LyXでは、古い環境に何かを置くまでは、その中に新しい環境を入れることがで
15198 きません。そこで以下のようにしてください。
15201 \begin_layout Itemize
15229 \begin_layout Itemize
15233 \begin_layout Itemize
15241 \begin_layout Itemize
15265 \begin_layout Standard
15266 将来のLyXでは、このような癖が解決されることを祈っています\SpecialChar \ldots{}
15271 \begin_layout Plain Layout
15272 (訳註)ここの記述は古くなっています。
15280 \begin_layout Subsection
15294 \begin_layout Subsubsection
15302 \begin_layout Standard
15303 もし本節が、実際のプレゼンテーションの作り方を教えてくれるものと期待されているとすれば、大いにがっかりされるかもしれません。当然ながら、プレゼンテーション用の資
15308 クラスを役立てる方法を詳しく説明はしますが、内容をどうするかはあなた次第です(そしてこれもLyXの哲学です)。
15311 \begin_layout Standard
15317 \begin_inset CommandInset ref
15319 reference "sec:スライドの癖"
15323 節参照のこと)、LyXは新規スライドを開始します。この環境ないし「疑似環境」のラベルは、鮮やかな青で「新規スライド:」と表示されます。この環境の後のテキスト環境
15324 や段落環境は、すべて新規スライドに入ります。簡単ですよね。
15327 \begin_layout Standard
15328 Slidesは、おそらくLyXの中で強制的に改頁をしなくてはならない唯一のクラスです(これは
15332 ダイアログで指定できます)。実際、一つのスライドの内容を入力し終わったら、改頁したくなるはずです。仮に一つのスライドに物理的に入りきらない文章を入力したとすると
15333 、入りきらない部分は、次の新規スライドにまわされます。しかしながら、入りきらない部分のスライドにはページ番号が付きませんので、こうするのはお勧めしません。その上
15341 \begin_layout Standard
15354 環境と同様の動作を示します。これらは、青の代わりに鮮やかなマゼンタで、それぞれ「
15362 」というラベルを表示します。ラベルのフォントも、3つの環境でそれぞれ異なるものが使用されます。
15365 \begin_layout Standard
15378 の内容が、一つのスライドないしページに物理的に収まりきらない場合には、余分は新規スライドに回されます。この場合には、
15386 の本来の目的が達せられなくなりますので、ここでもこのような状態は避けるべきでしょう。
15389 \begin_layout Subsubsection
15395 \begin_layout Standard
15400 の背後にある考え方は、別のスライドの上にスライドを載せようとするものです。メインの
15404 に図があるとき、関連した文章を表示する前に、図について議論を進めたいと思うことがあるかもしれません。これを行うひとつの方法は、
15408 で後に表示したい部分に黒い紙の蓋を貼り付けてしまうことですが、この方法は、たとえばグラフを他のグラフに重ねたい場合などには、うまく行きません。この場合には、二つ
15409 のグラフを揃えるために、重ねる二つのスライドを、喋りながら手探りで揃えなくてはなりません。これらのような場合には、
15416 \begin_layout Standard
15433 \begin_layout Plain Layout
15434 想像できるように、複数のオーバーレイがあれば、「
15446 」などが親スライドのページ番号に付け加えられます。
15459 の内容は両方とも、1枚のスライドに物理的に収まるようになっていなければなりません。
15467 の「一部」であると考えるのがよいでしょう。LyXでは、
15475 のラベルよりも下げることで、このことを視覚的に表しています。また、印刷可能な出力を生成すると、
15483 両方の四隅に、揃えマーカーがあることに気づかれるはずです。これは、2枚のスライドを物理的に重ね合わせるための補助となるものです。
15486 \begin_layout Standard
15487 2つのスライドをオーバーレイさせる際の大きな問題は、2枚のスライドの内容を揃えることです。2枚目のスライドのグラフには、どれだけの余白を残しておくべきなのでしょ
15488 うか?さらにややこしく、2枚目のスライドにグラフと文章を入れたいときに、その間に割り込んでしまうような文章がメインスライドにある場合には、どうでしょうか?正しい
15489 寸法の垂直スペースを挿入してみることもできるでしょう。しかし、もっと良い方法として、
15500 \begin_layout Standard
15509 は、それぞれ続く文章すべてを見えなくしたり見えるようにしたりするコマンド型の段落環境です。しかしながら、第
15510 \begin_inset CommandInset ref
15512 reference "sec:スライドの癖"
15524 を作成すると、「<以下不可視文>」と書かれた水色のラベルが、ページに中央揃えで表示されます。このラベルに続く段落は、それが置かれるべき
15532 ;どちらでも同じことです)部分に、代わりに空白の部分が置かれます。
15535 \begin_layout Standard
15540 の場合には、中央揃えのラベルは、鮮やかな緑の「<以下可視文>」となります。このラベル以降の段落は、通常通りの挙動を示します。新規の
15556 は自動的に終了されることに注意してください。したがって、
15567 \begin_layout Standard
15584 を適切に使用して、スライドをオーバーレイさせる方法が明らかになったことと思います。
15587 \begin_layout Enumerate
15592 かに関わらず、スライド上に現れるすべてを含んだ
15599 \begin_layout Enumerate
15604 のみに表示するすべての図や段落の前に、
15619 \begin_layout Enumerate
15631 \begin_layout Enumerate
15643 \begin_layout Enumerate
15667 \begin_layout Standard
15675 \begin_layout Standard
15680 クラスをデザインする上で、ひとつ残された問題があります。段落途中の文章を不可視にしたり、不可視段落の途中の文章を再度可視にしたりすることはできないのです。これを
15681 実現するためには、LaTeXコードを埋め込む必要があります
15685 \begin_layout Plain Layout
15689 \begin_layout Itemize
15694 invisible \SpecialChar \ldots{}
15698 \begin_layout Itemize
15703 visible \SpecialChar \ldots{}
15707 \begin_layout Plain Layout
15708 \SpecialChar \ldots{}
15709 のような形となり、TeXとしてマークする必要があります。「可視性」を変更したい文章は、波括弧のあいだ(そして
15721 コマンドの後ろ)に入れます。TeXとしてマークする方法がわからない場合は、
15733 \begin_layout Subsubsection
15739 \begin_inset CommandInset label
15748 \begin_layout Standard
15761 に関連付けられています。ここでもLyX
15773 よりも短く(オーバーレイのラベルよりも長いですが)、
15777 のラベルと同様、派手な赤紫色です。加えて、印刷した
15793 3」等を付けたページ番号が付けられます。1つの
15809 と同じように、長い注釈は、1枚の紙に収まるように分割したいと思われるに違いありません。
15812 \begin_layout Standard
15821 に関して付け加えたいことを書き留めておくことです。特定の
15825 についての覚書として使うこともできます。後者の場合には、タイムマーカを利用したいこともあるかもしれません。現在のところ、LyXの
15833 TeXの機能であるタイムマーカを「ネイティブには」サポートしていません。したがって、LaTeXコードを使用することに頼らなくてはなりません。
15836 \begin_layout Standard
15837 タイムマーカを使用するには、クラスオプション「
15842 \begin_inset CommandInset ref
15844 reference "sec:slidesetup-1"
15848 節参照)。このオプションはタイムマーカ機能を有効にして、生成したすべての
15852 の左下にタイムマーカを表示します。タイムマーカに表示するものを設定するには、LaTeXコマンド「
15864 」を使用します。両コマンドは、秒で測った時間を引数にとります。「
15870 」は、タイムマーカを特定の時間に設定し、「
15876 」は、タイムマーカを指定した分だけ進めます。このようにタイムマーカと
15884 にどれだけの時間をかけるのか忘れないでいられます。
15887 \begin_layout Standard
15888 最後に、説明しておくべき機能がもう一つあります。当然ながら、
15900 はすべて普通の紙に印刷したいはずです。しかしながら、
15908 。ユーザーはどうしたら良いのでしょうか。
15911 \begin_layout Standard
15912 幸いなことに、どれを印刷するか選択することを可能にするLaTeXコマンドが、2種類あります。どちらも文書のプリアンブルに記述されなくてはなりません。コマンド「
15928 のみが含まれるようにするものです。同様に、「
15940 以外の出力をすべて抑制します。私のアドバイスとしては、両コマンドをプリアンブルに書いておいて、最初は両方ともコメントアウトしておくと良いでしょう。そうすれば、執
15941 筆時にはプレゼンテーション全体をプレビューすることができます。いったん書き終えたならば、二つのうち一方のコメントを外して、印刷したい方を選ぶことができます。私な
15950 のコメントを外して、現ファイル名に「*
15954 」を付けた新たなファイルに出力を行ない、今度はこの行をふたたびコメントアウトするとともに、「
15966 」というファイルに出力します。そうすれば、必要に応じて、スライドまたは通常の紙をプリンタにセットし、一方のファイルをプリンタに送ればよいのです。
15969 \begin_layout Standard
15982 」コマンドには、他の引数を与えることもできます。詳しくは、LaTeXの良書をご覧ください。
15985 \begin_layout Subsection
15993 \begin_layout Standard
16002 」が提供されています。これを使用するには、新しいプレゼンテーションを作り始める際に、
16004 ファイル\SpecialChar \menuseparator
16007 メニューを選択してください。すると新規ファイルには、
16035 の使用例も含まれています。また、プリアンブルには、次のように書き込まれています。
16038 \begin_layout LyX-Code
16039 % Uncomment to print out only slides and overlays
16042 \begin_layout LyX-Code
16046 \begin_layout LyX-Code
16052 \begin_inset Newline newline
16058 \begin_layout LyX-Code
16059 % Uncomment to print out only notes
16062 \begin_layout LyX-Code
16066 \begin_layout LyX-Code
16074 \begin_layout Standard
16075 最後に、私はこの文書クラスを、LaTeX2eの組み込みクラスである「
16079 エミュレーション」クラスをサポートする目的で作成しました。私もLyXチームの他のメンバーも、この組み込みスライドクラスを使用することに賛成したり反対したりするも
16080 のではありません。これは単に、ユーザーがこれを使いたかったり必要としたりしたときのためにあるものです。プレゼンテーションを作成するためには、
16085 \begin_inset CommandInset ref
16087 reference "sec:foiltex"
16095 」パッケージ(一部のTeX頒布版に含まれています)のように、他のLaTeX2eクラスも存在します。私はこれらについては知らないのですが、他にどのようなことができ
16099 \begin_layout Chapter
16100 ソフトウェアを追加する必要がある LyX機能
16103 \begin_layout Section
16107 \begin_layout Standard
16115 \begin_layout Subsection
16119 \begin_layout Standard
16128 \begin_layout Plain Layout
16129 LaTeX頒布版としてMiKTeXを使用している場合には、
16151 \begin_inset CommandInset href
16153 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
16160 \begin_layout Standard
16165 パッケージは、LaTeXの構成物には直感的でないものもあり、すぐ忘れてしまいがちであるのに不満を感じた
16166 \begin_inset Flex Noun
16169 \begin_layout Plain Layout
16176 が書いたプログラムです。このプログラムは、LaTeXファイルを走査して、ファイルの整合性をチェックし、犯しがちな誤りを見つけ出します。別の技術用語では、LaTe
16184 \begin_layout Standard
16185 さて、LyXはつねに正しいLaTeXファイルを生成するはずなのに、文法チェッカーはLyXで何をするというのでしょうか。答えは簡単です。
16193 をチェックするだけでなく、打ち間違いによる
16209 は、以下のような誤りを検出することができます。
16212 \begin_layout Itemize
16214 \begin_inset Newline newline
16217 ...ではなく\SpecialChar \ldots{}
16221 \begin_layout Itemize
16223 \begin_inset Newline newline
16226 ( wrong spacing ):誤った空白
16229 \begin_layout Itemize
16230 よく使われる省略形の後ろは通常スペースにする:
16231 \begin_inset Newline newline
16235 \begin_inset space \thinspace{}
16239 \begin_inset space \space{}
16242 is too wide spacing.:広すぎる空白
16245 \begin_layout Itemize
16246 直前の文章が大文字で終わっているときに、文末スペースに直す:
16247 \begin_inset Newline newline
16251 And this is wrong spacing.:誤った空白
16254 \begin_layout Itemize
16256 \begin_inset Newline newline
16259 ラベルが別のページに行ってしまわないように、ラベルは文章に接していなくてはなりません。
16260 \begin_inset CommandInset label
16270 \begin_layout Plain Layout
16271 この脚注は、正しくないページに行ってしまう恐れがあります。
16279 \begin_layout Itemize
16280 参照の前にハードスペースではなくスペース:
16281 \begin_inset Newline newline
16284 運が悪ければ、参照文字列と参照番号のあいだでちょうど改行されてしまい、残念な結果となります。第
16285 \begin_inset CommandInset ref
16287 reference "sec:chktex"
16294 \begin_layout Itemize
16296 \begin_inset Formula $\times$
16300 \begin_inset Newline newline
16304 \begin_inset Formula $2\times2$
16310 \begin_layout Standard
16311 などなど\SpecialChar \ldots{}
16316 は、印刷する前に文書を「仕上げる」上で、たいへん価値のあるツールです。必須のスペルチェックを終えた直後、組版の微調整をする前には、これを実行するべきです。
16319 \begin_layout Subsection
16323 \begin_layout Standard
16324 このプログラムを導入したならば、使うのは
16326 ツール\SpecialChar \menuseparator
16329 を選択するだけなので簡単です。こうすると、LyXは使用中の文書のLaTeXファイルを生成して、
16333 を起動し、当該ファイルを検査しますが、
16337 から警告があった場合には、それを含んだ「エラーボックス」をLyX中に挿入します。警告は、誤りのある箇所のそばに置かれるので、メニュー項目の
16339 移動\SpecialChar \menuseparator
16350 を押せば、簡単に警告の箇所を見出すことができます。エラーボックスを開けるには、マウスでボックスをクリックするか、
16366 を押します。警告を読み、それが誤りを示していれば修正します。警告が何を意味しているか理解しにくい場合には、無視しても問題はありません。画面上の文書と、
16370 を起動する際に行なわれる実際の技術的な操作のあいだには、隠された層があり、この隔たりのせいで、一部の警告が不可解なものになったり、明らかに馬鹿げたものになる場合
16374 \begin_layout Standard
16375 本文書自体、この機能を確認する良い材料になりますので、実行してみてください。すると、かなりの量の警告が出るはずです。これはコンピュータが敏感すぎるせいですので、
16376 警告のほとんどは実際には警告に値しません。
16379 \begin_layout Subsection
16383 \begin_layout Standard
16388 は、あなたが望むよりも煩すぎると思うかもしれません。そのような場合には、必要と思うまで
16392 を無効にするか、あなたにもう少し合うように
16399 \begin_layout Standard
16404 は調整や拡張がひじょうに柔軟なのですが、LyXにおける
16408 関連の問題が、それですべて解決すると思うべきではありません。LyXは、
16416 \begin_layout Plain Layout
16427 文書\SpecialChar \menuseparator
16435 から得た行番号と内部構造を一致させるため、やや特殊なLaTeXファイルを生成しなくてはならないので、警告の一部は正しく表示されていないように見えるでしょう。これ
16436 に対処するためには、以下の2つの方法があります。
16439 \begin_layout Itemize
16456 起動コマンドラインを調整するか、グローバルな
16461 \begin_inset Flex Code
16464 \begin_layout Plain Layout
16470 ファイル)を調整します。コマンドラインからどの警告を有効・無効にできるかは以下をご覧ください。
16473 \begin_layout Itemize
16476 ファイル\SpecialChar \menuseparator
16477 書き出し\SpecialChar \menuseparator
16480 を使って文書をLaTeXファイルに変換し、そのファイルに対して
16484 を手動で実行します。このようにすると、LyX文書中の対応箇所を見つけるのがやや面倒ですが、少し我慢すれば見つけることができます。
16487 \begin_layout Standard
16492 で有効化・無効化できる警告メッセージです。警告を無効にするには
16500 を用います。イタリック表示の項目は、既定で無効となっています。既定値は "
16502 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
16507 \begin_layout Standard
16512 と通信するために、他のコマンドラインパラメータを特定の方法で使用しているため、メッセージを有効化・無効化する以外のオプションを使うべきではありません。
16515 \begin_layout Enumerate
16519 Command terminated with space.
16522 \begin_layout Enumerate
16525 Non-breaking space (
16526 \begin_inset Quotes eld
16534 \begin_inset Quotes erd
16537 ) should have been used.
16540 \begin_layout Enumerate
16544 You should enclose the previous parenthesis with
16545 \begin_inset Quotes eld
16553 \begin_inset Quotes erd
16559 \begin_layout Enumerate
16562 Italic correction (
16563 \begin_inset Quotes eld
16573 \begin_inset Quotes erd
16576 ) found in non-italic buffer.
16579 \begin_layout Enumerate
16582 Italic correction (
16583 \begin_inset Quotes eld
16593 \begin_inset Quotes erd
16596 ) found more than once.
16599 \begin_layout Enumerate
16603 No italic correction (
16604 \begin_inset Quotes eld
16614 \begin_inset Quotes erd
16620 \begin_layout Enumerate
16624 \begin_inset Quotes eld
16632 \begin_inset Quotes erd
16636 \begin_inset Quotes eld
16644 \begin_inset Quotes erd
16650 \begin_layout Enumerate
16653 Wrong length of dash may have been used.
16656 \begin_layout Enumerate
16660 \begin_inset Quotes eld
16668 \begin_inset Quotes erd
16672 \begin_inset Quotes eld
16680 \begin_inset Quotes erd
16686 \begin_layout Enumerate
16690 \begin_inset Quotes eld
16698 \begin_inset Quotes erd
16704 \begin_layout Enumerate
16708 \begin_inset Quotes eld
16716 \begin_inset Quotes erd
16719 to achieve an ellipsis.
16722 \begin_layout Enumerate
16725 Inter-word spacing (
16726 \begin_inset Quotes eld
16736 \begin_inset Quotes eld
16739 ) should perhaps be used.
16742 \begin_layout Enumerate
16745 Inter-sentence spacing (
16746 \begin_inset Quotes eld
16756 \begin_inset Quotes erd
16759 ) should perhaps be used.
16762 \begin_layout Enumerate
16765 Could not find argument for command.
16768 \begin_layout Enumerate
16772 \begin_inset Quotes eld
16780 \begin_inset Quotes erd
16786 \begin_layout Enumerate
16789 Math mode still on at end of LaTeX file.
16792 \begin_layout Enumerate
16796 \begin_inset Quotes eld
16804 \begin_inset Quotes erd
16807 doesn't match the number of
16808 \begin_inset Quotes eld
16816 \begin_inset Quotes erd
16822 \begin_layout Enumerate
16825 You should use either
16828 \begin_inset Quotes eld
16836 \begin_inset Quotes erd
16841 as an alternative to
16842 \begin_inset Quotes eld
16850 \begin_inset Quotes erd
16856 \begin_layout Enumerate
16863 " (ASCII 39) instead of "" (ASCII 180).
16866 \begin_layout Enumerate
16869 User-specified pattern found.
16872 \begin_layout Enumerate
16875 This command might not be intended.
16878 \begin_layout Enumerate
16885 \begin_layout Enumerate
16903 \begin_layout Enumerate
16906 Delete this space to maintain correct page references.
16909 \begin_layout Enumerate
16913 You might wish to put this between a pair of
16914 \begin_inset Quotes eld
16922 \begin_inset Quotes erd
16928 \begin_layout Enumerate
16931 You ought to remove spaces in front of punctuation.
16934 \begin_layout Enumerate
16937 Could not execute LaTeX command.
16940 \begin_layout Enumerate
16949 in front of small punctuation.
16952 \begin_layout Enumerate
16960 may look prettier here.
16963 \begin_layout Enumerate
16967 Multiple spaces detected in output.
16970 \begin_layout Enumerate
16973 This text may be ignored.
16976 \begin_layout Enumerate
16982 \begin_inset Quotes eld
16987 to begin quotation, not
16994 \begin_layout Enumerate
17001 to end quotation, not
17004 \begin_inset Quotes eld
17012 \begin_layout Enumerate
17018 \begin_layout Enumerate
17021 You should perhaps use
17022 \begin_inset Quotes eld
17030 \begin_inset Quotes erd
17036 \begin_layout Enumerate
17039 You should put a space in front of/after parenthesis.
17042 \begin_layout Enumerate
17045 You should avoid spaces in front of/after parenthesis.
17048 \begin_layout Enumerate
17052 You should not use punctuation in front of/after quotes.
17055 \begin_layout Enumerate
17058 Double space found.
17061 \begin_layout Enumerate
17064 You should put punctuation outside inner/inside display math mode.
17067 \begin_layout Enumerate
17070 You ought to not use primitive TeX in LaTeX code.
17073 \begin_layout Enumerate
17076 You should remove spaces in front of
17077 \begin_inset Quotes eld
17085 \begin_inset Quotes erd
17091 \begin_layout Enumerate
17094 \begin_inset Quotes eld
17102 \begin_inset Quotes erd
17105 is normally not followed by
17106 \begin_inset Quotes eld
17114 \begin_inset Quotes erd
17120 \begin_layout Standard
17121 LyXの将来の版では、このツール(およびその縮小版
17125 )の力を最大限引き出すように、より完備したインターフェイスを提供できればと考えています。しかし、現状でも十分に役立つものとなっています。ある程度長さがある既存文
17126 書に使用してみていただければ、きっと驚かれることでしょう。
17129 \begin_layout Section
17133 \begin_layout Standard
17136 Lars Bullik Bjønnes
17145 \begin_layout Subsection
17149 \begin_layout Standard
17150 かつて私の友人が、LyXをグループプロジェクトに使おうとしましたが、当時のLyXには、バージョン管理機能やファイルロック機構が備わっていなかったために、採用を見
17151 合わせました。この事実は少々私をいらだたせ、(将来的にCVSやSCCSのサポートできる拡張性を含め)少なくともRCSのサポートをするべきだと考えたのです。いまや
17152 これは実現しました。LyXは、今ではもっとも基本的なRCS/CVS/SVNコマンドをサポートしています。もしもっと洗練されたことを行いたい場合には、ターミナル上
17156 \begin_layout Standard
17157 LyXで実際にバージョン管理機能を使い始める前に、RCS/CVS/SVNの使用法に習熟しておかなくてはなりません。また、CVSのサポートは、subversion
17158 のサポートほど良くないので、CVSよりもSVNを使うことをお勧めします。Subversionを学び始めるには、SVN Book
17162 \begin_layout Plain Layout
17163 \begin_inset CommandInset href
17165 target "http://svnbook.red-bean.com/"
17174 が良いでしょう。RCSの場合は、「rsintro」をお読みください(これはmanファイルです。
17178 で読めます)。このファイルは、RCSの基本機能のすべてを説明しています。特に、RCSディレクトリに関するコメントと、マスターRCSファイル(
17182 で終わるファイルです)の概念に注意を払ってください。
17185 \begin_layout Standard
17186 LyXへの実装においては、GNU RCSまたはCVS/SVNパッケージの最新版を仮定しています。旧版への保証はありません。ログメッセージのほとんどは、現在のとこ
17187 ろ操作後には表示されません。確認したい場合には、メッセージペインで確かめてください。
17190 \begin_layout Standard
17191 自製の外部コマンドを導入したい場合には、LyX関数説明書のvcコマンドを確認してください。
17194 \begin_layout Subsection
17198 \begin_layout Standard
17199 以下の節ではLyXでサポートされているRCSコマンドを説明します。それらのコマンドは
17201 ファイル\SpecialChar \menuseparator
17204 のサブメニューにあります。LyXは、RCS 5.7に対して試験されています。
17207 \begin_layout Subsubsection
17213 \begin_layout Standard
17214 文書がバージョン管理の下にない場合には、これがメニューにあらわれる唯一の項目です。文書がバージョン管理下にあれば、項目
17221 \begin_layout Standard
17222 このコマンドは、文書をRCSに登録します(CVSが管理しているディレクトリ下にない場合)。すると対話的に、文書の最初の説明を入力するように尋ねられます。すると文
17223 書は読み込み専用モードになるので、変更を加えるためには
17227 を実行する必要があります。バージョン管理下にある文書は、ミニバッファのファイル名の後ろに「 [RCS:<バージョン> <ロック>]」という項目が表示されます。
17230 \begin_layout Standard
17233 ci -q -u -i -t-"<初期説明文>" <ファイル名>
17236 \begin_layout Standard
17244 \begin_layout Subsubsection
17250 \begin_layout Standard
17251 ファイルの編集が終わると、その変更をチェックインします。このとき、変更についての説明文を求められます。これは履歴ログに記録されます。バージョン番号は繰り上がり、
17252 変更がマスターRCSファイルに適用され、文書がアンロックされて読み込み専用モードになります。
17255 \begin_layout Standard
17258 ci -q -u -m"<説明文>" <ファイル名>
17261 \begin_layout Subsubsection
17267 \begin_layout Standard
17268 これは、文書をロックして編集できるようにします。そしてあなただけが文書を読み書きできるようにします。通常は、しばらくの間、文書を編集し、それが終わると変更をチェ
17269 ックインします。あなたがファイルをロックしたことを反映して、ステータスラインが変わります。
17272 \begin_layout Standard
17278 \begin_layout Subsubsection
17284 \begin_layout Standard
17285 これは、最終チェックイン以降、文書に加えられた変更をすべて破棄します。変更が破棄される前に、警告が発せられます。
17288 \begin_layout Standard
17291 co -f -u<バージョン> <ファイル名>
17294 \begin_layout Subsubsection
17300 \begin_layout Standard
17301 これは、最後のチェックインがあたかも為されなかったかのようにします。LyXに読み込まれた文書に変更は加えられませんが、マスターRCSファイルから最後のバージョン
17305 \begin_layout Standard
17308 rcs -o<バージョン> <ファイル名>
17311 \begin_layout Subsubsection
17317 \begin_layout Standard
17318 RCS文書の完全な履歴を表示します。ブラウザ中に、
17329 \begin_layout Subsubsection
17333 \begin_layout Standard
17334 LyXは、RCSバージョン番号情報(のみ)をサポートしています。詳細については、
17335 \begin_inset CommandInset ref
17337 reference "sub:VCS改訂情報"
17344 \begin_layout Subsection
17348 \begin_layout Standard
17349 LyXは、現在CVSを一部サポートしています。そのコマンドは、
17351 ファイル\SpecialChar \menuseparator
17354 サブメニューにあります。バージョン管理システムSVNの方が強力なので、可能ならばCVSではなく、SVNを使用してください。
17357 \begin_layout Subsubsection
17361 \begin_layout Standard
17362 CVSを初めて使いたい場合には、外部ツールを使用して自分のレポジトリを作成し、作業コピーをチェックアウトする必要があります。クライアント=サーバーモデルを使用し
17363 ている場合には、最初のレポジトリチェックアウトを行う前にログインする必要があるかもしれません。
17366 \begin_layout Standard
17367 改訂管理下にある文書のレポジトリを他人も利用している場合に、同一文書の同一箇所に別々の変更を加えてしまうと問題が発生します。標準的なCVSレポジトリは、ファイル
17368 ロッキング機構を有しません。これは驚くべきことかもしれませんが、コンフリクトは、文書の同じ箇所の特定の内容について、人々が意見を異にしている場合にのみ発生します
17369 。したがって、共著者同士がコンスタントにコミュニケーションを交わしていれば、このようなコンフリクトは滅多に発生しません。もしコミュニケーションがなければ、いずれ
17370 にしても根本的な問題があるわけです。それにもかかわらず、いわゆる「予備付きチェックアウト」を使用したいと思う人々もいます。この場合、最初にチェックアウトした際に
17371 、全ファイルの作業コピーは読み込み専用にされ、ユーザーは、作業コピーを書き込み可能にする特別なコマンドを使用した後、編集を開始することになります。変更をチェック
17372 インすると、作業コピーは読み込み専用状態に戻ります。LyXで予備付きチェックアウトを利用したい場合には、
17373 \begin_inset Flex Code
17376 \begin_layout Plain Layout
17383 \begin_inset Flex Code
17386 \begin_layout Plain Layout
17392 という行を書き加える必要があります。この方法の利点は、文書のうち、書き込み可能コピーを誰が使用しているかを見ることができることです。ただし、一人のユーザーだけが
17393 コピーを書き込み可能にしているとは限りません。
17396 \begin_layout Standard
17397 LyXは、あなたが予備付きチェックアウトを使用しているか、予備なしチェックアウトを利用しているか、推測しようと試みます。使用中の作業コピーが読み込み専用になって
17398 いるか、あるいはそれが書き込み可能であって、CVS/Baseサブディレクトリに使用中文書のコピーが存在している場合には、予備付きチェックアウトを使用しているもの
17399 と仮定し、そうでない場合には予備なしチェックアウトを使用しているものと仮定します。予備付きチェックアウトが検出された場合には、作業コピーが読み込み専用の場合に書
17401 \begin_inset Flex MenuItem
17404 \begin_layout Plain Layout
17410 メニューを使用しなくてはなりません。その後、
17411 \begin_inset Flex MenuItem
17414 \begin_layout Plain Layout
17420 メニューが利用可能になるので、自分が加えた変更をリポジトリに移した後、作業コピーを再び読み込み専用にする際には、これを使用します。
17423 \begin_layout Standard
17425 \begin_inset Flex URL
17428 \begin_layout Plain Layout
17430 http://www.nongnu.org/cvs
17436 \begin_inset Flex URL
17439 \begin_layout Plain Layout
17441 http://ximbiot.com/cvs
17449 \begin_layout Standard
17450 以下に言及するサブコマンドとスイッチを理解するには、
17457 \begin_layout Subsubsection
17461 \begin_layout Standard
17462 お使いの文書が改訂管理下に置かれていなければ、メニューにはこの項目だけが表示されます。もし改訂管理が有効ならば、
17469 \begin_layout Standard
17470 本コマンドは、既に文書ディレクトリをCVS管理下に置いている場合に
17477 \begin_inset Flex Code
17480 \begin_layout Plain Layout
17486 ファイルが存在する場合にのみ)、お使いの文書をCVSに登録します。つまり、外部ツールを使用して、アーカイブを自分で作成ないしチェックアウトしなくてはならないこと
17487 を意味します(このステップを忘れてしまうと、LyXは文書をRCSに登録します)。
17490 \begin_layout Standard
17491 すると、文書の最初の説明文を入力するように促されます。登録したファイルは、まだチェックインされたわけではないことに注意してください。
17494 \begin_layout Standard
17497 cvs -q add -m"<入力した説明文>" "<ファイル名>"
17502 \begin_layout Standard
17503 上記および他のすべてのCVSコマンドにおける
17507 は、「カレント作業ディレクトリをファイルの場所に移動し、パスコンポーネントを除いたファイル名を引数として使用する」という意味になります。
17510 \begin_layout Subsubsection
17514 \begin_layout Standard
17515 ファイルの編集を終えたら、変更をコミットします。このとき、文書に変更が加えられていれば、変更の説明文を入れるよう促されます。その後、変更がレポジトリに書き込まれ
17516 ます。文書を変更せず、予備付きチェックアウトが検出された場合、
17517 \begin_inset Flex MenuItem
17520 \begin_layout Plain Layout
17529 \begin_layout Labeling
17530 \labelwidthstring 00.00.0000
17532 \begin_inset space ~
17536 \begin_inset Newline newline
17540 \begin_inset Flex Code
17543 \begin_layout Plain Layout
17544 cvs -q commit -m"<入力した説明文>" "<ファイル名>"
17550 \begin_inset Newline newline
17554 \begin_inset Flex Code
17557 \begin_layout Plain Layout
17558 cvs -q unedit "<ファイル名>"
17566 \begin_layout Subsubsection
17570 \begin_layout Standard
17571 レポジトリを他人と共有している場合、他人の加えた変更を自らの作業コピーに取り込まなくてはならないことがあります。
17574 \begin_layout Standard
17577 cvs -q update "<ファイル名>"
17580 \begin_layout Standard
17581 読み込み専用チェックアウトが検出された場合、作業コピーを書き込み可能にし予備を作成します。
17584 \begin_layout Standard
17587 cvs -q edit "<ファイル名>"
17590 \begin_layout Subsubsection
17594 \begin_layout Standard
17595 これは、最後のチェックイン以降、文書に加えられた変更をすべて廃棄します。変更が廃棄される前に警告が表示されます。最初にファイルが削除され、次にCVS更新コマンド
17599 \begin_layout Standard
17602 cvs -q update "<ファイル名>"
17605 \begin_layout Standard
17606 予備付きチェックアウトが検出され、作業コピーに変更がない場合、予備のみが取り消されます。
17609 \begin_layout Standard
17612 cvs -q unedit "<ファイル名>"
17615 \begin_layout Subsubsection
17616 ローカルディレクトリチェックアウトのレポジトリからの更新
17619 \begin_layout Standard
17621 \begin_inset Flex Code
17624 \begin_layout Plain Layout
17630 ファイルを取り込むなど、文書が複雑になるにつれ、バージョン管理の利用は複雑になります。LyXは、文書が存在するツリー全体の更新をサポートします。これは、CVSの
17631 使用法について詳しい知識のない人々や、レポジトリに追加素材をコミットする野望のない人々と共同作業をするような場合に、特に便利です。ファイル構造は、すべての外部フ
17632 ァイルが、文書と同じディレクトリかそのサブディレクトリに来るように組織する必要があります。いずれにしても、複合文書を新しいディレクトリを建てて収容するのは、望ま
17636 \begin_layout Standard
17638 \begin_inset Flex Code
17641 \begin_layout Plain Layout
17647 は、ディレクトリ全体を更新します。ローカルの変更が検出された場合には、更新を開始する前にユーザーに警告が発せられます。マージコンフリクトが発生した場合には、コン
17648 フリクトを起こしている部分の新旧バージョンが、両方とも最終文書に置かれますので、マージの結果を見直し、修正する必要があります。コンフリクトは、
17649 \begin_inset Flex Code
17652 \begin_layout Plain Layout
17659 \begin_inset Flex Code
17662 \begin_layout Plain Layout
17669 \begin_inset Flex Code
17672 \begin_layout Plain Layout
17678 で区切られて表示されます。最初の部分は、文書名に続いて、更新操作前のバージョンが置かれています。第2の部分は、
17679 \begin_inset Flex Code
17682 \begin_layout Plain Layout
17688 記号列の後にバージョン番号に続いて、レポジトリ版が置かれます。
17691 \begin_layout Labeling
17692 \labelwidthstring 00.00.0000
17694 \begin_inset space ~
17698 \begin_inset Newline newline
17702 \begin_inset Flex Code
17705 \begin_layout Plain Layout
17706 cd $path; cvs diff "."
17712 \begin_inset Newline newline
17716 \begin_inset Flex Code
17719 \begin_layout Plain Layout
17720 cd $path; cvs -q update "."
17728 \begin_layout Standard
17730 \begin_inset Flex Code
17733 \begin_layout Plain Layout
17742 \begin_layout Subsubsection
17746 \begin_layout Standard
17747 これは、CVS文書の全履歴を表示します。
17748 \begin_inset Flex Code
17751 \begin_layout Plain Layout
17753 \begin_inset Quotes eld
17757 \begin_inset Quotes erd
17768 \begin_layout Subsection
17772 \begin_layout Standard
17773 LyXは、現在SVNを一部サポートしています。そのコマンドは、
17774 \begin_inset Flex MenuItem
17777 \begin_layout Plain Layout
17778 ファイル\SpecialChar \menuseparator
17784 メニューにあります。レポジトリへのアクセスに、ssh経由のパスワード保護アクセスを使用している場合には、端末ウィンドウでの入力を促されます。LyXは、SVN
17785 1.5および1.6に対して試験されています
17789 \begin_layout Plain Layout
17790 ほとんどのコマンドは、1.4でも動作します。第
17791 \begin_inset CommandInset ref
17793 reference "sub:レポジトリからSVN同期"
17805 \begin_layout Subsubsection
17809 \begin_layout Standard
17810 お使いの文書が改訂管理下に置かれていなければ、メニューにはこの項目だけが表示されます。もし改訂管理が有効ならば、
17817 \begin_layout Standard
17818 本コマンドは、既に文書のあるディレクトリをSVN管理下に置いている場合に
17823 \begin_inset Flex Code
17826 \begin_layout Plain Layout
17832 ファイルが存在する場合にのみ)、お使いの文書をSVNに登録します。つまり、アーカイブはご自分でチェックアウトしなくてはなりません。
17835 \begin_layout Standard
17836 すると、文書の最初の説明文を入力するように促されます。登録したファイルは、まだコミットされたわけではないことに注意してください。
17839 \begin_layout Standard
17841 \begin_inset Flex Code
17844 \begin_layout Plain Layout
17846 \begin_inset Quotes eld
17850 \begin_inset Quotes erd
17861 \begin_layout Standard
17863 \begin_inset Flex Code
17866 \begin_layout Plain Layout
17875 \begin_layout Subsubsection
17879 \begin_layout Standard
17880 ファイルの編集を終えたら、変更をコミットします。このとき、変更の説明文を入れるよう促されます。その後、変更がコミットされます。
17883 \begin_layout Standard
17888 \begin_layout Plain Layout
17889 ロックが有効になっていない場合です。第
17890 \begin_inset CommandInset ref
17892 reference "sub:SVNファイルロック"
17902 \begin_inset Flex Code
17905 \begin_layout Plain Layout
17907 \begin_inset Quotes erd
17911 \begin_inset Quotes erd
17915 \begin_inset Quotes eld
17919 \begin_inset Quotes erd
17930 \begin_layout Subsubsection
17934 \begin_layout Standard
17935 このファイルの変更点をレポジトリから取得して更新します。すべての干渉点は、手動で解決しなくてはならないので、この機能を使う前にSVNのマージ法と干渉解決法を理解
17939 \begin_layout Standard
17944 \begin_layout Plain Layout
17951 \begin_inset Flex Code
17954 \begin_layout Plain Layout
17955 svn update --non-interactive
17956 \begin_inset Quotes eld
17960 \begin_inset Quotes erd
17971 \begin_layout Subsubsection
17975 \begin_layout Standard
17976 これは、最後のチェックイン以降、文書に加えられた変更をすべて廃棄します。変更が廃棄される前に警告が表示されます。
17979 \begin_layout Standard
17981 \begin_inset Flex Code
17984 \begin_layout Plain Layout
17986 \begin_inset Quotes eld
17990 \begin_inset Quotes erd
18001 \begin_layout Subsubsection
18002 \begin_inset CommandInset label
18004 name "sub:レポジトリからSVN同期"
18008 レポジトリを使ったローカルディレクトリの同期
18012 \begin_layout Plain Layout
18014 \begin_inset Formula $\geqq1.5$
18017 でのみ動作することに注意してください。
18025 \begin_layout Standard
18026 上記の各コマンドはすべて、共通の短所を持っています。すなわち、これらのコマンドは現在の文書しか取り扱わないのです。もし、作業中の文書に図を含めたり、外部
18027 \begin_inset Flex Code
18030 \begin_layout Plain Layout
18036 ファイルを取り込んだりすれば、管理はずっと複雑になります。そこでLyXは、文書のおいてあるツリー全体の更新をサポートします
18040 \begin_layout Plain Layout
18041 すべての外部ファイルが、文書と同じディレクトリかそれ以下のサブディレクトリに来るようにファイル構造を構成する必要があります。
18046 。これは、subversion管理を知らなかったりレポジトリに新しい素材をコミットする勇気のない人たちと共同作業をする羽目になったときに、ひじょうに役に立ちます
18050 \begin_layout Standard
18051 \begin_inset Flex Code
18054 \begin_layout Plain Layout
18060 コマンドは、ディレクトリ全体を更新し、マージに衝突が発生した場合には、ローカル版は保存されるので、意図しないデータロスが発生しません。ローカルな変更が発見された
18061 場合には、更新が開始される前にユーザに警告が与えられます。
18064 \begin_layout Labeling
18065 \labelwidthstring 00.00.0000
18067 \begin_inset space ~
18071 \begin_inset Newline newline
18075 \begin_inset Flex Code
18078 \begin_layout Plain Layout
18079 svn diff $path(変更が発見された場合には通知します)
18080 \begin_inset Newline newline
18083 svn update --accept mine-full $path
18091 \begin_layout Standard
18093 \begin_inset Flex Code
18096 \begin_layout Plain Layout
18105 \begin_layout Subsubsection
18109 \begin_layout Standard
18110 これは、SVN文書の全履歴を表示します。
18111 \begin_inset Flex Code
18114 \begin_layout Plain Layout
18116 \begin_inset Quotes eld
18120 \begin_inset Quotes erd
18131 \begin_layout Subsubsection
18133 \begin_inset CommandInset label
18135 name "sub:SVNファイルロック"
18142 \begin_layout Standard
18143 別々の改訂管理システム間でファイルを交換しようとすると、二人のユーザが同じ文書(の一部)を編集している場合、マージが衝突する問題を引き起こします。そのような衝突
18144 が発生した場合、手動で解決しなくてはならなくなりますが、その合理的な解決法としては、与えられた時間に一人のユーザだけがファイルを編集することが許されるように保証
18145 するための、何らかのロック機構を導入することが考えられます。
18148 \begin_layout Standard
18149 SVNには、このように相互に排他的なファイルアクセスを提供する機構が二つあります。ロックと、
18150 \begin_inset Flex Code
18153 \begin_layout Plain Layout
18159 svnファイル特性に依拠した書き込み権限の自動設定(第
18160 \begin_inset CommandInset ref
18162 reference "sub:自動ロック特性"
18170 \begin_layout Plain Layout
18171 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
18176 。ある文書について、この特性が検出されたときには、LyXは自動的に文書編集にSVNロックを使用するようになり、チェックイン・チェックアウト機構はRCSと同じ枠組
18177 みに切り替わります。これは特に、LyXでのファイルの使われ方に以下の二つのモードがあることを意味します。
18180 \begin_layout Itemize
18181 非ロック状態。読み込まれたファイルは、読み込み専用モードになります。編集するためには、チェックアウトする必要があります。
18185 を行うと、レポジトリからの更新と、書き込みロックの獲得が行われます。ロックの獲得ができないと、非ロック状態から出ることができません。
18188 \begin_layout Itemize
18189 ロック状態。読み込まれたファイルは、「通常の」編集モードになります。他のユーザには、このファイルを編集する許可が与えられません。
18193 を行うと、変更のコミットと書き込みロックの解放が行われます。文書に変更が加えられなかった場合には、コミットは実行されず
18197 \begin_layout Plain Layout
18198 コミットは実行されないのに、コミットメッセージを入力するよう促されますが、驚かないでください。
18203 、書き込みロックの解放のみが行われます。
18206 \begin_layout Standard
18210 \begin_layout Labeling
18211 \labelwidthstring 00.00.0000
18213 \begin_inset Flex Code
18216 \begin_layout Plain Layout
18218 \begin_inset Quotes erd
18222 \begin_inset Quotes erd
18226 \begin_inset Quotes eld
18230 \begin_inset Quotes erd
18239 \begin_inset Newline newline
18243 \begin_inset Flex Code
18246 \begin_layout Plain Layout
18248 \begin_inset Quotes eld
18252 \begin_inset Quotes erd
18263 \begin_layout Labeling
18264 \labelwidthstring 00.00.0000
18266 \begin_inset Flex Code
18269 \begin_layout Plain Layout
18271 \begin_inset Quotes eld
18275 \begin_inset Quotes erd
18284 \begin_inset Newline newline
18288 \begin_inset Flex Code
18291 \begin_layout Plain Layout
18293 \begin_inset Quotes eld
18297 \begin_inset Quotes erd
18308 \begin_layout Subsubsection
18310 \begin_inset CommandInset label
18319 \begin_layout Standard
18321 \begin_inset Flex Code
18324 \begin_layout Plain Layout
18330 ファイルに対する書き込み権限の自動設定は、
18331 \begin_inset Flex MenuItem
18334 \begin_layout Plain Layout
18335 ファイル\SpecialChar \menuseparator
18336 バージョン管理\SpecialChar \menuseparator
18342 で行うことができます。このコマンドは、SVNサーバでファイルがロックされていないときのみ使用可能状態になります(つまり、使用するにはチェックアウトが必要です)。
18345 \begin_layout Standard
18349 \begin_layout Labeling
18350 \labelwidthstring 00.00.0000
18352 \begin_inset Flex Code
18355 \begin_layout Plain Layout
18356 svn propset svn:needs-lock ON
18357 \begin_inset Quotes eld
18361 \begin_inset Quotes erd
18372 \begin_layout Labeling
18373 \labelwidthstring 00.00.0000
18375 \begin_inset Flex Code
18378 \begin_layout Plain Layout
18379 svn propdel svn:needs-lock
18380 \begin_inset Quotes eld
18384 \begin_inset Quotes erd
18395 \begin_layout Subsubsection
18396 \begin_inset CommandInset label
18405 \begin_layout Standard
18406 文書中で改訂情報を有効化するにはいくつかの方法があります。
18409 \begin_layout Itemize
18414 \begin_layout Itemize
18416 \begin_inset Flex Code
18419 \begin_layout Plain Layout
18426 \begin_inset Flex Code
18429 \begin_layout Plain Layout
18435 コマンドの出力を返します。下記の表が、結果の読み方のヒントを与えるでしょう。
18438 \begin_layout Standard
18440 \begin_inset Tabular
18441 <lyxtabular version="3" rows="6" columns="2">
18442 <features tabularvalignment="middle">
18443 <column alignment="center" valignment="top" width="0">
18444 <column alignment="center" valignment="top" width="0">
18446 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
18449 \begin_layout Plain Layout
18455 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
18458 \begin_layout Plain Layout
18466 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
18469 \begin_layout Plain Layout
18475 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
18478 \begin_layout Plain Layout
18486 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
18489 \begin_layout Plain Layout
18495 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
18498 \begin_layout Plain Layout
18506 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
18509 \begin_layout Plain Layout
18515 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
18518 \begin_layout Plain Layout
18526 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
18529 \begin_layout Plain Layout
18535 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
18538 \begin_layout Plain Layout
18539 チェックアウト頻度が低かったことによる不完全な作業コピー
18546 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
18549 \begin_layout Plain Layout
18555 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
18558 \begin_layout Plain Layout
18559 改訂版が混合し、修正され、スイッチされた作業コピー
18572 \begin_layout Itemize
18574 \begin_inset Flex Code
18577 \begin_layout Plain Layout
18579 \begin_inset space ~
18583 \begin_inset space ~
18587 \begin_inset space ~
18595 の出力を解析したものが返されます。サポートされるフラグは
18599 \begin_layout Itemize
18601 \begin_inset Flex Code
18604 \begin_layout Plain Layout
18613 \begin_layout Itemize
18615 \begin_inset Flex Code
18618 \begin_layout Plain Layout
18627 \begin_layout Itemize
18629 \begin_inset Flex Code
18632 \begin_layout Plain Layout
18641 \begin_layout Itemize
18643 \begin_inset Flex Code
18646 \begin_layout Plain Layout
18656 \begin_layout Standard
18657 これらの情報は、情報差込枠で得ることができます(例:
18658 \begin_inset Flex Code
18661 \begin_layout Plain Layout
18662 info-insert buffer vcs-date
18667 )。これらの情報は、ファイルをsvn管理下に置いたときのみ(すなわち使用中文書の
18668 \begin_inset Flex Code
18671 \begin_layout Plain Layout
18677 ディレクトリがあるときのみ)利用可能です。
18681 \begin_layout Itemize
18682 もう一つの---ハッカー的な---方法は、SVNキーワードを使用する方法です
18686 \begin_layout Plain Layout
18687 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
18692 。簡単に言えば、ファイルキーワード特性を設定して(例:
18694 svn propset svn:keywords 'Rev' file.lyx
18700 \begin_layout Plain Layout
18701 これは、LyXがキーワードタグの途中で改行してしまわないことを確実にするための、簡単な方法です。
18710 \begin_layout Plain Layout
18717 )を貼り付けるのです。このようにして、SVNクライアントは、各更新やコミットの後に自動的に改訂番号を代入することができるのです(例
18721 \begin_layout Plain Layout
18728 )。このアプローチにはいくつか問題があります。第一に、TeXの世界では「$」文字は数式を表すのに使われるので、LyX中の
18729 \begin_inset Formula $Rev$
18733 \begin_inset Formula $Rev:59$
18736 になってしまいます。その他のId・Date・Authorなどといったキーワードも同様です。第二に、SVN出力は使用中のロケールに依存するので、Dateが用いられ
18737 ると、SVNは、問題を引き起こすような文字列を容易に生成してしまいます。第三に、文書中には、番号だけでなく「Rev:59」という文字列全体が表示されてしまいます
18738 。Subversionがユーザ定義のキーワードを実装するまでは、このアプローチを信頼性を持って使用したり、LyXがこれを直接サポートすることは、難しそうです。
18741 \begin_layout Subsection
18745 \begin_layout Quote
18746 ユーザが、かなり早いうちに自分自身でコマンドライン操作を理解できないのであれば、TortoiseSVNを使った方が賢明でしょう。---P.
18751 \begin_layout Subsubsection
18755 \begin_layout Standard
18756 LyXを導入して、Subversionレポジトリへのアクセス権を持っている他に、ユーザはSubversionクライアントプログラムを導入する必要があります。クラ
18757 イアントプログラムのWindows用インストーラは
18758 \begin_inset CommandInset href
18761 target "http://www.collab.net/nonav/downloads/subversion/"
18766 \begin_inset CommandInset href
18769 target "http://tortoisesvn.tigris.org/"
18773 も導入することを考えるでしょう。これはSubversionの操作をWindows Explorerのコンテクスト(右クリック)メニューに統合します。LyX外部で
18774 行う操作は、一般的にExplorerコンテクストメニューを使った方が便利です。TortoiseSVNは、LyX自身が使用するクライアントプログラムの代わりとは成
18778 \begin_layout Subsubsection
18779 文書をSubversion管理下に置くには
18782 \begin_layout Standard
18783 LyX文書をSubversionのバージョン管理下に置く前に、その親ディレクトリをバージョン管理下に置かなくてはなりません。文書を、既にレポジトリに存在するプロ
18784 ジェクトに追加する際には、新規文書が置かれることになるディレクトリへ、プロジェクトをチェックアウトすることによって実現します。プロジェクト自体がバージョン管理下
18785 にない場合(たとえばこの文書が新規プロジェクトの最初のファイルである場合)には、このディレクトリをレポジトリにインポートしなくてはなりません。これは、LyXの外
18786 部で行います。インポートもチェックアウトも共に、TortoiseSVNを使えば、Explorerのコンテクストメニューから簡単に終えることができます。あるいは、
18787 DOSプロンプトでコマンドライン・クライアントを使って成し遂げることもできます。TortoiseSVNを使ったプロジェクトのインポート手続きを下記で説明します。
18788 レポジトリは既に存在し、新規プロジェクトを
18789 \begin_inset Flex Code
18792 \begin_layout Plain Layout
18800 で開始するものとします。Subversionクライアントプログラムを使うための情報を得るには、DOSシェルで
18801 \begin_inset Flex Code
18804 \begin_layout Plain Layout
18813 \begin_layout Enumerate
18815 \begin_inset Flex Code
18818 \begin_layout Plain Layout
18827 \begin_inset Flex MenuItem
18830 \begin_layout Plain Layout
18831 TortoiseSVN\SpecialChar \menuseparator
18837 を選択してください。必要であれば、レポジトリのURLを調整し、OKをクリックしてください。
18840 \begin_layout Enumerate
18841 新規プロジェクトフォルダを置くレポジトリレベル(多くの場合最上位レベル)を右クリックし、
18842 \begin_inset Flex MenuItem
18845 \begin_layout Plain Layout
18846 Create folder\SpecialChar \ldots{}
18852 をクリックしてください。プロジェクトフォルダの名称を入力してOKをクリックしてください。必要であればログファイル用のメッセージを入力し、再びOKをクリックしてく
18853 ださい。新規プロジェクトフォルダがレポジトリに現れるはずです。最後にOKを再度クリックして、レポジトリブラウザを終了してください。
18856 \begin_layout Enumerate
18858 \begin_inset Flex Code
18861 \begin_layout Plain Layout
18870 \begin_inset Flex MenuItem
18873 \begin_layout Plain Layout
18874 SVN Checkout\SpecialChar \ldots{}
18880 を選択してください。レポジトリにたった今作成した、プロジェクトフォルダのURLを選択し、チェックアウトディレクトリを
18881 \begin_inset Flex Code
18884 \begin_layout Plain Layout
18892 に設定してから、OKをクリックしてください。フォルダが空でないことを警告されますが、OKをクリックして進んでください。すると、
18893 \begin_inset Flex Code
18896 \begin_layout Plain Layout
18905 \begin_inset Flex Code
18908 \begin_layout Plain Layout
18917 \begin_layout Enumerate
18918 LyXで文書を新規作成するか開くかして、
18919 \begin_inset Flex MenuItem
18922 \begin_layout Plain Layout
18923 ファイル\SpecialChar \menuseparator
18924 バージョン管理\SpecialChar \menuseparator
18930 をクリックします。ログメッセージを入力してOKをクリックし、文書をバージョン管理にコミットしてください。
18933 \begin_layout Standard
18935 \begin_inset Flex MenuItem
18938 \begin_layout Plain Layout
18939 ファイル\SpecialChar \menuseparator
18945 メニューのすべての機能が使用できるようになります。Windows ExplorerのTortoiseSVNコンテクストメニューか、コマンドプロンプトでのSubv
18946 ersionクライアントプログラムを使用して、文書をチェックイン・チェックアウトしたり、履歴を見たりといったことができるようになります。
18949 \begin_layout Subsubsection
18950 Windows下でSVNと共にSSHトンネルを使うには
18953 \begin_layout Standard
18954 Linuxに較べて、WindowsでSVNクライアントをSSH経由で通信するようにさせるのは、かなり厄介な仕事です。どのようにクライアント側を設定すればよいか、
18955 少なくとも幾分かのヒントをお示しするつもりですが、sshとWindowsコマンドラインの知識が前もって必要であり、それと共にかなりの量のフラストレーションが溜ま
18959 \begin_layout Enumerate
18960 前節で述べたように、Windows用のSVNクライアントを入手してください。これが新規の導入である場合には、何らかのSVNコマンド(たとえば
18961 \begin_inset Flex Code
18964 \begin_layout Plain Layout
18970 )を実行して、configファイル群を生成させてください。これらは後で変更を加える必要があります。
18973 \begin_layout Enumerate
18974 Windows用のsshクライアントを選んでください。選択肢はたくさんありますが、ここではPutty tools
18978 \begin_layout Plain Layout
18979 \begin_inset Flex URL
18982 \begin_layout Plain Layout
18984 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
18994 のものを使用することとしましょう。クライアントが接続の度にパスワードを訊いてこないように、接続を自動化する必要があります。簡単にするために、追加的なパスワード保
18995 護などを加えないキーのみを使用することとします。
18999 \begin_layout Enumerate
19000 \begin_inset Flex Code
19003 \begin_layout Plain Layout
19009 を使ってキーを生成します。.ppkプライベートキーファイルを保存し、パブリックキーファイルはサーバ側に置きます。SVNサーバがLinuxで走っている場合、このパブ
19010 リックキーの書式はLinuxのopensshと互換性がないために、「Public key for pasting into OpenSSH authorized
19011 _keys file:」編集フィールドから、直接サーバの
19012 \begin_inset Flex Code
19015 \begin_layout Plain Layout
19016 ~/.ssh/authorized_keys
19022 \begin_inset Flex Code
19025 \begin_layout Plain Layout
19031 ファイルにコピー&ペーストを行わなくてはならないことに注意してください。
19034 \begin_layout Enumerate
19035 Puttyのplinkを入手してください。SVNのconfigファイル
19039 \begin_layout Plain Layout
19040 正確なパスはWindowsのバージョンに依りますが、通常は
19041 \begin_inset Flex Code
19044 \begin_layout Plain Layout
19047 Documents and Settings
19061 \begin_inset Flex Code
19064 \begin_layout Plain Layout
19080 \begin_inset Flex Code
19083 \begin_layout Plain Layout
19089 セクションにsshコマンドを設定してください。例:
19090 \begin_inset Flex Code
19093 \begin_layout Plain Layout
19094 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
19103 \begin_layout Plain Layout
19104 通常、正確なコマンドを機能させるには長い時間がかかり、それは多くの物事に依存します。たとえば、リモートサーバがPuttyなどの既定セッションとして保存されないよ
19105 うにしてください。うまく行かない場合には、まずSVNなしでplink経由の接続を試してください。
19114 \begin_layout Enumerate
19115 SVNアーカイブをチェックアウトしてください。例:
19116 \begin_inset Flex Code
19119 \begin_layout Plain Layout
19120 svn co svn+ssh://user@server/repository_path
19128 \begin_layout Subsubsection
19132 \begin_layout Standard
19133 共著者同士がLinuxとWindowsを混在させているとき、LyXは.lyxファイル中で異なった行末記号を使用することになります。これは、LyXの機能に関する限り
19134 問題になりませんが、コミット差分は巨大になり、マージではコンフリクトを引き起こしがちです。幸いにして、SVNは、.lyxファイルを
19135 \begin_inset Flex Code
19138 \begin_layout Plain Layout
19148 \begin_layout Plain Layout
19150 \begin_inset Flex Code
19153 \begin_layout Plain Layout
19154 svn propset svn:eol-style native FILE_NAME
19164 、CR/LF問題をどのように取り扱えばいいかを知っているので大丈夫です
19168 \begin_layout Plain Layout
19169 \begin_inset Flex URL
19172 \begin_layout Plain Layout
19174 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
19187 \begin_layout Subsection
19191 \begin_layout Standard
19192 vcコマンド機構が最近になって付け加えられたおかげで、LyXのパワーユーザは、改訂管理のための自製コマンドを作ることができるようになりました。
19195 \begin_layout Standard
19196 たとえば、以下のようにして、二つのTortoiseSVNコマンドを直接統合することができます。
19199 \begin_layout Description
19201 \begin_inset Flex Code
19204 \begin_layout Plain Layout
19205 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
19213 \begin_layout Description
19215 \begin_inset Flex Code
19218 \begin_layout Plain Layout
19219 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
19227 \begin_layout Subsection
19231 \begin_layout Standard
19233 \begin_inset Flex Code
19236 \begin_layout Plain Layout
19242 ダンプを生成することによって、改訂版の間の変更点を検査するのが、典型的な使用法です。これは平文ファイルには有効なのですが、複雑な構造を持つLyXファイルの場合に
19243 は、あまり便利ではありません。そこで、LyXは独自の文書比較機能を提供しています。この機能を呼び出すには2つの方法があります。1つは、LyXの
19244 \begin_inset Flex Code
19247 \begin_layout Plain Layout
19253 関数を直接呼び出す方法であり(詳細はLyX関数説明書を参照)、もう1つは
19254 \begin_inset Flex MenuItem
19257 \begin_layout Plain Layout
19258 旧改訂と比較\SpecialChar \ldots{}
19264 メニューないしアイコンを使用する方法です。当該文書のうち、任意の2つの改訂版を比較することもできますし、編集中の現行版を古い改訂版と比較することもできます(この
19266 \begin_inset Flex MenuItem
19269 \begin_layout Plain Layout
19275 」は、編集中のファイルと最後にコミットした改訂版との比較を意味します)。
19278 \begin_layout Standard
19279 この機能は、SVNとRCSでサポートされていますが、RCSは、より複雑なバージョン付けスキームを持っているため、制約があります。ダイアログ中で改訂版を指定する際
19280 の数字は、つねにRCS改訂番号の最後の数を指し示します(例:「1.2.35」版のときには「35」)。
19283 \begin_layout Section
19287 \begin_layout Standard
19292 (kayvan@sylvan.com)改訂
19294 Edmar Wienskoski Jr.
19296 (edmar-w-jr@technologist.com)原文
19299 \begin_layout Subsection
19303 \begin_layout Standard
19304 この節の主な目的は、文芸的プログラミング(literate programming)のために、LyXをどう使えばよいかをお見せすることです。ここでは、あなたがこ
19305 のプログラミング技術をよくご存じで、「tangling」や「weaving」の意味するところを知っているものとして説明します。そうでない場合には、以下の各節にあ
19306 るウェブリンクをたどってください。そこには、かつての開発の歴史から最新のツールチップまで、たくさんの良質なドキュメンテーションがあります。
19309 \begin_layout Standard
19310 また、あなたが、LyXの設定を変更することを厭わない程度までLyXに習熟しており、Xリソースファイルにも親しんでいることを前提にしています。そうでない場合は、あ
19311 なたの必要とするトピックを扱っている、LyXの他の説明書で調べてください。
19314 \begin_layout Subsection
19318 \begin_layout Standard
19319 以下は、文芸的プログラミング FAQからの抜粋です。
19322 \begin_layout Quotation
19323 文芸的プログラミングは、人間が読むのに適した形でのドキュメンテーションとソースの組合わせです。実際、文芸的プログラムは楽しい読み物であるべきであり、さらには参加
19324 したいとさえ思わせるべきなのです!(ボブ、ごめん。言わずにはいれなかった。)一般的に、文芸的プログラムは、ソースとドキュメンテーションを同一ファイル上に結合した
19325 ものです。そして、文芸的プログラミングツールは、ファイルを解析して、読むことのできるドキュメンテーションか、あるいはコンパイル可能なソースを生成します。文芸的プ
19327 \begin_inset space \thinspace{}
19331 Knuthが、TeX組版ソフトウエアを開発中に作り出したものです。
19334 \begin_layout Standard
19338 \begin_layout Quotation
19341 文芸的プログラミングは、冗長なコメント付けと何が違いますか?
19344 \begin_layout Quotation
19345 3つの際立った特徴があります。重要な順に列挙すれば、
19349 \begin_layout Itemize
19353 \begin_layout Itemize
19357 \begin_layout Itemize
19358 特に図式と数式を含んだドキュメンテーションの組版
19362 \begin_layout Quotation
19366 \begin_layout Standard
19367 あなたの興味に火を付けたところで参考文献を見てみましょう。
19370 \begin_layout Subsubsection
19374 \begin_layout Standard
19378 \begin_layout Quote
19379 Literate Programming FAQ
19380 \begin_inset Flex URL
19383 \begin_layout Plain Layout
19385 http://shelob.ce.ttu.edu/daves/lpfaq/faq.html
19393 \begin_layout Standard
19397 \begin_layout Standard
19398 このFAQには、23(二十三です!)の文芸的プログラミング用ツールが列挙されています。一部のツールは、特定のプログラミング言語用に特化したものですが、一般的な対
19399 象を持つものもあります。私は自分で使うのに、いくつかの理由から
19406 \begin_layout Itemize
19407 ドキュメンテーションをLaTeXでもHTMLでも出力できる。
19410 \begin_layout Itemize
19411 開放的なアーキテクチャに持っているので、新しいフィルタをプラグインとして加えたり、自分が必要な特別な処理を実行することが容易である。
19414 \begin_layout Itemize
19415 すでに利用可能となっているフィルタの良質なコレクションがある(HTMLはその一つです)。
19418 \begin_layout Itemize
19422 \begin_layout Standard
19426 \begin_layout Quote
19428 \begin_inset Flex URL
19431 \begin_layout Plain Layout
19433 http://www.cs.virginia.edu/~nr/noweb/
19441 \begin_layout Standard
19442 にあります。ここから始めれば、たくさんの興味深いリンクや、文芸的プログラミングの用例にたどり着くことができます。
19445 \begin_layout Subsection
19449 \begin_layout Standard
19450 LyXにおける文芸的プログラミングのサポートは、LyXの汎用変換機構を使用して実現しています。このサポートは「Noweb非依存」的な方法で提供されているので、L
19451 yXの設定を変更するだけで、自分の好きな他の文芸的プログラミングツールを使って、この新しいLyXの機能を利用することができます。
19454 \begin_layout Subsubsection
19455 ドキュメントとコードの生成(weavingおよびtangling)
19458 \begin_layout Paragraph
19462 \begin_layout Standard
19463 NowebとLyXの導入に成功すると、新規文書を開いたり、既存文書の文書クラスを変更しようとする際、以下の3つの新しい文書クラスが利用可能になっているはずです。
19466 \begin_layout Itemize
19470 \begin_layout Itemize
19474 \begin_layout Itemize
19478 \begin_layout Standard
19479 文芸的プログラミング文書を作成する場合には、これらのうち一つを選んでください。
19482 \begin_layout Standard
19483 文芸的プログラミング文書は、これら3つのクラスに限定されないことに注意してください。letterのような他のスタイルから新しいクラスを作成することもできますし、
19484 Article (AMS)のような他のクラスバリエーションと組み合わせて作成することもできます。既存のクラスではカバーできないような、特別なニーズがある場合には
19485 、LyX開発者用メーリングリスト(lyx-devel@lists.lyx.org)に連絡していただければ、新しい項目を加えるように調整するか、そのしかたをお教えしま
19490 \begin_layout Plain Layout
19491 これは非常に簡単です。これを行うには、4行から成るファイルを作成し、自動設定を実行するだけなのです。
19496 。また、Noweb以外の文芸的プログラミングツールを使用する場合にも、そのための新しい文書クラスをつくる必要があります。
19499 \begin_layout Paragraph
19503 \begin_layout Standard
19512 \begin_layout Plain Layout
19513 Nowebでの名称は「Chunk」です。歴史的な理由から、別の文芸プログラミングツールNuwebで使われている「scrap」という用語を使用しています。Nuwe
19514 bは、私がNowebに乗り換える前に長年使用していたツールです。
19519 という名前のレイアウトを使えば、コードを入力することができます。Nowebは次のようにscrapを区切ります。
19522 \begin_layout LyX-Code
19526 \begin_layout LyX-Code
19530 \begin_layout LyX-Code
19534 \begin_layout LyX-Code
19538 \begin_layout LyX-Code
19542 \begin_layout Standard
19543 問題は<<と@の間にあるものを完全にそのままの形で扱わなければならないことです。つまりLyXはこの間に書かれたものへのどんな変更も禁止しなくてははなりません。こ
19544 れはScrapと呼ぶ特別なレイアウトで扱われます。この環境は通常の段落のようですが、自由に空白を入れることができます。
19547 \begin_layout Standard
19548 Scrap段落環境の欠点は、連続したコードの段落の間に空行がソースコードにも印刷したドキュメントにも入ることです。これを回避するためには、Scrap環境の中の改
19549 行には(ctrl-return)を使ってください。上の例では次のようにします
19553 \begin_layout Plain Layout
19554 印刷したバージョンを読んでいる場合にはこの例と上の例の違いが分かりません。
19562 \begin_layout LyX-Code
19564 \begin_inset Newline newline
19568 \begin_inset Newline newline
19572 \begin_inset Newline newline
19576 \begin_inset Newline newline
19582 \begin_layout Standard
19583 この環境はうまく働きます。不便な点は普通のリターンのかわりにctrl-returnを使わなければならないことです
19587 \begin_layout Plain Layout
19588 これは改善しなければならない点でしょう。
19596 \begin_layout Standard
19597 また、Scrapの中にNowebの%defを使うことができます。これを使うことでNowebのidentifierの相互参照に項目を加えることができます。次の例を
19601 \begin_layout LyX-Code
19603 \begin_inset Newline newline
19606 def some_function(args):
19607 \begin_inset Newline newline
19610 "This is the doc string for this function."
19611 \begin_inset Newline newline
19614 print "My args: ", args
19617 \begin_layout LyX-Code
19618 @ %def some_function
19621 \begin_layout Standard
19622 これをどのように使って、その結果相互参照がどうなるかは
19624 LIBDIR/examples/listerrors.lyx
19626 の中の文芸pythonプログラムを見るとよくわかります。
19629 \begin_layout Paragraph
19633 \begin_layout Standard
19634 新しい文章ファイルを正しい文書クラスでつくり、その中にコードとテキストも入れました。これをどうやって印刷したらいいのでしょう。簡単です。
19635 \begin_inset Flex MenuItem
19638 \begin_layout Plain Layout
19639 表示\SpecialChar \menuseparator
19645 等を選ぶだけです。普通の文章の場合と同じで、特別なことは必要ありません。
19648 \begin_layout Standard
19649 LyXの内部で何が起っているかを説明しておきましょう。
19652 \begin_layout Enumerate
19653 \begin_inset Flex MenuItem
19656 \begin_layout Plain Layout
19657 表示\SpecialChar \menuseparator
19663 が選ばれると、LaTeXファイルがつくられます。
19667 \begin_layout Standard
19668 ドキュメントが文芸プログラミング用のクラスであった場合には、拡張子に(
19669 \begin_inset Flex MenuItem
19672 \begin_layout Plain Layout
19678 パネルで設定した)文芸プログラム用のものがつけられます。それ以外は .texが拡張子に使われます。
19682 \begin_layout Enumerate
19683 違いがファイル名だけなのに注意してください。LyXによる特別な処理は必要ありません。Scrap環境でコードを入力するのだけがポイントです。
19686 \begin_layout Enumerate
19687 ドキュメントが文芸プログラムクラスなら、LyXは内部のLyXからNowebのコンバータを使い、それからNowebからLaTeXのコンバータ
19691 \begin_layout Plain Layout
19697 dit\SpecialChar \menuseparator
19704 パネルの Conversion タブで設定できます。
19709 を使ってLaTeXファイルを生成します。
19713 \begin_layout Standard
19714 それ以外の場合はこのステップを飛ばします。
19718 \begin_layout Enumerate
19719 最後にLaTeXが実行され、普通の文章と同じ後処理が行われます。
19722 \begin_layout Standard
19723 様々なコンバータから走らせるコマンドを変えることによって、特定の文芸プログラム用のソフトウエアにしばられないようになっています。
19726 \begin_layout Paragraph
19730 \begin_layout Standard
19731 ビルドメニューが選ばれた場合や、それに対応するツールバーのボタンが押された場合、上のステップ1と同様にLaTeXファイルが生成されます。それからLyXは
19735 のコンバータを起動します。通常は、このコンバータは(他のコンバータと同じように)2つの部分からできています。
19738 \begin_layout Enumerate
19739 コンバータプログラム。このプログラムは、一つのフォーマットから他のフォーマットへの変換を行います(この場合は、Nowebフォーマットからプログラムの疑似フォーマ
19743 \begin_layout Enumerate
19744 エラーログパーサー。これはエラーメッセージをLyXが理解できる形へ書き直します。これによって、LyXはファイルバッファの正しい位置へエラーボックスを配置すること
19748 \begin_layout Standard
19749 はじめのパートのために、「変換子」設定で、
19750 \begin_inset Quotes eld
19758 \begin_inset Quotes erd
19761 と指定します。これは基本的に、LyXが
19765 (プログラムかスクリプト名)を(一般にはLyXの一時ファイル用のディレクトリにつくられる)Nowebファイルの名前とともに起動することを意味しています。
19768 \begin_layout Standard
19769 以下にbuild-scriptの一例を書いておきます。パスが通っているディレクトリに置いて使います。
19772 \begin_layout LyX-Code
19776 \begin_layout LyX-Code
19780 \begin_layout LyX-Code
19781 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 sh
19784 \begin_layout Standard
19785 コンバータの設定の次の部分はFlagsです。これを
19786 \begin_inset Quotes eld
19791 originaldir,parselog=listerrors
19794 \begin_inset Quotes erd
19801 が出すすべてのエラーをlisterrorsプログラムに渡します。
19804 \begin_layout Standard
19805 コンバータコードがlisterrorsプログラムを探す順序は、はじめに
19816 \begin_layout Paragraph
19820 \begin_layout Standard
19821 LyXとNowebの統合の最後の部分は、
19822 \begin_inset Quotes eld
19826 \begin_inset Quotes erd
19829 scrapです。一般に、あなたのプログラムの構築操作の説明それ自身をscrapに入れて文章中に含めなければなりません。上の例のnoweb用のbuild-scr
19830 iptでは、scrapを見つけるのにnotangleコマンドを使い、shを使って起動します。
19833 \begin_layout Standard
19834 以下に典型的なscrapがどのようなものかを書いておきます。
19837 \begin_layout LyX-Code
19839 \begin_inset Newline newline
19843 \begin_inset Newline newline
19847 \begin_inset Newline newline
19850 if [ -z "${NOWEB_SOURCE}" ]
19851 \begin_inset Newline newline
19855 \begin_inset Newline newline
19858 NOWEB_SOURCE=myfile.nw
19859 \begin_inset Newline newline
19863 \begin_inset Newline newline
19867 code to extract files ...]
19868 \begin_inset Newline newline
19872 code to compile files ...]
19873 \begin_inset Newline newline
19879 \begin_layout Standard
19882 LIBDIR/examples/listerrors.lyx
19886 LIBDIR/examples/Literate.lyx
19888 を見てください。この2つのファイルには異なる実装のlisterrorsプログラムが含まれていて、これまで説明してきた各々の部分が全体としてどのようになるかをわか
19891 LIBDIR/examples/noweb2lyx.lyx
19893 も見てください。面白いことに、これらの3つのファイルは、Python、C、Perlが各々使われていて、LyXの文芸プログラミングのサポートがプログラム言語に依存
19897 \begin_layout Subsubsection
19901 \begin_layout Standard
19902 すべての文芸プログラムのための設定は、
19903 \begin_inset Flex MenuItem
19906 \begin_layout Plain Layout
19907 ツール\SpecialChar \menuseparator
19913 パネルの「変換子」タブですることができます。重要な部分を見ておきましょう。
19916 \begin_layout Description
19918 \begin_inset space ~
19922 \begin_inset Quotes eld
19926 \begin_inset Quotes erd
19930 \begin_inset space ~
19933 format 書式タブで設定します。ここで、Noweb特有の設定を行います。
19945 に設定してください。これによって、LyXに変換プロセスの第一段階でつくられるファイルに
19949 という拡張子をつけることを指示します。
19952 \begin_layout Description
19954 \begin_inset space ~
19962 \begin_inset space ~
19965 format これは空にしてください。この項目のただひとつの目的は変換の最終的なフォーマットを指定することです(これが設定されていると、このフォーマットからの変
19969 \begin_layout Description
19978 このコンバータは、weavingの段階を行います。Nowebの場合は、
19979 \begin_inset Quotes eld
19984 noweave -delay -index $$i > $$o
19987 \begin_inset Quotes erd
19993 \begin_layout Description
20002 これは、tanglingを行います。以前に説明したように、
20007 \begin_inset Quotes eld
20012 originaldir,parselog=listerrors
20015 \begin_inset Quotes erd
20021 \begin_layout Subsubsection
20025 \begin_layout Standard
20026 ddd/gdbまたは他のデバッガで使えるserver-goto-file-rowという関数が新たにLyXサーバに実装されました。
20029 \begin_layout Standard
20030 ddd/gdbでデバッグしているとき、一つのキーストロークで現在実行している位置でテキストエディタを起動できます。既定のdddの設定ではShift-Ctrl-V
20032 \begin_inset Flex MenuItem
20035 \begin_layout Plain Layout
20036 ツール\SpecialChar \menuseparator
20037 設定\SpecialChar \menuseparator
20044 \begin_inset Flex MenuItem
20047 \begin_layout Plain Layout
20053 エントリを変えると変えることができます。
20056 \begin_layout Standard
20057 新しいLyXサーバの関数と、このdddの機能を使うために
20058 \begin_inset Flex MenuItem
20061 \begin_layout Plain Layout
20070 \begin_layout LyX-Code
20071 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
20074 \begin_layout Standard
20075 こうしておくとdddを使っていてプログラムの編集したい場所があったとき、(dddのウインドウで)Shift-Ctrl-Vを押すだけでdddはLyXサーバに情報を
20076 送り、LyXは同じファイルを表示し、カーソルはdddが示した場所へあらわれます。これでもうデバッグの最中に推測しながらスクロールして場所を探す必要がなくなります
20080 \begin_layout Standard
20081 この機能が動くにはLyXサーバが利用可能でなければなりません(既定ではLyXサーバーは使えないようになっています)。LyXサーバを使えるようにするには、
20084 \begin_inset Flex MenuItem
20087 \begin_layout Plain Layout
20100 \begin_inset Flex MenuItem
20103 \begin_layout Plain Layout
20116 \begin_inset Flex MenuItem
20119 \begin_layout Plain Layout
20132 \begin_inset Quotes eld
20137 /home/<your-home-directory>/.lyx/lyxpipe
20140 \begin_inset Quotes erd
20146 \begin_layout Standard
20151 』のLyXサーバの説明を読んでください。
20154 \begin_layout Subsubsection
20158 \begin_layout Standard
20159 ツールバーに加えることのできる6つの新しいボタンがあります。そのうちの5つのボタンは段落環境へのショートカットです。
20179 環境用のボタンを用意しています。最後の一つはファイルメニューの Build Programエントリへのショートカットです。
20182 \begin_layout Standard
20183 LyXはツールバーで使うためのいくつものボタンを用意しています。私のツールバーはこの6つのショートカットに
20184 \begin_inset Flex MenuItem
20187 \begin_layout Plain Layout
20188 表示\SpecialChar \menuseparator
20189 更新\SpecialChar \menuseparator
20196 \begin_inset Flex MenuItem
20199 \begin_layout Plain Layout
20200 表示\SpecialChar \menuseparator
20209 \begin_layout LyX-Code
20213 \begin_layout LyX-Code
20217 \begin_layout LyX-Code
20218 Icon "layout Standard"
20221 \begin_layout LyX-Code
20222 Icon "layout Section"
20225 \begin_layout LyX-Code
20226 Icon "layout LaTeX"
20229 \begin_layout LyX-Code
20230 Icon "layout LyX-Code"
20233 \begin_layout LyX-Code
20234 Icon "layout Scrap"
20237 \begin_layout LyX-Code
20241 \begin_layout LyX-Code
20245 \begin_layout LyX-Code
20246 Icon "buffer-typeset"
20249 \begin_layout LyX-Code
20250 Icon "build-program"
20253 \begin_layout LyX-Code
20257 \begin_layout LyX-Code
20261 \begin_layout LyX-Code
20265 \begin_layout LyX-Code
20269 \begin_layout LyX-Code
20273 \begin_layout Subsubsection
20277 \begin_layout Standard
20279 \begin_inset Flex MenuItem
20282 \begin_layout Plain Layout
20288 で変えることができます。まず変えたいと思うのはLaTeXフォントカラーでしょう。既定では赤になっていますが、ScrapはLaTeXフォントを使い、文芸的プログラ
20289 ミングでは多くのScrapがあるためにそれらがすべて赤では疲れてしまいます。
20290 \begin_inset Flex MenuItem
20293 \begin_layout Plain Layout
20294 操作性\SpecialChar \menuseparator
20303 \begin_layout Standard
20304 次にすることは画面の改行文字を見えなくすることです。改行文字の色を背景の色と同じにすることで改行文字を見えなくできます。私は改行文字を背景の色に似ているが少し違
20305 う色にすることを勧めます。こうすると、改行文字があるのはわかりますが、じゃまにならないでしょう。
20308 \begin_layout Chapter
20314 \begin_inset CommandInset label
20316 name "chap:Special-features"
20323 \begin_layout Standard
20326 You can do everything with LyX that you can do with LaTeX.
20327 However, LyX cannot support every LaTeX feature directly.
20328 But you can always use TeX Code.
20329 This chapter shows you some more special things you might want to use.
20330 For other special things you can do with figures, tables, floats, boxes
20331 and notes, have a look at the
20338 \begin_layout Section
20342 \begin_layout Standard
20345 The aim for this section is to show how the LaTeX package
20349 can be used in a LyX document.
20350 LyX does not support the
20354 package natively yet, so you have to use some TeX code.
20357 \begin_layout Standard
20364 package allows switching between one and multicolumn format on the same
20366 Footnotes are handled correctly, but will be placed at the bottom of the
20367 page and not under each column.
20368 Within the different columns you can use everyting, with the limitation
20369 that for floats you need to use the option
20376 \begin_layout Subsection
20380 \begin_layout Standard
20381 二段組みを使いたい場合には、二段組みのレイアウトを始めたい場所にLaTeXモードで
20384 \begin_layout Standard
20389 begin{multicols}{2}
20392 \begin_layout Standard
20393 を挿入してください。そして二段組みを終わりたい場所に
20396 \begin_layout Standard
20404 \begin_layout Standard
20408 \begin_layout Standard
20412 \begin_layout Plain Layout
20416 begin{multicols}{2}
20424 \begin_layout Standard
20429 The Adventure of the Empty House
20432 \begin_inset Newline newline
20437 Sir Arthur Conan Doyle
20440 \begin_layout Standard
20443 It was in the spring of the year 1894 that all London was interested, and
20444 the fashionable world dismayed, by the murder of the Honourable Ronald
20445 Adair under most unusual and inexplicable circumstances.
20446 The public has already learned those particulars of the crime which came
20447 out in the police investigation, but a good deal was suppressed upon that
20448 occasion, since the case for the prosecution was so overwhelmingly strong
20449 that it was not necessary to bring forward all the facts.
20450 Only now, at the end of nearly ten years, am I allowed to supply those
20451 missing links which make up the whole of that remarkable chain.
20452 The crime was of interest in itself, but that interest was as nothing to
20453 me compared to the inconceivable sequel, which afforded me the greatest
20454 shock and surprise of any event in my adventurous life.
20455 Even now, after this long interval, I find myself thrilling as I think
20456 of it, and feeling once more that sudden flood of joy, amazement, and increduli
20457 ty which utterly submerged my mind.
20458 Let me say to that public, which has shown some interest in those glimpses
20459 which I have occasionally given them of the thoughts and actions of a very
20460 remarkable man, that they are not to blame me if I have not shared my knowledge
20461 with them, for I should have considered it my first duty to do so, had
20462 I not been barred by a positive prohibition from his own lips, which was
20463 only withdrawn upon the third of last month.
20466 \begin_layout Standard
20470 \begin_layout Plain Layout
20482 \begin_layout Subsection
20486 \begin_layout Standard
20487 二段以上の多段組みをする場合も同じようにできます。
20490 \begin_layout Standard
20494 \begin_layout Plain Layout
20498 begin{multicols}{3}
20506 \begin_layout Standard
20509 It can be imagined that my close intimacy with Sherlock Holmes had interested
20510 me deeply in crime, and that after his disappearance I never failed to
20511 read with care the various problems which came before the public.
20512 And I even attempted, more than once, for my own private satisfaction,
20513 to employ his methods in their solution, though with indifferent success.
20514 There was none, however, which appealed to me like this tragedy of Ronald
20516 As I read the evidence at the inquest, which led up to a verdict of willful
20517 murder against some person or persons unknown, I realized more clearly
20518 than I had ever done the loss which the community had sustained by the
20519 death of Sherlock Holmes.
20520 There were points about this strange business which would, I was sure,
20521 have specially appealed to him, and the efforts of the police would have
20522 been supplemented, or more probably anticipated, by the trained observation
20523 and the alert mind of the first criminal agent in Europe.
20524 All day, as I drove upon my round, I turned over the case in my mind and
20525 found no explanation which appeared to me to be adequate.
20526 At the risk of telling a twice-told tale, I will recapitulate the facts
20527 as they were known to the public at the conclusion of the inquest.
20530 \begin_layout Standard
20534 \begin_layout Plain Layout
20546 \begin_layout Standard
20547 三段組み以上も可能ですが、読みにくくなり実用的ではないでしょう。
20550 \begin_layout Subsection
20554 \begin_layout Standard
20555 カラムの中にカラムを入れることもできます。
20558 \begin_layout Standard
20562 \begin_layout Plain Layout
20566 begin{multicols}{2}
20574 \begin_layout Standard
20577 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
20578 at that time governor of one of the Australian colonies.
20579 Adair's mother had returned from Australia to undergo the operation for
20580 cataract, and she, her son Ronald, and her daughter Hilda were living together
20584 \begin_layout Standard
20588 \begin_layout Plain Layout
20592 begin{multicols}{2}
20600 \begin_layout Standard
20603 The youth moved in the best society--had, so far as was known, no enemies
20604 and no particular vices.
20605 He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
20606 had been broken off by mutual consent some months before, and there was
20607 no sign that it had left any very profound feeling behind it.
20608 For the rest {sic} the man's life moved in a narrow and conventional circle,
20609 for his habits were quiet and his nature unemotional.
20610 Yet it was upon this easy-going young aristocrat that death came, in most
20611 strange and unexpected form, between the hours of ten and eleven-twenty
20612 on the night of March 30, 1894.
20615 \begin_layout Standard
20619 \begin_layout Plain Layout
20631 \begin_layout Standard
20634 Ronald Adair was fond of cards--playing continually, but never for such
20635 stakes as would hurt him.
20636 He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
20637 It was shown that, after dinner on the day of his death, he had played
20638 a rubber of whist at the latter club.
20639 He had also played there in the afternoon.
20644 The evidence of those who had played with him-- Mr.
20645 Murray, Sir John Hardy, and Colonel Moran--showed that the game was whist,
20646 and that there was a fairly equal fall of the cards.
20647 Adair might have lost five pounds, but not more.
20648 His fortune was a considerable one, and such a loss could not in any way
20650 He had played nearly every day at one club or other, but he was a cautious
20651 player, and usually rose a winner.
20652 It came out in evidence that, in partnership with Colonel Moran, he had
20653 actually won as much as four hundred and twenty pounds in a sitting, some
20654 weeks before, from Godfrey Milner and Lord Balmoral.
20655 So much for his recent history as it came out at the inquest.
20658 \begin_layout Standard
20662 \begin_layout Plain Layout
20674 \begin_layout Standard
20675 より複雑な形でカラムの中にカラムを入れる例や、へッダのスペース、縦のカラムを分ける線の入れ方などの例は、ファイル
20686 \begin_layout Standard
20687 \begin_inset Newpage newpage
20693 \begin_layout Section
20697 \begin_layout Standard
20701 \begin_layout Plain Layout
20713 \begin_layout Standard
20717 \begin_layout Plain Layout
20726 \begin_layout Plain Layout
20740 \begin_layout Standard
20745 \begin_layout Plain Layout
20756 \begin_layout Plain Layout
20765 \begin_layout Plain Layout
20774 \begin_layout Plain Layout
20783 \begin_layout Plain Layout
20792 \begin_layout Plain Layout
20801 \begin_layout Plain Layout
20810 \begin_layout Plain Layout
20819 \begin_layout Plain Layout
20828 \begin_layout Plain Layout
20837 \begin_layout Plain Layout
20846 \begin_layout Plain Layout
20855 \begin_layout Plain Layout
20864 \begin_layout Plain Layout
20873 \begin_layout Plain Layout
20882 \begin_layout Plain Layout
20891 \begin_layout Plain Layout
20900 \begin_layout Plain Layout
20909 \begin_layout Plain Layout
20918 \begin_layout Plain Layout
20924 長方形の段落の形を変えたい場合があるでしょう。そういう場合は楽しいTeXコマンド
20930 を使いましょう。この例で分かるように適当に行の長さを設定することで好きな形の段落が作れます。馬鹿げているように見えるかもしれませんが、dropped
20931 capitalを最終調整したり、長方形ではない図のまわりを文章で囲ったりするのにこのような手作業が必要なのです。
20934 \begin_layout Standard
20935 \begin_inset VSpace bigskip
20942 parshape numlines #1indent #1length #2indent #2length \SpecialChar \ldots{}
20949 は段落をつくる行数です。その段落の本文がこれより短い場合はそこで終わり、長い場合には最後の行の定義がそれ以後も使われます。
20957 エントリは左余白からの字下げの量と、字下げされたところからの行の長さを指定します。この形は現在の段落にだけ適応されて、次の段落では通常の形にリセットされます。
20960 \begin_layout Standard
20964 \begin_layout Plain Layout