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 this document prints
10 % out as advertised. If you mess with this preamble,
11 % parts of this document 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 \usepackage{ifpdf} % part of the hyperref bundle
17 \ifpdf % if pdflatex is used
19 % set fonts for nicer pdf view
20 \IfFileExists{lmodern.sty}
21 {\usepackage{lmodern}}{}
23 \fi % end if pdflatex is used
25 % the pages of the TOC is numbered roman
26 % and a pdf-bookmark for the TOC is added
27 \let\myTOC\tableofcontents
28 \renewcommand\tableofcontents{%
30 \pdfbookmark[1]{\contentsname}{}
34 % Added only for Japanese translation
35 % This is needed to use \textquotedbl (this doesn't exist in OT1 encoding)
36 \usepackage[T1]{fontenc}
37 % Below is to correct PDF bookmarks
38 % but doesn't work because hyperref is automatically called.
39 % Modify \usepackage{hyperref} line manually
40 %\usepackage[dvipdfm,bookmarks=true,bookmarksnumbered=true,bookmarkstype=toc]{hyperref}
41 %\ifnum 42146=\euc"A4A2 \AtBeginDvi{\special{pdf:tounicode EUC-UCS2}}\else
42 %\AtBeginDvi{\special{pdf:tounicode 90ms-RKSJ-UCS2}}\fi
44 \options fleqn,bibliography=totoc,index=totoc,BCOR7.5mm,titlepage,captions=tableheading
45 \use_default_options false
49 \maintain_unincluded_children false
52 InsetLayout CharStyle:MenuItem
61 \newcommand*{\menuitem}[1]{{\sffamily #1}}
66 \language_package default
71 \font_typewriter default
72 \font_default_family default
73 \use_non_tex_fonts false
80 \default_output_format default
82 \bibtex_command default
83 \index_command default
87 \pdf_title "LyX Configuration Manual"
88 \pdf_author "LyX Team"
89 \pdf_subject "LyX-Documentation Customization"
90 \pdf_keywords "LyX, documentation, customization"
92 \pdf_bookmarksnumbered true
93 \pdf_bookmarksopen true
94 \pdf_bookmarksopenlevel 1
99 \pdf_pdfusetitle false
100 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue,pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
110 \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
152 \begin_layout Plain Layout
154 もしコメントや誤りの修正をお持ちでしたら、LyX文書化メーリングリスト
155 \begin_inset CommandInset href
157 target "lyx-docs@lists.lyx.org"
162 宛お送りください。件名ヘッダに「[Customization]」という文字を入れ、このファイルの現在のメンテナRichard Heck <rgheck@comc
163 ast.net>をccにして送ってください。
169 \begin_inset Newline newline
173 \begin_inset Newline newline
179 \begin_layout Standard
180 \begin_inset CommandInset toc
181 LatexCommand tableofcontents
186 \begin_inset Note Note
189 \begin_layout Plain Layout
190 本文書を修正する際には、変更追跡機能を使用してください。これによって、
193 \begin_layout Plain Layout
194 LyX翻訳者陣が変更点を認識しやすくなり、メンテナが最新の状態を維持することが容易になります。
202 \begin_layout Chapter
206 \begin_layout Standard
207 この取扱説明書は、LyXに備わっている高度設定機能を取り扱います。ここでは、短絡キーや画面プレビューオプション、プリンタオプション、LyXサーバ経由でのLyXへ
208 のコマンド送信、国際化、新しいLaTeXクラスやLyXレイアウトの導入などの題材について論じます。おそらくは変更可能なことすべてについて触れることは無理でしょう
209 が—私たちの開発者たちは私たちが文書化できる速さよりも速く新しい機能を付け加えてしまうので—、もっとも一般的な高度設定については説明を行い、わかりにくいものにつ
210 いては正しい方向を指し示すことができるようにしていくつもりです。
213 \begin_layout Standard
214 \begin_inset Branch OutDated
217 \begin_layout Standard
218 Information from previous versions of this document that now seems to be
219 outdated is contained in the OutDated branch of this document.
220 By default, this information will not appear in the LaTeX output.
228 \begin_layout Chapter
232 \begin_layout Standard
233 本章の目的は、LyX設定ファイル群を理解するための一助となることです。本章を読み進める前に、
234 \begin_inset Flex MenuItem
237 \begin_layout Plain Layout
238 ヘルプ\SpecialChar \menuseparator
243 \begin_layout Plain Layout
255 を使って、LyXライブラリとユーザディレクトリがどこにあるかを確認しておいてください。ライブラリディレクトリは、LyXがシステム全体の設定ファイルを置いておくと
256 ころです。一方、ユーザディレクトリは、自身がそれを修正した版を置いておくところです。私たちは、本書の以下の部分で、前者を
257 \begin_inset Flex Code
260 \begin_layout Plain Layout
265 \begin_layout Plain Layout
278 \begin_inset Flex MenuItem
281 \begin_layout Plain Layout
290 \begin_layout Section
291 \begin_inset Flex Code
294 \begin_layout Plain Layout
299 \begin_layout Plain Layout
314 \begin_layout Standard
315 \begin_inset Flex Code
318 \begin_layout Plain Layout
323 \begin_layout Plain Layout
335 とそのサブディレクトリには、多くのファイルがあり、LyXの挙動を高度設定するのに使用されます。これらのファイルの多くは、LyX内の
336 \begin_inset Flex MenuItem
339 \begin_layout Plain Layout
340 ツール\SpecialChar \menuseparator
346 ダイアログから変更することができます。LyX中で行いたいと思うような高度設定は、ほとんどこのダイアログから行うことができるようになっています。しかしながら、Ly
348 \begin_inset Flex Code
351 \begin_layout Plain Layout
356 \begin_layout Plain Layout
368 のファイルを修正することで高度設定されます。これらのファイルは様々なカテゴリに分類しうるので、以下の各小節で説明します。
371 \begin_layout Subsection
375 \begin_layout Standard
376 \begin_inset Flex MenuItem
379 \begin_layout Plain Layout
385 にある各ファイルは、LyXが自動設定を行ったときに生成されます。これらのファイルは、内部調査中に推測された様々な既定値が置かれています。これらは、随時上書きされ
386 てしまうので、一般的には修正しないことが望まれます。
389 \begin_layout Labeling
390 \labelwidthstring 00.00.0000
391 \begin_inset Flex Code
394 \begin_layout Plain Layout
400 このファイルには、様々な既定コマンドが置かれています。
403 \begin_layout Labeling
404 \labelwidthstring 00.00.0000
405 \begin_inset Flex Code
408 \begin_layout Plain Layout
414 このファイルには、LyXが認識したパッケージの一覧が収められています。現在のところ、これはLyXプログラム自体には使用されていませんが、抽出された情報その他は
416 \begin_inset Flex MenuItem
419 \begin_layout Plain Layout
420 ヘルプ\SpecialChar \menuseparator
425 \begin_layout Plain Layout
440 \begin_layout Labeling
441 \labelwidthstring 00.00.0000
442 \begin_inset Flex Code
445 \begin_layout Plain Layout
452 \begin_inset Flex Code
455 \begin_layout Plain Layout
461 ディレクトリで検出されたテキストクラスと、関連したLaTeX文書クラスおよびその説明の一覧です。
464 \begin_layout Labeling
465 \labelwidthstring 00.00.0000
466 \begin_inset Flex Code
469 \begin_layout Plain Layout
476 \begin_inset Flex Code
479 \begin_layout Plain Layout
485 ディレクトリで検出されたレイアウトモジュールの一覧です。
488 \begin_layout Labeling
489 \labelwidthstring 00.00.0000
490 \begin_inset Flex Code
493 \begin_layout Plain Layout
499 ご使用のシステムで検出された様々な種類のLaTeX関連ファイルの一覧です。
502 \begin_layout Labeling
503 \labelwidthstring 00.00.0000
504 \begin_inset Flex Code
507 \begin_layout Plain Layout
512 \begin_layout Plain Layout
525 \begin_inset Flex Code
528 \begin_layout Plain Layout
533 \begin_layout Plain Layout
545 から自動的に生成されます。ご使用中のLaTeXの設定に関する情報が納められています。
548 \begin_layout Subsection
552 \begin_layout Standard
554 \begin_inset Flex Code
557 \begin_layout Plain Layout
562 \begin_layout Plain Layout
575 \begin_inset Flex Code
578 \begin_layout Plain Layout
584 に重複して存在します。特定のファイルが両方の場所にある場合には、
585 \begin_inset Flex Code
588 \begin_layout Plain Layout
597 \begin_layout Labeling
598 \labelwidthstring 00.00.0000
599 \begin_inset Flex Code
602 \begin_layout Plain Layout
608 このディレクトリには、LyXで使用されるキー割当を定義している、拡張子が
609 \begin_inset Flex Code
612 \begin_layout Plain Layout
619 \begin_inset Flex Code
622 \begin_layout Plain Layout
628 という名称の割当ファイルの各国語版がある場合には、そちらが用いられます。
631 \begin_layout Labeling
632 \labelwidthstring 00.00.0000
633 \begin_inset Flex Code
636 \begin_layout Plain Layout
642 このディレクトリには、文書に取り込むことのできる画像ファイルが納められています。
645 \begin_layout Labeling
646 \labelwidthstring 00.00.0000
647 \begin_inset Flex Code
650 \begin_layout Plain Layout
656 このディレクトリには、LyXの取扱説明書ファイル(今お読みのものも含めて)が納められています。上述のように、
657 \begin_inset Flex Code
660 \begin_layout Plain Layout
665 \begin_layout Plain Layout
677 ファイルは特に注目に値します。各国語版のヘルプ文書は、
678 \begin_inset Flex Code
681 \begin_layout Plain Layout
687 (「xx」はISO言語コード)サブディレクトリにあります。詳しくは、第
688 \begin_inset CommandInset ref
690 reference "cha:LyXの各国語対応"
697 \begin_layout Labeling
698 \labelwidthstring 00.00.0000
699 \begin_inset Flex Code
702 \begin_layout Plain Layout
708 このディレクトリには、何らかの機能の使い方を説明する例示ファイルが納められています。ファイルブラウザ中で
709 \begin_inset Flex MenuItem
712 \begin_layout Plain Layout
718 ボタンを押すと、このディレクトリが表示されます。
721 \begin_layout Labeling
722 \labelwidthstring 00.00.0000
723 \begin_inset Flex Code
726 \begin_layout Plain Layout
733 \begin_inset Flex MenuItem
736 \begin_layout Plain Layout
742 ダイアログで使用される画像ファイルが納められています。さらに、ツールバーの各アイコンや、LyXを起動したときに現れるバナーも納められています。
745 \begin_layout Labeling
746 \labelwidthstring 00.00.0000
747 \begin_inset Flex Code
750 \begin_layout Plain Layout
756 このディレクトリには、キーボードのキー割当ファイルが納められています。詳細については、第
757 \begin_inset CommandInset ref
759 reference "sec:国際キー配列"
766 \begin_layout Labeling
767 \labelwidthstring 00.00.0000
768 \begin_inset Flex Code
771 \begin_layout Plain Layout
778 \begin_inset CommandInset ref
780 reference "cha:新規文書を導入"
784 章に述べられているテキストクラスおよびモジュールのファイルが納められています。
787 \begin_layout Labeling
788 \labelwidthstring 00.00.0000
789 \begin_inset Flex Code
792 \begin_layout Plain Layout
798 このディレクトリには、LyXの各バージョン間の変換に使用される
799 \begin_inset Flex Code
802 \begin_layout Plain Layout
808 Pythonスクリプトが納められています。たとえば、複数のファイルの変換をバッチ処理したい場合には、これらをコマンドラインから実行することもできます。
811 \begin_layout Labeling
812 \labelwidthstring 00.00.0000
813 \begin_inset Flex Code
816 \begin_layout Plain Layout
823 \begin_inset Flex MenuItem
826 \begin_layout Plain Layout
832 機能の有用性を示すためのファイルがいくつか納められています。LyX自身が使用するスクリプトもいくつか収められています。
835 \begin_layout Labeling
836 \labelwidthstring 00.00.0000
837 \begin_inset Flex Code
840 \begin_layout Plain Layout
847 \begin_inset CommandInset ref
849 reference "sec:ひな型を作成する"
853 章で述べられている標準のLyXひな型ファイルが納められています。
856 \begin_layout Labeling
857 \labelwidthstring 00.00.0000
858 \begin_inset Flex Code
861 \begin_layout Plain Layout
867 このディレクトリには、LyXの操作画面を定義する拡張子
868 \begin_inset Flex Code
871 \begin_layout Plain Layout
877 のファイルが納められています。つまり、これらのファイルは、どのメニュー項目がどのメニューに現れるかを定義し、どの項目がツールバーに現れるかを定義しています。
880 \begin_layout Subsection
884 \begin_layout Standard
885 これらのファイルはLyXが内部的に使用するもので、あなたが開発者でない限りは、凡そこれらに変更を加える必要はありません。
888 \begin_layout Labeling
889 \labelwidthstring 00.00.0000
890 \begin_inset Flex Code
893 \begin_layout Plain Layout
899 このファイルは、LyX開発陣の名簿です。この内容は、メニュー項目
900 \begin_inset Flex MenuItem
903 \begin_layout Plain Layout
904 ヘルプ\SpecialChar \menuseparator
909 \begin_layout Plain Layout
924 \begin_layout Labeling
925 \labelwidthstring 00.00.0000
926 \begin_inset Flex Code
929 \begin_layout Plain Layout
935 これは、自動設定プロセスによって使用されるLaTeXスクリプトです。直接実行しないでください。
938 \begin_layout Labeling
939 \labelwidthstring 00.00.0000
940 \begin_inset Flex Code
943 \begin_layout Plain Layout
949 これは、LyXの再設定によって使用されるスクリプトです。これは、このスクリプトを実行したディレクトリに設定ファイルを生成します。
952 \begin_layout Subsection
956 \begin_layout Labeling
957 \labelwidthstring 00.00.0000
958 \begin_inset Flex Code
961 \begin_layout Plain Layout
967 このファイルには、各文字エンコーディングがどのようにUnicodeにマップされるかを示した表が載っています。
970 \begin_layout Labeling
971 \labelwidthstring 00.00.0000
972 \begin_inset Flex Code
975 \begin_layout Plain Layout
982 \begin_inset Flex MenuItem
985 \begin_layout Plain Layout
994 \begin_layout Labeling
995 \labelwidthstring 00.00.0000
996 \begin_inset Flex Code
999 \begin_layout Plain Layout
1005 このファイルには、現在LyXがサポートしている言語の全一覧が載っています。
1008 \begin_layout Section
1012 \begin_layout Standard
1013 LyXを非特権ユーザとして利用している場合でも、自分自身で使うために、LyXの設定を変更したいと思うかもしれません。
1014 \begin_inset Flex Code
1017 \begin_layout Plain Layout
1023 ディレクトリには、すべての個人設定ファイルが収められています。これは、
1024 \begin_inset Flex MenuItem
1027 \begin_layout Plain Layout
1028 ヘルプ\SpecialChar \menuseparator
1033 \begin_layout Plain Layout
1044 \begin_layout Plain Layout
1056 で「ユーザーディレクトリ」として言及されているディレクトリです。このディレクトリは、
1057 \begin_inset Flex Code
1060 \begin_layout Plain Layout
1065 \begin_layout Plain Layout
1078 \begin_inset Flex Code
1081 \begin_layout Plain Layout
1088 \begin_inset Flex Code
1091 \begin_layout Plain Layout
1096 \begin_layout Plain Layout
1108 の対応するファイルを置き換えるものとして機能していることを意味します。前節で述べられた設定はどれも、全ユーザに影響する全システム用ディレクトリに置くこともできま
1109 すし、自分自身で使うために個人のローカルディレクトリに置くこともできます。
1112 \begin_layout Standard
1113 わかりやすくするために、いくつか例を挙げましょう。
1116 \begin_layout Itemize
1117 \begin_inset Flex MenuItem
1120 \begin_layout Plain Layout
1121 ツール\SpecialChar \menuseparator
1128 \begin_inset Flex Code
1131 \begin_layout Plain Layout
1138 \begin_inset Flex Code
1141 \begin_layout Plain Layout
1150 \begin_layout Itemize
1151 \begin_inset Flex MenuItem
1154 \begin_layout Plain Layout
1155 ツール\SpecialChar \menuseparator
1162 \begin_inset Flex Code
1165 \begin_layout Plain Layout
1171 スクリプトを実行し、その結果のファイルは、ご自身のローカル設定ディレクトリに書き込まれます。これはすなわち、
1172 \begin_inset Flex Code
1175 \begin_layout Plain Layout
1182 \begin_inset Flex MenuItem
1185 \begin_layout Plain Layout
1186 文書\SpecialChar \menuseparator
1192 ダイアログのクラス一覧に表示されるようになることを意味します。
1195 \begin_layout Itemize
1196 たとえば、LyXのFTPサイトから最新の取扱説明書をとってきたものの、使用中のシステム上で管理者権限がないために、それをインストールすることができなかったとして
1198 \begin_inset Flex Code
1201 \begin_layout Plain Layout
1208 \begin_inset Flex MenuItem
1211 \begin_layout Plain Layout
1217 メニュー項目はこれらを開くようになります!
1220 \begin_layout Section
1224 \begin_layout Standard
1225 ローカル設定ディレクトリにおいて設定の自由度があるだけでは、2つ以上の設定を自由に使いこなしたい場合には充分ではないかもしれません。たとえば、使用する度に異なる
1226 キー割当を使用したり、異なるプリンタ設定を使用したいことがあるかもしれません。これは、複数の設定ディレクトリを作ることで実現することができます。そして、実行時に
1227 どのディレクトリを使用するか指定するのです。
1230 \begin_layout Standard
1232 \begin_inset Flex Code
1235 \begin_layout Plain Layout
1245 と共に起動すると、設定を既定のディレクトリではなく、指定したディレクトリから読み込むように、指示することになります(LyXを
1246 \begin_inset Flex Code
1249 \begin_layout Plain Layout
1255 スイッチなしで実行すれば、既定ディレクトリを指定することになります)。指定したディレクトリが存在しない場合には、LyXは、初めてLyXを実行したときに既定ディレ
1256 クトリを訊いてくるのと同様に、そのディレクトリを作るかどうか訊いてきます。この追加したユーザディレクトリでは、既定ディレクトリで行うのと全く同じように設定オプシ
1257 ョンを修正することができます。これらのディレクトリは完全に独立しています(が、読み進めてください)。また、環境変数
1258 \begin_inset Flex Code
1261 \begin_layout Plain Layout
1267 を特定の値に設定しても、全く同じ効果があります。
1270 \begin_layout Standard
1271 複数の設定を持つことはまた、維持の手間も増えるということです。もし新しいレイアウトを
1272 \begin_inset Flex Code
1275 \begin_layout Plain Layout
1281 に加えて、これをすべての設定で利用できるようにしたいならば、これをすべての設定ディレクトリで個々に付け加えなくてはなりません。これを避けるには、次のようなトリッ
1282 クを使用してください。LyXが新しい設定ディレクトリを生成すると、そのサブディレクトリ(上記参照)はほとんど空です。新しい設定が既存のものをミラーするようにする
1283 には、空のサブディレクトリを、既存の設定の対応するサブディレクトリへのシンボリックリンクに置き換えてください。ただし
1284 \begin_inset Flex Code
1287 \begin_layout Plain Layout
1294 \begin_inset Flex MenuItem
1297 \begin_layout Plain Layout
1298 ツール\SpecialChar \menuseparator
1304 で使用可能)が書き出した、設定毎に異なるファイルが含まれていますので、注意を払ってください。
1307 \begin_layout Chapter
1311 \begin_layout Standard
1320 に述べられています。オプションのうちいくつかについて、ここでさらに詳細に説明します。
1323 \begin_layout Section
1325 \begin_inset CommandInset label
1334 \begin_layout Standard
1335 ファイル形式が定義されていない場合、はじめの一歩は、使いたいと思うファイル形式を定義することです。それには、
1336 \begin_inset Flex MenuItem
1339 \begin_layout Plain Layout
1340 ツール\SpecialChar \menuseparator
1347 \begin_inset Flex MenuItem
1350 \begin_layout Plain Layout
1351 ファイル処理\SpecialChar \menuseparator
1358 \begin_inset Flex MenuItem
1361 \begin_layout Plain Layout
1362 新規\SpecialChar \ldots{}
1368 ボタンを押して、登録する新しい形式を定義してください。
1369 \begin_inset Flex MenuItem
1372 \begin_layout Plain Layout
1378 フィールドは、GUI中で形式を認識するために用いられる名称です。
1379 \begin_inset Flex MenuItem
1382 \begin_layout Plain Layout
1388 は、形式を内部的に識別するために用いられます。さらにファイル拡張子も入力する必要があります。これらはすべて必須事項です。オプションの
1389 \begin_inset Flex MenuItem
1392 \begin_layout Plain Layout
1398 フィールドは、メニュー中で短絡キーを提供するのに使用されます(たとえば、
1399 \begin_inset Flex MenuItem
1402 \begin_layout Plain Layout
1409 \begin_inset Flex MenuItem
1412 \begin_layout Plain Layout
1413 表示\SpecialChar \menuseparator
1422 \begin_layout Standard
1424 \begin_inset Flex MenuItem
1427 \begin_layout Plain Layout
1434 \begin_inset Flex MenuItem
1437 \begin_layout Plain Layout
1443 を関連づけることができます。たとえば、PostScriptファイルを閲覧するのに
1444 \begin_inset Flex MenuItem
1447 \begin_layout Plain Layout
1453 を使用したいとしましょう。このプログラムを起動するのに必要なコマンドを対応するフィールドに入力します。ここで、コマンドを定義するのに、次節に掲げる4つの変数を用
1454 いることができます。この閲覧プログラムは、LyX中で画像を閲覧したり
1455 \begin_inset Flex MenuItem
1458 \begin_layout Plain Layout
1464 メニューを使用したときに起動されます。一方、編集プログラムは、たとえば、画像を右クリックして現れるコンテクストメニューで
1465 \begin_inset Flex MenuItem
1468 \begin_layout Plain Layout
1477 \begin_layout Standard
1479 \begin_inset Flex MenuItem
1482 \begin_layout Plain Layout
1488 型は必須ではありませんが、指定するときには、すべての形式の中で一意的なものでなくてはなりません。これは、この形式のファイルをファイル内容から検出するのに用いられ
1490 \begin_inset CommandInset href
1493 target "http://www.iana.org/assignments/media-types/"
1497 に公式に登録されたMIME型がないものがあります。そこで、LyXは、
1498 \begin_inset CommandInset href
1500 name "freedesktop.org"
1501 target "http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec"
1505 で指定されているMIME型拡張表を使用しています。
1508 \begin_layout Standard
1509 \begin_inset Flex MenuItem
1512 \begin_layout Plain Layout
1518 オプションは、LyXに、この形式が文書として書き出すのに適していることを指示するものです。このオプションが有効となっていて、適切な変換経路が存在する場合には(第
1519 \begin_inset CommandInset ref
1526 \begin_inset Flex MenuItem
1529 \begin_layout Plain Layout
1530 ファイル\SpecialChar \menuseparator
1536 メニューに表示されます。また、この形式に閲覧プログラムが指定されている場合には、この形式は
1537 \begin_inset Flex MenuItem
1540 \begin_layout Plain Layout
1547 \begin_inset Flex Code
1550 \begin_layout Plain Layout
1556 のような純粋な画像形式は、このオプションを有効にしてはいけません。
1557 \begin_inset Flex Code
1560 \begin_layout Plain Layout
1566 のようにベクター画像であると同時に文書でもあるような形式は、これを有効にします。
1569 \begin_layout Standard
1570 \begin_inset Flex MenuItem
1573 \begin_layout Plain Layout
1579 オプションは、LyXにこの形式がベクター画像を含みうることを教示するものです。この情報は、
1580 \begin_inset Flex MenuItem
1583 \begin_layout Plain Layout
1589 を書き出す際に、内包されている画像をどの形式に変換するかを決定するのに使用されます。
1590 \begin_inset Flex MenuItem
1593 \begin_layout Plain Layout
1600 \begin_inset Flex MenuItem
1603 \begin_layout Plain Layout
1610 \begin_inset Flex MenuItem
1613 \begin_layout Plain Layout
1620 \begin_inset Flex MenuItem
1623 \begin_layout Plain Layout
1629 以外の画像形式を取り扱うことができないので、内包されている画像は、これらの形式に変換される必要があるかもしれない為です。内包されている画像が既に
1630 \begin_inset Flex MenuItem
1633 \begin_layout Plain Layout
1640 \begin_inset Flex MenuItem
1643 \begin_layout Plain Layout
1650 \begin_inset Flex MenuItem
1653 \begin_layout Plain Layout
1659 のいずれかになっていない場合には、ベクター画像形式オプションが有効になっている場合には
1660 \begin_inset Flex MenuItem
1663 \begin_layout Plain Layout
1670 \begin_inset Flex MenuItem
1673 \begin_layout Plain Layout
1682 \begin_layout Section
1686 \begin_layout Standard
1687 形式の変換はすべて、LyXの一時ディレクトリで行われるため、変換用にファイルを一時ディレクトリにコピーする前段階で、ファイルに変更を加える必要のあることがありま
1692 \begin_layout Plain Layout
1693 たとえば、ファイルが他のファイル—たとえば画像—を、相対ファイル名を用いて参照している場合、このファイルが一時ディレクトリにコピーされると参照が無効になる場合が
1699 。これは複写子によって取り扱われ、複写子は、ファイルを一時ディレクトリに(あるいは一時ディレクトリから)コピーすると同時に、その過程でファイルに変更を加えます。
1702 \begin_layout Standard
1703 複写子の定義においては、以下の4つの変数を用いることができます。
1706 \begin_layout Labeling
1707 \labelwidthstring 00.00.0000
1708 \begin_inset Flex Code
1711 \begin_layout Plain Layout
1718 \begin_inset Flex MenuItem
1721 \begin_layout Plain Layout
1730 \begin_layout Labeling
1731 \labelwidthstring 00.00.0000
1732 \begin_inset Flex Code
1735 \begin_layout Plain Layout
1744 \begin_layout Labeling
1745 \labelwidthstring 00.00.0000
1746 \begin_inset Flex Code
1749 \begin_layout Plain Layout
1758 \begin_layout Labeling
1759 \labelwidthstring 00.00.0000
1760 \begin_inset Flex Code
1763 \begin_layout Plain Layout
1772 \begin_layout Standard
1779 コマンドで使用されるのと同形式のファイル名です。これは、書き出すファイルがそのようなインクルードに適している場合のみ、使用さるべきものです。
1782 \begin_layout Standard
1783 複写子は、出力ファイルに関する操作であれば、ほとんどすべてに対応することができます。たとえば、生成したPDFファイルを、
1784 \begin_inset Flex Code
1787 \begin_layout Plain Layout
1793 という特別なディレクトリにコピーしたいものとしましょう。その場合には、以下のようなシェルスクリプトを書きます。
1796 \begin_layout Standard
1797 \begin_inset listings
1801 \begin_layout Plain Layout
1806 \begin_layout Plain Layout
1811 \begin_layout Plain Layout
1813 TOFILE=`basename $2`
1816 \begin_layout Plain Layout
1818 cp $FROMFILE /home/you/pdf/$TOFILE
1823 これを、自身のローカルLyXディレクトリ—たとえば
1824 \begin_inset Flex Code
1827 \begin_layout Plain Layout
1828 /home/you/.lyx/scripts/pdfcopier.sh
1833 —に保存し、お使いのプラットフォームが必要とするならば、実行可能属性を付与します。それから、
1834 \begin_inset Flex MenuItem
1837 \begin_layout Plain Layout
1838 ツール\SpecialChar \menuseparator
1845 \begin_inset Flex MenuItem
1848 \begin_layout Plain Layout
1849 ファイル処理\SpecialChar \menuseparator
1856 \begin_inset Flex MenuItem
1859 \begin_layout Plain Layout
1865 形式—あるいは他のPDF形式のうちどれか—を選択し、
1866 \begin_inset Flex MenuItem
1869 \begin_layout Plain Layout
1876 \begin_inset Flex Code
1879 \begin_layout Plain Layout
1880 pdfcopier.sh $$i $$o
1888 \begin_layout Standard
1889 複写子は、LyX自身が様々な変換に使用します。たとえば、適切なプログラムが検出された場合、LyXは自動的に
1890 \begin_inset Flex MenuItem
1893 \begin_layout Plain Layout
1900 \begin_inset Flex MenuItem
1903 \begin_layout Plain Layout
1905 \begin_inset space ~
1913 形式の複写子を導入します。これらの形式を書き出す際、複写子は、本体のHTMLファイルだけでなく、関連した様々なファイル(スタイルファイルや画像など)もコピーされ
1914 るように手配します。これらのファイルはすべて、元のLyXファイルのあるディレクトリのサブディレクトリに書き込まれます
1918 \begin_layout Plain Layout
1919 この複写子の挙動は調整することができます。非必須の「-e」オプションは、コピーする拡張子をコンマ区切りで羅列したものを引数にとります。これを省略した場合には、す
1920 べてのファイルがコピーされます。「-t」引数は、生成したディレクトリに書き加える拡張子を指定するものです。既定値では、これは「
1921 \begin_inset Flex MenuItem
1924 \begin_layout Plain Layout
1929 \begin_layout Plain Layout
1942 \begin_inset Flex MenuItem
1945 \begin_layout Plain Layout
1946 /path/to/filename.lyx
1952 \begin_inset Flex MenuItem
1955 \begin_layout Plain Layout
1956 /path/to/filename.html.L
1960 \begin_layout Plain Layout
1981 \begin_layout Section
1983 \begin_inset CommandInset label
1992 \begin_layout Standard
1993 各形式間でファイルを変換するために、ご自身の変換子を定義することができます。これは、
1994 \begin_inset Flex MenuItem
1997 \begin_layout Plain Layout
1998 ツール\SpecialChar \menuseparator
1999 設定\SpecialChar \menuseparator
2000 ファイル処理\SpecialChar \menuseparator
2009 \begin_layout Standard
2010 新規に変換子を定義するには、ドロップダウンリストから
2011 \begin_inset Flex MenuItem
2014 \begin_layout Plain Layout
2021 \begin_inset Flex MenuItem
2024 \begin_layout Plain Layout
2030 を選択し、変換に必要なコマンドを入力してから
2031 \begin_inset Flex MenuItem
2034 \begin_layout Plain Layout
2040 ボタンを押してください。変換子の定義には、以下のような変数を使用することができます。
2043 \begin_layout Labeling
2044 \labelwidthstring 00.00.0000
2045 \begin_inset Flex Code
2048 \begin_layout Plain Layout
2057 \begin_layout Labeling
2058 \labelwidthstring 00.00.0000
2059 \begin_inset Flex Code
2062 \begin_layout Plain Layout
2071 \begin_layout Labeling
2072 \labelwidthstring 00.00.0000
2073 \begin_inset Flex Code
2076 \begin_layout Plain Layout
2085 \begin_layout Labeling
2086 \labelwidthstring 00.00.0000
2087 \begin_inset Flex Code
2090 \begin_layout Plain Layout
2096 入力ファイルのベースファイル名(拡張子をとった部分)
2099 \begin_layout Labeling
2100 \labelwidthstring 00.00.0000
2101 \begin_inset Flex Code
2104 \begin_layout Plain Layout
2113 \begin_layout Labeling
2114 \labelwidthstring 00.00.0000
2115 \begin_inset Flex Code
2118 \begin_layout Plain Layout
2124 元の入力ファイルのパス(変換子が連鎖して呼び出されたときの挙動が$$pとは異なります)
2127 \begin_layout Labeling
2128 \labelwidthstring 00.00.0000
2129 \begin_inset Flex Code
2132 \begin_layout Plain Layout
2141 \begin_layout Standard
2142 \begin_inset Flex MenuItem
2145 \begin_layout Plain Layout
2151 フィールドには、以下のフラグをコンマで区切って入力することができます。
2154 \begin_layout Labeling
2155 \labelwidthstring 00.00.0000
2156 \begin_inset Flex Code
2159 \begin_layout Plain Layout
2165 この変換子がLaTeXの一種を実行することを示します。これによって、LyXのLaTeXエラーログに記録を残せるようになります。
2168 \begin_layout Labeling
2169 \labelwidthstring 00.00.0000
2170 \begin_inset Flex Code
2173 \begin_layout Plain Layout
2180 \begin_inset Flex MenuItem
2183 \begin_layout Plain Layout
2192 \begin_layout Labeling
2193 \labelwidthstring 00.00.0000
2194 \begin_inset Flex Code
2197 \begin_layout Plain Layout
2206 \begin_layout Standard
2208 \begin_inset Flex MenuItem
2211 \begin_layout Plain Layout
2213 \begin_inset space ~
2217 \begin_inset space ~
2225 形式の引数をとります(したがって厳密にはフラグとは呼べません)。
2228 \begin_layout Labeling
2229 \labelwidthstring 00.00.0000
2230 \begin_inset Flex Code
2233 \begin_layout Plain Layout
2240 \begin_inset Flex Code
2243 \begin_layout Plain Layout
2249 ファイルにリダイレクトされ、引数に指定されたスクリプトが
2250 \begin_inset Flex Code
2253 \begin_layout Plain Layout
2254 script < infile.out > infile.log
2259 の形で実行されるようになります。引数には
2260 \begin_inset Flex Code
2263 \begin_layout Plain Layout
2272 \begin_layout Labeling
2273 \labelwidthstring 00.00.0000
2274 \begin_inset Flex Code
2277 \begin_layout Plain Layout
2283 これには、変換子が生成したファイルをダンプするディレクトリ名を指定します。LyXはこのディレクトリを作成せず、ここに何もコピーしませんが、このディレクトリを宛
2285 \begin_inset Flex Code
2288 \begin_layout Plain Layout
2294 を使用することができ、これはディレクトリがコピーされる際に、入力ファイルおよび出力ファイルのベース名で置換されます。
2295 \begin_inset Newline newline
2298 resultdirとusetempdirは、同時に用いることはできませんのでご注意ください。前者が指定されているときには、後者は無視されます。
2301 \begin_layout Labeling
2302 \labelwidthstring 00.00.0000
2303 \begin_inset Flex Code
2306 \begin_layout Plain Layout
2313 \begin_inset Flex Code
2316 \begin_layout Plain Layout
2322 を使用することができます。resultdirが指定されているときのみ有効で、必ず用いる必要はありません。指定されていなければ、既定値は「index」です。
2325 \begin_layout Standard
2326 最後の3つは、LyXとともに導入される変換子には、現在いずれも使用されておりません。
2329 \begin_layout Standard
2330 変換しようとするすべての形式のあいだに変換子を定義する必要はありません。たとえば、「LyXからPostScript」変換子が定義されていないのに、LyXはPos
2331 tScriptを書き出していることに気づかれることでしょう。これは、まずLaTeXファイルを生成した後に(これには変換子を定義する必要はありません)、「LaTe
2332 XからDVI」変換子を使用してDVIに変換し、最後に、得られたDVIをPostScriptに変換することによって実現しています。LyXはこのような変換子の「連鎖
2333 」を自動的に見つけ、つねに最も短い連鎖を選択します。しかしながら、なお形式間に複数の変換方法を定義することも可能です。たとえば、標準的なLyX設定は、LaTeX
2334 からPDFへ変換するのに、以下の3つの方法を用意しています。(1)
2335 \begin_inset space ~
2339 \begin_inset Flex MenuItem
2342 \begin_layout Plain Layout
2349 \begin_inset space ~
2352 (DVIと)PostScriptを経由して
2353 \begin_inset Flex MenuItem
2356 \begin_layout Plain Layout
2363 \begin_inset space ~
2367 \begin_inset Flex MenuItem
2370 \begin_layout Plain Layout
2376 を使用するもの。このように代替連鎖を定義するには、第
2377 \begin_inset CommandInset ref
2379 reference "sec:ファイル形式"
2383 節に述べられているように、ターゲットとなる「ファイル形式」を複数定義しなくてはなりません。たとえば、標準設定では、
2384 \begin_inset Flex MenuItem
2387 \begin_layout Plain Layout
2394 \begin_inset Flex MenuItem
2397 \begin_layout Plain Layout
2404 \begin_inset Flex MenuItem
2407 \begin_layout Plain Layout
2413 と命名された形式が定義されていて、すべて共通の拡張子
2414 \begin_inset Flex MenuItem
2417 \begin_layout Plain Layout
2423 を持ち、上記で言及した各変換方法に対応しています。
2426 \begin_layout Chapter
2428 \begin_inset CommandInset label
2430 name "cha:LyXの各国語対応"
2437 \begin_layout Standard
2438 LyXは、翻訳された操作画面の利用をサポートしています。私たちが最後に確かめたところでは、LyXは30言語の翻訳を提供しています。選択した言語は、使用する
2442 と呼ばれます(ロケール設定についての詳しい資料は、お使いの基本ソフトに添付のロケール関連説明書をご覧ください。Linuxの場合は、マニュアルページの
2443 \begin_inset Flex Code
2446 \begin_layout Plain Layout
2455 \begin_layout Standard
2456 これらの翻訳は適切に機能しますが、欠点もいくつかあることに注意してください。たとえば、ダイアログはすべて英文を念頭にデザインされているため、翻訳文の一部は、割り
2457 当てられたスペースに収めるには大きすぎるかもしれません。これは表示上の問題に過ぎず、他の障害は引き起こしません。また、翻訳によっては、すべての短絡キーが定義され
2458 ていないことに気づかれるでしょう。短絡キーのために空いている文字が十分ないことが時々あるのです。単に翻訳者がまだ短絡キーを定義していないこともあるでしょう。もち
2459 ろん、私たちの各国語対応チーム—あなたも参加したいと思われるかもしれません
2463 \begin_layout Plain Layout
2464 もしあなたが英語以外の言語を流暢に操れるならば、これらのチームに参加することは、LyXコミュニティに報いるたいへん素晴らしい方法です!
2469 —は、LyXの将来のバージョンでこれらの欠点を修正しようとするでしょう。
2472 \begin_layout Section
2476 \begin_layout Subsection
2477 グラフィカル・ユーザ・インタフェース(テキスト・メッセージ)を翻訳する
2478 \begin_inset Argument
2481 \begin_layout Plain Layout
2490 \begin_layout Standard
2492 \begin_inset Flex Code
2495 \begin_layout Plain Layout
2501 ライブラリを使用します。LyXのすべてのメニューやダイアログでお好みの言語を話させたいときには、その言語の
2502 \begin_inset Flex Code
2505 \begin_layout Plain Layout
2511 ファイルが必要です。このファイルが利用可能であれば、そこから
2512 \begin_inset Flex Code
2515 \begin_layout Plain Layout
2522 \begin_inset Flex Code
2525 \begin_layout Plain Layout
2531 ファイルをインストールしなくてはなりません。この全過程は、GNU
2532 \begin_inset Flex Code
2535 \begin_layout Plain Layout
2541 の取扱説明書に説明があります。この作業をあなたのためだけに行うこともできますが、もしせっかくするのであれば、あなたの骨折りの結果をLyXコミュニティの他の人々と
2542 分かち合いませんか。どのように段取りを進めればよいか、詳しくはLyX開発者メーリングリストにメールを送ってください。
2545 \begin_layout Standard
2546 要約すれば、以下のように行います(xxは言語コードを表します)。
2549 \begin_layout Itemize
2550 LyXソースコードをチェックアウトしてください(
2551 \begin_inset CommandInset href
2554 target "http://www.lyx.org/devel/cvs.php"
2561 \begin_layout Itemize
2562 \begin_inset Flex Code
2565 \begin_layout Plain Layout
2572 \begin_inset Flex Code
2575 \begin_layout Plain Layout
2582 \begin_inset Flex Code
2585 \begin_layout Plain Layout
2592 \begin_inset Flex Code
2595 \begin_layout Plain Layout
2601 がどこにもない場合には、コンソールからそのディレクトリで
2602 \begin_inset Flex Code
2605 \begin_layout Plain Layout
2611 コマンドを実行し、作成し直すか、他言語の既存のpoファイルをひな型として使用することができます)。
2614 \begin_layout Itemize
2615 \begin_inset Flex Code
2618 \begin_layout Plain Layout
2628 \begin_layout Plain Layout
2629 これは単なるテキストファイルなので、どのテキストエディタでも編集できます。しかし、
2637 (KDE用)のように、この目的の編集をサポートする特別なプログラムがあります。
2642 \begin_inset Flex Code
2645 \begin_layout Plain Layout
2651 ファイルを編集するための「モード」があります。
2656 。メニューラベルやウィジェットラベルのうちには、翻訳しなくてはならない短絡キーがある場合があります。これらのキーは「|」の後に記されており、当該言語の単語やフレ
2657 ーズに対応して翻訳しなくてはなりません。さらに、新しい
2658 \begin_inset Flex Code
2661 \begin_layout Plain Layout
2667 ファイルの冒頭に、あなたの電子メールアドレスなどの情報も書き加えて、人々があなたに提案や、滑稽な怒りのメッセージを届けることができるようにしてください。
2670 \begin_layout Standard
2671 もし、あなたがこれを自身のためだけに行っているのであれば、
2674 \begin_layout Itemize
2675 \begin_inset Flex Code
2678 \begin_layout Plain Layout
2685 \begin_inset Flex Code
2688 \begin_layout Plain Layout
2689 msgfmt -o xx.mo < xx.po
2697 \begin_layout Itemize
2699 \begin_inset Flex Code
2702 \begin_layout Plain Layout
2708 ファイルを、お使いのロケールツリー中、言語xxのアプリケーションメッセージ用の正式なディレクトリにコピーして、
2709 \begin_inset Flex Code
2712 \begin_layout Plain Layout
2719 \begin_inset Flex Code
2722 \begin_layout Plain Layout
2723 /usr/local/share/locale/xx/LC_MESSAGES/lyx.mo
2731 \begin_layout Standard
2733 \begin_inset Flex Code
2736 \begin_layout Plain Layout
2742 ファイルを他の人たちが使用できるよう、LyX頒布版に追加できることが最善です。これを追加するには、LyXに変更を加える必要がありますので、もしその気があれば、開
2743 発者メーリングリストに電子メールを送ってください。
2746 \begin_layout Subsubsection
2750 \begin_layout Standard
2751 時には、一つの英語のメッセージが、翻訳先の言語では複数のメッセージに翻訳されなくてはならないことが判明することがあります。一つの例は、
2752 \begin_inset Flex Code
2755 \begin_layout Plain Layout
2761 というメッセージで、これは英語で「to」がどういう意味を持っているかによって、独語ではNachと訳されたりBisと訳されたりします。GNU
2762 \begin_inset Flex Code
2765 \begin_layout Plain Layout
2772 \begin_inset Flex Code
2775 \begin_layout Plain Layout
2782 \begin_inset Flex Code
2785 \begin_layout Plain Layout
2786 To[[as in 'From format x to format y']]
2792 \begin_inset Flex Code
2795 \begin_layout Plain Layout
2796 To[[as in 'From page x to page y']]
2801 としなくてはなりません。これによって、これら2つの
2802 \begin_inset Flex Code
2805 \begin_layout Plain Layout
2812 \begin_inset Flex Code
2815 \begin_layout Plain Layout
2821 には別物と解釈され、それぞれ正しくNachとBisに訳すことができるようになります。
2824 \begin_layout Standard
2825 もちろん、この文脈情報は、翻訳が存在しないときには取り去られる必要がありますので、メッセージの終わりに二重大括弧で囲わなくてはなりません(上例参照)。LyXの翻
2826 訳機構では、メッセージの終わりに二重大括弧で囲われているものはすべて、メッセージを表示する前に取り去るようにされています。
2829 \begin_layout Subsection
2833 \begin_layout Standard
2835 \begin_inset Flex MenuItem
2838 \begin_layout Plain Layout
2844 メニュー中の)オンライン説明書は翻訳することができます(そして翻訳されるべきです!)。説明書の翻訳版が利用可能であり
2848 \begin_layout Plain Layout
2849 2008年3月現在、説明書の少なくとも一部が翻訳されている言語は14言語に上り、入門編が訳されているものはさらにいくつかあります。
2854 、ロケールがその言語に設定されている場合、LyXはこれを自動的に使用します。LyXは、翻訳版を
2855 \begin_inset Flex Code
2858 \begin_layout Plain Layout
2863 \begin_layout Plain Layout
2870 yXDir/doc/xx/DocName.lyx
2876 \begin_inset Flex Code
2879 \begin_layout Plain Layout
2885 は現在使用している言語コード)で探します。翻訳文書がない場合には、既定の英語版が表示されます。翻訳版は、原典と同じファイル名(上述の
2886 \begin_inset Flex Code
2889 \begin_layout Plain Layout
2895 )を持っていなくてはならないことに注意してください。説明書を翻訳する気がおありであれば(これは原典の校正としてもたいへん役立ちます!)、以下のような点をすぐに行
2899 \begin_layout Itemize
2901 \begin_inset CommandInset href
2903 name "http://www.lyx.org/Translation"
2904 target "http://www.lyx.org/Translation"
2908 を確認してください。ここで、どの文書が(もしあれば)お使いの言語に既に翻訳されているかを見つけることができます。また、説明書をお使いの言語に翻訳する作業の面倒を
2909 見ている人を(もしいれば)見つけることができます。この作業の面倒を見ている人がいない場合には、私たちにあなたが興味をお持ちであることを知らせてください。
2912 \begin_layout Standard
2913 いったん実際の翻訳の仕事に取りかかったならば、トラブルを回避するいくつかのヒントがあります。
2916 \begin_layout Itemize
2917 文書化チームに所属してください!そのための情報が
2918 \begin_inset Flex Code
2921 \begin_layout Plain Layout
2928 \begin_inset Flex MenuItem
2931 \begin_layout Plain Layout
2932 ヘルプ\SpecialChar \menuseparator
2939 \begin_inset Flex Code
2942 \begin_layout Plain Layout
2951 \begin_layout Itemize
2952 翻訳しようとする言語での印刷慣行を学んでください。活版印刷は古来の技術であり、何世紀にもわたって世界の至る所で、様々な慣行を発達させてきました。また、あなたの国
2953 で活版工が用いる専門用語も学んでください。自分で勝手な専門用語を捻出するとユーザを混乱させるだけです。(
2955 警告!活版技術は病みつきになる可能性があるので注意してくさい!
2960 \begin_layout Itemize
2961 文書のコピーをとってください。これを作業用コピーとします。これをお使いの
2962 \begin_inset Flex Code
2965 \begin_layout Plain Layout
2971 ディレクトリにコピーすれば、個人用の翻訳ヘルプファイルとして使用することができます。
2974 \begin_layout Itemize
2975 (LyXチームが維持している)原典の説明書は、時折更新されます。変更点については、
2976 \begin_inset CommandInset href
2978 name "http://www.lyx.org/trac/timeline"
2979 target "http://www.lyx.org/trac/timeline"
2983 のソースビューアでご覧ください。この方法で、翻訳文書のどの部分を更新しなくてはならないか、たやすく見つけることができます。
2986 \begin_layout Standard
2987 もし原典に誤りを見つけたならば、修正して文書化チームの他のメンバーに変更したことを知らせてください(文書化チームに参加することをお忘れになっていませんよね)。
2990 \begin_layout Standard
2991 \begin_inset Branch OutDated
2994 \begin_layout Section
2995 International Keyboard Support
2998 \begin_layout Standard
3001 [Editor's Note: The following section is by
3009 It needs to be fixed to conform to the new Documentation Style sheet and
3010 to make use of the new v1.0 features.
3011 The whole thing also needs to be merged with the section following it.-jw
3012 It may also be badly out of date.-rh (2008)]
3015 \begin_layout Subsection
3016 Defining Own Keymaps: Keymap File Format
3019 \begin_layout Standard
3020 Let's look at a keyboard definition file a little closer.
3021 It is a plain text file defining
3024 \begin_layout Itemize
3025 key-to-key or key-to-string translations
3028 \begin_layout Itemize
3032 \begin_layout Itemize
3033 dead keys exceptions
3036 \begin_layout Standard
3037 To define key-to-key or key-to-string translation, use this command:
3040 \begin_layout Quotation
3041 \begin_inset Flex Code
3044 \begin_layout Plain Layout
3053 \begin_inset Flex Code
3056 \begin_layout Plain Layout
3065 \begin_layout Standard
3067 \begin_inset Flex Code
3070 \begin_layout Plain Layout
3076 is the key to be translated and
3077 \begin_inset Flex Code
3080 \begin_layout Plain Layout
3086 is the string to be inserted into the document.
3087 To define dead keys, use:
3090 \begin_layout Quotation
3091 \begin_inset Flex Code
3094 \begin_layout Plain Layout
3103 \begin_inset Flex Code
3106 \begin_layout Plain Layout
3115 \begin_layout Standard
3117 \begin_inset Flex Code
3120 \begin_layout Plain Layout
3126 is a keyboard key and
3127 \begin_inset Flex Code
3130 \begin_layout Plain Layout
3137 The following dead keys are supported (shortcut name is in parentheses):
3140 \begin_layout Quotation
3144 \begin_inset space \hfill{}
3150 \begin_layout Quotation
3152 \begin_inset space \hfill{}
3160 \begin_layout Quotation
3162 \begin_inset space \hfill{}
3170 \begin_layout Quotation
3172 \begin_inset space \hfill{}
3180 \begin_layout Quotation
3182 \begin_inset space \hfill{}
3190 \begin_layout Quotation
3192 \begin_inset space \hfill{}
3199 \begin_layout Plain Layout
3211 \begin_layout Quotation
3213 \begin_inset space \hfill{}
3221 \begin_layout Quotation
3223 \begin_inset space \hfill{}
3230 \begin_layout Plain Layout
3242 \begin_layout Quotation
3244 \begin_inset space \hfill{}
3252 \begin_layout Quotation
3254 \begin_inset space \hfill{}
3262 \begin_layout Quotation
3264 \begin_inset space \hfill{}
3271 \begin_layout Plain Layout
3283 \begin_layout Quotation
3285 \begin_inset space \hfill{}
3296 \begin_layout Plain Layout
3308 \begin_layout Quotation
3310 \begin_inset space \hfill{}
3318 \begin_layout Quotation
3319 hungarian umlaut (hug)
3320 \begin_inset space \hfill{}
3328 \begin_layout Quotation
3330 \begin_inset space \hfill{}
3338 \begin_layout Quotation
3340 \begin_inset space \hfill{}
3351 \begin_layout Plain Layout
3363 \begin_layout Standard
3364 Since in many international keyboards there are exceptions to what some
3365 dead keys should do, you can define them using
3368 \begin_layout Quotation
3369 \begin_inset Flex Code
3372 \begin_layout Plain Layout
3380 deadkey key outstring
3383 \begin_layout Standard
3384 For example, on Slovak keyboard, if you enter caron-o, it generates circumflex-o
3388 \begin_layout Quotation
3389 \begin_inset Flex Code
3392 \begin_layout Plain Layout
3405 \begin_layout Standard
3406 to make it work correctly.
3407 Also, you have to define as exceptions dead keys over i and j, to remove
3408 the dot from them before inserting an accent mark.
3409 I will change this when the time comes, but so far I haven't had time.
3412 \begin_layout Standard
3413 Oh, and about characters: backslash is escaped, so to enter it, you'll need
3416 \begin_inset Flex Code
3419 \begin_layout Plain Layout
3425 have different meaning.
3427 \begin_inset Flex Code
3430 \begin_layout Plain Layout
3436 marks comments, quotes start and end LaTeX-style commands.
3437 To enter quote, you'll need to use
3438 \begin_inset Flex Code
3441 \begin_layout Plain Layout
3450 \begin_inset Flex Code
3453 \begin_layout Plain Layout
3460 \begin_inset Flex Code
3463 \begin_layout Plain Layout
3474 \begin_layout Standard
3475 If you make a keyboard description file that works for your language, please
3476 mail it to me, so I can include it in the next keymap distribution.
3479 \begin_layout Standard
3480 More keywords will be supported in keymap configuration file in future,
3484 \begin_layout Itemize
3485 \begin_inset Flex Code
3488 \begin_layout Plain Layout
3499 \begin_inset space \hfill{}
3503 \begin_inset Flex Code
3506 \begin_layout Plain Layout
3515 \begin_layout Itemize
3516 \begin_inset Flex Code
3519 \begin_layout Plain Layout
3530 \begin_inset space \hfill{}
3534 \begin_inset Flex Code
3537 \begin_layout Plain Layout
3543 an external keymap translation program
3546 \begin_layout Standard
3547 Also, it should look into
3548 \begin_inset Flex Code
3551 \begin_layout Plain Layout
3557 file for defaults, too (for example, a
3558 \begin_inset Flex Code
3561 \begin_layout Plain Layout
3569 option to include default keyboard).
3577 \begin_layout Section
3579 \begin_inset CommandInset label
3588 \begin_layout Standard
3589 \begin_inset Note Note
3592 \begin_layout Plain Layout
3593 2008年3月にこの文書を改訂するに当たって、改訂者が本節の内容に詳しくなかったために、本節は改訂されていません。他に改訂してくださる方がおられれば幸いです。
3596 \begin_layout Plain Layout
3605 \begin_layout Standard
3607 \begin_inset Flex Code
3610 \begin_layout Plain Layout
3617 \begin_inset Flex Code
3620 \begin_layout Plain Layout
3626 ファイルの文法を詳細に解説します。これらの節は、提供されているキー配列があなたのニーズに合わない場合に、自身用のキー配列をデザインする手助けとなるでしょう。
3629 \begin_layout Subsection
3633 \begin_layout Standard
3634 \begin_inset Flex Code
3637 \begin_layout Plain Layout
3643 ファイルは、打鍵したものを文字や文字列に割り当てます。名前が示唆するように、これはキーボード配列表を定義します。
3644 \begin_inset Flex Code
3647 \begin_layout Plain Layout
3653 ファイルは、以下の各項で説明するように、
3654 \begin_inset Flex Code
3657 \begin_layout Plain Layout
3664 \begin_inset Flex Code
3667 \begin_layout Plain Layout
3674 \begin_inset Flex Code
3677 \begin_layout Plain Layout
3684 \begin_inset Flex Code
3687 \begin_layout Plain Layout
3696 \begin_layout Labeling
3697 \labelwidthstring 00.00.0000
3698 \begin_inset Flex Code
3701 \begin_layout Plain Layout
3710 \begin_layout LyX-Code
3725 \begin_layout Standard
3738 中では、二重引用符(")とバックスラッシュ(
3742 )を付けてエスケープしなくてはならないことに注意してください。
3745 \begin_layout Standard
3746 \begin_inset Flex MenuItem
3749 \begin_layout Plain Layout
3756 \begin_inset Flex MenuItem
3759 \begin_layout Plain Layout
3766 \begin_inset Flex MenuItem
3769 \begin_layout Plain Layout
3778 \begin_layout LyX-Code
3784 \begin_layout Standard
3788 \begin_layout Labeling
3789 \labelwidthstring 00.00.0000
3790 \begin_inset Flex Code
3793 \begin_layout Plain Layout
3802 \begin_layout LyX-Code
3811 \begin_layout Standard
3820 のアクセントとするものです。これはデッドキー
3824 \begin_layout Plain Layout
3829 という用語は、それ自身で文字を出力しないけれども、別のキーを続けて打つと、望んだアクセント文字を出力するキーのことを指し示します。たとえば、独語で
3833 のようなウムラウトのついた文字は、このようにして出すことができます。
3841 \begin_layout Standard
3854 の後に許可文字ではないその文字が出力として表示されます。
3855 \begin_inset Flex MenuItem
3858 \begin_layout Plain Layout
3869 \begin_inset Flex MenuItem
3872 \begin_layout Plain Layout
3878 と打鍵すると、カーソルは一文字戻ることなく、文字が次の打鍵したものに及ぼしたはずの効力を取り消します。
3881 \begin_layout Standard
3882 以下の例は、'文字をacuteアクセントとして、a・e・i・o・u・A・E・I・O・Uの文字に許可するものです。
3885 \begin_layout LyX-Code
3888 kmod ' acute aeiouAEIOU
3891 \begin_layout Labeling
3892 \labelwidthstring 00.00.0000
3893 \begin_inset Flex Code
3896 \begin_layout Plain Layout
3905 \begin_layout LyX-Code
3914 \begin_layout Standard
3928 \begin_inset Flex Code
3931 \begin_layout Plain Layout
3939 宣言で打鍵キーを既に割り当てられてなくてはならず、
3951 の集合に属していてはなりません。こうして
3964 \begin_inset Flex Code
3967 \begin_layout Plain Layout
3994 \begin_inset Flex Code
3997 \begin_layout Plain Layout
4008 \begin_layout Standard
4009 以下のコマンドを用いると、acute-i('i)と入力した場合、äiと出力されるようになります。
4012 \begin_layout LyX-Code
4026 \begin_layout Labeling
4027 \labelwidthstring 00.00.0000
4028 \begin_inset Flex Code
4031 \begin_layout Plain Layout
4040 \begin_layout LyX-Code
4049 \begin_layout Standard
4050 これはなかなか難解になってきます。これは
4075 \begin_inset Flex Code
4078 \begin_layout Plain Layout
4086 コマンドで設定されていなくてはなりません。
4089 \begin_layout Standard
4090 \begin_inset Flex Code
4093 \begin_layout Plain Layout
4102 \begin_layout LyX-Code
4105 kmod ; acute aeioyvhAEIOYVH
4109 kcomb acute umlaut iyIY
4112 \begin_layout Standard
4114 \begin_inset Flex MenuItem
4117 \begin_layout Plain Layout
4124 \begin_inset Flex Code
4127 \begin_layout Plain Layout
4137 という効果を得るようにするものです。この場合のバックスペースは、最後のデッドキーを取り消すので、
4138 \begin_inset Flex MenuItem
4141 \begin_layout Plain Layout
4148 \begin_inset Flex Code
4151 \begin_layout Plain Layout
4162 \begin_layout Subsection
4166 \begin_layout Standard
4167 \begin_inset Flex Code
4170 \begin_layout Plain Layout
4177 \begin_inset Flex Code
4180 \begin_layout Plain Layout
4186 ファイルは、記号の作り出す文字列を現在のフォントの文字に割り当てます。LyX頒布版には、現在のところ、少なくとも
4187 \begin_inset Flex Code
4190 \begin_layout Plain Layout
4197 \begin_inset Flex Code
4200 \begin_layout Plain Layout
4209 \begin_layout Standard
4211 \begin_inset Flex Code
4214 \begin_layout Plain Layout
4223 \begin_layout LyX-Code
4236 \begin_layout Standard
4238 \begin_inset Flex MenuItem
4241 \begin_layout Plain Layout
4249 をiso-8859-1セットの対応する文字(233)に割り当てるには、以下の宣言を用います。
4252 \begin_layout LyX-Code
4260 \begin_layout Standard
4266 \begin_inset Flex Code
4269 \begin_layout Plain Layout
4278 \begin_inset Flex Code
4281 \begin_layout Plain Layout
4287 はエスケープされています。同一の文字を二つ以上の文字列に充てることができることに注意してください。
4288 \begin_inset Flex Code
4291 \begin_layout Plain Layout
4300 \begin_layout LyX-Code
4312 \begin_inset Newline newline
4328 \begin_layout Standard
4329 という例があります。LyXは、キー打鍵やデッドキーの組み合わせで生成される文字列の割り当てを見つけることができないとき、それがアクセント付き文字のように解釈がで
4330 きないかどうかチェックして、画面上の文字にアクセントを引くことを試みます。
4333 \begin_layout Subsection
4337 \begin_layout Standard
4338 国際文字のサポートを追加する第2の方法として、いわゆるデッドキーによる方法があります。デッドキーは文字と一緒に用いて、アクセント付き文字を生成します。ここではそ
4339 の機能を説明するために、きわめて単純なデッドキーの作り方を説明します。
4342 \begin_layout Standard
4343 仮に、曲折アクセント記号「 ̂」が必要になったものとしましょう。この場合、自身の
4344 \begin_inset Flex Code
4347 \begin_layout Plain Layout
4354 \begin_inset Flex MenuItem
4357 \begin_layout Plain Layout
4364 \begin_inset Flex MenuItem
4367 \begin_layout Plain Layout
4374 \begin_inset Flex Code
4377 \begin_layout Plain Layout
4384 \begin_inset Flex MenuItem
4387 \begin_layout Plain Layout
4393 キーの後に文字を打ったときはいつでも、この文字上に曲折アクセントが付けられるようになります。たとえば「
4394 \begin_inset Flex MenuItem
4397 \begin_layout Plain Layout
4403 」という打鍵順は「ê」という文字を生成します。しかしながら、もし「
4404 \begin_inset Flex MenuItem
4407 \begin_layout Plain Layout
4414 \begin_inset Flex MenuItem
4417 \begin_layout Plain Layout
4423 」は曲折アクセントをとることは決してないために、LyXはビープを鳴らして文句を付けます。デッドキーの後に
4424 \begin_inset Flex MenuItem
4427 \begin_layout Plain Layout
4433 を打つと、アクセントだけが生成されます。この最後の点に注意してください。あるキーをデッドキーに割り当てる場合には、このキー上の文字を別のキーに割り当て直す必要が
4435 \begin_inset Flex MenuItem
4438 \begin_layout Plain Layout
4444 をセディーユに割り当てるのはよくありません。コンマを入力しようとすると必ずセディーユが出てくるようになるためです。
4447 \begin_layout Standard
4448 デッドキーを割り当てるのによく用いられる方法は、
4449 \begin_inset Flex MenuItem
4452 \begin_layout Plain Layout
4459 \begin_inset Flex MenuItem
4462 \begin_layout Plain Layout
4469 \begin_inset Flex MenuItem
4472 \begin_layout Plain Layout
4479 \begin_inset Flex MenuItem
4482 \begin_layout Plain Layout
4489 \begin_inset Flex MenuItem
4492 \begin_layout Plain Layout
4499 \begin_inset Flex MenuItem
4502 \begin_layout Plain Layout
4508 」のようなアクセントと一緒に用いる方法です。また、
4509 \begin_inset Flex Code
4512 \begin_layout Plain Layout
4519 \begin_inset Flex Code
4522 \begin_layout Plain Layout
4529 \begin_inset Flex Code
4532 \begin_layout Plain Layout
4539 \begin_inset Flex Code
4542 \begin_layout Plain Layout
4549 \begin_inset Flex MenuItem
4552 \begin_layout Plain Layout
4558 キーのように機能するので、アクセント文字を割り当てるのに使用できます。また、特定のキーを
4559 \begin_inset Flex Code
4562 \begin_layout Plain Layout
4568 などに割り当てることで、これらのキーをデッドキーに仕立て、このシンボリックキーを対応するLyXコマンドに割り当てることもできます
4572 \begin_layout Plain Layout
4578 \begin_inset Flex Code
4581 \begin_layout Plain Layout
4588 \begin_inset Flex Code
4591 \begin_layout Plain Layout
4598 \begin_inset Flex MenuItem
4601 \begin_layout Plain Layout
4603 \begin_inset space ~
4612 \begin_inset Flex Code
4615 \begin_layout Plain Layout
4622 \begin_inset Flex Code
4625 \begin_layout Plain Layout
4632 \begin_inset Flex MenuItem
4635 \begin_layout Plain Layout
4637 \begin_inset space ~
4646 \begin_inset Flex MenuItem
4649 \begin_layout Plain Layout
4651 \begin_inset space ~
4659 などに割り当てています。私はこの方法でアクセント文字を入力しています。
4665 \begin_inset Flex Code
4668 \begin_layout Plain Layout
4675 \begin_inset Flex MenuItem
4678 \begin_layout Plain Layout
4684 キーの片方や使われていないファンクションキーなど、ほぼ何でも指定することができます。アクセントを生み出すLyXコマンドについては、
4689 \begin_inset Flex Code
4692 \begin_layout Plain Layout
4698 の項をご覧ください。ここには完備した一覧があります。
4701 \begin_layout Subsection
4705 \begin_layout Standard
4706 \begin_inset Flex MenuItem
4709 \begin_layout Plain Layout
4710 ツール\SpecialChar \menuseparator
4716 ダイアログを使えば、LyXを起動したときに、ご希望の言語環境に自動的に設定されるように、設定を編集することができます。
4719 \begin_layout Chapter
4720 文書クラス・レイアウト・ひな型の新規導入
4721 \begin_inset CommandInset label
4728 \begin_inset Argument
4731 \begin_layout Plain Layout
4740 \begin_layout Standard
4741 この章では、新しくLyXのレイアウトファイルやひな型ファイルを作成して、導入する手順を説明すると共に、新規にLaTeX文書クラス(ドキュメントクラス)を正しく導
4745 \begin_layout Standard
4746 まず、LyXとLaTeXの間の関係をどのように考えるべきか、若干の注釈を加えておくことにしましょう。理解していただきたいことは、ある意味において、LyXは、La
4747 TeXについて何も知らないと云うことです。実際のところ、LyXの観点からは、LaTeXは、LyXが出力を生成することができる、複数の「バックエンド形式」のうちの
4748 一つに過ぎないということです。同種のバックエンド形式には、DocBook・平文・XHTMLがあります。もちろんLaTeXは、とくに重要な形式ですが、LyXがLa
4749 TeXについて持っている情報のほとんどは、実はプログラム本体には含まれていないのです
4753 \begin_layout Plain Layout
4754 過度に複雑なため、LyXに「ハードコード化」されているコマンドもありますが、一般的に開発者は、これを「わるいこと」とみなしています。
4760 \begin_inset Flex Code
4763 \begin_layout Plain Layout
4769 のような標準クラスでも、「レイアウトファイル」に保管されています。同様に、LyXは、DocBookやXHTMLについてもほとんど知りません。LyXが知っているこ
4770 とは、レイアウトファイルの中にあります。
4773 \begin_layout Standard
4774 文書クラス用のレイアウトファイルは、LyX構成体---対応する様式や何らかの差込枠などを有する段落群---と、それに対応するLaTeX構成体・DocBook構成
4775 体・XHTML構成体との間の翻訳指南書のようなものです。たとえば、LyXが
4776 \begin_inset Flex Code
4779 \begin_layout Plain Layout
4785 について知っていることのほとんど総ては、
4786 \begin_inset Flex Code
4789 \begin_layout Plain Layout
4795 と、それが呼び出す他の様々なファイルに書き込まれています。このことから、レイアウトファイルを書こうとする人は、既存のファイルを研究することを勧めます。とっかかり
4797 \begin_inset Flex Code
4800 \begin_layout Plain Layout
4807 \begin_inset Flex Code
4810 \begin_layout Plain Layout
4816 や、文書クラス用の他のレイアウトファイルに取り込まれている
4817 \begin_inset Flex Code
4820 \begin_layout Plain Layout
4826 から見始めるのがよいでしょう。このファイルは、節などの定義が為されている場所です。
4827 \begin_inset Flex Code
4830 \begin_layout Plain Layout
4836 は、節様式や小節様式などとしてマークされている段落を、対応するLaTeX・DocBook・XHTMLのコマンドやタグにどのように翻訳すべきかをLyXに知らせるも
4838 \begin_inset Flex Code
4841 \begin_layout Plain Layout
4848 \begin_inset Flex Code
4851 \begin_layout Plain Layout
4857 ファイルを取り込んでいるだけのものです。
4860 \begin_layout Standard
4861 しかしながら、LyX--LaTeX間の対応を定義するだけが、レイアウトファイルが行うことではありません。レイアウトファイルが行うもう一つの仕事は、LyX構成体自
4862 身が画面上にどのように表示されるべきかを定義することです。この2つの仕事は全く独立したものであるので、レイアウトファイルが2つの仕事を行うという事実は、しばしば
4863 混乱を引き起こす元となります。ある段落様式をLaTeXに翻訳する仕方をLyXに指示することは、その表示の仕方をLyXに指示するものではありません。逆に、ある段落
4864 様式の表示の仕方をLyXに指示することは、その段落様式をどのようにLaTeXに翻訳するかをLyXに指示するものではありません(ましてやLaTeXに表示の仕方を指
4865 示するものではありません)。つまり、一般的に、新しいLyX構成体を定義する際には、(i)
4866 \begin_inset space ~
4869 LaTeXにどのように翻訳するかをLyXに指示する、(ii)
4870 \begin_inset space ~
4873 それをどのように表示するかをLyXに指示する、という、二つのかなり異なることを行わなくてはならないのです。
4876 \begin_layout Standard
4877 もちろん、LyXの他のバックエンド形式に関しても、ほぼ同じことが言えますが、XHTMLの場合には若干事情が異なり、LyXが、ブラウザ中での段落の表示方法を(CS
4878 Sの形で)出力するにあたって、当該段落をLyXが画面上に出力する仕方の情報を、ある程度利用することができます。しかし、この場合でも、LyXが内部的に行うことと、
4879 外部的に行う物事の間の区別は、依然として有効であり、この2つは独立して制御することができます。詳細に関しては、第
4880 \begin_inset CommandInset ref
4882 reference "sec:XHTML出力のタグ"
4889 \begin_layout Section
4893 \begin_layout Standard
4894 頒布版によっては、LyXで使いたいLaTeXパッケージやクラスファイルが含まれていないことがあるかもしれません。たとえば、オーバーヘッドプロジェクタ用のスライド
4895 を準備するためのパッケージである、FoilTeXがないかもしれません。TeXLive(2008年以降)やMiKTeXのような最近のLaTeX頒布版には、これらの
4896 パッケージを導入するためのユーザーインタフェースが用意されています。たとえば、MiKTeXでは、付属の「Package
4897 \begin_inset space ~
4900 Manager」プログラムを起動すると、利用できるパッケージの一覧を得ることができます。どれかを導入するには、その上で右クリックするかツールバーボタンを押してく
4904 \begin_layout Standard
4905 お使いのLaTeX頒布版がこのような「パッケージマネジャー」を提供していなかったり、使用中の頒布版にそのパッケージが入っていない場合には、以下のステップに従って
4909 \begin_layout Enumerate
4910 \begin_inset CommandInset href
4913 target "http://www.ctan.org/"
4917 などから欲しいパッケージを入手してください。
4920 \begin_layout Enumerate
4922 \begin_inset Flex Code
4925 \begin_layout Plain Layout
4931 」で終わるファイル名が入っている場合(FoilTeXがその一例です)は、コンソールを開いて、このファイルのフォルダに移動し、コマンド
4932 \begin_inset Flex Code
4935 \begin_layout Plain Layout
4941 を実行してください。すると、パッケージが解凍されて、導入すべきすべてのファイルが展開されます。たいていのLaTeXパッケージは圧縮されていないので、このステップ
4945 \begin_layout Enumerate
4946 ここで、パッケージを全ユーザーに使用可能にするか自分自身だけで使うかを決定する必要があります。
4950 \begin_layout Enumerate
4951 (Linux・OSXなどの)*nix系システムでは、システム上の全ユーザーに新パッケージを利用可能にしたければ、「ローカル」TeXツリーに導入し、そうでなければ
4952 「ユーザー」TeXツリーに導入してください。これらのツリーが存在しない場合にどこに作成すればよいかは、お使いのシステムに依存します。これを見いだすには、
4953 \begin_inset Flex Code
4956 \begin_layout Plain Layout
4966 \begin_layout Plain Layout
4972 \begin_inset Flex Code
4975 \begin_layout Plain Layout
4981 を実行してその場所を見つけることもできます。
4987 \begin_inset Flex Code
4990 \begin_layout Plain Layout
4997 \begin_inset Flex Code
5000 \begin_layout Plain Layout
5001 /usr/local/share/texmf/
5006 のような場所になっています。「ユーザー」TeXツリーの場所は、
5007 \begin_inset Flex Code
5010 \begin_layout Plain Layout
5017 \begin_inset Flex Code
5020 \begin_layout Plain Layout
5026 です(もしこれらの変数が事前定義されていなければ、定義しなくてはなりません)。「ローカル」ツリーを作成したり変更したりするには、おそらくroot権限が必要ですが
5027 、「ユーザー」ツリーにはこのような制限はありません。
5028 \begin_inset Newline newline
5031 一般的に、システムをアップグレードした際に、ユーザーが修正されたり上書きされたりということが起こらないので、ユーザーツリーに導入することが推奨されます。こうする
5032 と、自分のホームディレクトリをバックアップする際に、パッケージも他のものと一緒にバックアップされます(もちろん通常行われるようにすればの話です)。
5035 \begin_layout Enumerate
5036 Windowでは、システム上の全ユーザーに新パッケージを利用可能にしたければ、LaTeXの導入されているフォルダに移動し、それからサブフォルダ
5037 \begin_inset Flex Code
5040 \begin_layout Plain Layout
5050 に移動します(MiKTeXでは、これは既定では
5051 \begin_inset Flex Code
5054 \begin_layout Plain Layout
5070 \begin_layout Plain Layout
5071 これは、英語版でのみ正しいパスになっています。独語版では
5072 \begin_inset Flex Code
5075 \begin_layout Plain Layout
5093 \begin_inset Flex Code
5096 \begin_layout Plain Layout
5102 を作成し、パッケージの全ファイルをそこにコピーしてください。パッケージを自分だけで使用したい場合や、admin権限を持っていない場合には、ローカルLaTeXフォ
5103 ルダで同じことを行います。たとえばMiKTeX
5104 \begin_inset space ~
5108 \begin_inset Newline newline
5112 \begin_inset Flex Code
5115 \begin_layout Plain Layout
5118 Documents and Settings
5130 \begin_inset Newline newline
5134 \begin_inset Phantom HPhantom
5137 \begin_layout Plain Layout
5148 \begin_inset Flex Code
5151 \begin_layout Plain Layout
5164 \begin_inset Newline newline
5168 \begin_inset Newline newline
5172 \begin_inset Flex Code
5175 \begin_layout Plain Layout
5198 \begin_inset Newline newline
5205 \begin_layout Enumerate
5206 ここまで来れば、あとはLaTeXに新しいファイルがあることを告げるだけです。これは使用しているLaTeX頒布版に依存します。
5210 \begin_layout Enumerate
5211 TeXLiveの場合には、コンソールから
5212 \begin_inset Flex Code
5215 \begin_layout Plain Layout
5221 コマンドを実行してください。パッケージを全ユーザー用に導入した場合には、おそらくroot権限で行う必要があります。
5224 \begin_layout Enumerate
5225 MiKTeXでは、パッケージを全ユーザー用に導入した場合には、「Settings
5226 \begin_inset space ~
5229 (Admin)」を起動し、「Refresh FNDB」と記してあるボタンを押してください。そうでない場合には、「Settings」を起動して同様に行ってください
5234 \begin_layout Enumerate
5235 最後に、LyXに新しいパッケージがあることを告げなくてはなりません。そこで、LyXからツール\SpecialChar \menuseparator
5236 再初期設定メニューを実行して、LyXを再起動します。
5239 \begin_layout Standard
5240 これでパッケージが導入されました。この例では、文書クラス
5241 \begin_inset Flex Code
5244 \begin_layout Plain Layout
5246 \begin_inset space ~
5253 \begin_layout Plain Layout
5266 \begin_inset Flex MenuItem
5269 \begin_layout Plain Layout
5270 文書\SpecialChar \menuseparator
5271 設定\SpecialChar \menuseparator
5280 \begin_layout Standard
5281 \begin_inset Flex MenuItem
5284 \begin_layout Plain Layout
5285 文書\SpecialChar \menuseparator
5286 設定\SpecialChar \menuseparator
5292 メニューに列挙されてもいないLaTeX文書クラスを使用したい場合には、その「レイアウト」ファイルを作り出さなくてはなりません。これが次節のトピックです。
5295 \begin_layout Section
5299 \begin_layout Standard
5300 この節は、レイアウト情報を含む各種LyXファイルについて述べます。これらのファイルは、各種段落様式や文字様式についての記述がされているものであり、LyXがそれら
5301 をどのように表示すべきなのか、また、それらをどのようにLaTeXやDocBook、XHTMLその他の出力形式に翻訳すればよいのかが記されています。
5304 \begin_layout Standard
5305 ここでは、レイアウトファイル作成過程の包括的な解説を試みたいと思いますが、LaTeXクラスだけでもサポートする文書の種類があまりにたくさんあるので、読者が出会い
5306 うるケースや問題をすべてカバーすることはとても望めません。LyXユーザーメーリングリストには、自身の経験を人々と分かち合いたいと望む、レイアウトデザインの経験豊
5307 かな人々がよく顔を出していますので、気軽に質問を投げかけてみてください。
5310 \begin_layout Standard
5311 新しいレイアウトを準備するに当たっては、LyXと共に頒布されているレイアウトの例を見るのがたいへん役立ちます。他の人々も使用できるLaTeX文書クラス用のLyX
5312 レイアウトを作ったり、他の人々にも有用なモジュールをお書きになった場合には、
5313 \begin_inset CommandInset href
5315 name "LyX Wikiのレイアウトに関する節"
5316 target "http://wiki.lyx.org/Layouts/Layouts"
5320 か、LyX開発者メーリングリストに投稿して、LyX頒布版に同梱することができるようにしてください
5324 \begin_layout Plain Layout
5325 LyXはGeneral Public Licenseの下でライセンスされていますので、LyXに寄贈されたものは総て同じライセンス下に置かれることに注意してくださ
5334 \begin_layout Subsection
5336 \begin_inset CommandInset label
5338 name "sub:レイアウトモジュール"
5345 \begin_layout Standard
5346 ここまで、「レイアウトファイル」についてお話してきました。しかし、レイアウト情報を含むものには、他の種類のファイルもあります。厳密にレイアウトファイルと呼ぶとき
5348 \begin_inset Flex Code
5351 \begin_layout Plain Layout
5357 拡張子を持ち、文書クラスに関する情報をLyXに提供するものを指します。しかしながら、LyX 1.6以降、レイアウト情報は、拡張子が
5358 \begin_inset Flex Code
5361 \begin_layout Plain Layout
5371 にも含めることができます。レイアウトがLaTeXクラスに対応しているように、モジュールはLaTeXパッケージに対応するものであり、
5372 \begin_inset Flex Code
5375 \begin_layout Plain Layout
5381 モジュールのように、特定のパッケージにサポートを提供するためのモジュールもあります。レイアウトモジュールは、特定の文書レイアウトに特化したものではなく、多くのレ
5382 イアウトで使用できるという意味において、一面、
5383 \begin_inset Flex Code
5386 \begin_layout Plain Layout
5396 \begin_layout Plain Layout
5397 これらは任意の拡張子をつけることができますが、慣習的に
5398 \begin_inset Flex Code
5401 \begin_layout Plain Layout
5413 \begin_inset Flex Code
5416 \begin_layout Plain Layout
5422 でインクルードファイルを使用するには、そのファイルを編集しなくてはなりませんが、モジュールの場合は、
5423 \begin_inset Flex MenuItem
5426 \begin_layout Plain Layout
5427 文書\SpecialChar \menuseparator
5436 \begin_layout Standard
5437 モジュール作成は、新しく段落様式を一つ加えたり、自由差込枠を加えたりするだけで済むことも多いので、レイアウト編集を学ぶ上でもっとも易しい方法です。しかし原理的に
5438 は、レイアウトファイルに入れることのできるものはすべて入れることができます。
5441 \begin_layout Standard
5443 \begin_inset Flex Code
5446 \begin_layout Plain Layout
5452 フォルダにコピーした後、モジュールがメニューに現れるようにするためには、LyXの再設定を行って再起動しなくてはなりません。しかしながら、モジュールの修正の場合に
5454 \begin_inset Flex MenuItem
5457 \begin_layout Plain Layout
5458 文書\SpecialChar \menuseparator
5464 を開いてどれかを選択し「OK」を押せば、直ちに反映されます。
5466 これを実行する前に、作業中の文書を保存しておくことを強く勧めます
5470 実際の文書で作業しているときに、同時にモジュールの編集をしようとしないことを強く勧めます
5472 。もちろん開発陣は、そのような場合でもLyXが安定性を維持するように努力していますが、あなたが作成したモジュール中の文法エラー等によって、奇妙な挙動が引き起こさ
5476 \begin_layout Subsubsection
5480 \begin_layout Standard
5481 LyXに於けるモジュールは、LaTeXに於けるパッケージに当たります。しかしながら、特定の差込枠や文字様式を、ひとつの文書のためだけに作りたいこともあるでしょう
5482 から、そのような場合に、他の文書でも利用できるようなモジュールをわざわざ書くことには、あまり意味がありません。このような場合に必要となるのが、「ローカルレイアウ
5486 \begin_layout Standard
5489 文書\SpecialChar \menuseparator
5490 設定\SpecialChar \menuseparator
5493 にあります。そこにある大きなテキストボックスは、本来ならレイアウトファイルやモジュールに入力すべきものを、入力するためのものです。特定の文書のローカルレイアウト
5494 は、その文書専属のモジュールだと考えることができます。したがって、
5495 \begin_inset Flex Code
5498 \begin_layout Plain Layout
5504 タグは挿入しなくてはなりません。どの書式を使用しても構いませんが、通常は、執筆時点の最新書式を用いることになるでしょう(LyX 2.0では、最新書式は35です)。
5505 また、ローカルレイアウトは、LyX 1.6より前の版ではサポートされていないことを認識しておく必要があります。したがって、文書をLyX 1.5またはそれ以前の版に(
5506 ローカルレイアウト情報を失うことなく)書き出せることを望むならば、使用するべきではありません。第1.6版へ---第1.6版はUIはありませんがローカルレイアウトをサ
5507 ポートしています---書き出せることを望むならば、書式11を用いて、さらにLyX 1.6で使用できるレイアウト要素のみを使用してください。
5510 \begin_layout Standard
5511 \begin_inset Flex Code
5514 \begin_layout Plain Layout
5520 面に何かを入力すると、下部にある「検証」ボタンが有効になります。このボタンを押すと、ユーザーの入力したものが、指定された書式に沿って、有効なレイアウト情報になっ
5521 ているかどうかが検証されます。すると、LyXがその結果を返しますが、残念ながら、エラーがあった場合にそれが何のエラーであるかは返しません。しかしながら、LyXを
5522 ターミナル(擬似端末)から起動した場合には、そのエラーがターミナルに返されます。ローカルレイアウトは、正しい書式で入力されないうちは、保存することができません。
5525 \begin_layout Standard
5526 ここで、前節と同じ警告があります。ローカルレイアウトは、作業中の文書上で、特に保存していない文書上ではいじらないでください。それに注意すれば、テスト用文書上でロ
5527 ーカルレイアウトを用いるのは、レイアウトのアイディアを試すのに便利ですし、モジュール開発の第一歩としても便利です。
5530 \begin_layout Subsection
5531 \begin_inset Flex MenuItem
5534 \begin_layout Plain Layout
5543 \begin_layout Standard
5544 新しくLaTeX文書クラスをサポートしようとするとき、LaTeX2eクラス(
5545 \begin_inset Flex Code
5548 \begin_layout Plain Layout
5555 \begin_inset Flex Code
5558 \begin_layout Plain Layout
5564 )ファイルが絡む場合の2つの状況があり得ます。スタイルファイルのサポートは、通常は、かなり容易ですが、新しくクラスファイルをサポートすることは、もう少し難しくな
5565 ります。この節では、前者について述べることとし、後者については次節に譲ります。当然のことながら、新しくDocBook DTDをサポートしたい場合にも、同様の所見
5569 \begin_layout Standard
5570 この易しい方の場合では、新しい文書クラスは、既にサポートされている文書クラスと共に使うスタイルファイルとして提供されています。例示のために、スタイルファイルは
5571 \begin_inset Flex MenuItem
5574 \begin_layout Plain Layout
5581 \begin_inset Flex MenuItem
5584 \begin_layout Plain Layout
5593 \begin_layout Standard
5594 既存の文書クラスのレイアウトファイルを、以下のように、お使いのローカルディレクトリにコピーすることから始めてください
5598 \begin_layout Plain Layout
5599 もちろん、どのディレクトリがローカルディレクトリとなるかは、プラットフォームに依存します。LyXでは、起動時に
5600 \begin_inset Flex MenuItem
5603 \begin_layout Plain Layout
5609 オプションを指定することによって、ローカルディレクトリを指定することも可能です。
5617 \begin_layout LyX-Code
5618 cp report.layout ~/.lyx/layouts/myclass.layout
5621 \begin_layout Standard
5623 \begin_inset Flex Code
5626 \begin_layout Plain Layout
5635 \begin_layout LyX-Code
5642 \begin_layout Plain Layout
5652 \begin_layout Standard
5656 \begin_layout LyX-Code
5666 \begin_layout Plain Layout
5676 eXClass[report, myclass.sty]{report (myclass)}
5679 \begin_layout Standard
5680 のように変更してください。それから、ファイル冒頭辺りに
5683 \begin_layout LyX-Code
5685 \begin_inset Newline newline
5691 \begin_inset Newline newline
5697 \begin_layout Standard
5701 \begin_layout Standard
5703 \begin_inset Flex MenuItem
5706 \begin_layout Plain Layout
5707 ツール\SpecialChar \menuseparator
5713 を選択してください。それからLyXを再起動し、新規文書を作成してみてください。すると、
5714 \begin_inset Flex MenuItem
5717 \begin_layout Plain Layout
5718 文書\SpecialChar \menuseparator
5725 \begin_inset Flex MenuItem
5728 \begin_layout Plain Layout
5734 」が現れるはずです。新しいクラスにおいて、節区切り用コマンドなどの一部が、基礎となったクラス—この例では
5735 \begin_inset Flex Code
5738 \begin_layout Plain Layout
5744 —とは違う挙動をすることはよくありますので、希望に応じて、各節の設定をいじると良いでしょう。各節のレイアウト情報は、
5745 \begin_inset Flex Code
5748 \begin_layout Plain Layout
5754 に含まれていますが、このファイルをコピーしたり変更したりする必要はありません。代わりに、自身のレイアウトファイル中、
5755 \begin_inset Flex Code
5758 \begin_layout Plain Layout
5765 \begin_inset Flex Code
5768 \begin_layout Plain Layout
5774 の後に変更を加えるだけです。たとえば、章見だしのフォントをサンセリフ体に変更するには、以下のような行を加えます。
5777 \begin_layout LyX-Code
5781 \begin_layout LyX-Code
5785 \begin_layout LyX-Code
5789 \begin_layout LyX-Code
5793 \begin_layout LyX-Code
5797 \begin_layout Standard
5798 これは、既存の章様式宣言を上書き(あるいはこの場合には追加)します。
5801 \begin_layout Standard
5802 新しいパッケージでは、基礎となったクラスには存在しないコマンドや環境を提供することもできます。この場合には、これらをレイアウトファイルに加えます。そのやり方につ
5804 \begin_inset CommandInset ref
5806 reference "sec:テキストクラス"
5813 \begin_layout Standard
5815 \begin_inset Flex Code
5818 \begin_layout Plain Layout
5824 が他の文書クラスで使用することができたり、あるいはできない場合でも、基礎となるクラスから読み込むことのできるモジュールを書くのが最も簡単であることがわかるでしょ
5825 う。最も簡単なモジュールの例としては、以下のようなものになります。
5828 \begin_layout LyX-Code
5831 DeclareLyXModule{My Package}
5834 \begin_layout LyX-Code
5838 \begin_layout LyX-Code
5839 #Support for mypkg.sty.
5842 \begin_layout LyX-Code
5844 \begin_inset Newline newline
5850 \begin_layout LyX-Code
5852 \begin_inset Newline newline
5858 \begin_layout LyX-Code
5860 \begin_inset Newline newline
5866 \begin_inset Newline newline
5872 \begin_layout Standard
5873 もう少し複雑なモジュールでは、既存の構成物の挙動を修正したり、新しい構成物を定義したりすることになるでしょう。この辺りの議論については、第
5874 \begin_inset CommandInset ref
5876 reference "sec:テキストクラス"
5883 \begin_layout Subsection
5884 \begin_inset Flex MenuItem
5887 \begin_layout Plain Layout
5896 \begin_layout Standard
5897 これには2つのケースがありえます。ひとつは、クラスファイル自体が既存の文書クラスに立脚している場合です。たとえば、多くの学位論文用クラスは
5898 \begin_inset Flex MenuItem
5901 \begin_layout Plain Layout
5907 に基づいています。お使いのものがどうであるかを見るには、クラスファイル中に
5910 \begin_layout LyX-Code
5916 \begin_layout Standard
5917 という行がないかどうか探してください。もしこれがあれば、
5918 \begin_inset Flex Code
5921 \begin_layout Plain Layout
5927 行は異なりますが、おおよそ前節のように進めることができます。あなたが新しく作るクラスが
5928 \begin_inset Flex Code
5931 \begin_layout Plain Layout
5938 \begin_inset Flex Code
5941 \begin_layout Plain Layout
5948 \begin_inset Flex Code
5951 \begin_layout Plain Layout
5961 \begin_layout Plain Layout
5962 さらにLyXは、文書クラス名がレイアウトファイル名と同じだと仮定するので、クラスファイルを
5963 \begin_inset Flex Code
5966 \begin_layout Plain Layout
5980 \begin_layout LyX-Code
5987 \begin_layout Plain Layout
5994 eXClass[thesis,book]{thesis}
5997 \begin_layout Standard
5998 他方、新しいクラスが既存のクラスに基づいていない場合には、おそらくあなた自身のレイアウトをしたためる必要があります。もし可能であれば、類似したLaTeXクラスを
5999 使用している既存のレイアウトファイルをコピーして、それに修正を加えるようにすることを強くお勧めします。少なくとも、どの項目を考慮すべきかがわかるように、既存のフ
6003 \begin_layout Subsection
6005 \begin_inset CommandInset label
6014 \begin_layout Standard
6015 新しい文書クラス用のレイアウトファイルを書いたならば、そのレイアウト用のひな型も書くことを検討されるかもしれません。ひな型は、内容はダミーですが、レイアウトの使
6016 い方を示す一種のチュートリアルとして動作します。もちろん、イメージを得るために、LyX添付のひな型をあれこれ見てみるのもよいでしょう。
6019 \begin_layout Standard
6020 ひな型は、通常の文書と同様、LyXを使って作成することができます。唯一違う点は、通常の文書では、フォント構成や用紙寸法を含め、すべてのあり得る設定が為されている
6021 点です。これらの場合、通常ユーザーはひな型が彼の設定値を上書きすることを望みません。この理由から、ひな型の設計者は、
6022 \begin_inset Flex Code
6025 \begin_layout Plain Layout
6034 \begin_inset Flex Code
6037 \begin_layout Plain Layout
6045 などの対応するコマンドをひな型LyXファイルから取り除く必要があります。これは、たとえば
6046 \begin_inset Flex Code
6049 \begin_layout Plain Layout
6056 \begin_inset Flex Code
6059 \begin_layout Plain Layout
6065 のような、どの軽いテキストエディタでも行うことができます。
6068 \begin_layout Standard
6070 \begin_inset Flex Code
6073 \begin_layout Plain Layout
6080 \begin_inset Flex Code
6083 \begin_layout Plain Layout
6089 から使用したいものを同じ場所にコピーし、
6090 \begin_inset Flex MenuItem
6093 \begin_layout Plain Layout
6094 ツール\SpecialChar \menuseparator
6095 設定\SpecialChar \menuseparator
6101 ダイアログのひな型パスを再定義してください。
6104 \begin_layout Standard
6106 \begin_inset Flex Code
6109 \begin_layout Plain Layout
6115 があることに注意してください。このひな型は、
6116 \begin_inset Flex MenuItem
6119 \begin_layout Plain Layout
6120 ファイル\SpecialChar \menuseparator
6126 を使って新規文書を作成する際、便利な既定値を提供する目的で必ず読み込まれます。このひな型をLyX内部から作成するのにしなくてはならないことは、対応する設定を持つ
6128 \begin_inset Flex MenuItem
6131 \begin_layout Plain Layout
6140 \begin_layout Subsection
6144 \begin_layout Standard
6145 レイアウトファイルの書式は、LyXのリリース毎に変更されますので、古いレイアウトファイルは変換されなくてはなりません。この過程は、LyX第1.4版から自動化されま
6146 した。LyXが古い書式のレイアウトファイルを読み込むと、LyXは、自動的に変換ツール
6147 \begin_inset Flex Code
6150 \begin_layout Plain Layout
6151 LyXDir/scripts/layout2layout.py
6156 を呼び出し、それを現在の書式の一時ファイルに変換します。元のファイルは変更を加えられずに措かれます。もしこのレイアウトファイルをよく使うならば、LyXがこれを毎
6157 回行なわくて済むように、レイアウトファイルを恒久的に変換しておきたいと思うかもしれません。これを行うには、以下のように変換子を手動で呼び出してください。
6160 \begin_layout LyX-Code
6161 mv myclass.layout myclass.old
6164 \begin_layout LyX-Code
6165 python LyXDir/scripts/layout2layout.py myclass.old myclassnew.layout
6168 \begin_layout Standard
6170 \begin_inset Flex Code
6173 \begin_layout Plain Layout
6179 は、お使いのLyXシステムディレクトリ名に置き換えてください。
6182 \begin_layout Standard
6183 手動変換は、インクルードされているファイル内部の変更までは取り扱いませんので、それらのファイルは別に変換されなくてはなりません。
6186 \begin_layout Section
6187 \begin_inset CommandInset label
6196 \begin_layout Standard
6197 以下の各節では、いよいよ自分の手を汚してレイアウトファイルを作成したり編集したりする段階になった際、直面することの説明を行います。私たちからのアドバイスとしては
6198 、ゆっくりと進めるようにして、ちょっと進むごとに保存やテストを行い、心休まる音楽を聴き、好きな大人の飲み物を一二杯口にしながら行うのがいいでしょう。特に行き詰ま
6199 ってしまったときにはそうです。実際にはそんなに難しいことではないのですが、特に一度に多くのことをやろうとすると、選択肢が多くありすぎて圧倒されてしまうのです。さ
6200 て、もう一杯大人向け飲料をどうぞ。適量ね。
6203 \begin_layout Standard
6204 この章で述べられているタグは、すべて大文字小文字を区別しません。つまり、
6205 \begin_inset Flex Code
6208 \begin_layout Plain Layout
6215 \begin_inset Flex Code
6218 \begin_layout Plain Layout
6225 \begin_inset Flex Code
6228 \begin_layout Plain Layout
6234 は同じコマンドとなります。機能名の後にある角括弧は、その機能が取り得る値を示します。テキストクラス設定内で機能が特定されていない場合には、既定値は
6235 \begin_inset Flex Code
6238 \begin_layout Plain Layout
6246 で表記されます。引数が「文字列」や「浮動小数点型」などのデータ型をとる場合には、既定値は
6247 \begin_inset Flex Code
6250 \begin_layout Plain Layout
6261 \begin_layout Subsection
6265 \begin_layout Standard
6267 \begin_inset Flex Code
6270 \begin_layout Plain Layout
6276 で始まる行はコメントです。この規則には一つだけ例外があります。すべての
6277 \begin_inset Flex Code
6280 \begin_layout Plain Layout
6286 ファイルは、以下のような行で始めなくてはならないのです。
6289 \begin_layout LyX-Code
6292 #% Do not delete the line below; configure depends on this
6295 \begin_layout LyX-Code
6306 \begin_layout Plain Layout
6318 \begin_layout Standard
6319 この2行目は、LyXを初期設定や(再)設定するときに用いられるのです。このレイアウトファイルは、LaTeXスクリプト
6320 \begin_inset Flex Code
6323 \begin_layout Plain Layout
6330 \begin_inset Flex Code
6333 \begin_layout Plain Layout
6339 を無視する特別なモードで読み込みます。1行目は単なるLaTeXコメントですが、2行目にはテキストクラスの宣言が書かれています。これらの行が
6340 \begin_inset Flex Code
6343 \begin_layout Plain Layout
6350 \begin_inset Flex Code
6353 \begin_layout Plain Layout
6359 (レイアウトファイル名)という名称のテキストクラスを定義し、LaTeX文書クラス
6360 \begin_inset Flex Code
6363 \begin_layout Plain Layout
6369 を使用するようになります(既定ではレイアウトと同じ名称のものを使用します)。上記に現れる「article」という文字列は、
6370 \begin_inset Flex MenuItem
6373 \begin_layout Plain Layout
6374 文書\SpecialChar \menuseparator
6380 ダイアログのテキストクラスの説明に使用されます。
6383 \begin_layout Standard
6385 \begin_inset Flex Code
6388 \begin_layout Plain Layout
6394 文書クラスを使用するテキストクラスを自分で書いたものとしましょう。これを
6395 \begin_inset Flex Code
6398 \begin_layout Plain Layout
6404 というファイルに置いたとすると、このファイルのヘッダは以下のようになります。
6407 \begin_layout LyX-Code
6410 #% Do not delete the line below; configure depends on this
6413 \begin_layout LyX-Code
6424 \begin_layout Plain Layout
6433 eXClass[article]{article (with my own headings)}
6436 \begin_layout Standard
6438 \begin_inset Flex Code
6441 \begin_layout Plain Layout
6447 に関連づけられ、「article (with my own headings)」と表示される、
6448 \begin_inset Flex Code
6451 \begin_layout Plain Layout
6457 テキストクラスを宣言するものです。もしこのテキストクラスが複数のパッケージに依存するならば、以下のように宣言すると良いでしょう。
6460 \begin_layout LyX-Code
6463 #% Do not delete the line below; configure depends on this
6466 \begin_layout LyX-Code
6477 \begin_layout Plain Layout
6486 eXClass[article,foo.sty]{article (with my own headings)}
6489 \begin_layout Standard
6491 \begin_inset Flex Code
6494 \begin_layout Plain Layout
6500 パッケージを使用することを示しています。最後に、DocBookコード向けのクラスを宣言することもできることを見ます。典型的な宣言は以下のようになります。
6503 \begin_layout LyX-Code
6506 #% Do not delete the line below; configure depends on this
6509 \begin_layout LyX-Code
6514 DeclareDocBookClass[article]{SGML (DocBook article)}
6517 \begin_layout Standard
6518 これらの宣言には、文書クラス名を宣言する非必須パラメータ(ただしリストではない)を与えることができることに注意してください。
6521 \begin_layout Standard
6522 できる限り明示的に要約すると、レイアウト宣言は以下の形をとります。
6525 \begin_layout LyX-Code
6536 \begin_layout Plain Layout
6545 eXClass[クラス,パッケージ名.sty]{レイアウトの説明}
6548 \begin_layout Standard
6549 ここで「クラス」は、LaTeXクラスファイル名とレイアウトファイル名が異なるときのみ、指定する必要があります。クラスファイル名が指定されなければ、LyXは単純に
6550 、クラスファイル名がレイアウトファイル名と同じであると仮定します。
6553 \begin_layout Standard
6554 テキストクラスがあなたの嗜好に合うように修正できたならば、他にしなくてはならないことは、それを
6555 \begin_inset Flex Code
6558 \begin_layout Plain Layout
6563 \begin_layout Plain Layout
6576 \begin_inset Flex Code
6579 \begin_layout Plain Layout
6586 \begin_inset Flex MenuItem
6589 \begin_layout Plain Layout
6590 ツール\SpecialChar \menuseparator
6596 を実行し、LyXを終了して再起動するだけです。そうすれば、この新しいテキストクラスが、他のテキストクラスと同様に使用できるようになります。
6599 \begin_layout Standard
6600 レイアウトファイルが導入されたならば、これを編集して、再初期設定したりLyXを再起動したりすることなく、その変更を確認することができます
6604 \begin_layout Plain Layout
6605 第1.6版よりも前のLyXでは、これを行うことはできませんでした。その結果、レイアウトファイルに加えた変更を反映させるには、その度にLyXを再起動しなくてはならな
6606 かったので、レイアウトファイルを編集する作業は、たいへん時間を浪費する作業だったのです。
6612 \begin_inset Flex MenuItem
6615 \begin_layout Plain Layout
6621 を使用すれば、現在使っているレイアウトの再読み込みを強制することができるのです。この関数への既定のキー割り当てはありません—もちろん自分でどれかのキーに割り当て
6622 ることもできますが—。しかし、通常は、この関数を使用する場合は、これをミニバッファに入力します。
6625 \begin_layout Standard
6631 \begin_inset Flex MenuItem
6634 \begin_layout Plain Layout
6640 はかなり「高度な機能」です。この機能を利用する前に、作業中の文書を保存しておくことを
6644 勧めます。もっと言えば、大事な文書の作業をしているときに、同時にレイアウト情報の編集をしようとしないことを
6648 勧めます。テスト用文書を使用してください。レイアウトファイル中の文法エラー等が奇妙な挙動を引き起こす可能性があります。特に、そのようなエラーが起こると、LyXは
6649 現在のレイアウトが無効であるものと判断して、別のレイアウトに切り替えようとする可能性があります
6653 \begin_layout Plain Layout
6654 非常に悪質な文法エラーの場合には、LyXが終了してしまうことさえあります。これは、ある種のエラーでは、LyXがレイアウト情報を全く読めなくなる可能性があるからで
6660 。LyX開発陣は、このような状況下でも安定性を保つよう努力していますが、後悔よりも安心の方が良いでしょう
6664 \begin_layout Plain Layout
6665 重ねての助言ですが、つねにバックアップを取ってください。それから、お母さんのお片づけに注意。
6673 \begin_layout Subsection
6677 \begin_layout Standard
6678 モジュールは、以下のような行で始まらなくてはなりません。
6681 \begin_layout LyX-Code
6688 \begin_layout Plain Layout
6695 yXModule[endnotes.sty]{Endnotes}
6698 \begin_layout Standard
6699 波括弧内に入っている必須引数はモジュール名で、これは
6700 \begin_inset Flex MenuItem
6703 \begin_layout Plain Layout
6704 文書\SpecialChar \menuseparator
6710 内に表示されます。角括弧内の引数は非必須です。これは、モジュールが依存するLaTeXパッケージをすべて宣言します。角括弧の中には、LyXにとって既知のパッケージ
6711 だけしか、列挙することはできないことに注意してください。
6715 \begin_layout Plain Layout
6716 既知のパッケージのリストは、ソースコード中でしか、ドキュメント化されていません。
6721 LyXは、任意のパッケージをチェックすることはしません。また、非必須引数として、
6722 \begin_inset Flex Code
6725 \begin_layout Plain Layout
6732 \begin_inset Flex Code
6735 \begin_layout Plain Layout
6742 \begin_inset Flex Code
6745 \begin_layout Plain Layout
6751 形式への変換鎖が存在するときのみ、このモジュールを使用できることを宣言するものです。
6754 \begin_layout Standard
6755 それから、以下のようなモジュール宣言を行います。
6761 \begin_layout Plain Layout
6764 Preferably in English if the module should be published with LyX.
6765 This description will appear in the list of messages to be translated and
6766 will be thus translated with the next interface update.
6774 \begin_layout LyX-Code
6778 \begin_layout LyX-Code
6779 #Adds an endnote command, in addition to footnotes.
6783 \begin_layout LyX-Code
6784 #You will need to add
6790 \begin_layout Plain Layout
6800 \begin_layout LyX-Code
6801 #want the endnotes to appear.
6805 \begin_layout LyX-Code
6809 \begin_layout LyX-Code
6810 #Requires: somemodule | othermodule
6813 \begin_layout LyX-Code
6814 #Excludes: badmodule
6817 \begin_layout Standard
6818 ここで説明(Description)は、
6819 \begin_inset Flex MenuItem
6822 \begin_layout Plain Layout
6823 文書\SpecialChar \menuseparator
6829 でこのモジュールが何をするものか、ユーザに情報を与えるために使用されます。
6830 \begin_inset Flex Code
6833 \begin_layout Plain Layout
6839 行は、このモジュールが共に使用する必要がある、他のモジュールを特定するのに用いられます。一方、
6840 \begin_inset Flex Code
6843 \begin_layout Plain Layout
6849 行は、このモジュールが共に使用してはならない、他のモジュールを特定するのに用いられます。この2つの行は必須ではなく、上記のようにモジュールが複数ある場合には、パ
6850 イプ記号「|」で区切らなくてはなりません。
6851 \begin_inset Flex Code
6854 \begin_layout Plain Layout
6860 に指定されたモジュールは、選言的に取り扱われることに注意してください。つまり、
6861 \begin_inset Flex Code
6864 \begin_layout Plain Layout
6874 が使用されていればよいということです。同様に、
6875 \begin_inset Flex Code
6878 \begin_layout Plain Layout
6884 に指定されたモジュールは、一つも使用されてはなりません。ここでモジュールは、
6885 \begin_inset Flex Code
6888 \begin_layout Plain Layout
6898 で認識されることに注意してください。つまり
6899 \begin_inset Flex Code
6902 \begin_layout Plain Layout
6909 \begin_inset Flex Code
6912 \begin_layout Plain Layout
6921 \begin_layout Subsection
6925 \begin_layout Standard
6926 レイアウトファイルやインクルードされたファイル、またはモジュールの最初の非コメント行には、以下のように、かならずファイル形式番号が記されていなくてはなりません。
6929 \begin_layout Description
6930 \begin_inset Flex Code
6933 \begin_layout Plain Layout
6940 \begin_inset Flex Code
6943 \begin_layout Plain Layout
6952 \begin_layout Standard
6954 \begin_inset space ~
6958 \begin_inset space ~
6961 1.3.x以前のレイアウトファイルには、明示されたファイル形式がないため、書式1と解されます。LyX現行版のファイル形式は、書式35です。しかし、LyXの各版は、旧
6962 版のLyXで作成されたファイルを読むことができるように、旧版のレイアウトファイルも読むことができます。しかしながら、以前の書式に変換する方法はありません。
6965 \begin_layout Subsection
6966 \begin_inset CommandInset label
6968 name "sub:汎用テキストクラスパラメータ"
6975 \begin_layout Standard
6976 以下は、文書クラス全体の挙動を決定する汎用パラメータです(これは、
6977 \begin_inset Flex Code
6980 \begin_layout Plain Layout
6986 ファイルのみに使用されるべきで、モジュールでは使ってはならない、ということを意味するものでは
6990 。モジュールには、すべてのレイアウトタグを使用することができます)。
6993 \begin_layout Description
6994 \begin_inset Flex Code
6997 \begin_layout Plain Layout
7003 この文書クラスがXHTMLに出力されるときに、
7004 \begin_inset Flex Code
7007 \begin_layout Plain Layout
7013 ブロックに追加出力される情報です。典型的には、これはCSSスタイル情報を出力するのに用いられますが、
7014 \begin_inset Flex Code
7017 \begin_layout Plain Layout
7023 に出力するものであれば、何でも使用することができます。「
7024 \begin_inset Flex Code
7027 \begin_layout Plain Layout
7036 \begin_layout Description
7037 \begin_inset Flex Code
7040 \begin_layout Plain Layout
7046 文書プリアンブルに書き加えられる情報です。「
7047 \begin_inset Flex Code
7050 \begin_layout Plain Layout
7059 \begin_layout Description
7060 \begin_inset Flex Code
7063 \begin_layout Plain Layout
7069 書誌情報の表示に使う書式を定義します。詳細については、第
7070 \begin_inset CommandInset ref
7072 reference "sub:引用書式指定"
7077 \begin_inset Flex Code
7080 \begin_layout Plain Layout
7089 \begin_layout Description
7090 \begin_inset Flex Code
7093 \begin_layout Plain Layout
7099 文書クラスがサポートする様々な大域オプションを記します。説明は、第
7100 \begin_inset CommandInset ref
7102 reference "sub:ClassOptions"
7107 \begin_inset Flex Code
7110 \begin_layout Plain Layout
7119 \begin_layout Description
7120 \begin_inset Flex Code
7123 \begin_layout Plain Layout
7130 \begin_inset Flex Code
7133 \begin_layout Plain Layout
7142 \begin_inset space \thinspace{}
7146 \begin_inset Flex Code
7149 \begin_layout Plain Layout
7155 ] 文書クラスが既定で1段組か2段組かを指定します。
7156 \begin_inset Flex MenuItem
7159 \begin_layout Plain Layout
7160 文書\SpecialChar \menuseparator
7169 \begin_layout Description
7170 \begin_inset Flex Code
7173 \begin_layout Plain Layout
7180 \begin_inset Flex Code
7183 \begin_layout Plain Layout
7189 ] この部分はカウンタの特性を定義します。カウンタがまだ存在していなければ、生成されます。もし存在しなければ修正されます。「
7190 \begin_inset Flex Code
7193 \begin_layout Plain Layout
7200 \begin_inset Newline newline
7204 \begin_inset CommandInset ref
7206 reference "sub:カウンタ"
7213 \begin_layout Description
7214 \begin_inset Flex Code
7217 \begin_layout Plain Layout
7223 文書を表示するのに用いられる既定フォントを設定します。フォントの宣言の仕方については、第
7224 \begin_inset CommandInset ref
7226 reference "sub:フォント指定"
7231 \begin_inset Flex Code
7234 \begin_layout Plain Layout
7243 \begin_layout Description
7246 \begin_inset Flex Code
7249 \begin_layout Plain Layout
7258 \begin_inset Flex Code
7261 \begin_layout Plain Layout
7271 この文書クラスに、既定で取り込むモジュールを指定します。モジュールは、
7272 \begin_inset Flex Code
7275 \begin_layout Plain Layout
7281 拡張子を除いたファイル名で指定します。ユーザはこのモジュールを除外することができますが、当初は有効の状態になっています(これは新しいファイルが作成されたときや、
7282 既存の文書にこの文書クラスが選択したときのみ該当します)。
7285 \begin_layout Description
7286 \begin_inset Flex Code
7289 \begin_layout Plain Layout
7298 \begin_inset Flex Code
7301 \begin_layout Plain Layout
7311 これは新規段落に割り当てられる様式であり、通常は
7312 \begin_inset Flex MenuItem
7315 \begin_layout Plain Layout
7321 です。もしこれを指定しなければ、最初に定義される様式がこれに割り当てられるようにはなっていますが、このディレクティブを使用することが推奨されます。
7324 \begin_layout Description
7325 \begin_inset Flex Code
7328 \begin_layout Plain Layout
7337 \begin_inset Flex Code
7340 \begin_layout Plain Layout
7351 \begin_inset Flex Code
7354 \begin_layout Plain Layout
7360 拡張子を除いたファイル名で指定します—が、この文書クラスでは使用できないように設定します。これはたとえば、特定の学術誌用レイアウトファイルの中で、定理番号を節毎
7362 \begin_inset Flex Code
7365 \begin_layout Plain Layout
7371 モジュールが使用されるのを防ぐために用いたりすることができます。このタグは、モジュール内で
7375 。モジュールは、他のモジュールを排除する独自の枠組みがあります(第
7376 \begin_inset CommandInset ref
7378 reference "sub:レイアウトモジュール"
7385 \begin_layout Description
7386 \begin_inset Flex Code
7389 \begin_layout Plain Layout
7396 \begin_inset CommandInset ref
7398 reference "sub:フロート"
7403 \begin_inset Flex Code
7406 \begin_layout Plain Layout
7415 \begin_layout Description
7416 \begin_inset Flex Code
7419 \begin_layout Plain Layout
7425 この文書クラスがXHTMLに出力されるときに、
7426 \begin_inset Flex Code
7429 \begin_layout Plain Layout
7435 ブロックに出力される情報です。これより前に出現した
7436 \begin_inset Flex Code
7439 \begin_layout Plain Layout
7446 \begin_inset Flex Code
7449 \begin_layout Plain Layout
7455 宣言は、すべて完全に上書きされることに注意してください(プリアンブルに何かを追加したい時には、
7456 \begin_inset Flex Code
7459 \begin_layout Plain Layout
7466 \begin_inset Flex Code
7469 \begin_layout Plain Layout
7478 \begin_layout Description
7479 \begin_inset Flex Code
7482 \begin_layout Plain Layout
7488 CSSスタイル情報を指定します。これは、「
7489 \begin_inset Flex Code
7492 \begin_layout Plain Layout
7498 」ブロック内か、ユーザーがそのように選択すれば、独立したCSSファイル内に出力されます。これは、これより以前に宣言された
7499 \begin_inset Flex Code
7502 \begin_layout Plain Layout
7509 \begin_inset Flex Code
7512 \begin_layout Plain Layout
7518 をすべて完全に上書きしてしまうことに注意してください(追加をしたい時には`
7519 \begin_inset Flex Code
7522 \begin_layout Plain Layout
7529 \begin_inset Flex Code
7532 \begin_layout Plain Layout
7541 \begin_layout Description
7542 \begin_inset Flex Code
7545 \begin_layout Plain Layout
7554 \begin_inset Flex Code
7557 \begin_layout Plain Layout
7567 文書がHTMLに出力されるときに、目次や書誌情報などに使用されるレイアウトです。articleの場合には、これは通常「節」であり、bookの場合は「章」です。
7568 これを指定しない場合には、LyXはどのレイアウトを使用するべきか、解析しようと試みます。
7571 \begin_layout Description
7572 \begin_inset Flex Code
7575 \begin_layout Plain Layout
7582 \begin_inset Flex Code
7585 \begin_layout Plain Layout
7593 ] 与えられたカウンタの特性を修正します。カウンタが存在しない場合には、この節は無視されます。「
7594 \begin_inset Flex Code
7597 \begin_layout Plain Layout
7604 \begin_inset Newline newline
7608 \begin_inset CommandInset ref
7610 reference "sub:カウンタ"
7617 \begin_layout Description
7618 \begin_inset Flex Code
7621 \begin_layout Plain Layout
7628 \begin_inset Flex Code
7631 \begin_layout Plain Layout
7639 ] 与えられた段落様式の特性を修正します。様式が存在しない場合には、この節は無視されます。「
7640 \begin_inset Flex Code
7643 \begin_layout Plain Layout
7652 \begin_layout Description
7653 \begin_inset Flex Code
7656 \begin_layout Plain Layout
7665 \begin_inset Flex Code
7668 \begin_layout Plain Layout
7678 名称の指し示すように、このコマンドは、同じコマンドを何度も指定せずに済むように、別のレイアウト定義ファイルを取り込ませます。よく使われる例は、基本的なレイアウト
7680 \begin_inset Flex Code
7683 \begin_layout Plain Layout
7692 \begin_layout Description
7693 \begin_inset Flex Code
7696 \begin_layout Plain Layout
7705 \begin_inset Flex Code
7708 \begin_layout Plain Layout
7718 このセクションは、差込枠のレイアウトを定義(再定義)します。これは、既存の差込枠にも、新しい文字様式のような新規のユーザ定義差込枠にも使用することができます。「
7719 \begin_inset Flex Code
7722 \begin_layout Plain Layout
7729 \begin_inset Newline newline
7733 \begin_inset CommandInset ref
7735 reference "sub:任意設定差込枠"
7742 \begin_layout Description
7743 \begin_inset Flex Code
7746 \begin_layout Plain Layout
7753 \begin_inset Flex Code
7756 \begin_layout Plain Layout
7762 ] 画面上の左余白の幅を指示する文字列。例:「
7763 \begin_inset Flex Code
7766 \begin_layout Plain Layout
7772 」。(これは、「2ex」のような「長さ」ではないことに注意してください。)
7775 \begin_layout Description
7776 \begin_inset Flex Code
7779 \begin_layout Plain Layout
7788 \begin_inset Flex Code
7791 \begin_layout Plain Layout
7799 ] This command deletes an existing counter, usually one defined in an included
7803 \begin_layout Description
7804 \begin_inset Flex Code
7807 \begin_layout Plain Layout
7816 \begin_inset Flex Code
7819 \begin_layout Plain Layout
7829 このコマンドは既存のフロートを削除します。これは特に、Inputで取り込んだファイルに定義されていたフロートを抑制するのに便利です。
7832 \begin_layout Description
7833 \begin_inset Flex Code
7836 \begin_layout Plain Layout
7845 \begin_inset Flex Code
7848 \begin_layout Plain Layout
7858 このコマンドは既存の様式を削除します。これは特に、Inputで取り込んだファイルに定義されていた様式を抑制するのに便利です。
7861 \begin_layout Description
7862 \begin_inset Flex Code
7865 \begin_layout Plain Layout
7872 \begin_inset Flex Code
7875 \begin_layout Plain Layout
7883 ] このクラスによって生成されるファイル形式を示す文字列(
7887 ダイアログで定義される形のもの)。おもに、
7888 \begin_inset Flex Code
7891 \begin_layout Plain Layout
7898 \begin_inset Flex Code
7901 \begin_layout Plain Layout
7907 になっていて、新しい型のliterate文書を定義したい時に便利です。対応する
7908 \begin_inset Flex Code
7911 \begin_layout Plain Layout
7917 パラメーターに遭遇したときには、この文字列は、「
7918 \begin_inset Flex Code
7921 \begin_layout Plain Layout
7928 \begin_inset Flex Code
7931 \begin_layout Plain Layout
7942 \begin_layout Description
7943 \begin_inset Flex Code
7946 \begin_layout Plain Layout
7953 \begin_inset Flex Code
7956 \begin_layout Plain Layout
7967 \begin_inset Flex Code
7970 \begin_layout Plain Layout
7977 \begin_inset Flex Code
7980 \begin_layout Plain Layout
7986 ] このクラスを使用する文書がどのような種類の出力をするかを示す文字列。現在のところ、取り得る値は「docbook」・「latex」・「literate」です。
7989 \begin_layout Description
7990 \begin_inset Flex Code
7993 \begin_layout Plain Layout
8002 \begin_inset Flex Code
8005 \begin_layout Plain Layout
8014 \begin_inset Flex Code
8017 \begin_layout Plain Layout
8024 \begin_inset Flex Code
8027 \begin_layout Plain Layout
8034 \begin_inset Flex MenuItem
8037 \begin_layout Plain Layout
8038 文書\SpecialChar \menuseparator
8047 \begin_layout Description
8048 \begin_inset Flex Code
8051 \begin_layout Plain Layout
8057 LaTeX文書のプリアンブルを設定します。前に行った
8058 \begin_inset Flex Code
8061 \begin_layout Plain Layout
8068 \begin_inset Flex Code
8071 \begin_layout Plain Layout
8077 宣言は、すべて上書きされてしまうので注意してください。(プリアンブルに何かを追加したい時には、
8078 \begin_inset Flex Code
8081 \begin_layout Plain Layout
8088 \begin_inset Flex Code
8091 \begin_layout Plain Layout
8100 \begin_layout Description
8101 \begin_inset Flex Code
8104 \begin_layout Plain Layout
8111 \begin_inset Flex Code
8114 \begin_layout Plain Layout
8121 \begin_inset Flex Code
8124 \begin_layout Plain Layout
8133 \begin_inset Flex Code
8136 \begin_layout Plain Layout
8143 \begin_inset Flex Code
8146 \begin_layout Plain Layout
8152 で示される機能を既に提供しているかどうかを示します。機能は、一般的にパッケージ名(
8153 \begin_inset Flex Code
8156 \begin_layout Plain Layout
8163 \begin_inset Flex Code
8166 \begin_layout Plain Layout
8172 ・\SpecialChar \ldots{}
8174 \begin_inset Flex Code
8177 \begin_layout Plain Layout
8184 \begin_inset Flex Code
8187 \begin_layout Plain Layout
8193 ・\SpecialChar \ldots{}
8194 )です。サポートされている機能の全覧は、LyXソースコード以外には残念ながら文書化されていませんが、興味があれば
8195 \begin_inset Flex Code
8198 \begin_layout Plain Layout
8205 \begin_inset Flex MenuItem
8208 \begin_layout Plain Layout
8209 ヘルプ\SpecialChar \menuseparator
8214 \begin_layout Plain Layout
8226 もサポートされているパッケージの概要を提供します。
8229 \begin_layout Description
8230 \begin_inset Flex Code
8233 \begin_layout Plain Layout
8240 \begin_inset Flex Code
8243 \begin_layout Plain Layout
8250 \begin_inset Flex Code
8253 \begin_layout Plain Layout
8259 で表されているモジュールの機能を提供することを示し、
8260 \begin_inset Flex Code
8263 \begin_layout Plain Layout
8270 \begin_inset Flex Code
8273 \begin_layout Plain Layout
8279 タグを使用すると、モジュールを使用しなくてはならないことを示しますが、このタグは主に、このレイアウトがモジュールを直接取り込んでしまっていることを示すのに用いら
8280 れます。同じ機能を別に実装しているモジュール中で使用するなどすることもできます。
8283 \begin_layout Description
8284 \begin_inset Flex Code
8287 \begin_layout Plain Layout
8294 \begin_inset Flex Code
8297 \begin_layout Plain Layout
8304 \begin_inset Flex Code
8307 \begin_layout Plain Layout
8313 で表されている機能を要求することを示します。機能が複数ある場合には、コンマで区切らなくてはなりません。サポートされている機能以外は要求できないことに注意してくだ
8315 \begin_inset Flex Code
8318 \begin_layout Plain Layout
8327 \begin_layout Description
8328 \begin_inset Flex Code
8331 \begin_layout Plain Layout
8338 \begin_inset Flex Code
8341 \begin_layout Plain Layout
8347 ] 画面上の右余白の幅を指示する文字列。例:「
8348 \begin_inset Flex Code
8351 \begin_layout Plain Layout
8360 \begin_layout Description
8361 \begin_inset Flex Code
8364 \begin_layout Plain Layout
8371 \begin_inset Flex Code
8374 \begin_layout Plain Layout
8380 ] どの節区切りまで連番を振るかを指定します。LaTeXにおける
8381 \begin_inset Flex Code
8384 \begin_layout Plain Layout
8393 \begin_layout Description
8394 \begin_inset Flex Code
8397 \begin_layout Plain Layout
8406 \begin_inset Flex Code
8409 \begin_layout Plain Layout
8418 \begin_inset space \thinspace{}
8422 \begin_inset Flex Code
8425 \begin_layout Plain Layout
8431 ] クラスの既定値として、用紙の片面に印字するか両面に印字するかを指定します。
8432 \begin_inset Flex MenuItem
8435 \begin_layout Plain Layout
8436 文書\SpecialChar \menuseparator
8445 \begin_layout Description
8446 \begin_inset Flex Code
8449 \begin_layout Plain Layout
8458 \begin_inset Flex Code
8461 \begin_layout Plain Layout
8471 この部分は段落様式を定義します。様式がまだ存在していなければ、生成されます。既に存在していれば、そのパラメータが修正されます。「
8472 \begin_inset Flex Code
8475 \begin_layout Plain Layout
8482 \begin_inset Newline newline
8486 \begin_inset CommandInset ref
8488 reference "sub:段落様式-XHTML"
8495 \begin_layout Description
8496 \begin_inset Flex Code
8499 \begin_layout Plain Layout
8506 \begin_inset Flex Code
8509 \begin_layout Plain Layout
8516 \begin_inset Flex Code
8519 \begin_layout Plain Layout
8525 で使用すべきコマンド名あるいは環境名。The name of the command or environment to be used with
8527 \begin_inset Flex Code
8530 \begin_layout Plain Layout
8539 \begin_layout Description
8540 \begin_inset Flex Code
8543 \begin_layout Plain Layout
8550 \begin_inset Flex Code
8553 \begin_layout Plain Layout
8562 \begin_inset Flex Code
8565 \begin_layout Plain Layout
8571 ] 文書のタイトルを定義するのに、どのようなマークアップを使用するのかを示します。
8572 \begin_inset Flex Code
8575 \begin_layout Plain Layout
8582 \begin_inset Flex Code
8585 \begin_layout Plain Layout
8587 \begin_inset space ~
8595 」が指定されている最後のレイアウトの後に、
8596 \begin_inset Flex Code
8599 \begin_layout Plain Layout
8605 で指定したマクロ名を挿入することを意味します。
8606 \begin_inset Flex Code
8609 \begin_layout Plain Layout
8616 \begin_inset Flex Code
8619 \begin_layout Plain Layout
8621 \begin_inset space ~
8630 \begin_inset Flex Code
8633 \begin_layout Plain Layout
8639 で指定した環境でくるむ場合に対応します。
8642 \begin_layout Description
8643 \begin_inset Flex Code
8646 \begin_layout Plain Layout
8653 \begin_inset Flex Code
8656 \begin_layout Plain Layout
8662 ] どの節区切りまで目次に取り込むかを指定します。LaTeXの
8663 \begin_inset Flex Code
8666 \begin_layout Plain Layout
8675 \begin_layout Subsection
8676 \begin_inset Flex Code
8679 \begin_layout Plain Layout
8686 \begin_inset CommandInset label
8688 name "sub:ClassOptions"
8695 \begin_layout Standard
8696 \begin_inset Flex Code
8699 \begin_layout Plain Layout
8708 \begin_layout Description
8709 \begin_inset Flex Code
8712 \begin_layout Plain Layout
8719 \begin_inset Flex Code
8722 \begin_layout Plain Layout
8728 ] 文書のメインフォントが使用できるフォント寸法の一覧です。「
8729 \begin_inset Flex Code
8732 \begin_layout Plain Layout
8741 \begin_layout Description
8742 \begin_inset Flex Code
8745 \begin_layout Plain Layout
8751 XMLベースの出力クラスで、DTD行を設定するのに使用されます。例:PUBLIC
8752 \begin_inset Quotes eld
8755 -//OASIS//DTD DocBook V4.2//EN
8756 \begin_inset Quotes erd
8762 \begin_layout Description
8763 \begin_inset Flex Code
8766 \begin_layout Plain Layout
8773 \begin_inset Flex Code
8776 \begin_layout Plain Layout
8783 \begin_inset Flex Code
8786 \begin_layout Plain Layout
8794 コマンドの非必須パラメータとして付け加える文書クラスオプションです。コンマで区切ります。
8797 \begin_layout Description
8798 \begin_inset Flex Code
8801 \begin_layout Plain Layout
8808 \begin_inset Flex Code
8811 \begin_layout Plain Layout
8812 文字列="empty|plain|headings|fancy"
8818 \begin_inset Flex Code
8821 \begin_layout Plain Layout
8830 \begin_layout Standard
8831 \begin_inset Flex Code
8834 \begin_layout Plain Layout
8841 \begin_inset Flex Code
8844 \begin_layout Plain Layout
8853 \begin_layout Subsection
8855 \begin_inset CommandInset label
8864 \begin_layout Standard
8869 \begin_layout Plain Layout
8870 これは新しいレイアウトを定義するか、既存のレイアウトを修正することになることに注意してください。
8878 \begin_layout LyX-Code
8885 \begin_layout LyX-Code
8889 \begin_layout LyX-Code
8893 \begin_layout Standard
8894 ここでは、以下のコマンドを使用することができます。
8897 \begin_layout Description
8898 \begin_inset Flex Code
8901 \begin_layout Plain Layout
8908 \begin_inset Flex Code
8911 \begin_layout Plain Layout
8916 , left, right, center
8924 \begin_layout Description
8925 \begin_inset Flex Code
8928 \begin_layout Plain Layout
8935 \begin_inset Flex Code
8938 \begin_layout Plain Layout
8943 , left, right, center
8948 ] 使用できる揃えのコンマ区切りリスト(LaTeXスタイルには、意味を成さない一部の揃えが禁じられているものがあります。たとえば、連番箇条書きを右揃えや中央揃え
8952 \begin_layout Description
8953 \begin_inset Flex Code
8956 \begin_layout Plain Layout
8963 \begin_inset Flex Code
8966 \begin_layout Plain Layout
8972 宣言をすべて、完全に上書きしますので注意してください。「
8973 \begin_inset Flex Code
8976 \begin_layout Plain Layout
8982 」で閉じる必要があります。これの利用法についての詳細は、第
8983 \begin_inset CommandInset ref
8985 reference "sub:段落様式の国際化"
8992 \begin_layout Description
8993 \begin_inset Flex Code
8996 \begin_layout Plain Layout
9003 \begin_inset Flex Code
9006 \begin_layout Plain Layout
9016 \begin_layout Plain Layout
9017 ここで「浮動小数点型」とは1.5のような実数を指します。
9022 このレイアウト型の段落塊の最後の段落と、次の段落とを分離する垂直空白。次の段落が別のレイアウト型である場合、分離幅は足し上げられるのではなく、最大値がとられま
9026 \begin_layout Description
9027 \begin_inset Flex Code
9030 \begin_layout Plain Layout
9037 \begin_inset Flex Code
9040 \begin_layout Plain Layout
9046 ] この様式のカテゴリです。これは、ツールバーのレイアウト・コンボボックスで関連した様式をグループ化するのに用いられます。任意の文字列を使用することができますが
9047 、作成した様式に既存のカテゴリを使用したいと思うことが多いでしょう。
9050 \begin_layout Description
9051 \begin_inset Flex Code
9054 \begin_layout Plain Layout
9060 XMLコマンドの深度。XML型の書式でのみ使用されます。
9063 \begin_layout Description
9064 \begin_inset Flex Code
9067 \begin_layout Plain Layout
9074 \begin_inset Flex Code
9077 \begin_layout Plain Layout
9083 ] 既存の様式から、すべての機能を現在の様式にコピーします。
9086 \begin_layout Description
9087 \begin_inset Flex Code
9090 \begin_layout Plain Layout
9099 \begin_inset Flex Code
9102 \begin_layout Plain Layout
9116 プリアンブルを出力させる様式名。マクロ定義がお互いに依存関係にある場合に、プリアンブルの断片の順序を確実にするためのものです
9120 \begin_layout Plain Layout
9121 この機能以外には、プリアンブルの順序を確定する方法はないことに注意してください。LyXの特定のバージョンで観察された順序は、将来のバージョンで警告なしに変わる可
9130 \begin_layout Description
9131 \begin_inset Flex Code
9134 \begin_layout Plain Layout
9141 \begin_inset Flex Code
9144 \begin_layout Plain Layout
9149 , Box, Filled_Box, Static
9155 \begin_inset Flex Code
9158 \begin_layout Plain Layout
9165 \begin_inset Flex Code
9168 \begin_layout Plain Layout
9175 \begin_inset Flex Code
9178 \begin_layout Plain Layout
9185 \begin_inset Flex Code
9188 \begin_layout Plain Layout
9194 のいずれかの場合は、段落群の最後)に置くラベル。
9195 \begin_inset Flex Code
9198 \begin_layout Plain Layout
9205 \begin_inset Flex Code
9208 \begin_layout Plain Layout
9215 \begin_inset Flex Code
9218 \begin_layout Plain Layout
9224 )の場合は、証明終了マーカ用の白い箱型(あるいは黒い箱型)を指し、
9225 \begin_inset Flex Code
9228 \begin_layout Plain Layout
9237 \begin_layout Description
9238 \begin_inset Flex Code
9241 \begin_layout Plain Layout
9248 \begin_inset Flex Code
9251 \begin_layout Plain Layout
9258 \begin_inset Flex Code
9261 \begin_layout Plain Layout
9268 \begin_inset Flex Code
9271 \begin_layout Plain Layout
9280 \begin_layout Description
9281 \begin_inset Flex Code
9284 \begin_layout Plain Layout
9295 \begin_inset CommandInset ref
9297 reference "sub:フォント指定"
9301 節を参照。このフォントを定義すると、自動的に
9302 \begin_inset Flex Code
9305 \begin_layout Plain Layout
9311 も同じ値で定義されることに注意してください。したがって、
9312 \begin_inset Flex Code
9315 \begin_layout Plain Layout
9321 も同時に定義したい場合には、これを先に定義してください。
9324 \begin_layout Description
9325 \begin_inset Flex Code
9328 \begin_layout Plain Layout
9337 \begin_inset Flex Code
9340 \begin_layout Plain Layout
9349 \begin_inset space \thinspace{}
9353 \begin_inset Flex Code
9356 \begin_layout Plain Layout
9362 ] LyXは、空白をそれ自体文字や記号ではなく、2つの単語の間の分割子として捉えているため、単語間に2つ以上の空白を入れることは、通常許可していません。これ自体
9363 はとても素晴らしいことですが、たとえばプログラムコードや生のLaTeXコードを入力しようとするときなどに、煩わしくなることがあります。このことから、
9364 \begin_inset Flex Code
9367 \begin_layout Plain Layout
9373 を有効にすることが認められています。LyXは、LaTeXモード以外では2つめ以降の空白には、保護された空白を使用することに注意してください。
9376 \begin_layout Description
9377 \begin_inset Flex Code
9380 \begin_layout Plain Layout
9386 これらのタグは、XHTML出力で使用されます。第
9387 \begin_inset CommandInset ref
9389 reference "sub:段落様式-XHTML"
9396 \begin_layout Description
9397 \begin_inset Flex Code
9400 \begin_layout Plain Layout
9406 [[FIXME]] (XML型書式でのみ使用されます。)
9409 \begin_layout Description
9410 \begin_inset Flex Code
9413 \begin_layout Plain Layout
9422 \begin_inset Flex Code
9425 \begin_layout Plain Layout
9434 \begin_inset space \thinspace{}
9438 \begin_inset Flex Code
9441 \begin_layout Plain Layout
9448 \begin_inset Flex Code
9451 \begin_layout Plain Layout
9457 の場合、様式が文書本体ではなく、文書プリアンブルにインクルードされるようにします。これは、タイトルや著者の情報をプリアンブルで設定する必要のある文書クラスに便利
9459 \begin_inset Flex Code
9462 \begin_layout Plain Layout
9469 \begin_inset Flex Code
9472 \begin_layout Plain Layout
9479 \begin_inset Flex Code
9482 \begin_layout Plain Layout
9491 \begin_layout Description
9492 \begin_inset Flex Code
9495 \begin_layout Plain Layout
9504 \begin_inset Flex Code
9507 \begin_layout Plain Layout
9516 \begin_inset space \thinspace{}
9520 \begin_inset Flex Code
9523 \begin_layout Plain Layout
9530 \begin_inset Flex Code
9533 \begin_layout Plain Layout
9539 の場合、このレイアウトをタイトルブロックの一部としてマークします(大域項目の
9540 \begin_inset Flex Code
9543 \begin_layout Plain Layout
9550 \begin_inset Flex Code
9553 \begin_layout Plain Layout
9562 \begin_layout Description
9563 \begin_inset Flex Code
9566 \begin_layout Plain Layout
9573 \begin_inset Flex Code
9576 \begin_layout Plain Layout
9582 ] これは、同じレイアウトを持つ段落群の間に追加する空白を与えるものです。複数のレイアウトを一つの環境に入れると、それぞれのレイアウトは、その環境の
9583 \begin_inset Flex Code
9586 \begin_layout Plain Layout
9592 だけ分離されます。しかし、その環境の項目全体は、さらにこの
9593 \begin_inset Flex Code
9596 \begin_layout Plain Layout
9609 \begin_layout Description
9610 \begin_inset Flex Code
9613 \begin_layout Plain Layout
9619 [[FIXME]] (XML型書式でのみ使用されます。)
9622 \begin_layout Description
9623 \begin_inset Flex Code
9626 \begin_layout Plain Layout
9635 \begin_inset Flex Code
9638 \begin_layout Plain Layout
9647 \begin_inset space \thinspace{}
9651 \begin_inset Flex Code
9654 \begin_layout Plain Layout
9660 ] 段落を空のままにすると、LaTeX出力が空になってしまうので、通常、LyXは段落を空にすることを許可しません。しかしながら、これを無効にすることが望ましい場
9661 合が存在します。たとえば、書簡のひな型では、必須フィールドを人々が忘れないように、空のフィールドのまま提供する手もあります。特別なクラスにおいては、レイアウトを
9662 実際には文章を含まないある種の改行として使用することもあります。
9665 \begin_layout Description
9666 \begin_inset Flex Code
9669 \begin_layout Plain Layout
9676 \begin_inset Flex Code
9679 \begin_layout Plain Layout
9685 ] ラベルと本文テキストとの間の垂直余白。本文テキストの上に来るラベルにのみ使用されます(
9686 \begin_inset Flex Code
9689 \begin_layout Plain Layout
9696 \begin_inset Newline linebreak
9700 \begin_inset Flex Code
9703 \begin_layout Plain Layout
9704 Centered_Top_Environment
9712 \begin_layout Description
9713 \begin_inset Flex Code
9716 \begin_layout Plain Layout
9723 \begin_inset Flex Code
9726 \begin_layout Plain Layout
9732 ] 自動連番に使われるカウンタ名(詳しくは第
9733 \begin_inset CommandInset ref
9735 reference "sub:カウンタ"
9740 \begin_inset Newline newline
9744 \begin_inset Flex Code
9747 \begin_layout Plain Layout
9754 \begin_inset Flex Code
9757 \begin_layout Plain Layout
9767 です。この場合には、この様式が出現するたびにカウンタが増えます。
9768 \begin_inset Newline newline
9772 \begin_inset Flex Code
9775 \begin_layout Plain Layout
9782 \begin_inset Flex Code
9785 \begin_layout Plain Layout
9791 型のときにも、若干複雑にはなりますが、本項目を使うことができます。たとえば、「
9792 \begin_inset Flex Code
9795 \begin_layout Plain Layout
9801 」と宣言したものとしましょう。すると、LaTeXにおけるのと同様、実際に使われるカウンタは、
9802 \begin_inset Flex Code
9805 \begin_layout Plain Layout
9812 \begin_inset Flex Code
9815 \begin_layout Plain Layout
9822 \begin_inset Flex Code
9825 \begin_layout Plain Layout
9832 \begin_inset Flex Code
9835 \begin_layout Plain Layout
9841 のようになります。これらのカウンタは、全て別々に宣言されなくてはなりません。
9842 \begin_inset Newline newline
9846 \begin_inset CommandInset ref
9848 reference "sub:カウンタ"
9855 \begin_layout Description
9856 \begin_inset Flex Code
9859 \begin_layout Plain Layout
9866 \begin_inset CommandInset ref
9868 reference "sub:フォント指定"
9875 \begin_layout Description
9876 \begin_inset Flex Code
9879 \begin_layout Plain Layout
9886 \begin_inset Flex Code
9889 \begin_layout Plain Layout
9895 ] ラベルをどれくらい行頭下げすべきかを示す文字列。
9898 \begin_layout Description
9899 \begin_inset Flex Code
9902 \begin_layout Plain Layout
9909 \begin_inset Flex Code
9912 \begin_layout Plain Layout
9920 Text that indicates the amount of
9922 ラベルと本文テキストの間の水平余白。本文テキストの上に来ないラベルにのみ使用されます。
9925 \begin_layout Description
9926 \begin_inset Flex Code
9929 \begin_layout Plain Layout
9936 \begin_inset Flex Code
9939 \begin_layout Plain Layout
9946 \begin_inset Flex Code
9949 \begin_layout Plain Layout
9956 \begin_inset Flex Code
9959 \begin_layout Plain Layout
9966 \begin_inset CommandInset ref
9968 reference "sub:カウンタ"
9972 節に述べられている特別な整形コマンドを含めることができます。
9975 \begin_layout Description
9976 \begin_inset Flex Code
9979 \begin_layout Plain Layout
9986 \begin_inset Flex Code
9989 \begin_layout Plain Layout
9996 \begin_inset Flex Code
9999 \begin_layout Plain Layout
10006 \begin_inset Flex Code
10009 \begin_layout Plain Layout
10016 \begin_inset Flex Code
10019 \begin_layout Plain Layout
10020 LabelStringAppendix
10025 をもリセットすることに注意してください。
10028 \begin_layout Description
10029 \begin_inset Flex Code
10032 \begin_layout Plain Layout
10038 [FIXME] (XML型書式でのみ使用されます。)
10041 \begin_layout Description
10042 \begin_inset Flex Code
10045 \begin_layout Plain Layout
10052 \begin_inset Flex Code
10055 \begin_layout Plain Layout
10060 , Manual, Static, Top_Environment,
10061 \begin_inset Newline newline
10064 Centered_Top_Environment, Counter, Sensitive, Enumerate,
10065 \begin_inset Newline newline
10068 Itemize, Bibliography
10077 \begin_layout Description
10078 \begin_inset Flex Code
10081 \begin_layout Plain Layout
10087 は、ラベルが最初の単語(最初の本当の空白まで)であることを示します。ラベルに2単語以上使用したいときは、保護された空白を使用してください。
10090 \begin_layout Description
10091 \begin_inset Flex Code
10094 \begin_layout Plain Layout
10101 \begin_inset Flex Code
10104 \begin_layout Plain Layout
10110 で宣言したものであることを示します。これは「静的」であることに注意してください。
10113 \begin_layout Description
10114 \begin_inset Flex Code
10117 \begin_layout Plain Layout
10124 \begin_inset Flex Code
10127 \begin_layout Plain Layout
10128 Centered_Top_Environment
10134 \begin_inset Flex Code
10137 \begin_layout Plain Layout
10143 の特別な場合です。ラベルは段落の上に印字されるのですが、それは単一の環境の上か、このレイアウトを持つ連続した段落群の上だけに印字されます。たとえば、
10144 \begin_inset Flex MenuItem
10147 \begin_layout Plain Layout
10156 \begin_layout Description
10157 \begin_inset Flex Code
10160 \begin_layout Plain Layout
10166 はキャプションラベルの「図」や「表」の特別な場合です。
10167 \begin_inset Flex Code
10170 \begin_layout Plain Layout
10176 は、(ハードコードされた)ラベル文字列がフロートの種類に依存することを示します。これは、フロートに関連付けられたカウンタの値がNであるものとすると、「Float
10177 Type N」にハードコードされています。
10180 \begin_layout Description
10181 \begin_inset Flex Code
10184 \begin_layout Plain Layout
10190 ラベル型は、自動的に連番が付されるラベルを定義します。
10191 \begin_inset Flex Code
10194 \begin_layout Plain Layout
10200 は、それが含むカウンタ参照をすべて解決するために展開されます。これは、たとえば
10201 \begin_inset Flex Code
10204 \begin_layout Plain Layout
10215 \begin_inset CommandInset ref
10217 reference "sub:カウンタ"
10224 \begin_layout Description
10225 \begin_inset Flex Code
10228 \begin_layout Plain Layout
10234 は、通常の連番ラベルを生成します。現在のところ、これは、第4階層まで順に、アラビア数字・小文字・小文字ローマ数字・大文字を使用するようにハードコードされていま
10238 \begin_layout Description
10239 \begin_inset Flex Code
10242 \begin_layout Plain Layout
10248 は、各階層でさまざまなブリットを生成します。これもハードコードされています。
10251 \begin_layout Description
10252 \begin_inset Flex Code
10255 \begin_layout Plain Layout
10262 \begin_inset Flex Code
10265 \begin_layout Plain Layout
10266 LatexType BibEnvironment
10275 \begin_layout Description
10276 \begin_inset Flex Code
10279 \begin_layout Plain Layout
10286 \begin_inset Flex Code
10289 \begin_layout Plain Layout
10295 宣言をすべて、完全に上書きしますので、注意してください。使用法についての詳細は、第
10296 \begin_inset CommandInset ref
10298 reference "sub:段落様式の国際化"
10305 \begin_layout Description
10306 \begin_inset Flex Code
10309 \begin_layout Plain Layout
10318 \begin_inset Flex Code
10321 \begin_layout Plain Layout
10331 対応するLaTeXの名称です。環境名かコマンド名を指します。
10334 \begin_layout Description
10335 \begin_inset Flex Code
10338 \begin_layout Plain Layout
10347 \begin_inset Flex Code
10350 \begin_layout Plain Layout
10361 \begin_inset Flex Code
10364 \begin_layout Plain Layout
10370 の非必須パラメータです。このパラメータは、LyX内部から変更することはできません。
10373 \begin_layout Description
10374 \begin_inset Flex Code
10377 \begin_layout Plain Layout
10384 \begin_inset Flex Code
10387 \begin_layout Plain Layout
10392 , Command, Environment, Item_Environment,
10393 \begin_inset Newline newline
10396 List_Environment, Bib_Environment
10401 ] レイアウトがどのようにLaTeXに変換されるべきかを示します
10405 \begin_layout Plain Layout
10406 これらのルールはSGMLクラスにも適用されるので、
10407 \begin_inset Flex Code
10410 \begin_layout Plain Layout
10416 の名称は、少しミスリーディングかもしれません。特定の例については、SGMLクラスファイルを見てください。
10425 \begin_layout Description
10426 \begin_inset Flex Code
10429 \begin_layout Plain Layout
10438 \begin_layout Description
10439 \begin_inset Flex Code
10442 \begin_layout Plain Layout
10449 \begin_inset Flex Code
10452 \begin_layout Plain Layout
10459 {\SpecialChar \ldots{}
10468 \begin_layout Description
10469 \begin_inset Flex Code
10472 \begin_layout Plain Layout
10479 \begin_inset Flex Code
10482 \begin_layout Plain Layout
10489 }\SpecialChar \ldots{}
10504 \begin_layout Description
10505 \begin_inset Flex Code
10508 \begin_layout Plain Layout
10515 \begin_inset Flex Code
10518 \begin_layout Plain Layout
10525 \begin_inset Flex Code
10528 \begin_layout Plain Layout
10536 がこの環境のすべての段落に付けられるところだけが異なっています。
10539 \begin_layout Description
10540 \begin_inset Flex Code
10543 \begin_layout Plain Layout
10550 \begin_inset Flex Code
10553 \begin_layout Plain Layout
10560 \begin_inset Flex Code
10563 \begin_layout Plain Layout
10569 が環境の引数として渡されるところだけが異なっています。
10570 \begin_inset Flex Code
10573 \begin_layout Plain Layout
10580 \begin_inset Flex MenuItem
10583 \begin_layout Plain Layout
10584 編集\SpecialChar \menuseparator
10593 \begin_layout Description
10596 \begin_inset Flex Code
10599 \begin_layout Plain Layout
10608 \begin_inset Flex Code
10611 \begin_layout Plain Layout
10619 but adds additionally the necessary mandatory argument to the begin statement
10620 of the bibliography environment:
10621 \begin_inset Newline newline
10625 \begin_inset Flex Code
10628 \begin_layout Plain Layout
10633 begin{thebibliography}{99}
10638 It is therefore only useful for bibliography environments.
10641 \begin_layout Standard
10642 上記最後のいくつかをまとめると、LaTeX出力は、LaTeX型に依存して
10645 \begin_layout LyX-Code
10648 LatexName[LatexParam]{\SpecialChar \ldots{}
10652 \begin_layout Standard
10656 \begin_layout LyX-Code
10659 begin{LatexName}[LatexParam] \SpecialChar \ldots{}
10665 \begin_layout Standard
10670 \begin_layout Description
10671 \begin_inset Flex Code
10674 \begin_layout Plain Layout
10681 \begin_inset Flex Code
10684 \begin_layout Plain Layout
10690 ] レイアウトを環境の中に入れた場合、左余白は単純に加えられるのではなく、因子
10691 \begin_inset Formula $\frac{4}{\mathrm{depth}+4}$
10694 をかけて加えられます。このパラメータは、
10695 \begin_inset Flex Code
10698 \begin_layout Plain Layout
10705 \begin_inset Flex Code
10708 \begin_layout Plain Layout
10715 \begin_inset Flex Code
10718 \begin_layout Plain Layout
10724 に設定されているときにも用いられることに注意してください。その場合には、これは手動設定余白または動的設定余白に加えられることに注意してください。
10725 \begin_inset Newline newline
10729 \begin_inset Flex Code
10732 \begin_layout Plain Layout
10738 」と指定すると、段落を通常フォントの「
10739 \begin_inset Flex Code
10742 \begin_layout Plain Layout
10748 」の幅だけ行頭下げを行います。文字列の前に「
10749 \begin_inset Flex Code
10752 \begin_layout Plain Layout
10758 」を付けると、負の幅を与えることができます。この方法が採用されたのは、どの画面フォントでも見かけが同じになるようにするためです。
10761 \begin_layout Description
10762 \begin_inset Flex Code
10765 \begin_layout Plain Layout
10772 \begin_inset Flex Code
10775 \begin_layout Plain Layout
10780 , Manual, Dynamic, First_Dynamic, Right_Address_Box
10786 \begin_inset Newline newline
10793 \begin_layout Description
10794 \begin_inset Flex Code
10797 \begin_layout Plain Layout
10806 \begin_layout Description
10807 \begin_inset Flex Code
10810 \begin_layout Plain Layout
10817 \begin_inset Flex MenuItem
10820 \begin_layout Plain Layout
10821 編集\SpecialChar \menuseparator
10827 ダイアログで入力した文字列によって決められることを示します。これは、タブを用いずに整った一覧表を組むのに使用されます。
10830 \begin_layout Description
10831 \begin_inset Flex Code
10834 \begin_layout Plain Layout
10840 は、余白がラベルの大きさに依存することを示します。これは、自動連番の見出しに使用されます。「5.4.3.2.1 非常に長い見出し」という見出し行が、「3.2
10841 非常に長い見出し」よりも広い左余白(5.4.3.2.1足す空白と同じ幅)を必要とすることは明らかでしょう(標準的「ワープロ」はこんなことはやってくれませんが)。
10844 \begin_layout Description
10845 \begin_inset Flex Code
10848 \begin_layout Plain Layout
10854 は似ていますが、段落の最初の行だけがDynamicでその他の行はStaticです。これは、たとえば、箇条書き(記述)に使用されます。
10857 \begin_layout Description
10858 \begin_inset Flex Code
10861 \begin_layout Plain Layout
10867 は、段落中、最も長い行が右余白に合うように余白を選択します。これは、ページの右端に住所を組版するのに用いられます。
10871 \begin_layout Description
10872 \begin_inset Flex Code
10875 \begin_layout Plain Layout
10882 \begin_inset Flex Code
10885 \begin_layout Plain Layout
10894 \begin_inset space \thinspace{}
10898 \begin_inset Flex Code
10901 \begin_layout Plain Layout
10907 ] このレイアウト中の脆弱なコマンドが
10908 \begin_inset Flex Code
10911 \begin_layout Plain Layout
10919 されるべきか否か(註:これはこのコマンド自体が
10920 \begin_inset Flex Code
10923 \begin_layout Plain Layout
10938 \begin_layout Description
10939 \begin_inset Flex Code
10942 \begin_layout Plain Layout
10949 \begin_inset Flex Code
10952 \begin_layout Plain Layout
10959 \begin_inset space \thinspace{}
10963 \begin_inset Flex Code
10966 \begin_layout Plain Layout
10975 \begin_inset Flex Code
10978 \begin_layout Plain Layout
10988 )に変換するか否か。LyX中でLaTeX編集をやりやすくするために、変換は無効にすることができます。
10991 \begin_layout Description
10992 \begin_inset Flex Code
10995 \begin_layout Plain Layout
11002 \begin_inset Flex Code
11005 \begin_layout Plain Layout
11014 \begin_inset space \thinspace{}
11018 \begin_inset Flex Code
11021 \begin_layout Plain Layout
11027 ] 次の段落に最初の行の行頭下げを許すか否か。
11028 \begin_inset Flex Code
11031 \begin_layout Plain Layout
11038 \begin_inset Flex Code
11041 \begin_layout Plain Layout
11047 は望むならば行頭下げできることを意味します。
11050 \begin_layout Description
11051 \begin_inset Flex Code
11054 \begin_layout Plain Layout
11063 \begin_inset Flex Code
11066 \begin_layout Plain Layout
11076 このレイアウトが置き換えられたレイアウト名。これは、後方互換性を維持しながら、レイアウトの名称を変更するのに使用されます。
11079 \begin_layout Description
11080 \begin_inset Flex Code
11083 \begin_layout Plain Layout
11090 \begin_inset Flex Code
11093 \begin_layout Plain Layout
11099 ] このレイアウトに使用することのできる非必須引数の数。節見出しのようなものに有用であり、LaTeXでのみ意味を持ちます。出力時には、非必須引数は、すべての必須
11100 引数の前に来ることに注意してください(以下参照)。つまり、
11104 \begin_layout LyX-Code
11107 mycmd[非必須引数1]{必須引数1}{段落の内容}
11110 \begin_layout Standard
11114 \begin_layout LyX-Code
11117 mycmd[非必須引数1]{必須引数1}[非必須引数2]{段落の内容}
11120 \begin_layout Standard
11121 のようなコマンドは、TeXコード(これを使えば何でもできます)を使用することなしには、生成することができません。
11125 \begin_layout Description
11126 \begin_inset Flex Code
11129 \begin_layout Plain Layout
11136 \begin_inset Flex Code
11139 \begin_layout Plain Layout
11148 \begin_inset space \thinspace{}
11152 \begin_inset Flex Code
11155 \begin_layout Plain Layout
11161 ] LaTeX出力中で、段落を空行ではなく、改行で区切るよう指定します。
11162 \begin_inset Flex Code
11165 \begin_layout Plain Layout
11171 と併用すれば、(TeXコードを使用したときのように)テキストエディタをエミュレートすることができます。
11174 \begin_layout Description
11175 \begin_inset Flex Code
11178 \begin_layout Plain Layout
11185 \begin_inset Flex Code
11188 \begin_layout Plain Layout
11194 ] 段落の最初の行の行頭下げ。レイアウトによっては
11195 \begin_inset Flex Code
11198 \begin_layout Plain Layout
11204 は固定されています。例外には標準レイアウトがあり、標準レイアウトの段落の行頭下げは、
11205 \begin_inset Flex Code
11208 \begin_layout Plain Layout
11214 で禁止することができるようになっています。また、環境中の標準レイアウト段落は、当該段落の
11215 \begin_inset Flex Code
11218 \begin_layout Plain Layout
11225 \begin_inset Flex Code
11228 \begin_layout Plain Layout
11234 を使用します。たとえば、箇条書き(連番)内の標準段落は、行頭下げされません。
11237 \begin_layout Description
11238 \begin_inset Flex Code
11241 \begin_layout Plain Layout
11248 \begin_inset Flex Code
11251 \begin_layout Plain Layout
11257 ] このレイアウトの2段落間の垂直余白。
11260 \begin_layout Description
11261 \begin_inset Flex Code
11264 \begin_layout Plain Layout
11271 \begin_inset Flex Code
11274 \begin_layout Plain Layout
11280 ] LyXでは、文書を組版するのに、ユーザが「行頭下げ」か「スキップ」を選ぶことができます。「行頭下げ」を選択した際には、この値は完全に無視されます。「スキップ
11281 」を選択した際には、LaTeX型「段落」レイアウトの
11282 \begin_inset Flex Code
11285 \begin_layout Plain Layout
11292 \begin_inset Flex Code
11295 \begin_layout Plain Layout
11301 引数分だけ引き離されます。垂直余白は、
11302 \begin_inset Flex Code
11305 \begin_layout Plain Layout
11311 を標準フォントでの1行の高さとすると、
11312 \begin_inset Flex Code
11315 \begin_layout Plain Layout
11322 \begin_inset Formula $\times$
11326 \begin_inset Flex Code
11329 \begin_layout Plain Layout
11335 によって計算されます。このようにして、画面フォントを変更しても同じように表示されるのです。
11338 \begin_layout Description
11339 \begin_inset Flex Code
11342 \begin_layout Plain Layout
11351 \begin_inset Flex Code
11354 \begin_layout Plain Layout
11363 \begin_inset space \thinspace{}
11367 \begin_inset Flex Code
11370 \begin_layout Plain Layout
11376 ] この段落の内容が、LaTeXが必要とするような特別な変換を行わずに、生の形で出力されるべきかどうか。
11379 \begin_layout Description
11380 \begin_inset Flex Code
11383 \begin_layout Plain Layout
11389 この様式が使用されたときに、LaTeXプリアンブルに付け加えるべき情報。この特定の様式が要求するマクロを定義したり、パッケージを読み込んだりと言ったことに使用
11391 \begin_inset Flex Code
11394 \begin_layout Plain Layout
11403 \begin_layout Description
11404 \begin_inset Flex Code
11407 \begin_layout Plain Layout
11414 \begin_inset Flex Code
11417 \begin_layout Plain Layout
11423 ] この型の段落を参照する際、生成されるラベルに使用する前置句。これによって、整形参照を使用することができるようになります。
11426 \begin_layout Description
11427 \begin_inset Flex Code
11430 \begin_layout Plain Layout
11437 \begin_inset Flex Code
11440 \begin_layout Plain Layout
11446 ] このレイアウトに対応するLaTeXコマンドやLaTeX環境が予期している、必須引数の数。コマンドの場合には、段落の内容自体に関連付けられている引数
11450 、必要な引数の数のことです。これらの引数は、実際には渡されなくても構いません。必要な場合は、LyXが空の引数を生成します。非必須引数は、必須引数の前に出力される
11451 ことに注意してください。詳細については、上記
11452 \begin_inset Flex Code
11455 \begin_layout Plain Layout
11464 \begin_layout Description
11465 \begin_inset Flex Code
11468 \begin_layout Plain Layout
11475 \begin_inset Flex Code
11478 \begin_layout Plain Layout
11486 Whether the style requires the feature
11487 \begin_inset Flex Code
11490 \begin_layout Plain Layout
11499 See the description of
11500 \begin_inset Flex Code
11503 \begin_layout Plain Layout
11514 \begin_inset space ~
11518 \begin_inset CommandInset ref
11520 reference "sub:汎用テキストクラスパラメータ"
11526 ) for information on `features'
11531 \begin_layout Description
11532 \begin_inset Flex Code
11535 \begin_layout Plain Layout
11542 \begin_inset Flex Code
11545 \begin_layout Plain Layout
11552 \begin_inset Flex Code
11555 \begin_layout Plain Layout
11564 \begin_layout Description
11565 \begin_inset Flex Code
11568 \begin_layout Plain Layout
11575 \begin_inset Flex Code
11578 \begin_layout Plain Layout
11587 \begin_inset Flex Code
11590 \begin_layout Plain Layout
11597 \begin_inset Flex Code
11600 \begin_layout Plain Layout
11607 \begin_inset Flex Code
11610 \begin_layout Plain Layout
11612 \begin_inset space ~
11628 これはレイアウト中の既定の行間をどうすべきか定義するものです。引数の
11629 \begin_inset Flex Code
11632 \begin_layout Plain Layout
11639 \begin_inset Flex Code
11642 \begin_layout Plain Layout
11649 \begin_inset Flex Code
11652 \begin_layout Plain Layout
11658 は、それぞれ乗数1・1.25・1.667に対応します。引数
11659 \begin_inset Flex Code
11662 \begin_layout Plain Layout
11668 を指定した場合には、実際の乗数値も引数として指定しなくてはなりません。他のパラメータと違って
11669 \begin_inset Flex Code
11672 \begin_layout Plain Layout
11683 \begin_inset Flex Code
11686 \begin_layout Plain Layout
11692 パッケージを使用した、限定的なLaTeXコードを生成することを意味することにご注意ください。
11695 \begin_layout Description
11696 \begin_inset Flex Code
11699 \begin_layout Plain Layout
11706 \begin_inset Flex Code
11709 \begin_layout Plain Layout
11716 \begin_inset space \thinspace{}
11720 \begin_inset Flex Code
11723 \begin_layout Plain Layout
11729 ] この様式の段落をスペルチェックするか否か。既定値は真です。
11732 \begin_layout Description
11733 \begin_inset Flex Code
11736 \begin_layout Plain Layout
11743 \begin_inset CommandInset ref
11745 reference "sub:フォント指定"
11752 \begin_layout Description
11753 \begin_inset Flex Code
11756 \begin_layout Plain Layout
11763 \begin_inset Flex Code
11766 \begin_layout Plain Layout
11772 ] 目次中でのこの様式の階層。これは、節見出しの自動連番に使用されます。
11775 \begin_layout Description
11776 \begin_inset Flex Code
11779 \begin_layout Plain Layout
11786 \begin_inset Flex Code
11789 \begin_layout Plain Layout
11795 ] このレイアウトを持つ一連の段落群の最初の段落と、その前の段落の間の垂直余白。前の段落が別のレイアウトを持っていれば、余白は単純に追加されるのではなく、それら
11799 \begin_layout Subsection
11800 \begin_inset CommandInset label
11802 name "sub:段落様式の国際化"
11809 \begin_layout Standard
11810 LyXは、長きにわたってレイアウト情報の国際化をサポートしてきましたが、第2.0版までは、これは操作画面にのみ適用されるものであって、たとえばPDF出力には適用さ
11811 れませんでした。たとえば、フランスの著者が、「Theorem 1」の代わりに「
11815 1」としたければ、醜いハックに頼るしかありませんでした。Georg Baumのおかげで、これは解消されました。
11818 \begin_layout Standard
11820 \begin_inset Flex MenuItem
11823 \begin_layout Plain Layout
11829 が、組版文書に出力される文字列を定義するのであれば、非英語文書や複数言語文書をサポートするために、
11830 \begin_inset Flex MenuItem
11833 \begin_layout Plain Layout
11840 \begin_inset Flex MenuItem
11843 \begin_layout Plain Layout
11849 を使用することができます。以下の抜粋(
11850 \begin_inset Flex MenuItem
11853 \begin_layout Plain Layout
11859 より)は、これがどう動作するかを示すものです。
11862 \begin_layout LyX-Code
11867 \begin_layout LyX-Code
11870 theoremstyle{remark}
11873 \begin_layout LyX-Code
11876 newtheorem{claim}[thm]{
11883 \begin_layout LyX-Code
11887 \begin_layout LyX-Code
11891 \begin_layout LyX-Code
11896 claimname}{_(Claim)}
11899 \begin_layout LyX-Code
11903 \begin_layout LyX-Code
11907 \begin_layout LyX-Code
11916 claimname}{_(Claim)}}
11919 \begin_layout LyX-Code
11924 \begin_layout Standard
11926 \begin_inset Flex MenuItem
11929 \begin_layout Plain Layout
11936 \begin_inset Flex MenuItem
11939 \begin_layout Plain Layout
11945 タグ内には、有効なLaTeXコードはすべて用いることができますが、実際においては、ここで典型的に示したような形になるでしょう。組版文字列が正しく翻訳されるための
11947 \begin_inset Flex Code
11950 \begin_layout Plain Layout
11959 \begin_inset Flex Code
11962 \begin_layout Plain Layout
11973 \begin_layout Standard
11974 \begin_inset Flex Code
11977 \begin_layout Plain Layout
11983 タグは、文書全体の言語に基づいた国際化を提供します。タグの内容は、
11984 \begin_inset Flex Code
11987 \begin_layout Plain Layout
11993 タグと同様、プリアンブルに置かれるのですが、これを特別なものにしているのは、「関数」
11994 \begin_inset Flex Code
11997 \begin_layout Plain Layout
12003 が使用されていることです。これは、LyXがLaTeX出力を生成する際、その引数を文書言語に翻訳したもので置き換えられます。
12006 \begin_layout Standard
12007 \begin_inset Flex Code
12010 \begin_layout Plain Layout
12017 \begin_inset Flex Code
12020 \begin_layout Plain Layout
12026 パッケージへのインタフェースを提供することを意図しているので、もう少し複雑です。その内容は、文書に現れる言語それぞれについて一度、プリアンブルに追加されます。こ
12028 \begin_inset Flex Code
12031 \begin_layout Plain Layout
12037 の引数は、その当該言語への翻訳で置き換えられ、
12038 \begin_inset Flex Code
12041 \begin_layout Plain Layout
12047 は言語名(babelパッケージで使用されるもの)で置き換えられます。
12050 \begin_layout Standard
12051 したがって、フランス語のセクションを持つドイツ語文書では、以下のような内容がプリアンブルに追加されます
12054 \begin_layout LyX-Code
12063 claimname}{Affirmation}}
12064 \begin_inset Newline newline
12075 claimname}{Behauptung}}
12076 \begin_inset Newline newline
12083 claimname}{Behauptung}
12086 \begin_layout Standard
12088 \begin_inset Flex Code
12091 \begin_layout Plain Layout
12097 は協力して、出力に正しい文字列を生成します。
12100 \begin_layout Standard
12101 ここで注意しなくてはならない重要な点は、翻訳は、操作画面の国際化に使われるのと同じ機構を通じて、LyX自身によって提供されるということです。つまり、ユーザー作成
12102 のレイアウトファイルに入力された文字列は、LyXの国際化ルーチンでは取り扱われないので、
12103 \begin_inset Flex MenuItem
12106 \begin_layout Plain Layout
12113 \begin_inset Flex MenuItem
12116 \begin_layout Plain Layout
12122 は、事実上、LyXとともに提供されるレイアウトファイルでのみ、使うことができるということを意味します。とはいえ、こういうことでありますので、将来的にLyXに同梱
12123 させようという意図を以て作成されたレイアウトは、適切なところではすべて、これらのタグを使用するべきです。
12126 \begin_layout Subsection
12128 \begin_inset CommandInset label
12137 \begin_layout Standard
12138 LyX第1.3.0版以来、テキストクラス自体の中でフロート(
12139 \begin_inset Flex MenuItem
12142 \begin_layout Plain Layout
12149 \begin_inset Flex MenuItem
12152 \begin_layout Plain Layout
12158 ・\SpecialChar \ldots{}
12159 )を定義することが可能となり、かつ必要となりました。標準的なフロートは
12160 \begin_inset Flex Code
12163 \begin_layout Plain Layout
12169 ファイルに含まれているので、作業中のレイアウトファイルに
12172 \begin_layout LyX-Code
12173 Input stdfloats.inc
12176 \begin_layout Standard
12177 と加えるだけで済むことも多いでしょう。LyXに同梱されているAGUクラスのように、それ以外のフロート型を提供するテキストクラスを実装するには、以下の情報が役立つ
12181 \begin_layout Description
12182 \begin_inset Flex Code
12185 \begin_layout Plain Layout
12192 \begin_inset Flex Code
12195 \begin_layout Plain Layout
12202 \begin_inset Quotes erd
12206 \begin_inset Quotes erd
12209 ] 図などのリストを含む外部ファイルのファイル拡張子名。LaTeXがキャプションを書き込むファイルです。
12212 \begin_layout Description
12213 \begin_inset Flex Code
12216 \begin_layout Plain Layout
12223 \begin_inset Flex Code
12226 \begin_layout Plain Layout
12233 \begin_inset Quotes erd
12237 \begin_inset Quotes erd
12240 ] メニューとキャプションに使用される文字列。babelが使用される場合には、これは現在の言語に翻訳されます。
12243 \begin_layout Description
12244 \begin_inset Flex Code
12247 \begin_layout Plain Layout
12253 これらは、XHTML出力で使用されます。第
12254 \begin_inset CommandInset ref
12256 reference "sec:XHTML出力のタグ"
12263 \begin_layout Description
12264 \begin_inset Flex Code
12267 \begin_layout Plain Layout
12274 \begin_inset Flex Code
12277 \begin_layout Plain Layout
12286 \begin_inset space \thinspace{}
12290 \begin_inset Flex Code
12293 \begin_layout Plain Layout
12299 ] フロートがドキュメントクラス中に既に定義されているのか、あるいは
12304 \begin_inset Flex Code
12307 \begin_layout Plain Layout
12313 を読み込む必要があり、そのファイル内のものを使用して、オン・ザ・フライで定義するかを示します。既定は
12314 \begin_inset Flex Code
12317 \begin_layout Plain Layout
12324 \begin_inset Flex Code
12327 \begin_layout Plain Layout
12333 を使用します。LaTeXドキュメントクラス中に既に定義されているときには、
12334 \begin_inset Flex Code
12337 \begin_layout Plain Layout
12346 \begin_layout Description
12347 \begin_inset Flex Code
12350 \begin_layout Plain Layout
12357 \begin_inset Flex Code
12360 \begin_layout Plain Layout
12367 \begin_inset Quotes erd
12371 \begin_inset Quotes erd
12374 ] この型のフロートの一覧を生成するのに使用するコマンド。頭部の「
12377 \begin_inset Flex Code
12380 \begin_layout Plain Layout
12386 が偽の時には、このコマンドを生成する標準的な方法はないので、これは
12391 \begin_inset Flex Code
12394 \begin_layout Plain Layout
12400 が真の時は、標準的な方法が存在するので、これは無視されます。
12403 \begin_layout Description
12404 \begin_inset Flex Code
12407 \begin_layout Plain Layout
12414 \begin_inset Flex Code
12417 \begin_layout Plain Layout
12424 \begin_inset Quotes erd
12428 \begin_inset Quotes erd
12431 ] この種類のフロート一覧(図一覧・表一覧など)に使用される見出し。LyX中では、これは画面上のラベルとして使用されます。また、見出しとして使用するために、La
12432 TeXに渡され、XHTML出力でも見出しとして使用されます。これは、文書言語に翻訳されます。
12435 \begin_layout Description
12436 \begin_inset Flex Code
12439 \begin_layout Plain Layout
12446 \begin_inset Flex Code
12449 \begin_layout Plain Layout
12456 \begin_inset Quotes erd
12460 \begin_inset Quotes erd
12463 ] この(非必須の)引数は、このクラスのフロートが文書中のある節単位ごとに番号を振り直されるべきかどうかを規定します。
12468 \begin_inset Flex Code
12471 \begin_layout Plain Layout
12482 \begin_inset Flex Code
12485 \begin_layout Plain Layout
12491 」と指定されていれば、フロートは章ごとに番号が振り直されます。
12494 \begin_layout Description
12495 \begin_inset Flex Code
12498 \begin_layout Plain Layout
12505 \begin_inset Flex Code
12508 \begin_layout Plain Layout
12515 \begin_inset Quotes erd
12519 \begin_inset Quotes erd
12522 ] このクラスのフロートの既定の配置法。文字列は、標準的なLaTeX表記に従い、
12523 \begin_inset Flex Code
12526 \begin_layout Plain Layout
12533 \begin_inset Flex Code
12536 \begin_layout Plain Layout
12543 \begin_inset Flex Code
12546 \begin_layout Plain Layout
12553 \begin_inset Flex Code
12556 \begin_layout Plain Layout
12566 \begin_layout Plain Layout
12567 LaTeX同様、文字列中でのこれらの文字の順序は関係ありません。
12573 \begin_inset Flex Code
12576 \begin_layout Plain Layout
12582 があり、これはフロートを「ここ」に置いていいけれども他の場所はだめ、というものなので、本当はフロートにあるものではありません。しかし、
12583 \begin_inset Flex Code
12586 \begin_layout Plain Layout
12592 指定子は特別なものであり、その細かい実装上の理由で、組み込み以外のフロート型では使用することができません。これが何を意味するかおわかりにならない場合には、代わり
12594 \begin_inset Flex Code
12597 \begin_layout Plain Layout
12606 \begin_layout Description
12607 \begin_inset Flex Code
12610 \begin_layout Plain Layout
12617 \begin_inset Flex Code
12620 \begin_layout Plain Layout
12626 ] この型のフロートを参照する際、生成されるラベルに使用する前置句。これによって、整形参照を使用することができるようになります。コピーした様式が設定した
12627 \begin_inset Flex Code
12630 \begin_layout Plain Layout
12636 は、特別な文字列「OFF」(すべて大文字)を使えば、いつでも削除することができます。
12639 \begin_layout Description
12640 \begin_inset Flex Code
12643 \begin_layout Plain Layout
12650 \begin_inset Flex Code
12653 \begin_layout Plain Layout
12660 \begin_inset Quotes erd
12664 \begin_inset Quotes erd
12668 \begin_inset Flex Code
12671 \begin_layout Plain Layout
12679 を使用してフロートを定義する際に使用される様式。
12682 \begin_layout Description
12683 \begin_inset Flex Code
12686 \begin_layout Plain Layout
12693 \begin_inset Flex Code
12696 \begin_layout Plain Layout
12703 \begin_inset Quotes erd
12707 \begin_inset Quotes erd
12710 ] プログラムやアルゴリズムのような、フロートの新しいクラス「型」。適切な
12711 \begin_inset Flex Code
12714 \begin_layout Plain Layout
12723 \begin_inset Flex Code
12726 \begin_layout Plain Layout
12735 \begin_inset Flex Code
12738 \begin_layout Plain Layout
12749 \begin_layout Description
12750 \begin_inset Flex Code
12753 \begin_layout Plain Layout
12760 \begin_inset Flex Code
12763 \begin_layout Plain Layout
12770 \begin_inset space \thinspace{}
12774 \begin_inset Flex Code
12777 \begin_layout Plain Layout
12785 ] このフロートが、クラスファイルやパッケージ中で、
12790 \begin_inset Flex Code
12793 \begin_layout Plain Layout
12799 が提供しているものを使用して定義されているのか、LyX自身がオン・ザ・フライで定義しているのかを示します。
12802 \begin_layout Standard
12803 \begin_inset Flex Code
12806 \begin_layout Plain Layout
12819 \begin_inset Flex Code
12822 \begin_layout Plain Layout
12833 \begin_layout Subsection
12835 \begin_inset CommandInset label
12844 \begin_layout Standard
12848 \begin_layout Itemize
12850 \begin_inset Flex Code
12853 \begin_layout Plain Layout
12860 \begin_inset Flex Code
12863 \begin_layout Plain Layout
12872 \begin_inset Flex Code
12875 \begin_layout Plain Layout
12883 などのLaTeXコマンドに対応した意味論的マークアップを定義するものです。
12886 \begin_layout Itemize
12888 \begin_inset Flex Code
12891 \begin_layout Plain Layout
12897 )。これは、TeXコードや脚注などに似たユーザ設定の折りたたみ式差込枠を定義するのに使用することができます。わかりやすい例はendnote差込枠で、これは
12898 \begin_inset Flex Code
12901 \begin_layout Plain Layout
12910 \begin_layout Itemize
12912 \begin_inset Flex Code
12915 \begin_layout Plain Layout
12921 )。DocBookクラスで使用するものです。
12924 \begin_layout Standard
12926 \begin_inset Flex Code
12929 \begin_layout Plain Layout
12938 \begin_layout Standard
12939 \begin_inset Flex Code
12942 \begin_layout Plain Layout
12948 タグは、もう一つ別の機能も提供します。これを使えば、いろいろな種類の差込枠全体のレイアウトを設定するのに使用することができるのです。現在のところ、
12949 \begin_inset Flex Code
12952 \begin_layout Plain Layout
12958 は自由差込枠を定義することの他に、脚注・傍注・注釈差込枠・TeXコード(ERT)差込枠・派生枝・リスト・索引・ボックス・表・アルゴリズム・URL・オプション引数
12959 のレイアウトパラメータを設定するのに使用することができます。
12962 \begin_layout Standard
12963 \begin_inset Flex Code
12966 \begin_layout Plain Layout
12972 定義は以下の形の行では始まらなくてはなりません。
12975 \begin_layout LyX-Code
12979 \begin_layout Standard
12981 \begin_inset Flex Code
12984 \begin_layout Plain Layout
12990 は、レイアウトを定義しようとしている差込枠を指し、以下の2つの場合がありえます。
12993 \begin_layout Enumerate
12994 既存の差込枠のレイアウトを変更する場合。この場合、
12995 \begin_inset Flex Code
12998 \begin_layout Plain Layout
13005 \begin_inset Flex Code
13008 \begin_layout Plain Layout
13015 \begin_inset Flex Code
13018 \begin_layout Plain Layout
13025 \begin_inset Flex Code
13028 \begin_layout Plain Layout
13035 \begin_inset Flex Code
13038 \begin_layout Plain Layout
13045 \begin_inset Flex Code
13048 \begin_layout Plain Layout
13055 \begin_inset Flex Code
13058 \begin_layout Plain Layout
13065 \begin_inset Flex Code
13068 \begin_layout Plain Layout
13075 \begin_inset Flex Code
13078 \begin_layout Plain Layout
13085 \begin_inset Flex Code
13088 \begin_layout Plain Layout
13095 \begin_inset Flex Code
13098 \begin_layout Plain Layout
13105 \begin_inset Flex Code
13108 \begin_layout Plain Layout
13115 \begin_inset Flex Code
13118 \begin_layout Plain Layout
13125 \begin_inset Flex Code
13128 \begin_layout Plain Layout
13135 \begin_inset Flex Code
13138 \begin_layout Plain Layout
13145 \begin_inset Flex Code
13148 \begin_layout Plain Layout
13155 \begin_inset Flex Code
13158 \begin_layout Plain Layout
13165 \begin_inset Flex Code
13168 \begin_layout Plain Layout
13175 \begin_inset Flex Code
13178 \begin_layout Plain Layout
13185 \begin_inset Flex Code
13188 \begin_layout Plain Layout
13195 \begin_inset Flex Code
13198 \begin_layout Plain Layout
13207 \begin_layout Enumerate
13208 自由差込枠のレイアウトを定義する場合。この場合、
13209 \begin_inset Flex Code
13212 \begin_layout Plain Layout
13219 \begin_inset Flex Code
13222 \begin_layout Plain Layout
13229 \begin_inset Flex Code
13232 \begin_layout Plain Layout
13238 は、既存の自由差込枠で使用されていない有効な識別子であれば、何でも構いません。識別子には空白を入れることもできますが、この場合には全体を引用符で囲まなくてはなり
13239 ません。自由差込枠の定義には、この定義がどの差込枠型なのか宣言するために、
13240 \begin_inset Flex Code
13243 \begin_layout Plain Layout
13249 項目が含まれていなくてはならないことに注意してください。
13252 \begin_layout Standard
13253 \begin_inset Flex Code
13256 \begin_layout Plain Layout
13262 定義には以下の項目を入れることができます。
13265 \begin_layout Description
13266 \begin_inset Flex Code
13269 \begin_layout Plain Layout
13278 \begin_inset Flex Code
13281 \begin_layout Plain Layout
13294 \begin_inset space ~
13298 \begin_inset CommandInset ref
13300 reference "chap:Names-of-colors"
13304 for a list of the available color names.
13307 \begin_layout Description
13308 \begin_inset Flex Code
13311 \begin_layout Plain Layout
13318 \begin_inset Flex Code
13321 \begin_layout Plain Layout
13330 \begin_inset space \thinspace{}
13334 \begin_inset Flex Code
13337 \begin_layout Plain Layout
13343 ] 差込枠を閉じた際、差込枠の内容をラベルとして使用するか否か。既定値は偽です。
13346 \begin_layout Description
13347 \begin_inset Flex Code
13350 \begin_layout Plain Layout
13358 As with paragraph styles, see sec.
13359 \begin_inset space ~
13365 \begin_inset CommandInset ref
13367 reference "sub:段落様式"
13373 Note that you need to specify the complete type, e.
13374 \begin_inset space \thinspace{}
13378 \begin_inset space ~
13382 \begin_inset Flex Code
13385 \begin_layout Plain Layout
13388 CopyStyle Flex:<name>
13396 \begin_layout Description
13397 \begin_inset Flex Code
13400 \begin_layout Plain Layout
13407 \begin_inset Flex Code
13410 \begin_layout Plain Layout
13419 \begin_inset space \thinspace{}
13423 \begin_inset Flex Code
13426 \begin_layout Plain Layout
13432 ] 段落を設定するのに、段落設定ダイアログをユーザが使えるかどうかを指定します。
13435 \begin_layout Description
13436 \begin_inset Flex Code
13439 \begin_layout Plain Layout
13445 差込枠の枠とボタンをレンダリングするのに使用する様式を指定するもので、
13446 \begin_inset Flex Code
13449 \begin_layout Plain Layout
13456 \begin_inset Flex Code
13459 \begin_layout Plain Layout
13466 \begin_inset Flex Code
13469 \begin_layout Plain Layout
13475 のいずれかを指定することができます。脚注は通常
13476 \begin_inset Flex Code
13479 \begin_layout Plain Layout
13486 \begin_inset Flex Code
13489 \begin_layout Plain Layout
13496 \begin_inset Flex Code
13499 \begin_layout Plain Layout
13508 \begin_layout Description
13509 \begin_inset Flex Code
13512 \begin_layout Plain Layout
13519 \begin_inset Flex Code
13522 \begin_layout Plain Layout
13529 \begin_inset space \thinspace{}
13533 \begin_inset Flex Code
13536 \begin_layout Plain Layout
13545 \begin_inset Flex Code
13548 \begin_layout Plain Layout
13555 \begin_inset Flex Code
13558 \begin_layout Plain Layout
13564 の時のみ意味をもちます。環境を、出力中で独立して出力させるか、周囲のテキストとインラインで出力させるかを示します。偽にすると、LaTeX環境は、
13565 \begin_inset Flex Code
13568 \begin_layout Plain Layout
13577 \begin_inset Flex Code
13580 \begin_layout Plain Layout
13588 タグの後の空白(改行文字を含む)を無視するものと仮定します。
13591 \begin_layout Description
13592 \begin_inset Flex Code
13595 \begin_layout Plain Layout
13602 \begin_inset Flex Code
13605 \begin_layout Plain Layout
13614 \begin_layout Description
13615 \begin_inset Flex Code
13618 \begin_layout Plain Layout
13629 \begin_inset CommandInset ref
13631 reference "sub:フォント指定"
13635 節を参照。このフォントを定義すると自動的に
13636 \begin_inset Flex Code
13639 \begin_layout Plain Layout
13645 も同じ値に定義されるので、これらを別々の値にしたいときは、これを先に定義してから後に
13646 \begin_inset Flex Code
13649 \begin_layout Plain Layout
13655 を定義しなくてはならないことに注意してください。
13658 \begin_layout Description
13659 \begin_inset Flex Code
13662 \begin_layout Plain Layout
13669 \begin_inset Flex Code
13672 \begin_layout Plain Layout
13681 \begin_inset space \thinspace{}
13685 \begin_inset Flex Code
13688 \begin_layout Plain Layout
13694 ] たとえばTeXコードやURLで「latex」言語が「左から右」(ラテン式)出力になるように強制します。うまく機能しません。
13697 \begin_layout Description
13698 \begin_inset Flex Code
13701 \begin_layout Plain Layout
13708 \begin_inset Flex Code
13711 \begin_layout Plain Layout
13720 \begin_inset space \thinspace{}
13724 \begin_inset Flex Code
13727 \begin_layout Plain Layout
13733 ] PlainLayoutを使用するべきなのか、それともユーザが差込枠で使用されている段落様式を変更できるのかを指定します。既定値は偽です。
13736 \begin_layout Description
13737 \begin_inset Flex Code
13740 \begin_layout Plain Layout
13749 \begin_inset Flex Code
13752 \begin_layout Plain Layout
13761 \begin_inset space \thinspace{}
13765 \begin_inset Flex Code
13768 \begin_layout Plain Layout
13776 As with paragraph styles, see sec.
13777 \begin_inset space ~
13783 \begin_inset CommandInset ref
13785 reference "sub:段落様式"
13792 \begin_layout Description
13793 \begin_inset Flex Code
13796 \begin_layout Plain Layout
13802 これらは、XHTML出力で使用されます。第
13803 \begin_inset CommandInset ref
13805 reference "sec:XHTML出力のタグ"
13812 \begin_layout Description
13813 \begin_inset Flex Code
13816 \begin_layout Plain Layout
13823 \begin_inset Flex Code
13826 \begin_layout Plain Layout
13835 \begin_inset space \thinspace{}
13839 \begin_inset Flex Code
13842 \begin_layout Plain Layout
13848 ] 「文書構造」ペイン用に出力される文字列に、この差込枠の内容を含めるかどうか。たとえば、節見出しの脚注の内容が、文書構造の目次に表示されることは望まないでしょ
13849 うが、通常、文字様式の内容は表示されることを望むでしょう。既定値は偽、すなわち含めません。
13852 \begin_layout Description
13853 \begin_inset Flex Code
13856 \begin_layout Plain Layout
13865 \begin_inset Flex Code
13868 \begin_layout Plain Layout
13877 \begin_inset space \thinspace{}
13881 \begin_inset Flex Code
13884 \begin_layout Plain Layout
13892 As with paragraph styles, see sec.
13893 \begin_inset space ~
13899 \begin_inset CommandInset ref
13901 reference "sub:段落様式"
13908 \begin_layout Description
13909 \begin_inset Flex Code
13912 \begin_layout Plain Layout
13919 \begin_inset CommandInset ref
13921 reference "sub:フォント指定"
13925 節を参照。非効率を回避するため、この定義は
13926 \begin_inset Flex Code
13929 \begin_layout Plain Layout
13938 \begin_layout Description
13939 \begin_inset Flex Code
13942 \begin_layout Plain Layout
13949 \begin_inset Flex Code
13952 \begin_layout Plain Layout
13959 \begin_inset Quotes erd
13963 \begin_inset Quotes erd
13970 ボタンなどに差込枠のラベルとして表示されるもの。差込枠型によっては(TeXコードや派生枝)、ラベルが動的に変更されます。
13973 \begin_layout Description
13974 \begin_inset Flex Code
13977 \begin_layout Plain Layout
13986 \begin_inset Flex Code
13989 \begin_layout Plain Layout
13999 ] 対応するLaTeX関連物の名称。環境名ないしはコマンド名。
14002 \begin_layout Description
14003 \begin_inset Flex Code
14006 \begin_layout Plain Layout
14015 \begin_inset Flex Code
14018 \begin_layout Plain Layout
14029 \begin_inset Flex Code
14032 \begin_layout Plain Layout
14039 \begin_inset Flex Code
14042 \begin_layout Plain Layout
14048 のような括弧対を含む。このパラメータはLyX内部から変更することはできません。
14051 \begin_layout Description
14052 \begin_inset Flex Code
14055 \begin_layout Plain Layout
14063 As with paragraph styles, see sec.
14064 \begin_inset space ~
14070 \begin_inset CommandInset ref
14072 reference "sub:段落様式"
14079 \begin_layout Description
14080 \begin_inset Flex Code
14083 \begin_layout Plain Layout
14090 \begin_inset Flex Code
14093 \begin_layout Plain Layout
14100 \begin_inset Flex Code
14103 \begin_layout Plain Layout
14110 \begin_inset Flex Code
14113 \begin_layout Plain Layout
14120 \begin_inset Flex Code
14123 \begin_layout Plain Layout
14129 (charstyleの定義の終わりなどを示すダミー定義)の各値を取ることができます。この項目は、自由差込枠に必須であり、かつ自由差込枠でしか意味を持ちません。こ
14130 の項目は、就中、差込枠がどのメニューに表示されるかを決定します。
14131 \begin_inset Flex Code
14134 \begin_layout Plain Layout
14141 \begin_inset Flex Code
14144 \begin_layout Plain Layout
14151 \begin_inset Flex Code
14154 \begin_layout Plain Layout
14161 \begin_inset Flex Code
14164 \begin_layout Plain Layout
14171 \begin_inset Flex Code
14174 \begin_layout Plain Layout
14184 設定すれば、真に設定することができます。
14187 \begin_layout Description
14188 \begin_inset Flex Code
14191 \begin_layout Plain Layout
14198 \begin_inset Flex Code
14201 \begin_layout Plain Layout
14210 \begin_inset space \thinspace{}
14214 \begin_inset Flex Code
14217 \begin_layout Plain Layout
14223 ] この差込枠中に複数の段落を入れることができるかどうか。これは同時に、
14224 \begin_inset Flex Code
14227 \begin_layout Plain Layout
14234 \begin_inset Flex Code
14237 \begin_layout Plain Layout
14244 \begin_inset Flex Code
14247 \begin_layout Plain Layout
14257 指定されれば、他の値に指定し直すことができます。既定値は真です。
14260 \begin_layout Description
14261 \begin_inset Flex Code
14264 \begin_layout Plain Layout
14271 \begin_inset Flex Code
14274 \begin_layout Plain Layout
14283 \begin_inset space \thinspace{}
14287 \begin_inset Flex Code
14290 \begin_layout Plain Layout
14297 \begin_inset Flex Code
14300 \begin_layout Plain Layout
14308 するか否か(註:当該コマンド自身をprotectするかどうかでは
14315 \begin_layout Description
14316 \begin_inset Flex Code
14319 \begin_layout Plain Layout
14326 \begin_inset Flex Code
14329 \begin_layout Plain Layout
14338 \begin_inset space \thinspace{}
14342 \begin_inset Flex Code
14345 \begin_layout Plain Layout
14353 As with paragraph styles, see sec.
14354 \begin_inset space ~
14360 \begin_inset CommandInset ref
14362 reference "sub:段落様式"
14369 \begin_layout Description
14370 \begin_inset Flex Code
14373 \begin_layout Plain Layout
14382 \begin_inset Flex Code
14385 \begin_layout Plain Layout
14394 \begin_inset space \thinspace{}
14398 \begin_inset Flex Code
14401 \begin_layout Plain Layout
14409 As with paragraph styles, see sec.
14410 \begin_inset space ~
14416 \begin_inset CommandInset ref
14418 reference "sub:段落様式"
14425 \begin_layout Description
14426 \begin_inset Flex Code
14429 \begin_layout Plain Layout
14437 As with paragraph styles, see sec.
14438 \begin_inset space ~
14444 \begin_inset CommandInset ref
14446 reference "sub:段落様式"
14453 \begin_layout Description
14454 \begin_inset Flex Code
14457 \begin_layout Plain Layout
14464 \begin_inset Flex Code
14467 \begin_layout Plain Layout
14473 ] この型の差込枠を参照する際、生成されるラベルに使用する前置句。これによって、整形参照を使用することができるようになります。
14476 \begin_layout Description
14477 \begin_inset Flex Code
14480 \begin_layout Plain Layout
14487 \begin_inset Flex Code
14490 \begin_layout Plain Layout
14498 As with paragraph styles, see sec.
14499 \begin_inset space ~
14505 \begin_inset CommandInset ref
14507 reference "sub:段落様式"
14514 \begin_layout Description
14515 \begin_inset Flex Code
14518 \begin_layout Plain Layout
14525 \begin_inset Flex Code
14528 \begin_layout Plain Layout
14535 \begin_inset space \thinspace{}
14539 \begin_inset Flex Code
14542 \begin_layout Plain Layout
14550 ] この差込枠が周囲の環境と同じフォントを用いるか、独自のフォントを用いるか。既定値は真、すなわち独自のフォントを用います。
14553 \begin_layout Description
14554 \begin_inset Flex Code
14557 \begin_layout Plain Layout
14564 \begin_inset Flex Code
14567 \begin_layout Plain Layout
14574 \begin_inset space \thinspace{}
14578 \begin_inset Flex Code
14581 \begin_layout Plain Layout
14589 ] この差込枠の内容をスペルチェックするか否か。既定値は真です。
14592 \begin_layout Subsection
14594 \begin_inset CommandInset label
14603 \begin_layout Standard
14606 It is necessary to define the counters
14609 \begin_inset Flex MenuItem
14612 \begin_layout Plain Layout
14619 \begin_inset Flex MenuItem
14622 \begin_layout Plain Layout
14628 ・\SpecialChar \ldots{}
14629 )を定義することが可能となり、かつ必要となりました。標準的なフロートは
14630 \begin_inset Flex Code
14633 \begin_layout Plain Layout
14639 ファイルに含まれているので、作業中のレイアウトファイルに
14642 \begin_layout LyX-Code
14643 Input stdcounters.inc
14646 \begin_layout Standard
14647 と加えるだけで済むことも多いでしょう。しかし自製カウンタを定義したければ、そうすることもできます。カウンタ宣言は、
14650 \begin_layout LyX-Code
14654 \begin_layout Standard
14656 \begin_inset Flex Code
14659 \begin_layout Plain Layout
14665 」は、実際のカウンタ名で置き換えます。また、宣言は「
14666 \begin_inset Flex Code
14669 \begin_layout Plain Layout
14678 \begin_layout Standard
14679 以下のパラメータを使用することができます。
14682 \begin_layout Description
14683 \begin_inset Flex Code
14686 \begin_layout Plain Layout
14687 LabelString [文字列=""]
14692 定義されていると、ここで指定した文字列がカウンタの表示の仕方を定義します。この値を指定すると、
14693 \begin_inset Flex Code
14696 \begin_layout Plain Layout
14697 LabelStringAppendix
14702 も同じ値に設定されます。文字列中では、以下の構成要素を使用することができます。
14706 \begin_layout Itemize
14707 \begin_inset Flex Code
14710 \begin_layout Plain Layout
14719 \begin_inset Flex Code
14722 \begin_layout Plain Layout
14729 \begin_inset Flex Code
14732 \begin_layout Plain Layout
14739 \begin_inset Newline linebreak
14743 \begin_inset Flex Code
14746 \begin_layout Plain Layout
14747 LabelStringAppendix
14755 \begin_layout Itemize
14757 \begin_inset Flex Code
14760 \begin_layout Plain Layout
14776 を用いて表現することができます。ここで
14777 \begin_inset Flex Code
14780 \begin_layout Plain Layout
14789 \begin_inset Flex Code
14792 \begin_layout Plain Layout
14798 :1, 2, 3,\SpecialChar \ldots{}
14800 \begin_inset Flex Code
14803 \begin_layout Plain Layout
14809 :a, b, c, \SpecialChar \ldots{}
14811 \begin_inset Flex Code
14814 \begin_layout Plain Layout
14820 :A, B, C, \SpecialChar \ldots{}
14822 \begin_inset Flex Code
14825 \begin_layout Plain Layout
14831 :i, ii, iii, \SpecialChar \ldots{}
14833 \begin_inset Flex Code
14836 \begin_layout Plain Layout
14842 :I, II, III\SpecialChar \ldots{}
14847 \begin_layout Standard
14848 \begin_inset Flex Code
14851 \begin_layout Plain Layout
14857 が定義されていないときは、既定値は以下のように組み立てられます。このカウンタに親カウンタ
14858 \begin_inset Flex Code
14861 \begin_layout Plain Layout
14868 \begin_inset Flex Code
14871 \begin_layout Plain Layout
14878 \begin_inset Newline linebreak
14882 \begin_inset Flex Code
14885 \begin_layout Plain Layout
14896 \begin_inset Flex Code
14899 \begin_layout Plain Layout
14910 \begin_layout Description
14911 \begin_inset Flex Code
14914 \begin_layout Plain Layout
14915 LabelStringAppendix
14921 \begin_inset Flex Code
14924 \begin_layout Plain Layout
14931 \begin_inset Flex Code
14934 \begin_layout Plain Layout
14940 と同様ですが、付録で使用するためのものです。
14943 \begin_layout Description
14944 \begin_inset Flex Code
14947 \begin_layout Plain Layout
14954 \begin_inset Flex Code
14957 \begin_layout Plain Layout
14964 \begin_inset Quotes erd
14968 \begin_inset Quotes erd
14971 ] このカウンタの整形参照で使用する書式。たとえば、節番号への参照を「Section
14972 \begin_inset space ~
14975 2.4」のように表示させたい場合には、文字列に「##」を含めます。これは、カウンタ番号で置換されます。したがって、節の場合には「Section ##」のようにしま
14979 \begin_layout Description
14980 \begin_inset Flex Code
14983 \begin_layout Plain Layout
14990 \begin_inset Flex Code
14993 \begin_layout Plain Layout
15000 \begin_inset Quotes erd
15004 \begin_inset Quotes erd
15007 ] これを別のカウンタ名に設定すると、現在のカウンタは、別のカウンタが増加する毎にリセットされます。たとえば、
15008 \begin_inset Flex Code
15011 \begin_layout Plain Layout
15018 \begin_inset Flex Code
15021 \begin_layout Plain Layout
15030 \begin_layout Subsection
15032 \begin_inset CommandInset label
15041 \begin_layout Standard
15042 フォント指定は、以下のような形を取ります。
15045 \begin_layout LyX-Code
15061 \begin_layout LyX-Code
15065 \begin_layout LyX-Code
15069 \begin_layout Standard
15070 以下のコマンドを使用することができます。
15073 \begin_layout Description
15074 \begin_inset Flex Code
15077 \begin_layout Plain Layout
15084 \begin_inset Flex Code
15087 \begin_layout Plain Layout
15096 \begin_inset Flex Code
15099 \begin_layout Plain Layout
15106 \begin_inset Flex Code
15109 \begin_layout Plain Layout
15116 \begin_inset Flex Code
15119 \begin_layout Plain Layout
15126 \begin_inset Flex Code
15129 \begin_layout Plain Layout
15136 \begin_inset Flex Code
15139 \begin_layout Plain Layout
15146 \begin_inset Flex Code
15149 \begin_layout Plain Layout
15156 \begin_inset Flex Code
15159 \begin_layout Plain Layout
15166 \begin_inset Flex Code
15169 \begin_layout Plain Layout
15178 \begin_layout Description
15179 \begin_inset Flex Code
15182 \begin_layout Plain Layout
15191 \begin_inset Flex Code
15194 \begin_layout Plain Layout
15203 \begin_inset Flex Code
15206 \begin_layout Plain Layout
15213 \begin_inset Flex Code
15216 \begin_layout Plain Layout
15225 \begin_layout Description
15226 \begin_inset Flex Code
15229 \begin_layout Plain Layout
15236 \begin_inset Flex Code
15239 \begin_layout Plain Layout
15246 \begin_inset Flex Code
15249 \begin_layout Plain Layout
15256 \begin_inset Flex Code
15259 \begin_layout Plain Layout
15266 \begin_inset Flex Code
15269 \begin_layout Plain Layout
15276 \begin_inset Flex Code
15279 \begin_layout Plain Layout
15286 \begin_inset Flex Code
15289 \begin_layout Plain Layout
15296 \begin_inset Flex Code
15299 \begin_layout Plain Layout
15306 \begin_inset Flex Code
15309 \begin_layout Plain Layout
15316 \begin_inset Flex Code
15319 \begin_layout Plain Layout
15326 \begin_inset Flex Code
15329 \begin_layout Plain Layout
15336 \begin_inset Flex Code
15339 \begin_layout Plain Layout
15346 \begin_inset Flex Code
15349 \begin_layout Plain Layout
15356 \begin_inset Flex Code
15359 \begin_layout Plain Layout
15365 です。それぞれ、対応する属性を有効にしたり無効にしたりします。
15366 \begin_inset Newline newline
15370 \begin_inset Flex Code
15373 \begin_layout Plain Layout
15380 \begin_inset Flex Code
15383 \begin_layout Plain Layout
15389 はそれを無効にします。もし後者がわかりにくければ、現在のコンテクストのフォント設定は、一般的に周囲のコンテクストから継承していることを思い出してください。ですか
15391 \begin_inset Flex Code
15394 \begin_layout Plain Layout
15400 は、たとえば定理環境で、何をせずとも有効となっている強調を無効にするのです。
15403 \begin_layout Description
15404 \begin_inset Flex Code
15407 \begin_layout Plain Layout
15416 \begin_inset Flex Code
15419 \begin_layout Plain Layout
15428 \begin_inset Flex Code
15431 \begin_layout Plain Layout
15440 \begin_layout Description
15441 \begin_inset Flex Code
15444 \begin_layout Plain Layout
15453 \begin_inset Flex Code
15456 \begin_layout Plain Layout
15465 \begin_inset Flex Code
15468 \begin_layout Plain Layout
15475 \begin_inset Flex Code
15478 \begin_layout Plain Layout
15485 \begin_inset Flex Code
15488 \begin_layout Plain Layout
15497 \begin_layout Description
15498 \begin_inset Flex Code
15501 \begin_layout Plain Layout
15508 \begin_inset Flex Code
15511 \begin_layout Plain Layout
15518 \begin_inset Flex Code
15521 \begin_layout Plain Layout
15528 \begin_inset Flex Code
15531 \begin_layout Plain Layout
15540 \begin_inset Flex Code
15543 \begin_layout Plain Layout
15550 \begin_inset Flex Code
15553 \begin_layout Plain Layout
15560 \begin_inset Flex Code
15563 \begin_layout Plain Layout
15570 \begin_inset Flex Code
15573 \begin_layout Plain Layout
15580 \begin_inset Flex Code
15583 \begin_layout Plain Layout
15592 \begin_layout Subsection
15593 \begin_inset CommandInset label
15602 \begin_layout Standard
15603 (引用ダイアログやツールチップなどの)LyX内部やXHTML出力において、書誌情報をどのように表示するべきかの叙述には、
15604 \begin_inset Flex Code
15607 \begin_layout Plain Layout
15613 ブロックが使用されています。このブロックは、以下のような形をしています。
15616 \begin_layout LyX-Code
15620 \begin_layout LyX-Code
15624 \begin_layout LyX-Code
15628 \begin_layout LyX-Code
15632 \begin_layout Standard
15633 上記の各行は、それぞれarticleやbookに関連付けられた書誌情報をどのように表示するべきかを定義するものですが、このような定義は、BibTeXファイル中に
15634 存在しうる「項目型」すべてについて与えることができます。特定の定義が与えられなければ、LyXは、ソースコード中に定義されている既定書式を使用します。LyXは、い
15636 \begin_inset Flex Code
15639 \begin_layout Plain Layout
15645 ファイルで事前定義しており、これはほとんどのLyX文書クラスにインクルードされています。
15648 \begin_layout Standard
15649 この定義は、BibTeXキーをその値で置換できる機能を持った、簡単な言語を使用しています。キーは、
15650 \begin_inset Flex Code
15653 \begin_layout Plain Layout
15660 \begin_inset Flex Code
15663 \begin_layout Plain Layout
15669 記号でくくらなくてはなりません。したがって、簡単な定義は以下のようになります。
15672 \begin_layout LyX-Code
15674 \begin_inset Quotes eld
15678 \begin_inset Quotes erd
15684 \begin_layout Standard
15685 これは、「著者名・コンマ・引用に囲まれたタイトル・終止符」を出力します。
15688 \begin_layout Standard
15689 もちろん、キーが存在するときのみ、キーを出力したい時があるはずです。このようなときには
15690 \begin_inset Flex Code
15693 \begin_layout Plain Layout
15695 \begin_inset space ~
15703 のように、条件付きの構成を使用することができます。これは、
15704 \begin_inset Flex Code
15707 \begin_layout Plain Layout
15714 \begin_inset space ~
15717 」とvolumeキーを出力するという意味です。また、
15718 \begin_inset Newline newline
15722 \begin_inset Flex Code
15725 \begin_layout Plain Layout
15726 {%author%[[%author%]][[%editor%, ed.]]}
15732 \begin_inset Newline newline
15735 のように、条件の中にelse節を含めることも可能です。ここでは、もし
15736 \begin_inset Flex Code
15739 \begin_layout Plain Layout
15745 キーが存在するならば出力され、そうでなければeditorキーと「,
15746 \begin_inset space ~
15749 ed.」が出力されます。ここでもキーは、
15750 \begin_inset Flex Code
15753 \begin_layout Plain Layout
15759 記号でくくられていることに注意してください。条件全体は、波括弧で囲まれています。if節およびelse節は、「
15760 \begin_inset Flex Code
15763 \begin_layout Plain Layout
15770 \begin_inset Flex Code
15773 \begin_layout Plain Layout
15779 」の二重角括弧で囲まれています。これらすべてのあいだには,空白は入ってはなりません。
15782 \begin_layout Standard
15783 もう一つ、定義中で使用することのできる文法として、
15784 \begin_inset Flex Code
15787 \begin_layout Plain Layout
15793 という形をしたものがあります。これは、「リッチテキスト」を生成するときに使われる整形情報を定義するものです。当然のことながら、平文を書き出すときには、HTMLタ
15794 グを出力させたくはありませんから、HTMLタグは「
15795 \begin_inset Flex Code
15798 \begin_layout Plain Layout
15805 \begin_inset Flex Code
15808 \begin_layout Plain Layout
15814 」でくるんでやらなくてはならないのです。
15817 \begin_layout Standard
15818 \begin_inset Flex Code
15821 \begin_layout Plain Layout
15827 ブロックでは、他に2つの特殊な定義が可能です。一つめの例としては、
15830 \begin_layout LyX-Code
15832 \begin_inset Quotes eld
15836 \begin_inset Quotes erd
15842 \begin_layout Standard
15843 といった例が挙げられます。これは、短縮形ないしはマクロであり、
15844 \begin_inset Flex Code
15847 \begin_layout Plain Layout
15853 のように、これがキーであるかのように扱って使用することができます。LyXは、
15854 \begin_inset Flex Code
15857 \begin_layout Plain Layout
15863 を、そこで定義されているものを扱う場合と同じように取り扱います。ですから、明白な警告を敢えてさせて頂くと、
15866 \begin_layout LyX-Code
15870 \begin_layout Standard
15871 のようなことはしないでください。LyXは、無限ループに陥るようなことはありませんが、諦めるまでに長いループに入るかもしれません。
15874 \begin_layout Standard
15878 \begin_layout LyX-Code
15882 \begin_layout Standard
15883 のようなものです。これは、文字列の翻訳可能な部分を定義するもので、書誌情報中の関連部分が翻訳されるようにすることができます。
15884 \begin_inset Flex Code
15887 \begin_layout Plain Layout
15893 のように、これをキーとして扱って、定義の中に入れることもできます。これらのうちいくつかは、
15894 \begin_inset Flex Code
15897 \begin_layout Plain Layout
15903 中に事前定義されています。これは、上記で述べたような意味でのマクロではないことに注意してください。
15906 \begin_layout Standard
15907 以下は、これらの機能を全て使った例です。
15908 \begin_inset VSpace defskip
15914 \begin_layout Standard
15918 !authoredit {%author%[[%author%, ]][[{%editor%[[%editor%, %_edtext%, ]]}]]}
15921 \begin_layout Standard
15922 \begin_inset VSpace defskip
15926 \begin_inset Flex Code
15929 \begin_layout Plain Layout
15935 キーが定義されているならば、著者とコンマを出力し、
15936 \begin_inset Flex Code
15939 \begin_layout Plain Layout
15946 \begin_inset Flex Code
15949 \begin_layout Plain Layout
15955 キーが定義されているならば、編集者名の後に
15956 \begin_inset Flex Code
15959 \begin_layout Plain Layout
15965 ないしはその翻訳(既定では「ed.」)を出力します。これは実は
15966 \begin_inset Flex Code
15969 \begin_layout Plain Layout
15975 の中で定義されていますので、このファイルをまず読みこめば、ご自身の定義ないしは再定義の中で使用することができます。
15978 \begin_layout Section
15979 \begin_inset CommandInset label
15981 name "sec:XHTML出力のタグ"
15988 \begin_layout Standard
15989 LaTeXやDocBookと同様、LyXのXHTML出力の書式も、レイアウト情報によって制御することができます。一般的に、LyXは適切な既定値を提供し、前述した
15990 ように、他のレイアウトタグに基づいて、既定のCSSスタイルの構成まで行ないます。たとえば、章見出しを適切に整形するためのCSSを書き出すために、LyXは、章様式
15992 \begin_inset Flex Code
15995 \begin_layout Plain Layout
16001 宣言で提供されている情報を利用しようと試みます。
16004 \begin_layout Standard
16005 したがって、多くの場合、使いたい環境やユーザ設定差込枠などのために満足のいくXHTML出力を得るために、まったく何もしなくてよいことになるでしょう。しかしながら
16006 、これが必要になる場合もあるので、LyXは、生成されるXHTMLやCSSをカスタマイズするために使用できるレイアウトタグを、たくさん提供しています。
16009 \begin_layout Standard
16010 様式宣言や差込枠宣言の外で使用することができるタグに、
16011 \begin_inset Flex Code
16014 \begin_layout Plain Layout
16021 \begin_inset Flex Code
16024 \begin_layout Plain Layout
16030 の2つがあることに注意してください。これらの詳細については、第
16031 \begin_inset CommandInset ref
16033 reference "sub:汎用テキストクラスパラメータ"
16040 \begin_layout Subsection
16041 \begin_inset CommandInset label
16043 name "sub:段落様式-XHTML"
16050 \begin_layout Standard
16051 LyXが段落のために出力するXHTMLの種類は、通常の段落を取り扱っているのか、コマンドを取り扱っているのか、あるいは環境を取り扱っているのかに依存し、これは対
16053 \begin_inset Flex Code
16056 \begin_layout Plain Layout
16065 \begin_layout Standard
16066 コマンドや通常の段落の場合には、XHTML出力は以下の形になります。
16069 \begin_layout LyX-Code
16071 \begin_inset Quotes erd
16075 \begin_inset Quotes erd
16081 \begin_layout LyX-Code
16083 \begin_inset Quotes erd
16087 \begin_inset Quotes erd
16093 \begin_layout LyX-Code
16097 \begin_layout LyX-Code
16101 \begin_layout Standard
16102 もちろん、段落にラベルがなければ、ラベルタグは省略することができます。
16105 \begin_layout Standard
16106 環境のうち、リストの変種でないものに関しては、XHTMLは以下の形を取ります。
16109 \begin_layout LyX-Code
16111 \begin_inset Quotes erd
16115 \begin_inset Quotes erd
16121 \begin_layout LyX-Code
16123 \begin_inset Quotes erd
16127 \begin_inset Quotes erd
16131 \begin_inset Quotes erd
16135 \begin_inset Quotes erd
16138 >環境ラベル</labeltag>最初の段落。
16141 \begin_layout LyX-Code
16145 \begin_layout LyX-Code
16146 <itemtag>二つめの段落。</itemtag>
16149 \begin_layout LyX-Code
16153 \begin_layout Standard
16154 ラベルは、たとえば定理の場合にそうであるように、最初の段落にだけ出力されることに注意してください。
16157 \begin_layout Standard
16158 リストに関しては、次のような形になります。
16161 \begin_layout LyX-Code
16163 \begin_inset Quotes erd
16167 \begin_inset Quotes erd
16173 \begin_layout LyX-Code
16175 \begin_inset Quotes erd
16179 \begin_inset Quotes erd
16183 \begin_inset Quotes erd
16187 \begin_inset Quotes erd
16190 >リストのラベル</labeltag>最初の項目。</itemtag>
16193 \begin_layout LyX-Code
16195 \begin_inset Quotes erd
16199 \begin_inset Quotes erd
16203 \begin_inset Quotes erd
16207 \begin_inset Quotes erd
16210 >リストのラベル</labeltag>二つめの項目。</itemtag>
16213 \begin_layout LyX-Code
16217 \begin_layout LyX-Code
16221 \begin_layout LyX-Code
16223 \begin_inset Quotes erd
16227 \begin_inset Quotes erd
16233 \begin_layout LyX-Code
16235 \begin_inset Quotes erd
16239 \begin_inset Quotes erd
16242 >リストのラベル</labeltag><itemtag attr=
16243 \begin_inset Quotes erd
16247 \begin_inset Quotes erd
16253 \begin_layout LyX-Code
16255 \begin_inset Quotes erd
16259 \begin_inset Quotes erd
16262 >リストのラベル</labeltag><itemtag attr=
16263 \begin_inset Quotes erd
16267 \begin_inset Quotes erd
16273 \begin_layout LyX-Code
16277 \begin_layout Standard
16279 \begin_inset Flex Code
16282 \begin_layout Plain Layout
16289 \begin_inset Flex Code
16292 \begin_layout Plain Layout
16298 の順序が違っていることに注意してください。どちらの順序になるかは、
16299 \begin_inset Flex Code
16302 \begin_layout Plain Layout
16309 \begin_inset Flex Code
16312 \begin_layout Plain Layout
16318 が偽であれば(既定値)、最初のケースのようになり、これが真であれば、二番めのケースのように、labelがitemの外側に来るようになります。
16321 \begin_layout Standard
16322 各段落の特定のタグ出力や属性出力は、以下に述べるようなレイアウトタグを使って制御することができます。しかしながら、前述のように、多くの場合、LyXは適切な既定値
16323 を生成するので、たいしたことをしなくても、望ましいXHTML出力を得ることができるということになるはずです。ここで利用出来るタグは、自分の好みにあわせて微調整す
16324 る目的でここにあるものと考えてください。
16327 \begin_layout Description
16328 \begin_inset Flex Code
16331 \begin_layout Plain Layout
16338 \begin_inset Flex Code
16341 \begin_layout Plain Layout
16347 ] 主幹タグと共に出力される属性情報を指定します。たとえば、「
16348 \begin_inset Flex Code
16351 \begin_layout Plain Layout
16357 」のようなものです。既定においては、LyXは「
16358 \begin_inset Flex Code
16361 \begin_layout Plain Layout
16368 \begin_inset Flex Code
16371 \begin_layout Plain Layout
16377 は、レイアウトのLyX名であり、chapterのように小文字で記述します。
16380 \begin_layout Description
16381 \begin_inset Flex Code
16384 \begin_layout Plain Layout
16391 \begin_inset Flex Code
16394 \begin_layout Plain Layout
16403 \begin_inset space \thinspace{}
16407 \begin_inset Flex Code
16410 \begin_layout Plain Layout
16417 \begin_inset Flex Code
16420 \begin_layout Plain Layout
16426 で追加情報が明示的に与えられているときでも、LyXがこのレイアウト用に生成する既定CSS情報を出力するか否か。これを
16427 \begin_inset Flex Code
16430 \begin_layout Plain Layout
16436 にすると、生成されたCSSを完全に上書きする代わりに、変更したり追加したりすることができます。既定値は
16437 \begin_inset Flex Code
16440 \begin_layout Plain Layout
16449 \begin_layout Description
16450 \begin_inset Flex Code
16453 \begin_layout Plain Layout
16460 \begin_inset Flex Code
16463 \begin_layout Plain Layout
16469 ] 環境の段落に使用されるタグ。上記各例の
16470 \begin_inset Flex Code
16473 \begin_layout Plain Layout
16480 \begin_inset Flex Code
16483 \begin_layout Plain Layout
16492 \begin_layout Description
16493 \begin_inset Flex Code
16496 \begin_layout Plain Layout
16503 \begin_inset Flex Code
16506 \begin_layout Plain Layout
16513 \begin_inset Flex Code
16516 \begin_layout Plain Layout
16517 class=`レイアウト名_item'
16527 \begin_inset Flex Code
16530 \begin_layout Plain Layout
16539 \begin_layout Description
16540 \begin_inset Flex Code
16543 \begin_layout Plain Layout
16550 \begin_inset Flex Code
16553 \begin_layout Plain Layout
16559 ] 段落と項目ラベルに使用されるタグ。上記各例の
16560 \begin_inset Flex Code
16563 \begin_layout Plain Layout
16570 \begin_inset Flex Code
16573 \begin_layout Plain Layout
16580 \begin_inset Flex Code
16583 \begin_layout Plain Layout
16590 \begin_inset Flex Code
16593 \begin_layout Plain Layout
16594 Centered_Top_Environment
16600 \begin_inset Flex Code
16603 \begin_layout Plain Layout
16610 \begin_inset Flex Code
16613 \begin_layout Plain Layout
16622 \begin_layout Description
16623 \begin_inset Flex Code
16626 \begin_layout Plain Layout
16633 \begin_inset Flex Code
16636 \begin_layout Plain Layout
16643 \begin_inset Flex Code
16646 \begin_layout Plain Layout
16647 class=`レイアウト名_label'
16657 \begin_inset Flex Code
16660 \begin_layout Plain Layout
16669 \begin_layout Description
16670 \begin_inset Flex Code
16673 \begin_layout Plain Layout
16680 \begin_inset Flex Code
16683 \begin_layout Plain Layout
16692 \begin_inset space \thinspace{}
16696 \begin_inset Flex Code
16699 \begin_layout Plain Layout
16705 ] このタグは、リスト関係環境でのみ意味を持ち、labelタグが、itemタグの前に出力されるか、中に出力されるかを制御します。これは、たとえば、descrip
16707 \begin_inset Flex Code
16710 \begin_layout Plain Layout
16711 `<dt>\SpecialChar \ldots{}
16712 </dt><dd>\SpecialChar \ldots{}
16718 という形を得るために使用されます。既定値は
16719 \begin_inset Flex Code
16722 \begin_layout Plain Layout
16728 で、labelタグはitemタグの中に出力されます。
16731 \begin_layout Description
16732 \begin_inset Flex Code
16735 \begin_layout Plain Layout
16742 \begin_inset Flex Code
16745 \begin_layout Plain Layout
16751 セクションに出力される情報。これは、たとえば、
16752 \begin_inset Flex Code
16755 \begin_layout Plain Layout
16762 \begin_inset Flex Code
16765 \begin_layout Plain Layout
16771 ブロックをインクルードするのに使用することができます。
16774 \begin_layout Description
16775 \begin_inset Flex Code
16778 \begin_layout Plain Layout
16784 この様式が使用されたときに、インクルードするCSSスタイル情報。これは、レイアウトが生成する
16785 \begin_inset Flex Code
16788 \begin_layout Plain Layout
16794 ブロックで自動的に包まれますので、CSS自体をインクルードするだけで大丈夫です。
16797 \begin_layout Description
16798 \begin_inset Flex Code
16801 \begin_layout Plain Layout
16808 \begin_inset Flex Code
16811 \begin_layout Plain Layout
16817 ] 主幹ラベルに使用されるタグ。上記各例の
16818 \begin_inset Flex Code
16821 \begin_layout Plain Layout
16828 \begin_inset Flex Code
16831 \begin_layout Plain Layout
16840 \begin_layout Description
16841 \begin_inset Flex Code
16844 \begin_layout Plain Layout
16851 \begin_inset Flex Code
16854 \begin_layout Plain Layout
16863 \begin_inset space \thinspace{}
16867 \begin_inset Flex Code
16870 \begin_layout Plain Layout
16877 \begin_inset Flex Code
16880 \begin_layout Plain Layout
16886 タグを生成するのに使用する様式であるという印をつけます。既定値は偽です。
16887 \begin_inset Flex Code
16890 \begin_layout Plain Layout
16897 \begin_inset Flex Code
16900 \begin_layout Plain Layout
16909 \begin_layout Subsection
16913 \begin_layout Standard
16914 差込枠のXHTML出力も、レイアウトファイル内の情報によって制御することができます
16918 \begin_layout Plain Layout
16919 現在のところ、これは「テキスト」差込枠(中に書き込みができる差込枠)にのみ有効で、「コマンド」差込枠(ダイアログボックスに関連付けられた差込枠)には適用されませ
16925 。ここでも、LyXは適切な既定値を提供しようと試み、既定のCSS様式を構成します。しかし、すべてカスタマイズ可能です。
16928 \begin_layout Standard
16929 LyXが差込枠用に出力するXHTMLは、以下の形を取ります。
16932 \begin_layout LyX-Code
16934 \begin_inset Quotes erd
16938 \begin_inset Quotes erd
16944 \begin_layout LyX-Code
16945 <labeltag>ラベル</labeltag>
16948 \begin_layout LyX-Code
16950 \begin_inset Quotes erd
16954 \begin_inset Quotes erd
16957 >差込枠の内容。</innertag>
16960 \begin_layout LyX-Code
16964 \begin_layout Standard
16965 差込枠が多段落を許可している---つまり
16966 \begin_inset Flex Code
16969 \begin_layout Plain Layout
16975 が真---ならば、差込枠の内容は、それ自身段落として出力され、それらの段落に用いられる様式(標準、引用など)を用いて整形されます。もちろん、段落にラベルがなけれ
16976 ば、labelタグは省略され、ラベルがあれば、現在のところ、つねに
16977 \begin_inset Flex Code
16980 \begin_layout Plain Layout
16986 が用いられます。innerタグは非必須であり、既定では出力されません。各差込枠用に出力される特定のタグや属性は、以下のレイアウトタグによって制御することができま
16990 \begin_layout Description
16991 \begin_inset Flex Code
16994 \begin_layout Plain Layout
17001 \begin_inset Flex Code
17004 \begin_layout Plain Layout
17010 ] 主幹タグと共に出力される属性情報を指定します。たとえば、「
17011 \begin_inset Flex Code
17014 \begin_layout Plain Layout
17015 class=`myinset' onclick=`\SpecialChar \ldots{}
17021 」のようなものです。既定においては、LyXは「
17022 \begin_inset Flex Code
17025 \begin_layout Plain Layout
17032 \begin_inset Flex Code
17035 \begin_layout Plain Layout
17041 は、差込枠のLyX名であり、小文字で記述します。アルファベットや数字以外の文字は、アンダースコアに置き換えられます。
17044 \begin_layout Description
17045 \begin_inset Flex Code
17048 \begin_layout Plain Layout
17055 \begin_inset Flex Code
17058 \begin_layout Plain Layout
17069 \begin_inset Flex Code
17072 \begin_layout Plain Layout
17078 で追加情報が明示的に与えられているときでも、LyXがこのレイアウト用に生成する既定CSS情報を出力するか否か。これを
17079 \begin_inset Flex Code
17082 \begin_layout Plain Layout
17088 にすると、生成されたCSSを完全に上書きする代わりに、変更したり追加したりすることができます。既定値は
17089 \begin_inset Flex Code
17092 \begin_layout Plain Layout
17101 \begin_layout Description
17102 \begin_inset Flex Code
17105 \begin_layout Plain Layout
17112 \begin_inset Flex Code
17115 \begin_layout Plain Layout
17122 \begin_inset Flex Code
17125 \begin_layout Plain Layout
17134 \begin_layout Description
17135 \begin_inset Flex Code
17138 \begin_layout Plain Layout
17145 \begin_inset Flex Code
17148 \begin_layout Plain Layout
17155 \begin_inset Flex Code
17158 \begin_layout Plain Layout
17167 \begin_layout Description
17168 \begin_inset Flex Code
17171 \begin_layout Plain Layout
17178 \begin_inset Flex Code
17181 \begin_layout Plain Layout
17188 \begin_inset space \thinspace{}
17192 \begin_inset Flex Code
17195 \begin_layout Plain Layout
17203 ] この差込枠が(脚注のように)独立した文字列ブロックを表すのか、それとも、(派生枝のように)周囲の文字列の中に取り込まれる素材を表すのか。既定値は1です。
17206 \begin_layout Description
17207 \begin_inset Flex Code
17210 \begin_layout Plain Layout
17217 \begin_inset Flex Code
17220 \begin_layout Plain Layout
17226 ] 場合によっては、カウンタへの参照を含む、この差込枠のラベル。たとえば、脚注用には
17227 \begin_inset Flex Code
17230 \begin_layout Plain Layout
17238 など。これは非必須であり、既定値はありません。
17241 \begin_layout Description
17242 \begin_inset Flex Code
17245 \begin_layout Plain Layout
17252 \begin_inset Flex Code
17255 \begin_layout Plain Layout
17261 セクションに出力される情報。これは、たとえば、
17262 \begin_inset Flex Code
17265 \begin_layout Plain Layout
17272 \begin_inset Flex Code
17275 \begin_layout Plain Layout
17281 ブロックをインクルードするのに使用することができます。
17284 \begin_layout Description
17285 \begin_inset Flex Code
17288 \begin_layout Plain Layout
17294 この様式が使用されたときに、インクルードするCSSスタイル情報。これは、レイアウトが生成する
17295 \begin_inset Flex Code
17298 \begin_layout Plain Layout
17304 ブロックで自動的に包まれますので、CSS自体をインクルードするだけで大丈夫です。
17307 \begin_layout Description
17308 \begin_inset Flex Code
17311 \begin_layout Plain Layout
17318 \begin_inset Flex Code
17321 \begin_layout Plain Layout
17327 ] 主幹ラベルに使用されるタグ。上記各例の
17328 \begin_inset Flex Code
17331 \begin_layout Plain Layout
17338 \begin_inset Flex Code
17341 \begin_layout Plain Layout
17348 \begin_inset Flex Code
17351 \begin_layout Plain Layout
17358 \begin_inset Flex Code
17361 \begin_layout Plain Layout
17368 \begin_inset Flex Code
17371 \begin_layout Plain Layout
17380 \begin_layout Subsection
17384 \begin_layout Standard
17385 フロートのXHTML出力も、レイアウトファイル内の情報によって制御することができます。出力は、以下の形を取ります。
17388 \begin_layout LyX-Code
17390 \begin_inset Quotes erd
17394 \begin_inset Quotes erd
17400 \begin_layout LyX-Code
17404 \begin_layout LyX-Code
17408 \begin_layout Standard
17409 キャプションは、存在している場合には、独立した差込枠となり、そのような形で出力されます。その外観は、キャプション差込枠のInsetLayoutで制御することがで
17413 \begin_layout Description
17414 \begin_inset Flex Code
17417 \begin_layout Plain Layout
17424 \begin_inset Flex Code
17427 \begin_layout Plain Layout
17433 ] 主幹タグと共に出力される属性情報を指定します。たとえば、「
17434 \begin_inset Flex Code
17437 \begin_layout Plain Layout
17438 class=`myfloat' onclick=`\SpecialChar \ldots{}
17444 」のようなものです。既定においては、LyXは「
17445 \begin_inset Flex Code
17448 \begin_layout Plain Layout
17449 class=`float フロート-フロート型'
17455 \begin_inset Flex Code
17458 \begin_layout Plain Layout
17465 \begin_inset CommandInset ref
17467 reference "sub:フロート"
17471 参照)、この型のフロートのLyX名です。ただし、これは小文字に変換され、アルファベットや数字でない文字はアンダースコアに変換されます。例:float-table
17475 \begin_layout Description
17476 \begin_inset Flex Code
17479 \begin_layout Plain Layout
17485 このフロートが使用されたときに、インクルードするCSSスタイル情報。これは、レイアウトが生成する
17486 \begin_inset Flex Code
17489 \begin_layout Plain Layout
17495 ブロックで自動的に包まれますので、CSS自体をインクルードするだけで大丈夫です。
17498 \begin_layout Description
17499 \begin_inset Flex Code
17502 \begin_layout Plain Layout
17509 \begin_inset Flex Code
17512 \begin_layout Plain Layout
17518 ] このフロートに使用されるタグ。上記各例の
17519 \begin_inset Flex Code
17522 \begin_layout Plain Layout
17529 \begin_inset Flex Code
17532 \begin_layout Plain Layout
17538 であり、ほとんどの場合変更する必要はありません。
17541 \begin_layout Subsection
17545 \begin_layout Standard
17547 \begin_inset Flex Code
17550 \begin_layout Plain Layout
17556 ブロックを使用して整形することができます。詳細については、第
17557 \begin_inset CommandInset ref
17559 reference "sub:引用書式指定"
17566 \begin_layout Subsection
17570 \begin_layout Standard
17571 LyXは、提供されている他のレイアウト情報に基づいて、差込枠と段落様式の両方の既定CSS様式ルールを生成ということすることを、これまでに何度か触れました。この節
17572 では、LyXがどのレイアウト情報を、どのように使うのか、ひとこと述べておきたいと思います。
17575 \begin_layout Standard
17577 \begin_inset Flex Code
17580 \begin_layout Plain Layout
17587 \begin_inset Flex Code
17590 \begin_layout Plain Layout
17597 \begin_inset Flex Code
17600 \begin_layout Plain Layout
17607 \begin_inset Flex Code
17610 \begin_layout Plain Layout
17617 \begin_inset Flex Code
17620 \begin_layout Plain Layout
17626 を利用して、フォント情報についてのみCSSを自動生成します(第
17627 \begin_inset CommandInset ref
17629 reference "sub:フォント指定"
17633 節を参照)。この変換は、きわめて分かりやすく自明です。たとえば、「
17634 \begin_inset Flex Code
17637 \begin_layout Plain Layout
17644 \begin_inset Flex Code
17647 \begin_layout Plain Layout
17648 font-family: sans-serif
17653 」になります。LyXの寸法とCSSの寸法のあいだの対応は、少し複雑ですが、それでも直感的に分かります。詳細については、
17654 \begin_inset Flex URL
17657 \begin_layout Plain Layout
17665 \begin_inset Flex Code
17668 \begin_layout Plain Layout
17677 \begin_layout Chapter
17681 \begin_layout Standard
17682 \begin_inset Box Shadowbox
17692 height_special "totalheight"
17695 \begin_layout Plain Layout
17696 【警告】本説明書のこの部分は、しばらく更新されていません。もちろんまだ正確であることを期待していますが、保証の限りではありません。
17704 \begin_layout Standard
17705 LyX外部のソースから素材を使用する方法は、取扱説明書
17709 で詳細にカバーされています。本章は、新種の素材を取り込む際に、舞台裏で何をする必要があるかをカバーします。
17712 \begin_layout Section
17716 \begin_layout Standard
17717 外部素材の機能は、ひな型の概念に基づいています。ひな型は、LyXがある型の素材とどのように橋渡しをするべきかを指定するものです。同梱物として、LyXは、Xfig
17718 の図や、様々なラスター形式画像、チェス棋譜、LilyPond楽譜用のひな型を事前に定義されたものとして含んでいます。実際に何が入っているかは、
17719 \begin_inset Flex MenuItem
17722 \begin_layout Plain Layout
17723 挿入\SpecialChar \menuseparator
17724 ファイル\SpecialChar \menuseparator
17730 メニューで見ることができます。さらに、特定の型の素材をサポートするのに、自分自身のひな型を作成することも可能です。後でどのようなことをすればいいか詳細に説明しま
17731 すが、できればあなたが作ったすべてのひな型を投稿して、我々がLyXの後の版に取り込むことができるようにしてくださることを希望します。
17734 \begin_layout Standard
17735 外部素材の機能におけるもう一つの基本的な発想は、最終素材の元となるオリジナルファイルと、書き出された文書や印刷された文書に取り込むための生成ファイルとを区別して
17737 \begin_inset Flex Code
17740 \begin_layout Plain Layout
17746 で作成した図の場合を考えてみましょう。Xfigアプリケーション自体は、
17747 \begin_inset Flex Code
17750 \begin_layout Plain Layout
17756 拡張子を持つオリジナルファイルを操作します。Xfigで図を作成したり変更したりして、作業が終われば
17757 \begin_inset Flex Code
17760 \begin_layout Plain Layout
17766 ファイルに保存します。この図をお使いの文書に取り込みたいときには、LaTeXファイルにそのままインクルードできるように、
17767 \begin_inset Flex Code
17770 \begin_layout Plain Layout
17776 を呼び出してPostScriptファイルを生成します。この場合には、
17777 \begin_inset Flex Code
17780 \begin_layout Plain Layout
17786 ファイルがオリジナルファイルであり、PostScriptファイルが生成ファイルになります。
17789 \begin_layout Standard
17790 この区別は、文書を執筆している最中に、素材を更新することができるようにするために重要です。さらに、これによって、複数の書き出し書式をサポートするために必要な柔軟
17791 性が提供されます。たとえば、平文テキストファイルの場合には、図を生のPostScriptファイルとして取り込むのは、とても褒められた発想とはいえません。むしろ、
17792 その図への参照だけを含めるか、最終出力が実際の画像に近いものとなるように画像からASCIIへの変換子を呼び出したいと考えることでしょう。LyXの外部素材マネジメ
17793 ントは、LyXがサポートする各書き出し書式別に仕分けしているので、ユーザがこれを行うことが可能となっています。
17796 \begin_layout Standard
17797 LyXの外部素材マネジメントは、書き出し書式によって異なる生成物をサポートすることの他に、編集・閲覧アプリケーションを緊密に統合することもサポートします。Xfi
17798 gの図の場合には、LyXの外部素材ダイアログからシングルクリックでオリジナルファイルをXfigで開くことができ、ダブルクリックすることで生成されたPostScr
17799 iptファイルをGhostviewで閲覧することができます。もうコマンドラインをもてあそんだり、オリジナルファイルや生成ファイルがどこにあるか探したり変更を加え
17800 るためにファイルブラウザをいじくり回す必要はないのです。このようにして、文書を執筆する際に必要となる多くのアプリケーションを最大限に利用し、最終的により生産性を
17804 \begin_layout Section
17808 \begin_layout Standard
17809 LyXに自製の外用ひな型を付け加えるのは、比較的簡単です。しかしながら、これを不用心に行ってしまうと、たいていの場合、簡単に濫用されてしまうようなセキュリティホ
17810 ールを作ってしまいがちであることを心に留めておいてください。したがって、これを実行に移す前に、第
17811 \begin_inset CommandInset ref
17813 reference "sec:セキュリティに関する論点"
17817 節のセキュリティに関する議論を読んでおいてください。
17820 \begin_layout Standard
17821 このことに言及した上で、あなたが作成した面白いひな型は、ぜひ投稿してください。
17824 \begin_layout Standard
17826 \begin_inset Flex Code
17829 \begin_layout Plain Layout
17830 LyXDir/lib/external_templates
17835 ファイルで定義されています。自分用の版を
17836 \begin_inset Flex Code
17839 \begin_layout Plain Layout
17840 UserDir/external_templates
17848 \begin_layout Standard
17849 典型的なひな型は以下のようになります。
17852 \begin_layout LyX-Code
17856 \begin_layout LyX-Code
17857 GuiName "XFig: $$AbsOrRelPathParent$$Basename"
17860 \begin_layout LyX-Code
17864 \begin_layout LyX-Code
17868 \begin_layout LyX-Code
17872 \begin_layout LyX-Code
17876 \begin_layout LyX-Code
17880 \begin_layout LyX-Code
17881 AutomaticProduction true
17884 \begin_layout LyX-Code
17888 \begin_layout LyX-Code
17892 \begin_layout LyX-Code
17897 \begin_layout Plain Layout
17907 \begin_layout LyX-Code
17908 TransformCommand Rotate RotationLatexCommand
17911 \begin_layout LyX-Code
17912 TransformCommand Resize ResizeLatexCommand
17915 \begin_layout LyX-Code
17916 Product "$$RotateFront$$ResizeFront
17919 \begin_layout LyX-Code
17924 input{$$AbsOrRelPathMaster$$Basename.pstex_t}
17927 \begin_layout LyX-Code
17928 $$ResizeBack$$RotateBack"
17931 \begin_layout LyX-Code
17935 \begin_layout LyX-Code
17936 UpdateResult "$$AbsPath$$Basename.pstex_t"
17939 \begin_layout LyX-Code
17940 Requirement "graphicx"
17943 \begin_layout LyX-Code
17944 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
17947 \begin_layout LyX-Code
17948 ReferencedFile latex "$$AbsPath$$Basename.eps"
17951 \begin_layout LyX-Code
17952 ReferencedFile dvi "$$AbsPath$$Basename.eps"
17955 \begin_layout LyX-Code
17959 \begin_layout LyX-Code
17964 \begin_layout Plain Layout
17974 \begin_layout LyX-Code
17975 TransformCommand Rotate RotationLatexCommand
17978 \begin_layout LyX-Code
17979 TransformCommand Resize ResizeLatexCommand
17982 \begin_layout LyX-Code
17983 Product "$$RotateFront$$ResizeFront
17986 \begin_layout LyX-Code
17991 input{$$AbsOrRelPathMaster$$Basename.pdftex_t}
17994 \begin_layout LyX-Code
17995 $$ResizeBack$$RotateBack"
17998 \begin_layout LyX-Code
17999 UpdateFormat pdftex
18002 \begin_layout LyX-Code
18003 UpdateResult "$$AbsPath$$Basename.pdftex_t"
18006 \begin_layout LyX-Code
18007 Requirement "graphicx"
18010 \begin_layout LyX-Code
18011 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pdftex_t"
18014 \begin_layout LyX-Code
18015 ReferencedFile latex "$$AbsPath$$Basename.pdf"
18018 \begin_layout LyX-Code
18022 \begin_layout LyX-Code
18026 \begin_layout LyX-Code
18027 Product "$$Contents(
18029 "$$AbsPath$$Basename.asc
18034 \begin_layout LyX-Code
18035 UpdateFormat asciixfig
18038 \begin_layout LyX-Code
18039 UpdateResult "$$AbsPath$$Basename.asc"
18042 \begin_layout LyX-Code
18046 \begin_layout LyX-Code
18050 \begin_layout LyX-Code
18051 Product "<graphic fileref=
18053 "$$AbsOrRelPathMaster$$Basename.eps
18058 \begin_layout LyX-Code
18062 \begin_layout LyX-Code
18066 \begin_layout LyX-Code
18067 UpdateResult "$$AbsPath$$Basename.eps"
18070 \begin_layout LyX-Code
18071 ReferencedFile docbook "$$AbsPath$$Basename.eps"
18074 \begin_layout LyX-Code
18075 ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"
18078 \begin_layout LyX-Code
18082 \begin_layout LyX-Code
18083 Product "[XFig: $$FName]"
18086 \begin_layout LyX-Code
18090 \begin_layout LyX-Code
18094 \begin_layout Standard
18096 \begin_inset Flex Code
18099 \begin_layout Plain Layout
18105 \SpecialChar \ldots{}
18107 \begin_inset Flex Code
18110 \begin_layout Plain Layout
18116 で閉じられます。ひな型には、一般的な設定を行うヘッダ部と、サポートされている主要な文書ファイル形式の設定を行う
18117 \begin_inset Flex Code
18120 \begin_layout Plain Layout
18126 \SpecialChar \ldots{}
18128 \begin_inset Flex Code
18131 \begin_layout Plain Layout
18140 \begin_layout Subsection
18144 \begin_layout Description
18145 \begin_inset Flex Code
18148 \begin_layout Plain Layout
18149 AutomaticProduction
18150 \begin_inset space ~
18158 このひな型で扱うファイルをLyXが生成しなくてはならないか否か。このコマンドは、一度だけ必ず現れなくてはなりません。
18161 \begin_layout Description
18162 \begin_inset Flex Code
18165 \begin_layout Plain Layout
18167 \begin_inset space ~
18175 望むファイル群を表示するために、ファイルダイアログで使用するフィルタ用globパターン。2つ以上のファイル拡張子があり得る場合(たとえば、tgifには
18176 \begin_inset Flex Code
18179 \begin_layout Plain Layout
18186 \begin_inset Flex Code
18189 \begin_layout Plain Layout
18196 \begin_inset Flex Code
18199 \begin_layout Plain Layout
18205 」の様なパターンを使用してください。このコマンドは、一度だけ必ず現れなくてはなりません。
18208 \begin_layout Description
18209 \begin_inset Flex Code
18212 \begin_layout Plain Layout
18214 \begin_inset space ~
18222 この文字列はボタン上に表示されます。このコマンドは、一度だけ必ず現れなくてはなりません。
18225 \begin_layout Description
18226 \begin_inset Flex Code
18229 \begin_layout Plain Layout
18231 \begin_inset space ~
18235 \begin_inset space ~
18243 外部素材ダイアログで使用されるヘルプ文。このひな型がユーザに何を提供できるのか、ユーザに説明するのに十分な情報を盛り込んでください。このコマンドは、一度だけ必
18247 \begin_layout Description
18248 \begin_inset Flex Code
18251 \begin_layout Plain Layout
18253 \begin_inset space ~
18261 オリジナルファイルのファイル形式。これは、LyXが知っている書式名でなくてはなりません(第
18262 \begin_inset CommandInset ref
18264 reference "sec:ファイル形式"
18268 章参照)。このひな型が、2つ以上の書式のオリジナルファイルを取り扱える場合は、「
18269 \begin_inset Flex Code
18272 \begin_layout Plain Layout
18278 」を使用してください。この場合、LyXはファイル形式を推定するために、ファイル自体に詮索を試みます。このコマンドは、一度だけ必ず現れなくてはなりません。
18281 \begin_layout Description
18282 \begin_inset Flex Code
18285 \begin_layout Plain Layout
18287 \begin_inset space ~
18295 このひな型の(他と重複しない)名称。代入マクロを含めてはなりません(下記参照)。
18298 \begin_layout Description
18299 \begin_inset Flex Code
18302 \begin_layout Plain Layout
18304 \begin_inset space ~
18307 Rotate|Resize|Clip|Extra
18312 このコマンドは、このひな型がどのような変換をサポートしているかを指定します。これは全く登場しなくても1回以上現れても構いません。このコマンドは、外部素材ダイア
18313 ログ中の対応するタブを使用可能にします。
18314 \begin_inset Flex Code
18317 \begin_layout Plain Layout
18324 \begin_inset Flex Code
18327 \begin_layout Plain Layout
18334 \begin_inset Flex Code
18337 \begin_layout Plain Layout
18344 \begin_inset Flex Code
18347 \begin_layout Plain Layout
18353 コマンドを置かなくてはなりません。これを行わないと、この書式での変換はサポートされません。
18356 \begin_layout Subsection
18357 \begin_inset Flex Code
18360 \begin_layout Plain Layout
18369 \begin_layout Description
18370 \begin_inset Flex Code
18373 \begin_layout Plain Layout
18375 \begin_inset space ~
18382 \begin_layout Plain Layout
18393 \begin_layout Plain Layout
18400 eX|PlainText|DocBook
18405 この書式定義が定める主要な文書ファイル形式。すべてのひな型が、全文書ファイル形式に対して意味のある表示ができるわけではありません。それでも、全書式に対して
18406 \begin_inset Flex Code
18409 \begin_layout Plain Layout
18415 部を定義してください。表示する方法がないときは、ダミーテキストを使用してください。これによって、書き出した文書内で、少なくとも外部素材への参照を見ることができる
18419 \begin_layout Description
18420 \begin_inset Flex Code
18423 \begin_layout Plain Layout
18425 \begin_inset space ~
18429 \begin_inset space ~
18438 \begin_inset Flex Code
18441 \begin_layout Plain Layout
18448 \begin_inset Flex Code
18451 \begin_layout Plain Layout
18458 \begin_inset Flex Code
18461 \begin_layout Plain Layout
18467 自体にも代入マクロを使うことができます。
18468 \begin_inset Flex Code
18471 \begin_layout Plain Layout
18478 \begin_inset Flex Code
18481 \begin_layout Plain Layout
18488 \begin_inset Flex Code
18491 \begin_layout Plain Layout
18497 に代入された値が、その文書書式で有効な非必須引数となるように健全化されることです。このコマンドは全く登場しなくても1回以上現れても構いません。
18500 \begin_layout Description
18501 \begin_inset Flex Code
18504 \begin_layout Plain Layout
18506 \begin_inset space ~
18514 書き出された文書に挿入される文。実のところ、これが最も重要なコマンドであり、とても複雑になることがあります。このコマンドは、一度だけ必ず現れなくてはなりません
18518 \begin_layout Description
18519 \begin_inset Flex Code
18522 \begin_layout Plain Layout
18524 \begin_inset space ~
18532 このコマンドは、LaTeXプリアンブルに入れるプリアンブル片を指定します。これは
18533 \begin_inset Flex Code
18536 \begin_layout Plain Layout
18542 \SpecialChar \ldots{}
18544 \begin_inset Flex Code
18547 \begin_layout Plain Layout
18553 を使用して定義しなくてはなりません。このコマンドは全く登場しなくても1回以上現れても構いません。
18556 \begin_layout Description
18557 \begin_inset Flex Code
18560 \begin_layout Plain Layout
18562 \begin_inset space ~
18566 \begin_inset space ~
18574 このコマンドは、変換過程で生成され、特定の書き出し書式に必要とされるファイルを示します。ファイル名が相対パスである場合には、親文書に対する相対パスとして解釈さ
18575 れます。このコマンドは全く登場しなくても1回以上現れても構いません。
18578 \begin_layout Description
18579 \begin_inset Flex Code
18582 \begin_layout Plain Layout
18584 \begin_inset space ~
18592 必要とされるLaTeXパッケージ名。パッケージは、LaTeXプリアンブル中で
18593 \begin_inset Flex Code
18596 \begin_layout Plain Layout
18604 を使って取り込まれます。このコマンドは全く登場しなくても1回以上現れても構いません。
18607 \begin_layout Description
18608 \begin_inset Flex Code
18611 \begin_layout Plain Layout
18613 \begin_inset space ~
18617 \begin_inset space ~
18620 RotationLatexCommand
18625 このコマンドは、回転用に、組み込みのLaTeXコマンドを使用するように指定します。このコマンドは、1回現れても全く現れなくても構いません。
18628 \begin_layout Description
18629 \begin_inset Flex Code
18632 \begin_layout Plain Layout
18634 \begin_inset space ~
18638 \begin_inset space ~
18646 このコマンドは、伸縮用に、組み込みのLaTeXコマンドを使用するように指定します。このコマンドは、1回現れても全く現れなくても構いません。
18649 \begin_layout Description
18650 \begin_inset Flex Code
18653 \begin_layout Plain Layout
18655 \begin_inset space ~
18659 \begin_inset space ~
18662 RotationLatexOption
18667 このコマンドは、回転が非必須引数を通じて行われるように指定します。このコマンドは、1回現れても全く現れなくても構いません。
18670 \begin_layout Description
18671 \begin_inset Flex Code
18674 \begin_layout Plain Layout
18676 \begin_inset space ~
18680 \begin_inset space ~
18688 このコマンドは、伸縮が非必須引数を通じて行われるように指定します。このコマンドは、1回現れても全く現れなくても構いません。
18691 \begin_layout Description
18692 \begin_inset Flex Code
18695 \begin_layout Plain Layout
18697 \begin_inset space ~
18701 \begin_inset space ~
18709 このコマンドは、切り抜きが非必須引数を通じて行われるように指定します。このコマンドは、1回現れても全く現れなくても構いません。
18712 \begin_layout Description
18713 \begin_inset Flex Code
18716 \begin_layout Plain Layout
18718 \begin_inset space ~
18722 \begin_inset space ~
18730 このコマンドは、追加の非必須引数を使用することを指定します。このコマンドは、1回現れても全く現れなくても構いません。
18733 \begin_layout Description
18734 \begin_inset Flex Code
18737 \begin_layout Plain Layout
18739 \begin_inset space ~
18747 変換されたファイルのファイル形式。これは、LyXが知っている書式名でなくてはなりません(
18748 \begin_inset Flex MenuItem
18751 \begin_layout Plain Layout
18752 ツール\SpecialChar \menuseparator
18758 ダイアログを参照)。このコマンドは、一度だけ必ず現れなくてはなりません。
18761 \begin_layout Description
18762 \begin_inset Flex Code
18765 \begin_layout Plain Layout
18767 \begin_inset space ~
18775 変換されたファイルのファイル名。ファイル名は絶対パスでなくてはなりません。このコマンドは、一度だけ必ず現れなくてはなりません。
18778 \begin_layout Subsection
18782 \begin_layout Standard
18784 \begin_inset Flex Code
18787 \begin_layout Plain Layout
18793 \SpecialChar \ldots{}
18795 \begin_inset Flex Code
18798 \begin_layout Plain Layout
18804 で囲んだプリアンブル定義を追加することができます。これらの定義は、ひな型の
18805 \begin_inset Flex Code
18808 \begin_layout Plain Layout
18817 \begin_layout Section
18821 \begin_layout Standard
18822 外部素材機構が外部プログラムを呼び出すときには、ひな型設定ファイルで定義されたコマンドにしたがって行われます。これらのコマンドには、実行前に展開されるマクロをい
18823 ろいろ入れることができます。実行は、つねに元の文書があるディレクトリで行われます。
18826 \begin_layout Standard
18827 また、外部素材が表示されるときにはいつでも、その名称は代入機構によって組み立てられ、ひな型定義中の他のほとんどのコマンドも代入をサポートしています。
18830 \begin_layout Standard
18834 \begin_layout Description
18835 \begin_inset Flex Code
18838 \begin_layout Plain Layout
18839 $$AbsOrRelPathMaster
18844 LyX親文書への絶対ファイルパスないしは相対ファイルパス
18847 \begin_layout Description
18848 \begin_inset Flex Code
18851 \begin_layout Plain Layout
18852 $$AbsOrRelPathParent
18857 LyX文書への絶対ファイルパスないしは相対ファイルパス
18860 \begin_layout Description
18861 \begin_inset Flex Code
18864 \begin_layout Plain Layout
18873 \begin_layout Description
18874 \begin_inset Flex Code
18877 \begin_layout Plain Layout
18886 \begin_layout Description
18887 \begin_inset Flex Code
18890 \begin_layout Plain Layout
18892 \begin_inset Quotes eld
18896 \begin_inset Quotes erd
18905 \begin_inset Flex Code
18908 \begin_layout Plain Layout
18914 と云う名のファイルの中身を展開します。
18917 \begin_layout Description
18918 \begin_inset Flex Code
18921 \begin_layout Plain Layout
18930 \begin_layout Description
18931 \begin_inset Flex Code
18934 \begin_layout Plain Layout
18940 外部素材ダイアログで指定されたファイルのファイル名。これはLyX文書への絶対パスでも良いですし、相対パスでも構いません。
18943 \begin_layout Description
18944 \begin_inset Flex Code
18947 \begin_layout Plain Layout
18954 \begin_inset Flex Code
18957 \begin_layout Plain Layout
18963 のパス部分(LyX文書への絶対パス名か相対パス名)
18966 \begin_layout Description
18967 \begin_inset Flex Code
18970 \begin_layout Plain Layout
18979 \begin_layout Description
18980 \begin_inset Flex Code
18983 \begin_layout Plain Layout
18992 \begin_layout Description
18993 \begin_inset Flex Code
18996 \begin_layout Plain Layout
19002 このマクロは、システムディレクトリの絶対パスを展開します。これは、典型的には、LyXに同梱されているヘルパースクリプト群を示したりするのに使用されます。
19005 \begin_layout Description
19006 \begin_inset Flex Code
19009 \begin_layout Plain Layout
19015 元の文書が閉じられたり、挿入されていた外部素材が削除されたりすると自動的に削除される一時ファイルのフルパスとファイル名。
19018 \begin_layout Standard
19019 パスを示すマクロはすべて最後のディレクトリ区切りも含んでいますので、たとえば絶対パスのファイル名を
19020 \begin_inset Flex Code
19023 \begin_layout Plain Layout
19024 $$AbsPath$$Basename$$Extension
19032 \begin_layout Standard
19033 上記マクロは、特記しない限りはすべてのコマンドで代入が行われます。
19034 \begin_inset Flex Code
19037 \begin_layout Plain Layout
19044 \begin_inset Flex Code
19047 \begin_layout Plain Layout
19054 \begin_inset Flex Code
19057 \begin_layout Plain Layout
19063 コマンドは、これらに加えて以下の代入もサポートします。
19066 \begin_layout Description
19067 \begin_inset Flex Code
19070 \begin_layout Plain Layout
19079 \begin_layout Description
19080 \begin_inset Flex Code
19083 \begin_layout Plain Layout
19092 \begin_layout Description
19093 \begin_inset Flex Code
19096 \begin_layout Plain Layout
19105 \begin_layout Description
19106 \begin_inset Flex Code
19109 \begin_layout Plain Layout
19118 \begin_layout Standard
19119 \begin_inset Flex Code
19122 \begin_layout Plain Layout
19129 \begin_inset Flex Code
19132 \begin_layout Plain Layout
19139 \begin_inset Flex Code
19142 \begin_layout Plain Layout
19148 コマンドが有効にされていれば、以下の代入もサポートされます。
19151 \begin_layout Description
19152 \begin_inset Flex Code
19155 \begin_layout Plain Layout
19164 \begin_layout Description
19165 \begin_inset Flex Code
19168 \begin_layout Plain Layout
19177 \begin_layout Description
19178 \begin_inset Flex Code
19181 \begin_layout Plain Layout
19190 \begin_layout Description
19191 \begin_inset Flex Code
19194 \begin_layout Plain Layout
19203 \begin_layout Standard
19204 どうしてこんなに多くのパス関連マクロがあるのか不思議に思われるかもしれません。主に以下の二つの理由があります。
19207 \begin_layout Enumerate
19208 相対ファイル名と絶対ファイル名は、それぞれ相対的あるいは絶対的なままで維持されなくてはなりません。ユーザにはどちらかの形を好む理由があるのかもしれません。たとえ
19209 ば相対名は、いろいろなマシンで作業をする持ち運び用の文書で役立ちます。絶対名は、プログラムによっては必要とされることがあり得ます。
19212 \begin_layout Enumerate
19213 LaTeXは、相対ファイル名に関して、LyXや入れ子にした取り込みファイル中の他のプログラムとは異なった取り扱いを行います。LyXにとって相対ファイル名とは、常
19214 にこのファイル名が書かれている文書に対して相対的なものになります。LaTeXにとっての相対ファイル名は、常に親文書に対するものになります。これら二つの定義は、一
19215 つの文書しかないときには同じですが、部分文書を含む親文書があるときには異なったものとなってきます。つまり、相対ファイル名は、LaTeXに提示されるときに変換され
19216 なくてはならないのです。幸い、正しいマクロを選びさえすれば、これはLyXが自動的に行ってくれます。
19219 \begin_layout Standard
19220 すると、新しく作ったひな型定義では、どのパス関連マクロを使うべきでしょうか。このルールは難しくありません。つまり、
19223 \begin_layout Itemize
19225 \begin_inset Flex Code
19228 \begin_layout Plain Layout
19237 \begin_layout Itemize
19238 代入された文字列が、LaTeXインプットの一種である場合には、
19239 \begin_inset Flex Code
19242 \begin_layout Plain Layout
19243 $$AbsOrRelPathMaster
19251 \begin_layout Itemize
19252 それ以外ならば、ユーザの選択を尊重するために
19253 \begin_inset Flex Code
19256 \begin_layout Plain Layout
19257 $$AbsOrRelPathParent
19265 \begin_layout Standard
19266 このルールが機能せずに、たとえば相対名が必要となる特殊な場合もありますが、通常、上記でうまく動作します。特殊例の例としては、上述のXFigひな型での
19267 \begin_inset Flex Code
19270 \begin_layout Plain Layout
19271 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
19277 \begin_inset Flex Code
19280 \begin_layout Plain Layout
19286 ファイルの複写子は、ファイル内容を書き換えるのに相対名を必要とするために、絶対名を使用することができないのです。
19289 \begin_layout Section
19291 \begin_inset CommandInset label
19293 name "sec:セキュリティに関する論点"
19300 \begin_layout Standard
19301 外部素材機能は、多くの外部プログラムとの橋渡しをし、しかもそれを自動的に行うので、そのセキュリティ面での帰結を考慮しなくてはなりません。特に、ユーザは好きなファ
19302 イル名やパラメータ文字列を含めることが許されていて、しかもそれらがコマンドに展開されるので、ユーザが文書を閲覧したり印刷したりしたときに、任意のコマンドを実行す
19303 ることができるような悪意ある文書を作成することが可能となりましょう。これは、我々がぜひとも避けたいことなのです。
19306 \begin_layout Standard
19307 しかしながら、外部プログラムコマンドはひな型設定ファイルでのみ指定されているので、LyXが安全なひな型でのみ適切に設定されているならば、セキュリティ上の問題は発
19309 \begin_inset Flex Code
19312 \begin_layout Plain Layout
19319 \begin_inset Flex Code
19322 \begin_layout Plain Layout
19328 システムコールで呼び出されているため、ファイル名やパラメータ部からシェル経由で任意のコマンドを実行することはできないためです。
19331 \begin_layout Standard
19332 これは、外部素材ひな型でどのようなコマンド文字列を使用することのできるかについて、制限があることを意味します。特に、パイプやリダイレクトはそのまま使用することは
19333 できません。これは、LyXの安全性を維持するためにそうしなくてはならないのです。もしシェル機能の一部を使用したいとすると、これを完全に統御の下においたまま行う安
19334 全なスクリプトを書いた上で、このスクリプトをコマンド文字列から呼び出すようにしなくてはなりません。
19337 \begin_layout Standard
19338 シェルと直接やりとりするひな型を設計することは可能ではありますが、悪意のあるユーザが狡猾なファイル名やパラメータを書くことによって、任意のコマンドを実行できるよ
19339 うになるため、一般的には、統御下に置いた状態で
19340 \begin_inset Flex Code
19343 \begin_layout Plain Layout
19349 システムコールを使用する安全なスクリプトのみを使用することをお勧めします。確かに、管理された環境下で使用する分には、通常のシェルスクリプトを使用する方に流れる誘
19350 惑はあります。そうした場合には、お使いのシステムに簡単に濫用することのできるセキュリティホールを、
19354 導入することを理解しておいてください。オープンソースの伝統に従って、私たちは人々に新しいひな型を投稿してくれるよう促していますが、そのような安全でないひな型はL
19355 yXの標準頒布版には取り入れるべきでないとすることには当然の正当性があります。公式の頒布チャンネルから出荷されているLyXには、安全でないひな型は決して入ってい
19359 \begin_layout Standard
19360 外部素材を含めることで強力な力を手に入れることができますが、この力とともにセキュリティ上の危険を導入してしまわないように気をつける必要があります。無防備なスクリ
19361 プトのたった一行に入り込んだ、ちょっとしたエラーが、巨大なセキュリティ上の問題に扉を開きうるのです。したがって、もしこの問題を完全に理解していないならば、特定の
19362 ひな型が安全であるかどうか疑問がある際には、知識豊富なセキュリティの専門家か、LyX開発チームに相談してみてください。そしてこの相談は、管理されていない環境下で
19363 これを使用する前に、行うようにしてください。
19366 \begin_layout Chapter
19370 Names of available colors to be used in layouts
19371 \begin_inset CommandInset label
19373 name "chap:Names-of-colors"
19380 \begin_layout Standard
19383 The colors listed here are the standard colors and the those that you can
19384 adjust in the LyX preferences.
19387 \begin_layout Description
19402 No particular color -- clear or default
19405 \begin_layout Description
19411 \begin_layout Description
19417 \begin_layout Description
19423 \begin_layout Description
19429 \begin_layout Description
19435 \begin_layout Description
19441 \begin_layout Description
19447 \begin_layout Description
19453 \begin_layout Description
19456 cursor Cursor color
19459 \begin_layout Description
19462 background Background color
19465 \begin_layout Description
19468 foreground Foreground color
19471 \begin_layout Description
19474 selection Background color of selected text
19477 \begin_layout Description
19480 selectiontext Foreground color of selected text
19483 \begin_layout Description
19486 latex Text color in LaTeX mode
19489 \begin_layout Description
19492 preview The color used for previews
19495 \begin_layout Description
19498 inlinecompletion Inline completion color
19501 \begin_layout Description
19504 nonunique_inlinecompletion Inline completion color for the non-unique part
19507 \begin_layout Description
19510 notelabel Label color for notes
19513 \begin_layout Description
19516 notebg Background color of notes
19519 \begin_layout Description
19522 commentlabel Label color for comments
19525 \begin_layout Description
19528 commentbg Background color of comments
19531 \begin_layout Description
19534 greyedoutlabel Label color for greyedout insets
19537 \begin_layout Description
19540 greyedouttext Color for greyedout inset text
19543 \begin_layout Description
19546 greyedoutbg Background color of greyedout inset
19549 \begin_layout Description
19552 shadedbg Background color of shaded box
19555 \begin_layout Description
19558 listingsbg Background color of listings inset
19561 \begin_layout Description
19564 branchlabel Label color for branches
19567 \begin_layout Description
19570 footlabel Label color for footnotes
19573 \begin_layout Description
19576 indexlabel Label color for index insets
19579 \begin_layout Description
19582 marginlabel Label color for margin notes
19585 \begin_layout Description
19588 phantomtext Text color for phantom insets
19591 \begin_layout Description
19594 urllabel Label color for URL insets
19597 \begin_layout Description
19600 urltext Color for URL inset text
19603 \begin_layout Description
19606 depthbar Color for the depth bars in the margin
19609 \begin_layout Description
19612 language Color for marking foreign language words
19615 \begin_layout Description
19618 command Text color for command insets
19621 \begin_layout Description
19624 commandbg Background color for command insets
19627 \begin_layout Description
19630 commandframe Frame color for command insets
19633 \begin_layout Description
19636 special Special chars text color
19639 \begin_layout Description
19642 graphicsbg Graphics inset background color
19645 \begin_layout Description
19648 math Math inset text color
19651 \begin_layout Description
19654 mathbg Math inset background color
19657 \begin_layout Description
19660 mathmacrobg Macro math inset background color
19663 \begin_layout Description
19666 mathmacrohoverbg Macro math inset background color hovered
19669 \begin_layout Description
19672 mathmacrolabel Macro math label color
19675 \begin_layout Description
19678 mathmacroframe Macro math frame color
19681 \begin_layout Description
19684 mathmacroblend Macro math blended color
19687 \begin_layout Description
19690 mathmacrooldarg Macro template color for old parameters
19693 \begin_layout Description
19696 mathmacronewarg Macro template color for new parameters
19699 \begin_layout Description
19702 mathframe Math inset frame color under focus
19705 \begin_layout Description
19708 mathcorners Math inset frame color not under focus
19711 \begin_layout Description
19714 mathline Math line color
19717 \begin_layout Description
19720 collapsable Collapsable insets text
19723 \begin_layout Description
19726 collapsableframe Collapsable insets frame
19729 \begin_layout Description
19732 insetbg Inset marker background color
19735 \begin_layout Description
19738 insetframe Inset marker frame color
19741 \begin_layout Description
19744 error Error box text color
19747 \begin_layout Description
19750 eolmarker End of line marker color
19753 \begin_layout Description
19756 added_space Added space colour
19759 \begin_layout Description
19762 appendix Appendix marker color
19765 \begin_layout Description
19768 changebar Changebar color
19771 \begin_layout Description
19774 deletedtext Deleted text color
19777 \begin_layout Description
19780 addedtext Added text color
19783 \begin_layout Description
19786 changedtextauthor1 Changed text color author 1
19789 \begin_layout Description
19792 changedtextauthor2 Changed text color author 2
19795 \begin_layout Description
19798 changedtextauthor3 Changed text color author 3
19801 \begin_layout Description
19804 changedtextauthor4 Changed text color author 4
19807 \begin_layout Description
19810 changedtextauthor5 Changed text color author 5
19813 \begin_layout Description
19816 deletedtextmodifier Deleted text modifying color
19819 \begin_layout Description
19822 tabularline Table line color
19825 \begin_layout Description
19828 tabularonoffline Table line color
19831 \begin_layout Description
19834 bottomarea Bottom area color
19837 \begin_layout Description
19840 newpage New page color
19843 \begin_layout Description
19846 pagebreak Page break color
19849 \begin_layout Description
19852 buttonframe Color used for button frame
19855 \begin_layout Description
19858 buttonbg Color used for bottom background
19861 \begin_layout Description
19864 buttonhoverbg Color used for buttom under focus
19867 \begin_layout Description
19870 paragraphmarker Color used for the pilcrow sign to mark the end of a paragraph
19874 \begin_layout Description
19877 previewframe Preview frame color
19880 \begin_layout Description
19883 inherit Color is inherited
19886 \begin_layout Description
19889 regexpframe Color for regexp frame
19892 \begin_layout Description
19895 ignore For ignoring updates of a color