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
1478 \begin_inset Flex MenuItem
1481 \begin_layout Plain Layout
1487 オプションは、LyXに、この書式が文書として書き出すのに適していることを指示するものです。このオプションが有効となっていて、適切な変換経路が存在する場合には(第
1488 \begin_inset CommandInset ref
1495 \begin_inset Flex MenuItem
1498 \begin_layout Plain Layout
1499 ファイル\SpecialChar \menuseparator
1505 メニューに表示されます。また、この書式に閲覧プログラムが指定されている場合には、この書式は
1506 \begin_inset Flex MenuItem
1509 \begin_layout Plain Layout
1516 \begin_inset Flex Code
1519 \begin_layout Plain Layout
1525 のような純粋な画像書式は、このオプションを有効にしてはいけません。
1526 \begin_inset Flex Code
1529 \begin_layout Plain Layout
1535 のようにベクター画像であると同時に文書でもあるような書式は、これを有効にします。
1538 \begin_layout Standard
1539 \begin_inset Flex MenuItem
1542 \begin_layout Plain Layout
1548 オプションは、LyXにこの書式がベクター画像を含みうることを教示するものです。この情報は、
1549 \begin_inset Flex MenuItem
1552 \begin_layout Plain Layout
1558 を書き出す際に、内包されている画像をどの書式に変換するかを決定するのに使用されます。
1559 \begin_inset Flex MenuItem
1562 \begin_layout Plain Layout
1569 \begin_inset Flex MenuItem
1572 \begin_layout Plain Layout
1579 \begin_inset Flex MenuItem
1582 \begin_layout Plain Layout
1589 \begin_inset Flex MenuItem
1592 \begin_layout Plain Layout
1598 以外の画像書式を取り扱うことができないので、内包されている画像は、これらの書式に変換される必要があるかもしれない為です。内包されている画像が既に
1599 \begin_inset Flex MenuItem
1602 \begin_layout Plain Layout
1609 \begin_inset Flex MenuItem
1612 \begin_layout Plain Layout
1619 \begin_inset Flex MenuItem
1622 \begin_layout Plain Layout
1628 のいずれかになっていない場合には、ベクター画像書式オプションが有効になっている場合には
1629 \begin_inset Flex MenuItem
1632 \begin_layout Plain Layout
1639 \begin_inset Flex MenuItem
1642 \begin_layout Plain Layout
1651 \begin_layout Section
1655 \begin_layout Standard
1656 書式の変換はすべて、LyXの一時ディレクトリで行われるため、変換用にファイルを一時ディレクトリにコピーする前段階で、ファイルに変更を加える必要のあることがありま
1661 \begin_layout Plain Layout
1662 たとえば、ファイルが他のファイル—たとえば画像—を、相対ファイル名を用いて参照している場合、このファイルが一時ディレクトリにコピーされると参照が無効になる場合が
1668 。これは複写子によって取り扱われ、複写子は、ファイルを一時ディレクトリに(あるいは一時ディレクトリから)コピーすると同時に、その過程でファイルに変更を加えます。
1671 \begin_layout Standard
1672 複写子の定義においては、以下の4つの変数を用いることができます。
1675 \begin_layout Labeling
1676 \labelwidthstring 00.00.0000
1677 \begin_inset Flex Code
1680 \begin_layout Plain Layout
1687 \begin_inset Flex MenuItem
1690 \begin_layout Plain Layout
1699 \begin_layout Labeling
1700 \labelwidthstring 00.00.0000
1701 \begin_inset Flex Code
1704 \begin_layout Plain Layout
1713 \begin_layout Labeling
1714 \labelwidthstring 00.00.0000
1715 \begin_inset Flex Code
1718 \begin_layout Plain Layout
1727 \begin_layout Labeling
1728 \labelwidthstring 00.00.0000
1729 \begin_inset Flex Code
1732 \begin_layout Plain Layout
1741 \begin_layout Standard
1748 コマンドで使用されるのと同形式のファイル名です。これは、書き出すファイルがそのようなインクルードに適している場合のみ、使用さるべきものです。
1751 \begin_layout Standard
1752 複写子は、出力ファイルに関する操作であれば、ほとんどすべてに対応することができます。たとえば、生成したPDFファイルを、
1753 \begin_inset Flex Code
1756 \begin_layout Plain Layout
1762 という特別なディレクトリにコピーしたいものとしましょう。その場合には、以下のようなシェルスクリプトを書きます。
1765 \begin_layout Standard
1766 \begin_inset listings
1770 \begin_layout Plain Layout
1775 \begin_layout Plain Layout
1780 \begin_layout Plain Layout
1782 TOFILE=`basename $2`
1785 \begin_layout Plain Layout
1787 cp $FROMFILE /home/you/pdf/$TOFILE
1792 これを、自身のローカルLyXディレクトリ—たとえば
1793 \begin_inset Flex Code
1796 \begin_layout Plain Layout
1797 /home/you/.lyx/scripts/pdfcopier.sh
1802 —に保存し、お使いのプラットフォームが必要とするならば、実行可能属性を付与します。それから、
1803 \begin_inset Flex MenuItem
1806 \begin_layout Plain Layout
1807 ツール\SpecialChar \menuseparator
1814 \begin_inset Flex MenuItem
1817 \begin_layout Plain Layout
1818 ファイル処理\SpecialChar \menuseparator
1825 \begin_inset Flex MenuItem
1828 \begin_layout Plain Layout
1834 書式—あるいは他のPDF書式のうちどれか—を選択し、
1835 \begin_inset Flex MenuItem
1838 \begin_layout Plain Layout
1845 \begin_inset Flex Code
1848 \begin_layout Plain Layout
1849 pdfcopier.sh $$i $$o
1857 \begin_layout Standard
1858 複写子は、LyX自身が様々な変換に使用します。たとえば、適切なプログラムが検出された場合、LyXは自動的に
1859 \begin_inset Flex MenuItem
1862 \begin_layout Plain Layout
1869 \begin_inset Flex MenuItem
1872 \begin_layout Plain Layout
1874 \begin_inset space ~
1882 書式の複写子を導入します。これらの書式を書き出す際、複写子は、本体のHTMLファイルだけでなく、関連した様々なファイル(スタイルファイルや画像など)もコピーされ
1883 るように手配します。これらのファイルはすべて、元のLyXファイルのあるディレクトリのサブディレクトリに書き込まれます
1887 \begin_layout Plain Layout
1888 この複写子の挙動は調整することができます。非必須の「-e」オプションは、コピーする拡張子をコンマ区切りで羅列したものを引数にとります。これを省略した場合には、す
1889 べてのファイルがコピーされます。「-t」引数は、生成したディレクトリに書き加える拡張子を指定するものです。既定値では、これは「
1890 \begin_inset Flex MenuItem
1893 \begin_layout Plain Layout
1898 \begin_layout Plain Layout
1911 \begin_inset Flex MenuItem
1914 \begin_layout Plain Layout
1915 /path/to/filename.lyx
1921 \begin_inset Flex MenuItem
1924 \begin_layout Plain Layout
1925 /path/to/filename.html.L
1929 \begin_layout Plain Layout
1950 \begin_layout Section
1952 \begin_inset CommandInset label
1961 \begin_layout Standard
1962 各書式間でファイルを変換するために、ご自身の変換子を定義することができます。これは、
1963 \begin_inset Flex MenuItem
1966 \begin_layout Plain Layout
1967 ツール\SpecialChar \menuseparator
1968 設定\SpecialChar \menuseparator
1969 ファイル処理\SpecialChar \menuseparator
1978 \begin_layout Standard
1979 新規に変換子を定義するには、ドロップダウンリストから
1980 \begin_inset Flex MenuItem
1983 \begin_layout Plain Layout
1990 \begin_inset Flex MenuItem
1993 \begin_layout Plain Layout
1999 を選択し、変換に必要なコマンドを入力してから
2000 \begin_inset Flex MenuItem
2003 \begin_layout Plain Layout
2009 ボタンを押してください。変換子の定義には、以下のような変数を使用することができます。
2012 \begin_layout Labeling
2013 \labelwidthstring 00.00.0000
2014 \begin_inset Flex Code
2017 \begin_layout Plain Layout
2026 \begin_layout Labeling
2027 \labelwidthstring 00.00.0000
2028 \begin_inset Flex Code
2031 \begin_layout Plain Layout
2040 \begin_layout Labeling
2041 \labelwidthstring 00.00.0000
2042 \begin_inset Flex Code
2045 \begin_layout Plain Layout
2054 \begin_layout Labeling
2055 \labelwidthstring 00.00.0000
2056 \begin_inset Flex Code
2059 \begin_layout Plain Layout
2065 入力ファイルのベースファイル名(拡張子をとった部分)
2068 \begin_layout Labeling
2069 \labelwidthstring 00.00.0000
2070 \begin_inset Flex Code
2073 \begin_layout Plain Layout
2082 \begin_layout Labeling
2083 \labelwidthstring 00.00.0000
2084 \begin_inset Flex Code
2087 \begin_layout Plain Layout
2093 元の入力ファイルのパス(変換子が連鎖して呼び出されたときの挙動が$$pとは異なります)
2096 \begin_layout Labeling
2097 \labelwidthstring 00.00.0000
2098 \begin_inset Flex Code
2101 \begin_layout Plain Layout
2110 \begin_layout Standard
2111 \begin_inset Flex MenuItem
2114 \begin_layout Plain Layout
2120 フィールドには、以下のフラグをコンマで区切って入力することができます。
2123 \begin_layout Labeling
2124 \labelwidthstring 00.00.0000
2125 \begin_inset Flex Code
2128 \begin_layout Plain Layout
2134 この変換子がLaTeXの一種を実行することを示します。これによって、LyXのLaTeXエラーログに記録を残せるようになります。
2137 \begin_layout Labeling
2138 \labelwidthstring 00.00.0000
2139 \begin_inset Flex Code
2142 \begin_layout Plain Layout
2149 \begin_inset Flex MenuItem
2152 \begin_layout Plain Layout
2161 \begin_layout Labeling
2162 \labelwidthstring 00.00.0000
2163 \begin_inset Flex Code
2166 \begin_layout Plain Layout
2175 \begin_layout Standard
2177 \begin_inset Flex MenuItem
2180 \begin_layout Plain Layout
2182 \begin_inset space ~
2186 \begin_inset space ~
2194 形式の引数をとります(したがって厳密にはフラグとは呼べません)。
2197 \begin_layout Labeling
2198 \labelwidthstring 00.00.0000
2199 \begin_inset Flex Code
2202 \begin_layout Plain Layout
2209 \begin_inset Flex Code
2212 \begin_layout Plain Layout
2218 ファイルにリダイレクトされ、引数に指定されたスクリプトが
2219 \begin_inset Flex Code
2222 \begin_layout Plain Layout
2223 script < infile.out > infile.log
2228 の形で実行されるようになります。引数には
2229 \begin_inset Flex Code
2232 \begin_layout Plain Layout
2241 \begin_layout Labeling
2242 \labelwidthstring 00.00.0000
2243 \begin_inset Flex Code
2246 \begin_layout Plain Layout
2252 これには、変換子が生成したファイルをダンプするディレクトリ名を指定します。LyXはこのディレクトリを作成せず、ここに何もコピーしませんが、このディレクトリを宛
2254 \begin_inset Flex Code
2257 \begin_layout Plain Layout
2263 を使用することができ、これはディレクトリがコピーされる際に、入力ファイルおよび出力ファイルのベース名で置換されます。
2264 \begin_inset Newline newline
2267 resultdirとusetempdirは、同時に用いることはできませんのでご注意ください。前者が指定されているときには、後者は無視されます。
2270 \begin_layout Labeling
2271 \labelwidthstring 00.00.0000
2272 \begin_inset Flex Code
2275 \begin_layout Plain Layout
2282 \begin_inset Flex Code
2285 \begin_layout Plain Layout
2291 を使用することができます。resultdirが指定されているときのみ有効で、必ず用いる必要はありません。指定されていなければ、既定値は「index」です。
2294 \begin_layout Standard
2295 最後の3つは、LyXとともに導入される変換子には、現在いずれも使用されておりません。
2298 \begin_layout Standard
2299 変換しようとするすべての書式のあいだに変換子を定義する必要はありません。たとえば、「LyXからPostScript」変換子が定義されていないのに、LyXはPos
2300 tScriptを書き出していることに気づかれることでしょう。これは、まずLaTeXファイルを生成した後に(これには変換子を定義する必要はありません)、「LaTe
2301 XからDVI」変換子を使用してDVIに変換し、最後に、得られたDVIをPostScriptに変換することによって実現しています。LyXはこのような変換子の「連鎖
2302 」を自動的に見つけ、つねに最も短い連鎖を選択します。しかしながら、なお書式間に複数の変換方法を定義することも可能です。たとえば、標準的なLyX設定は、LaTeX
2303 からPDFへ変換するのに、以下の3つの方法を用意しています。(1)
2304 \begin_inset space ~
2308 \begin_inset Flex MenuItem
2311 \begin_layout Plain Layout
2318 \begin_inset space ~
2321 (DVIと)PostScriptを経由して
2322 \begin_inset Flex MenuItem
2325 \begin_layout Plain Layout
2332 \begin_inset space ~
2336 \begin_inset Flex MenuItem
2339 \begin_layout Plain Layout
2345 を使用するもの。このように代替連鎖を定義するには、第
2346 \begin_inset CommandInset ref
2352 節に述べられているように、ターゲットとなる「ファイル書式」を複数定義しなくてはなりません。たとえば、標準設定では、
2353 \begin_inset Flex MenuItem
2356 \begin_layout Plain Layout
2363 \begin_inset Flex MenuItem
2366 \begin_layout Plain Layout
2373 \begin_inset Flex MenuItem
2376 \begin_layout Plain Layout
2382 と命名された書式が定義されていて、すべて共通の拡張子
2383 \begin_inset Flex MenuItem
2386 \begin_layout Plain Layout
2392 を持ち、上記で言及した各変換方法に対応しています。
2395 \begin_layout Chapter
2397 \begin_inset CommandInset label
2399 name "cha:LyXの各国語対応"
2406 \begin_layout Standard
2407 LyXは、翻訳された操作画面の利用をサポートしています。私たちが最後に確かめたところでは、LyXは30言語の翻訳を提供しています。選択した言語は、使用する
2411 と呼ばれます(ロケール設定についての詳しい資料は、お使いの基本ソフトに添付のロケール関連説明書をご覧ください。Linuxの場合は、マニュアルページの
2412 \begin_inset Flex Code
2415 \begin_layout Plain Layout
2424 \begin_layout Standard
2425 これらの翻訳は適切に機能しますが、欠点もいくつかあることに注意してください。たとえば、ダイアログはすべて英文を念頭にデザインされているため、翻訳文の一部は、割り
2426 当てられたスペースに収めるには大きすぎるかもしれません。これは表示上の問題に過ぎず、他の障害は引き起こしません。また、翻訳によっては、すべての短絡キーが定義され
2427 ていないことに気づかれるでしょう。短絡キーのために空いている文字が十分ないことが時々あるのです。単に翻訳者がまだ短絡キーを定義していないこともあるでしょう。もち
2428 ろん、私たちの各国語対応チーム—あなたも参加したいと思われるかもしれません
2432 \begin_layout Plain Layout
2433 もしあなたが英語以外の言語を流暢に操れるならば、これらのチームに参加することは、LyXコミュニティに報いるたいへん素晴らしい方法です!
2438 —は、LyXの将来のバージョンでこれらの欠点を修正しようとするでしょう。
2441 \begin_layout Section
2445 \begin_layout Subsection
2446 グラフィカル・ユーザ・インタフェース(テキスト・メッセージ)を翻訳する
2447 \begin_inset Argument
2450 \begin_layout Plain Layout
2459 \begin_layout Standard
2461 \begin_inset Flex Code
2464 \begin_layout Plain Layout
2470 ライブラリを使用します。LyXのすべてのメニューやダイアログでお好みの言語を話させたいときには、その言語の
2471 \begin_inset Flex Code
2474 \begin_layout Plain Layout
2480 ファイルが必要です。このファイルが利用可能であれば、そこから
2481 \begin_inset Flex Code
2484 \begin_layout Plain Layout
2491 \begin_inset Flex Code
2494 \begin_layout Plain Layout
2500 ファイルをインストールしなくてはなりません。この全過程は、GNU
2501 \begin_inset Flex Code
2504 \begin_layout Plain Layout
2510 の取扱説明書に説明があります。この作業をあなたのためだけに行うこともできますが、もしせっかくするのであれば、あなたの骨折りの結果をLyXコミュニティの他の人々と
2511 分かち合いませんか。どのように段取りを進めればよいか、詳しくはLyX開発者メーリングリストにメールを送ってください。
2514 \begin_layout Standard
2515 要約すれば、以下のように行います(xxは言語コードを表します)。
2518 \begin_layout Itemize
2519 LyXソースコードをチェックアウトしてください(
2520 \begin_inset CommandInset href
2523 target "http://www.lyx.org/devel/cvs.php"
2530 \begin_layout Itemize
2531 \begin_inset Flex Code
2534 \begin_layout Plain Layout
2541 \begin_inset Flex Code
2544 \begin_layout Plain Layout
2551 \begin_inset Flex Code
2554 \begin_layout Plain Layout
2561 \begin_inset Flex Code
2564 \begin_layout Plain Layout
2570 がどこにもない場合には、コンソールからそのディレクトリで
2571 \begin_inset Flex Code
2574 \begin_layout Plain Layout
2580 コマンドを実行し、作成し直すか、他言語の既存のpoファイルをひな型として使用することができます)。
2583 \begin_layout Itemize
2584 \begin_inset Flex Code
2587 \begin_layout Plain Layout
2597 \begin_layout Plain Layout
2598 これは単なるテキストファイルなので、どのテキストエディタでも編集できます。しかし、
2606 (KDE用)のように、この目的の編集をサポートする特別なプログラムがあります。
2611 \begin_inset Flex Code
2614 \begin_layout Plain Layout
2620 ファイルを編集するための「モード」があります。
2625 。メニューラベルやウィジェットラベルのうちには、翻訳しなくてはならない短絡キーがある場合があります。これらのキーは「|」の後に記されており、当該言語の単語やフレ
2626 ーズに対応して翻訳しなくてはなりません。さらに、新しい
2627 \begin_inset Flex Code
2630 \begin_layout Plain Layout
2636 ファイルの冒頭に、あなたの電子メールアドレスなどの情報も書き加えて、人々があなたに提案や、滑稽な怒りのメッセージを届けることができるようにしてください。
2639 \begin_layout Standard
2640 もし、あなたがこれを自身のためだけに行っているのであれば、
2643 \begin_layout Itemize
2644 \begin_inset Flex Code
2647 \begin_layout Plain Layout
2654 \begin_inset Flex Code
2657 \begin_layout Plain Layout
2658 msgfmt -o xx.mo < xx.po
2666 \begin_layout Itemize
2668 \begin_inset Flex Code
2671 \begin_layout Plain Layout
2677 ファイルを、お使いのロケールツリー中、言語xxのアプリケーションメッセージ用の正式なディレクトリにコピーして、
2678 \begin_inset Flex Code
2681 \begin_layout Plain Layout
2688 \begin_inset Flex Code
2691 \begin_layout Plain Layout
2692 /usr/local/share/locale/xx/LC_MESSAGES/lyx.mo
2700 \begin_layout Standard
2702 \begin_inset Flex Code
2705 \begin_layout Plain Layout
2711 ファイルを他の人たちが使用できるよう、LyX頒布版に追加できることが最善です。これを追加するには、LyXに変更を加える必要がありますので、もしその気があれば、開
2712 発者メーリングリストに電子メールを送ってください。
2715 \begin_layout Subsubsection
2719 \begin_layout Standard
2720 時には、一つの英語のメッセージが、翻訳先の言語では複数のメッセージに翻訳されなくてはならないことが判明することがあります。一つの例は、
2721 \begin_inset Flex Code
2724 \begin_layout Plain Layout
2730 というメッセージで、これは英語で「to」がどういう意味を持っているかによって、独語ではNachと訳されたりBisと訳されたりします。GNU
2731 \begin_inset Flex Code
2734 \begin_layout Plain Layout
2741 \begin_inset Flex Code
2744 \begin_layout Plain Layout
2751 \begin_inset Flex Code
2754 \begin_layout Plain Layout
2755 To[[as in 'From format x to format y']]
2761 \begin_inset Flex Code
2764 \begin_layout Plain Layout
2765 To[[as in 'From page x to page y']]
2770 としなくてはなりません。これによって、これら2つの
2771 \begin_inset Flex Code
2774 \begin_layout Plain Layout
2781 \begin_inset Flex Code
2784 \begin_layout Plain Layout
2790 には別物と解釈され、それぞれ正しくNachとBisに訳すことができるようになります。
2793 \begin_layout Standard
2794 もちろん、この文脈情報は、翻訳が存在しないときには取り去られる必要がありますので、メッセージの終わりに二重大括弧で囲わなくてはなりません(上例参照)。LyXの翻
2795 訳機構では、メッセージの終わりに二重大括弧で囲われているものはすべて、メッセージを表示する前に取り去るようにされています。
2798 \begin_layout Subsection
2802 \begin_layout Standard
2804 \begin_inset Flex MenuItem
2807 \begin_layout Plain Layout
2813 メニュー中の)オンライン説明書は翻訳することができます(そして翻訳されるべきです!)。説明書の翻訳版が利用可能であり
2817 \begin_layout Plain Layout
2818 2008年3月現在、説明書の少なくとも一部が翻訳されている言語は14言語に上り、入門編が訳されているものはさらにいくつかあります。
2823 、ロケールがその言語に設定されている場合、LyXはこれを自動的に使用します。LyXは、翻訳版を
2824 \begin_inset Flex Code
2827 \begin_layout Plain Layout
2832 \begin_layout Plain Layout
2839 yXDir/doc/xx/DocName.lyx
2845 \begin_inset Flex Code
2848 \begin_layout Plain Layout
2854 は現在使用している言語コード)で探します。翻訳文書がない場合には、既定の英語版が表示されます。翻訳版は、原典と同じファイル名(上述の
2855 \begin_inset Flex Code
2858 \begin_layout Plain Layout
2864 )を持っていなくてはならないことに注意してください。説明書を翻訳する気がおありであれば(これは原典の校正としてもたいへん役立ちます!)、以下のような点をすぐに行
2868 \begin_layout Itemize
2870 \begin_inset CommandInset href
2872 name "http://www.lyx.org/Translation"
2873 target "http://www.lyx.org/Translation"
2877 を確認してください。ここで、どの文書が(もしあれば)お使いの言語に既に翻訳されているかを見つけることができます。また、説明書をお使いの言語に翻訳する作業の面倒を
2878 見ている人を(もしいれば)見つけることができます。この作業の面倒を見ている人がいない場合には、私たちにあなたが興味をお持ちであることを知らせてください。
2881 \begin_layout Standard
2882 いったん実際の翻訳の仕事に取りかかったならば、トラブルを回避するいくつかのヒントがあります。
2885 \begin_layout Itemize
2886 文書化チームに所属してください!そのための情報が
2887 \begin_inset Flex Code
2890 \begin_layout Plain Layout
2897 \begin_inset Flex MenuItem
2900 \begin_layout Plain Layout
2901 ヘルプ\SpecialChar \menuseparator
2908 \begin_inset Flex Code
2911 \begin_layout Plain Layout
2920 \begin_layout Itemize
2921 翻訳しようとする言語での印刷慣行を学んでください。活版印刷は古来の技術であり、何世紀にもわたって世界の至る所で、様々な慣行を発達させてきました。また、あなたの国
2922 で活版工が用いる専門用語も学んでください。自分で勝手な専門用語を捻出するとユーザを混乱させるだけです。(
2924 警告!活版技術は病みつきになる可能性があるので注意してくさい!
2929 \begin_layout Itemize
2930 文書のコピーをとってください。これを作業用コピーとします。これをお使いの
2931 \begin_inset Flex Code
2934 \begin_layout Plain Layout
2940 ディレクトリにコピーすれば、個人用の翻訳ヘルプファイルとして使用することができます。
2943 \begin_layout Itemize
2944 (LyXチームが維持している)原典の説明書は、時折更新されます。変更点については、
2945 \begin_inset CommandInset href
2947 name "http://www.lyx.org/trac/timeline"
2948 target "http://www.lyx.org/trac/timeline"
2952 のソースビューアでご覧ください。この方法で、翻訳文書のどの部分を更新しなくてはならないか、たやすく見つけることができます。
2955 \begin_layout Standard
2956 もし原典に誤りを見つけたならば、修正して文書化チームの他のメンバーに変更したことを知らせてください(文書化チームに参加することをお忘れになっていませんよね)。
2959 \begin_layout Standard
2960 \begin_inset Branch OutDated
2963 \begin_layout Section
2964 International Keyboard Support
2967 \begin_layout Standard
2970 [Editor's Note: The following section is by
2978 It needs to be fixed to conform to the new Documentation Style sheet and
2979 to make use of the new v1.0 features.
2980 The whole thing also needs to be merged with the section following it.-jw
2981 It may also be badly out of date.-rh (2008)]
2984 \begin_layout Subsection
2985 Defining Own Keymaps: Keymap File Format
2988 \begin_layout Standard
2989 Let's look at a keyboard definition file a little closer.
2990 It is a plain text file defining
2993 \begin_layout Itemize
2994 key-to-key or key-to-string translations
2997 \begin_layout Itemize
3001 \begin_layout Itemize
3002 dead keys exceptions
3005 \begin_layout Standard
3006 To define key-to-key or key-to-string translation, use this command:
3009 \begin_layout Quotation
3010 \begin_inset Flex Code
3013 \begin_layout Plain Layout
3022 \begin_inset Flex Code
3025 \begin_layout Plain Layout
3034 \begin_layout Standard
3036 \begin_inset Flex Code
3039 \begin_layout Plain Layout
3045 is the key to be translated and
3046 \begin_inset Flex Code
3049 \begin_layout Plain Layout
3055 is the string to be inserted into the document.
3056 To define dead keys, use:
3059 \begin_layout Quotation
3060 \begin_inset Flex Code
3063 \begin_layout Plain Layout
3072 \begin_inset Flex Code
3075 \begin_layout Plain Layout
3084 \begin_layout Standard
3086 \begin_inset Flex Code
3089 \begin_layout Plain Layout
3095 is a keyboard key and
3096 \begin_inset Flex Code
3099 \begin_layout Plain Layout
3106 The following dead keys are supported (shortcut name is in parentheses):
3109 \begin_layout Quotation
3113 \begin_inset space \hfill{}
3119 \begin_layout Quotation
3121 \begin_inset space \hfill{}
3129 \begin_layout Quotation
3131 \begin_inset space \hfill{}
3139 \begin_layout Quotation
3141 \begin_inset space \hfill{}
3149 \begin_layout Quotation
3151 \begin_inset space \hfill{}
3159 \begin_layout Quotation
3161 \begin_inset space \hfill{}
3168 \begin_layout Plain Layout
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{}
3231 \begin_layout Quotation
3233 \begin_inset space \hfill{}
3240 \begin_layout Plain Layout
3252 \begin_layout Quotation
3254 \begin_inset space \hfill{}
3265 \begin_layout Plain Layout
3277 \begin_layout Quotation
3279 \begin_inset space \hfill{}
3287 \begin_layout Quotation
3288 hungarian umlaut (hug)
3289 \begin_inset space \hfill{}
3297 \begin_layout Quotation
3299 \begin_inset space \hfill{}
3307 \begin_layout Quotation
3309 \begin_inset space \hfill{}
3320 \begin_layout Plain Layout
3332 \begin_layout Standard
3333 Since in many international keyboards there are exceptions to what some
3334 dead keys should do, you can define them using
3337 \begin_layout Quotation
3338 \begin_inset Flex Code
3341 \begin_layout Plain Layout
3349 deadkey key outstring
3352 \begin_layout Standard
3353 For example, on Slovak keyboard, if you enter caron-o, it generates circumflex-o
3357 \begin_layout Quotation
3358 \begin_inset Flex Code
3361 \begin_layout Plain Layout
3374 \begin_layout Standard
3375 to make it work correctly.
3376 Also, you have to define as exceptions dead keys over i and j, to remove
3377 the dot from them before inserting an accent mark.
3378 I will change this when the time comes, but so far I haven't had time.
3381 \begin_layout Standard
3382 Oh, and about characters: backslash is escaped, so to enter it, you'll need
3385 \begin_inset Flex Code
3388 \begin_layout Plain Layout
3394 have different meaning.
3396 \begin_inset Flex Code
3399 \begin_layout Plain Layout
3405 marks comments, quotes start and end LaTeX-style commands.
3406 To enter quote, you'll need to use
3407 \begin_inset Flex Code
3410 \begin_layout Plain Layout
3419 \begin_inset Flex Code
3422 \begin_layout Plain Layout
3429 \begin_inset Flex Code
3432 \begin_layout Plain Layout
3443 \begin_layout Standard
3444 If you make a keyboard description file that works for your language, please
3445 mail it to me, so I can include it in the next keymap distribution.
3448 \begin_layout Standard
3449 More keywords will be supported in keymap configuration file in future,
3453 \begin_layout Itemize
3454 \begin_inset Flex Code
3457 \begin_layout Plain Layout
3468 \begin_inset space \hfill{}
3472 \begin_inset Flex Code
3475 \begin_layout Plain Layout
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
3512 an external keymap translation program
3515 \begin_layout Standard
3516 Also, it should look into
3517 \begin_inset Flex Code
3520 \begin_layout Plain Layout
3526 file for defaults, too (for example, a
3527 \begin_inset Flex Code
3530 \begin_layout Plain Layout
3538 option to include default keyboard).
3546 \begin_layout Section
3548 \begin_inset CommandInset label
3557 \begin_layout Standard
3558 \begin_inset Note Note
3561 \begin_layout Plain Layout
3562 2008年3月にこの文書を改訂するに当たって、改訂者が本節の内容に詳しくなかったために、本節は改訂されていません。他に改訂してくださる方がおられれば幸いです。
3565 \begin_layout Plain Layout
3574 \begin_layout Standard
3576 \begin_inset Flex Code
3579 \begin_layout Plain Layout
3586 \begin_inset Flex Code
3589 \begin_layout Plain Layout
3595 ファイルの文法を詳細に解説します。これらの節は、提供されているキー配列があなたのニーズに合わない場合に、自身用のキー配列をデザインする手助けとなるでしょう。
3598 \begin_layout Subsection
3602 \begin_layout Standard
3603 \begin_inset Flex Code
3606 \begin_layout Plain Layout
3612 ファイルは、打鍵したものを文字や文字列に割り当てます。名前が示唆するように、これはキーボード配列表を定義します。
3613 \begin_inset Flex Code
3616 \begin_layout Plain Layout
3622 ファイルは、以下の各項で説明するように、
3623 \begin_inset Flex Code
3626 \begin_layout Plain Layout
3633 \begin_inset Flex Code
3636 \begin_layout Plain Layout
3643 \begin_inset Flex Code
3646 \begin_layout Plain Layout
3653 \begin_inset Flex Code
3656 \begin_layout Plain Layout
3665 \begin_layout Labeling
3666 \labelwidthstring 00.00.0000
3667 \begin_inset Flex Code
3670 \begin_layout Plain Layout
3679 \begin_layout LyX-Code
3694 \begin_layout Standard
3707 中では、二重引用符(")とバックスラッシュ(
3711 )を付けてエスケープしなくてはならないことに注意してください。
3714 \begin_layout Standard
3715 \begin_inset Flex MenuItem
3718 \begin_layout Plain Layout
3725 \begin_inset Flex MenuItem
3728 \begin_layout Plain Layout
3735 \begin_inset Flex MenuItem
3738 \begin_layout Plain Layout
3747 \begin_layout LyX-Code
3753 \begin_layout Standard
3757 \begin_layout Labeling
3758 \labelwidthstring 00.00.0000
3759 \begin_inset Flex Code
3762 \begin_layout Plain Layout
3771 \begin_layout LyX-Code
3780 \begin_layout Standard
3789 のアクセントとするものです。これはデッドキー
3793 \begin_layout Plain Layout
3798 という用語は、それ自身で文字を出力しないけれども、別のキーを続けて打つと、望んだアクセント文字を出力するキーのことを指し示します。たとえば、独語で
3802 のようなウムラウトのついた文字は、このようにして出すことができます。
3810 \begin_layout Standard
3823 の後に許可文字ではないその文字が出力として表示されます。
3824 \begin_inset Flex MenuItem
3827 \begin_layout Plain Layout
3838 \begin_inset Flex MenuItem
3841 \begin_layout Plain Layout
3847 と打鍵すると、カーソルは一文字戻ることなく、文字が次の打鍵したものに及ぼしたはずの効力を取り消します。
3850 \begin_layout Standard
3851 以下の例は、'文字をacuteアクセントとして、a・e・i・o・u・A・E・I・O・Uの文字に許可するものです。
3854 \begin_layout LyX-Code
3857 kmod ' acute aeiouAEIOU
3860 \begin_layout Labeling
3861 \labelwidthstring 00.00.0000
3862 \begin_inset Flex Code
3865 \begin_layout Plain Layout
3874 \begin_layout LyX-Code
3883 \begin_layout Standard
3897 \begin_inset Flex Code
3900 \begin_layout Plain Layout
3908 宣言で打鍵キーを既に割り当てられてなくてはならず、
3920 の集合に属していてはなりません。こうして
3933 \begin_inset Flex Code
3936 \begin_layout Plain Layout
3963 \begin_inset Flex Code
3966 \begin_layout Plain Layout
3977 \begin_layout Standard
3978 以下のコマンドを用いると、acute-i('i)と入力した場合、äiと出力されるようになります。
3981 \begin_layout LyX-Code
3995 \begin_layout Labeling
3996 \labelwidthstring 00.00.0000
3997 \begin_inset Flex Code
4000 \begin_layout Plain Layout
4009 \begin_layout LyX-Code
4018 \begin_layout Standard
4019 これはなかなか難解になってきます。これは
4044 \begin_inset Flex Code
4047 \begin_layout Plain Layout
4055 コマンドで設定されていなくてはなりません。
4058 \begin_layout Standard
4059 \begin_inset Flex Code
4062 \begin_layout Plain Layout
4071 \begin_layout LyX-Code
4074 kmod ; acute aeioyvhAEIOYVH
4078 kcomb acute umlaut iyIY
4081 \begin_layout Standard
4083 \begin_inset Flex MenuItem
4086 \begin_layout Plain Layout
4093 \begin_inset Flex Code
4096 \begin_layout Plain Layout
4106 という効果を得るようにするものです。この場合のバックスペースは、最後のデッドキーを取り消すので、
4107 \begin_inset Flex MenuItem
4110 \begin_layout Plain Layout
4117 \begin_inset Flex Code
4120 \begin_layout Plain Layout
4131 \begin_layout Subsection
4135 \begin_layout Standard
4136 \begin_inset Flex Code
4139 \begin_layout Plain Layout
4146 \begin_inset Flex Code
4149 \begin_layout Plain Layout
4155 ファイルは、記号の作り出す文字列を現在のフォントの文字に割り当てます。LyX頒布版には、現在のところ、少なくとも
4156 \begin_inset Flex Code
4159 \begin_layout Plain Layout
4166 \begin_inset Flex Code
4169 \begin_layout Plain Layout
4178 \begin_layout Standard
4180 \begin_inset Flex Code
4183 \begin_layout Plain Layout
4192 \begin_layout LyX-Code
4205 \begin_layout Standard
4207 \begin_inset Flex MenuItem
4210 \begin_layout Plain Layout
4218 をiso-8859-1セットの対応する文字(233)に割り当てるには、以下の宣言を用います。
4221 \begin_layout LyX-Code
4229 \begin_layout Standard
4235 \begin_inset Flex Code
4238 \begin_layout Plain Layout
4247 \begin_inset Flex Code
4250 \begin_layout Plain Layout
4256 はエスケープされています。同一の文字を二つ以上の文字列に充てることができることに注意してください。
4257 \begin_inset Flex Code
4260 \begin_layout Plain Layout
4269 \begin_layout LyX-Code
4281 \begin_inset Newline newline
4297 \begin_layout Standard
4298 という例があります。LyXは、キー打鍵やデッドキーの組み合わせで生成される文字列の割り当てを見つけることができないとき、それがアクセント付き文字のように解釈がで
4299 きないかどうかチェックして、画面上の文字にアクセントを引くことを試みます。
4302 \begin_layout Subsection
4306 \begin_layout Standard
4307 国際文字のサポートを追加する第2の方法として、いわゆるデッドキーによる方法があります。デッドキーは文字と一緒に用いて、アクセント付き文字を生成します。ここではそ
4308 の機能を説明するために、きわめて単純なデッドキーの作り方を説明します。
4311 \begin_layout Standard
4312 仮に、曲折アクセント記号「 ̂」が必要になったものとしましょう。この場合、自身の
4313 \begin_inset Flex Code
4316 \begin_layout Plain Layout
4323 \begin_inset Flex MenuItem
4326 \begin_layout Plain Layout
4333 \begin_inset Flex MenuItem
4336 \begin_layout Plain Layout
4343 \begin_inset Flex Code
4346 \begin_layout Plain Layout
4353 \begin_inset Flex MenuItem
4356 \begin_layout Plain Layout
4362 キーの後に文字を打ったときはいつでも、この文字上に曲折アクセントが付けられるようになります。たとえば「
4363 \begin_inset Flex MenuItem
4366 \begin_layout Plain Layout
4372 」という打鍵順は「ê」という文字を生成します。しかしながら、もし「
4373 \begin_inset Flex MenuItem
4376 \begin_layout Plain Layout
4383 \begin_inset Flex MenuItem
4386 \begin_layout Plain Layout
4392 」は曲折アクセントをとることは決してないために、LyXはビープを鳴らして文句を付けます。デッドキーの後に
4393 \begin_inset Flex MenuItem
4396 \begin_layout Plain Layout
4402 を打つと、アクセントだけが生成されます。この最後の点に注意してください。あるキーをデッドキーに割り当てる場合には、このキー上の文字を別のキーに割り当て直す必要が
4404 \begin_inset Flex MenuItem
4407 \begin_layout Plain Layout
4413 をセディーユに割り当てるのはよくありません。コンマを入力しようとすると必ずセディーユが出てくるようになるためです。
4416 \begin_layout Standard
4417 デッドキーを割り当てるのによく用いられる方法は、
4418 \begin_inset Flex MenuItem
4421 \begin_layout Plain Layout
4428 \begin_inset Flex MenuItem
4431 \begin_layout Plain Layout
4438 \begin_inset Flex MenuItem
4441 \begin_layout Plain Layout
4448 \begin_inset Flex MenuItem
4451 \begin_layout Plain Layout
4458 \begin_inset Flex MenuItem
4461 \begin_layout Plain Layout
4468 \begin_inset Flex MenuItem
4471 \begin_layout Plain Layout
4477 」のようなアクセントと一緒に用いる方法です。また、
4478 \begin_inset Flex Code
4481 \begin_layout Plain Layout
4488 \begin_inset Flex Code
4491 \begin_layout Plain Layout
4498 \begin_inset Flex Code
4501 \begin_layout Plain Layout
4508 \begin_inset Flex Code
4511 \begin_layout Plain Layout
4518 \begin_inset Flex MenuItem
4521 \begin_layout Plain Layout
4527 キーのように機能するので、アクセント文字を割り当てるのに使用できます。また、特定のキーを
4528 \begin_inset Flex Code
4531 \begin_layout Plain Layout
4537 などに割り当てることで、これらのキーをデッドキーに仕立て、このシンボリックキーを対応するLyXコマンドに割り当てることもできます
4541 \begin_layout Plain Layout
4547 \begin_inset Flex Code
4550 \begin_layout Plain Layout
4557 \begin_inset Flex Code
4560 \begin_layout Plain Layout
4567 \begin_inset Flex MenuItem
4570 \begin_layout Plain Layout
4572 \begin_inset space ~
4581 \begin_inset Flex Code
4584 \begin_layout Plain Layout
4591 \begin_inset Flex Code
4594 \begin_layout Plain Layout
4601 \begin_inset Flex MenuItem
4604 \begin_layout Plain Layout
4606 \begin_inset space ~
4615 \begin_inset Flex MenuItem
4618 \begin_layout Plain Layout
4620 \begin_inset space ~
4628 などに割り当てています。私はこの方法でアクセント文字を入力しています。
4634 \begin_inset Flex Code
4637 \begin_layout Plain Layout
4644 \begin_inset Flex MenuItem
4647 \begin_layout Plain Layout
4653 キーの片方や使われていないファンクションキーなど、ほぼ何でも指定することができます。アクセントを生み出すLyXコマンドについては、
4658 \begin_inset Flex Code
4661 \begin_layout Plain Layout
4667 の項をご覧ください。ここには完備した一覧があります。
4670 \begin_layout Subsection
4674 \begin_layout Standard
4675 \begin_inset Flex MenuItem
4678 \begin_layout Plain Layout
4679 ツール\SpecialChar \menuseparator
4685 ダイアログを使えば、LyXを起動したときに、ご希望の言語環境に自動的に設定されるように、設定を編集することができます。
4688 \begin_layout Chapter
4689 文書クラスやレイアウトやひな型を新規に導入する
4690 \begin_inset CommandInset label
4697 \begin_inset Argument
4700 \begin_layout Plain Layout
4709 \begin_layout Standard
4710 この章では、新しくLyXのレイアウトファイルやひな型ファイルを作成して、導入する手順を説明すると共に、新規にLaTeX文書クラス(ドキュメントクラス)を正しく導
4714 \begin_layout Standard
4715 まず、LyXとLaTeXの間の関係をどのように考えるべきか、若干の注釈を加えておくことにしましょう。理解していただきたいことは、ある意味において、LyXは、La
4716 TeXについて何も知らないと云うことです。実際のところ、LyXの観点からは、LaTeXは、LyXが出力を生成することができる、複数の「バックエンド書式」のうちの
4717 一つに過ぎないということです。同種のバックエンド書式には、DocBook・平文・XHTMLがあります。もちろんLaTeXは、とくに重要な書式ですが、LyXがLa
4718 TeXについて持っている情報のほとんどは、実はプログラム本体には含まれていないのです
4722 \begin_layout Plain Layout
4723 過度に複雑なため、LyXに「ハードコード化」されているコマンドもありますが、一般的に開発者は、これを「わるいこと」とみなしています。
4729 \begin_inset Flex Code
4732 \begin_layout Plain Layout
4738 のような標準クラスでも、「レイアウトファイル」に保管されています。同様に、LyXは、DocBookやXHTMLについてもほとんど知りません。LyXが知っているこ
4739 とは、レイアウトファイルの中にあります。
4742 \begin_layout Standard
4743 文書クラス用のレイアウトファイルは、LyX構成体---対応する様式や何らかの差込枠などを有する段落群---と、それに対応するLaTeX構成体・DocBook構成
4744 体・XHTML構成体との間の翻訳指南書のようなものです。たとえば、LyXが
4745 \begin_inset Flex Code
4748 \begin_layout Plain Layout
4754 について知っていることのほとんど総ては、
4755 \begin_inset Flex Code
4758 \begin_layout Plain Layout
4764 と、それが呼び出す他の様々なファイルに書き込まれています。このことから、レイアウトファイルを書こうとする人は、既存のファイルを研究することを勧めます。とっかかり
4766 \begin_inset Flex Code
4769 \begin_layout Plain Layout
4776 \begin_inset Flex Code
4779 \begin_layout Plain Layout
4785 や、文書クラス用の他のレイアウトファイルに取り込まれている
4786 \begin_inset Flex Code
4789 \begin_layout Plain Layout
4795 から見始めるのがよいでしょう。このファイルは、節などの定義が為されている場所です。
4796 \begin_inset Flex Code
4799 \begin_layout Plain Layout
4805 は、節様式や小節様式などとしてマークされている段落を、対応するLaTeX・DocBook・XHTMLのコマンドやタグにどのように翻訳すべきかをLyXに知らせるも
4807 \begin_inset Flex Code
4810 \begin_layout Plain Layout
4817 \begin_inset Flex Code
4820 \begin_layout Plain Layout
4826 ファイルを取り込んでいるだけのものです。
4829 \begin_layout Standard
4830 しかしながら、LyX--LaTeX間の対応を定義するだけが、レイアウトファイルが行うことではありません。レイアウトファイルが行うもう一つの仕事は、LyX構成体自
4831 身が画面上にどのように表示されるべきかを定義することです。この2つの仕事は全く独立したものであるので、レイアウトファイルが2つの仕事を行うという事実は、しばしば
4832 混乱を引き起こす元となります。ある段落様式をLaTeXに翻訳する仕方をLyXに指示することは、その表示の仕方をLyXに指示するものではありません。逆に、ある段落
4833 様式の表示の仕方をLyXに指示することは、その段落様式をどのようにLaTeXに翻訳するかをLyXに指示するものではありません(ましてやLaTeXに表示の仕方を指
4834 示するものではありません)。つまり、一般的に、新しいLyX構成体を定義する際には、(i)
4835 \begin_inset space ~
4838 LaTeXにどのように翻訳するかをLyXに指示する、(ii)
4839 \begin_inset space ~
4842 それをどのように表示するかをLyXに指示する、という、二つのかなり異なることを行わなくてはならないのです。
4845 \begin_layout Standard
4846 もちろん、LyXの他のバックエンド書式に関しても、ほぼ同じことが言えますが、XHTMLの場合には若干事情が異なり、LyXが、ブラウザ中での段落の表示方法を(CS
4847 Sの形で)出力するにあたって、当該段落をLyXが画面上に出力する仕方の情報を、ある程度利用することができます。しかし、この場合でも、LyXが内部的に行うことと、
4848 外部的に行う物事の間の区別は、依然として有効であり、この2つは独立して制御することができます。詳細に関しては、第
4849 \begin_inset CommandInset ref
4851 reference "sec:XHTML出力のタグ"
4858 \begin_layout Section
4862 \begin_layout Standard
4863 頒布版によっては、LyXで使いたいLaTeXパッケージやクラスファイルが含まれていないことがあるかもしれません。たとえば、オーバーヘッドプロジェクタ用のスライド
4864 を準備するためのパッケージである、FoilTeXがないかもしれません。TeXLive(2008年以降)やMiKTeXのような最近のLaTeX頒布版には、これらの
4865 パッケージを導入するためのユーザーインタフェースが用意されています。たとえば、MiKTeXでは、付属の「Package
4866 \begin_inset space ~
4869 Manager」プログラムを起動すると、利用できるパッケージの一覧を得ることができます。どれかを導入するには、その上で右クリックするかツールバーボタンを押してく
4873 \begin_layout Standard
4874 お使いのLaTeX頒布版がこのような「パッケージマネジャー」を提供していなかったり、使用中の頒布版にそのパッケージが入っていない場合には、以下のステップに従って
4878 \begin_layout Enumerate
4879 \begin_inset CommandInset href
4882 target "http://www.ctan.org/"
4886 などから欲しいパッケージを入手してください。
4889 \begin_layout Enumerate
4891 \begin_inset Flex Code
4894 \begin_layout Plain Layout
4900 」で終わるファイル名が入っている場合(FoilTeXがその一例です)は、コンソールを開いて、このファイルのフォルダに移動し、コマンド
4901 \begin_inset Flex Code
4904 \begin_layout Plain Layout
4910 を実行してください。すると、パッケージが解凍されて、導入すべきすべてのファイルが展開されます。たいていのLaTeXパッケージは圧縮されていないので、このステップ
4914 \begin_layout Enumerate
4915 ここで、パッケージを全ユーザーに使用可能にするか自分自身だけで使うかを決定する必要があります。
4919 \begin_layout Enumerate
4920 (Linux・OSXなどの)*nix系システムでは、システム上の全ユーザーに新パッケージを利用可能にしたければ、「ローカル」TeXツリーに導入し、そうでなければ
4921 「ユーザー」TeXツリーに導入してください。これらのツリーが存在しない場合にどこに作成すればよいかは、お使いのシステムに依存します。これを見いだすには、
4922 \begin_inset Flex Code
4925 \begin_layout Plain Layout
4935 \begin_layout Plain Layout
4941 \begin_inset Flex Code
4944 \begin_layout Plain Layout
4950 を実行してその場所を見つけることもできます。
4956 \begin_inset Flex Code
4959 \begin_layout Plain Layout
4966 \begin_inset Flex Code
4969 \begin_layout Plain Layout
4970 /usr/local/share/texmf/
4975 のような場所になっています。「ユーザー」TeXツリーの場所は、
4976 \begin_inset Flex Code
4979 \begin_layout Plain Layout
4986 \begin_inset Flex Code
4989 \begin_layout Plain Layout
4995 です(もしこれらの変数が事前定義されていなければ、定義しなくてはなりません)。「ローカル」ツリーを作成したり変更したりするには、おそらくroot権限が必要ですが
4996 、「ユーザー」ツリーにはこのような制限はありません。
4997 \begin_inset Newline newline
5000 一般的に、システムをアップグレードした際に、ユーザーが修正されたり上書きされたりということが起こらないので、ユーザーツリーに導入することが推奨されます。こうする
5001 と、自分のホームディレクトリをバックアップする際に、パッケージも他のものと一緒にバックアップされます(もちろん通常行われるようにすればの話です)。
5004 \begin_layout Enumerate
5005 Windowでは、システム上の全ユーザーに新パッケージを利用可能にしたければ、LaTeXの導入されているフォルダに移動し、それからサブフォルダ
5006 \begin_inset Flex Code
5009 \begin_layout Plain Layout
5019 に移動します(MiKTeXでは、これは既定では
5020 \begin_inset Flex Code
5023 \begin_layout Plain Layout
5039 \begin_layout Plain Layout
5040 これは、英語版でのみ正しいパスになっています。独語版では
5041 \begin_inset Flex Code
5044 \begin_layout Plain Layout
5062 \begin_inset Flex Code
5065 \begin_layout Plain Layout
5071 を作成し、パッケージの全ファイルをそこにコピーしてください。パッケージを自分だけで使用したい場合や、admin権限を持っていない場合には、ローカルLaTeXフォ
5072 ルダで同じことを行います。たとえばMiKTeX
5073 \begin_inset space ~
5077 \begin_inset Newline newline
5081 \begin_inset Flex Code
5084 \begin_layout Plain Layout
5087 Documents and Settings
5099 \begin_inset Newline newline
5103 \begin_inset Phantom HPhantom
5106 \begin_layout Plain Layout
5117 \begin_inset Flex Code
5120 \begin_layout Plain Layout
5133 \begin_inset Newline newline
5137 \begin_inset Newline newline
5141 \begin_inset Flex Code
5144 \begin_layout Plain Layout
5167 \begin_inset Newline newline
5174 \begin_layout Enumerate
5175 ここまで来れば、あとはLaTeXに新しいファイルがあることを告げるだけです。これは使用しているLaTeX頒布版に依存します。
5179 \begin_layout Enumerate
5180 TeXLiveの場合には、コンソールから
5181 \begin_inset Flex Code
5184 \begin_layout Plain Layout
5190 コマンドを実行してください。パッケージを全ユーザー用に導入した場合には、おそらくroot権限で行う必要があります。
5193 \begin_layout Enumerate
5194 MiKTeXでは、パッケージを全ユーザー用に導入した場合には、「Settings
5195 \begin_inset space ~
5198 (Admin)」を起動し、「Refresh FNDB」と記してあるボタンを押してください。そうでない場合には、「Settings」を起動して同様に行ってください
5203 \begin_layout Enumerate
5204 最後に、LyXに新しいパッケージがあることを告げなくてはなりません。そこで、LyXからツール\SpecialChar \menuseparator
5205 再初期設定メニューを実行して、LyXを再起動します。
5208 \begin_layout Standard
5209 これでパッケージが導入されました。この例では、文書クラス
5210 \begin_inset Flex Code
5213 \begin_layout Plain Layout
5215 \begin_inset space ~
5222 \begin_layout Plain Layout
5235 \begin_inset Flex MenuItem
5238 \begin_layout Plain Layout
5239 文書\SpecialChar \menuseparator
5240 設定\SpecialChar \menuseparator
5249 \begin_layout Standard
5250 \begin_inset Flex MenuItem
5253 \begin_layout Plain Layout
5254 文書\SpecialChar \menuseparator
5255 設定\SpecialChar \menuseparator
5261 メニューに列挙されてもいないLaTeX文書クラスを使用したい場合には、その「レイアウト」ファイルを作り出さなくてはなりません。これが次節のトピックです。
5264 \begin_layout Section
5268 \begin_layout Standard
5269 この節は、レイアウト情報を含む各種LyXファイルについて述べます。これらのファイルは、各種段落様式や文字様式についての記述がされているものであり、LyXがそれら
5270 をどのように表示すべきなのか、また、それらをどのようにLaTeXやDocBook、XHTMLその他の出力書式に翻訳すればよいのかが記されています。
5273 \begin_layout Standard
5274 ここでは、レイアウトファイル作成過程の包括的な解説を試みたいと思いますが、LaTeXクラスだけでもサポートする文書の種類があまりにたくさんあるので、読者が出会い
5275 うるケースや問題をすべてカバーすることはとても望めません。LyXユーザーメーリングリストには、自身の経験を人々と分かち合いたいと望む、レイアウトデザインの経験豊
5276 かな人々がよく顔を出していますので、気軽に質問を投げかけてみてください。
5279 \begin_layout Standard
5280 新しいレイアウトを準備するに当たっては、LyXと共に頒布されているレイアウトの例を見るのがたいへん役立ちます。他の人々も使用できるLaTeX文書クラス用のLyX
5281 レイアウトを作ったり、他の人々にも有用なモジュールをお書きになった場合には、
5282 \begin_inset CommandInset href
5284 name "LyX Wikiのレイアウトに関する節"
5285 target "http://wiki.lyx.org/Layouts/Layouts"
5289 か、LyX開発者メーリングリストに投稿して、LyX頒布版に同梱することができるようにしてください
5293 \begin_layout Plain Layout
5294 LyXはGeneral Public Licenseの下でライセンスされていますので、LyXに寄贈されたものは総て同じライセンス下に置かれることに注意してくださ
5303 \begin_layout Subsection
5305 \begin_inset CommandInset label
5307 name "sub:レイアウトモジュール"
5314 \begin_layout Standard
5315 ここまで、「レイアウトファイル」についてお話してきました。しかし、レイアウト情報を含むものには、他の種類のファイルもあります。厳密にレイアウトファイルと呼ぶとき
5317 \begin_inset Flex Code
5320 \begin_layout Plain Layout
5326 拡張子を持ち、文書クラスに関する情報をLyXに提供するものを指します。しかしながら、LyX 1.6以降、レイアウト情報は、拡張子が
5327 \begin_inset Flex Code
5330 \begin_layout Plain Layout
5340 にも含めることができます。レイアウトがLaTeXクラスに対応しているように、モジュールはLaTeXパッケージに対応するものであり、
5341 \begin_inset Flex Code
5344 \begin_layout Plain Layout
5350 モジュールのように、特定のパッケージにサポートを提供するためのモジュールもあります。レイアウトモジュールは、特定の文書レイアウトに特化したものではなく、多くのレ
5351 イアウトで使用できるという意味において、一面、
5352 \begin_inset Flex Code
5355 \begin_layout Plain Layout
5365 \begin_layout Plain Layout
5366 これらは任意の拡張子をつけることができますが、慣習的に
5367 \begin_inset Flex Code
5370 \begin_layout Plain Layout
5382 \begin_inset Flex Code
5385 \begin_layout Plain Layout
5391 でインクルードファイルを使用するには、そのファイルを編集しなくてはなりませんが、モジュールの場合は、
5392 \begin_inset Flex MenuItem
5395 \begin_layout Plain Layout
5396 文書\SpecialChar \menuseparator
5405 \begin_layout Standard
5406 モジュール作成は、新しく段落様式を一つ加えたり、任意設定差込枠を加えたりするだけで済むことも多いので、レイアウト編集を学ぶ上でもっとも易しい方法です。しかし原理
5407 的には、レイアウトファイルに入れることのできるものはすべて入れることができます。
5410 \begin_layout Standard
5412 \begin_inset Flex Code
5415 \begin_layout Plain Layout
5421 フォルダにコピーした後、モジュールがメニューに現れるようにするためには、LyXの再設定を行って再起動しなくてはなりません。しかしながら、モジュールの修正の場合に
5423 \begin_inset Flex MenuItem
5426 \begin_layout Plain Layout
5427 文書\SpecialChar \menuseparator
5433 を開いてどれかを選択し「OK」を押せば、直ちに反映されます。
5435 これを実行する前に、作業中の文書を保存しておくことを強く勧めます
5439 実際の文書で作業しているときに、同時にモジュールの編集をしようとしないことを強く勧めます
5441 。もちろん開発陣は、そのような場合でもLyXが安定性を維持するように努力していますが、あなたが作成したモジュール中の文法エラー等によって、奇妙な挙動が引き起こさ
5445 \begin_layout Subsection
5446 \begin_inset Flex MenuItem
5449 \begin_layout Plain Layout
5458 \begin_layout Standard
5459 新しくLaTeX文書クラスをサポートしようとするとき、LaTeX2eクラス(
5460 \begin_inset Flex Code
5463 \begin_layout Plain Layout
5470 \begin_inset Flex Code
5473 \begin_layout Plain Layout
5479 )ファイルが絡む場合の2つの状況があり得ます。スタイルファイルのサポートは、通常は、かなり容易ですが、新しくクラスファイルをサポートすることは、もう少し難しくな
5480 ります。この節では、前者について述べることとし、後者については次節に譲ります。当然のことながら、新しくDocBook DTDをサポートしたい場合にも、同様の所見
5484 \begin_layout Standard
5485 この易しい方の場合では、新しい文書クラスは、既にサポートされている文書クラスと共に使うスタイルファイルとして提供されています。例示のために、スタイルファイルは
5486 \begin_inset Flex MenuItem
5489 \begin_layout Plain Layout
5496 \begin_inset Flex MenuItem
5499 \begin_layout Plain Layout
5508 \begin_layout Standard
5509 既存の文書クラスのレイアウトファイルを、以下のように、お使いのローカルディレクトリにコピーすることから始めてください
5513 \begin_layout Plain Layout
5514 もちろん、どのディレクトリがローカルディレクトリとなるかは、プラットフォームに依存します。LyXでは、起動時に
5515 \begin_inset Flex MenuItem
5518 \begin_layout Plain Layout
5524 オプションを指定することによって、ローカルディレクトリを指定することも可能です。
5532 \begin_layout LyX-Code
5533 cp report.layout ~/.lyx/layouts/myclass.layout
5536 \begin_layout Standard
5538 \begin_inset Flex Code
5541 \begin_layout Plain Layout
5550 \begin_layout LyX-Code
5557 \begin_layout Plain Layout
5567 \begin_layout Standard
5571 \begin_layout LyX-Code
5581 \begin_layout Plain Layout
5591 eXClass[report, myclass.sty]{report (myclass)}
5594 \begin_layout Standard
5595 のように変更してください。それから、ファイル冒頭辺りに
5598 \begin_layout LyX-Code
5600 \begin_inset Newline newline
5606 \begin_inset Newline newline
5612 \begin_layout Standard
5616 \begin_layout Standard
5618 \begin_inset Flex MenuItem
5621 \begin_layout Plain Layout
5622 ツール\SpecialChar \menuseparator
5628 を選択してください。それからLyXを再起動し、新規文書を作成してみてください。すると、
5629 \begin_inset Flex MenuItem
5632 \begin_layout Plain Layout
5633 文書\SpecialChar \menuseparator
5640 \begin_inset Flex MenuItem
5643 \begin_layout Plain Layout
5649 」が現れるはずです。新しいクラスにおいて、節区切り用コマンドなどの一部が、基礎となったクラス—この例では
5650 \begin_inset Flex Code
5653 \begin_layout Plain Layout
5659 —とは違う挙動をすることはよくありますので、希望に応じて、各節の設定をいじると良いでしょう。各節のレイアウト情報は、
5660 \begin_inset Flex Code
5663 \begin_layout Plain Layout
5669 に含まれていますが、このファイルをコピーしたり変更したりする必要はありません。代わりに、自身のレイアウトファイル中、
5670 \begin_inset Flex Code
5673 \begin_layout Plain Layout
5680 \begin_inset Flex Code
5683 \begin_layout Plain Layout
5689 の後に変更を加えるだけです。たとえば、章見だしのフォントをサンセリフ体に変更するには、以下のような行を加えます。
5692 \begin_layout LyX-Code
5696 \begin_layout LyX-Code
5700 \begin_layout LyX-Code
5704 \begin_layout LyX-Code
5708 \begin_layout LyX-Code
5712 \begin_layout Standard
5713 これは、既存の章様式宣言を上書き(あるいはこの場合には追加)します。
5716 \begin_layout Standard
5717 新しいパッケージでは、基礎となったクラスには存在しないコマンドや環境を提供することもできます。この場合には、これらをレイアウトファイルに加えます。そのやり方につ
5719 \begin_inset CommandInset ref
5721 reference "sec:テキストクラス"
5728 \begin_layout Standard
5730 \begin_inset Flex Code
5733 \begin_layout Plain Layout
5739 が他の文書クラスで使用することができたり、あるいはできない場合でも、基礎となるクラスから読み込むことのできるモジュールを書くのが最も簡単であることがわかるでしょ
5740 う。最も簡単なモジュールの例としては、以下のようなものになります。
5743 \begin_layout LyX-Code
5746 DeclareLyXModule{My Package}
5749 \begin_layout LyX-Code
5753 \begin_layout LyX-Code
5754 #Support for mypkg.sty.
5757 \begin_layout LyX-Code
5759 \begin_inset Newline newline
5765 \begin_layout LyX-Code
5767 \begin_inset Newline newline
5773 \begin_layout LyX-Code
5775 \begin_inset Newline newline
5781 \begin_inset Newline newline
5787 \begin_layout Standard
5788 もう少し複雑なモジュールでは、既存の構成物の挙動を修正したり、新しい構成物を定義したりすることになるでしょう。この辺りの議論については、第
5789 \begin_inset CommandInset ref
5791 reference "sec:テキストクラス"
5798 \begin_layout Subsection
5799 \begin_inset Flex MenuItem
5802 \begin_layout Plain Layout
5811 \begin_layout Standard
5812 これには2つのケースがありえます。ひとつは、クラスファイル自体が既存の文書クラスに立脚している場合です。たとえば、多くの学位論文用クラスは
5813 \begin_inset Flex MenuItem
5816 \begin_layout Plain Layout
5822 に基づいています。お使いのものがどうであるかを見るには、クラスファイル中に
5825 \begin_layout LyX-Code
5831 \begin_layout Standard
5832 という行がないかどうか探してください。もしこれがあれば、
5833 \begin_inset Flex Code
5836 \begin_layout Plain Layout
5842 行は異なりますが、おおよそ前節のように進めることができます。あなたが新しく作るクラスが
5843 \begin_inset Flex Code
5846 \begin_layout Plain Layout
5853 \begin_inset Flex Code
5856 \begin_layout Plain Layout
5863 \begin_inset Flex Code
5866 \begin_layout Plain Layout
5876 \begin_layout Plain Layout
5877 さらにLyXは、文書クラス名がレイアウトファイル名と同じだと仮定するので、クラスファイルを
5878 \begin_inset Flex Code
5881 \begin_layout Plain Layout
5895 \begin_layout LyX-Code
5902 \begin_layout Plain Layout
5909 eXClass[thesis,book]{thesis}
5912 \begin_layout Standard
5913 他方、新しいクラスが既存のクラスに基づいていない場合には、おそらくあなた自身のレイアウトをしたためる必要があります。もし可能であれば、類似したLaTeXクラスを
5914 使用している既存のレイアウトファイルをコピーして、それに修正を加えるようにすることを強くお勧めします。少なくとも、どの項目を考慮すべきかがわかるように、既存のフ
5918 \begin_layout Subsection
5920 \begin_inset CommandInset label
5929 \begin_layout Standard
5930 新しい文書クラス用のレイアウトファイルを書いたならば、そのレイアウト用のひな型も書くことを検討されるかもしれません。ひな型は、内容はダミーですが、レイアウトの使
5931 い方を示す一種のチュートリアルとして動作します。もちろん、イメージを得るために、LyX添付のひな型をあれこれ見てみるのもよいでしょう。
5934 \begin_layout Standard
5935 ひな型は、通常の文書と同様、LyXを使って作成することができます。唯一違う点は、通常の文書では、フォント構成や用紙寸法を含め、すべてのあり得る設定が為されている
5936 点です。これらの場合、通常ユーザーはひな型が彼の設定値を上書きすることを望みません。この理由から、ひな型の設計者は、
5937 \begin_inset Flex Code
5940 \begin_layout Plain Layout
5949 \begin_inset Flex Code
5952 \begin_layout Plain Layout
5960 などの対応するコマンドをひな型LyXファイルから取り除く必要があります。これは、たとえば
5961 \begin_inset Flex Code
5964 \begin_layout Plain Layout
5971 \begin_inset Flex Code
5974 \begin_layout Plain Layout
5980 のような、どの軽いテキストエディタでも行うことができます。
5983 \begin_layout Standard
5985 \begin_inset Flex Code
5988 \begin_layout Plain Layout
5995 \begin_inset Flex Code
5998 \begin_layout Plain Layout
6004 から使用したいものを同じ場所にコピーし、
6005 \begin_inset Flex MenuItem
6008 \begin_layout Plain Layout
6009 ツール\SpecialChar \menuseparator
6010 設定\SpecialChar \menuseparator
6016 ダイアログのひな型パスを再定義してください。
6019 \begin_layout Standard
6021 \begin_inset Flex Code
6024 \begin_layout Plain Layout
6030 があることに注意してください。このひな型は、
6031 \begin_inset Flex MenuItem
6034 \begin_layout Plain Layout
6035 ファイル\SpecialChar \menuseparator
6041 を使って新規文書を作成する際、便利な既定値を提供する目的で必ず読み込まれます。このひな型をLyX内部から作成するのにしなくてはならないことは、対応する設定を持つ
6043 \begin_inset Flex MenuItem
6046 \begin_layout Plain Layout
6055 \begin_layout Subsection
6059 \begin_layout Standard
6060 レイアウトファイルの書式は、LyXのリリース毎に変更されますので、古いレイアウトファイルは変換されなくてはなりません。この過程は、LyX第1.4版から自動化されま
6061 した。LyXが古い書式のレイアウトファイルを読み込むと、LyXは、自動的に変換ツール
6062 \begin_inset Flex Code
6065 \begin_layout Plain Layout
6066 LyXDir/scripts/layout2layout.py
6071 を呼び出し、それを現在の書式の一時ファイルに変換します。元のファイルは変更を加えられずに措かれます。もしこのレイアウトファイルをよく使うならば、LyXがこれを毎
6072 回行なわくて済むように、レイアウトファイルを恒久的に変換しておきたいと思うかもしれません。これを行うには、以下のように変換子を手動で呼び出してください。
6075 \begin_layout LyX-Code
6076 mv myclass.layout myclass.old
6079 \begin_layout LyX-Code
6080 python LyXDir/scripts/layout2layout.py myclass.old myclassnew.layout
6083 \begin_layout Standard
6085 \begin_inset Flex Code
6088 \begin_layout Plain Layout
6094 は、お使いのLyXシステムディレクトリ名に置き換えてください。
6097 \begin_layout Standard
6098 手動変換は、インクルードされているファイル内部の変更までは取り扱いませんので、それらのファイルは別に変換されなくてはなりません。
6101 \begin_layout Section
6102 \begin_inset CommandInset label
6111 \begin_layout Standard
6112 以下の各節では、いよいよ自分の手を汚してレイアウトファイルを作成したり編集したりする段階になった際、直面することの説明を行います。私たちからのアドバイスとしては
6113 、ゆっくりと進めるようにして、ちょっと進むごとに保存やテストを行い、心休まる音楽を聴き、好きな大人の飲み物を一二杯口にしながら行うのがいいでしょう。特に行き詰ま
6114 ってしまったときにはそうです。実際にはそんなに難しいことではないのですが、特に一度に多くのことをやろうとすると、選択肢が多くありすぎて圧倒されてしまうのです。さ
6115 て、もう一杯大人向け飲料をどうぞ。適量ね。
6118 \begin_layout Standard
6119 この章で述べられているタグは、すべて大文字小文字を区別しません。つまり、
6120 \begin_inset Flex Code
6123 \begin_layout Plain Layout
6130 \begin_inset Flex Code
6133 \begin_layout Plain Layout
6140 \begin_inset Flex Code
6143 \begin_layout Plain Layout
6149 は同じコマンドとなります。機能名の後にある角括弧は、その機能が取り得る値を示します。テキストクラス設定内で機能が特定されていない場合には、既定値は
6150 \begin_inset Flex Code
6153 \begin_layout Plain Layout
6161 で表記されます。引数が「文字列」や「浮動小数点型」などのデータ型をとる場合には、既定値は
6162 \begin_inset Flex Code
6165 \begin_layout Plain Layout
6176 \begin_layout Subsection
6180 \begin_layout Standard
6182 \begin_inset Flex Code
6185 \begin_layout Plain Layout
6191 で始まる行はコメントです。この規則には一つだけ例外があります。すべての
6192 \begin_inset Flex Code
6195 \begin_layout Plain Layout
6201 ファイルは、以下のような行で始めなくてはならないのです。
6204 \begin_layout LyX-Code
6207 #% Do not delete the line below; configure depends on this
6210 \begin_layout LyX-Code
6221 \begin_layout Plain Layout
6233 \begin_layout Standard
6234 この2行目は、LyXを初期設定や(再)設定するときに用いられるのです。このレイアウトファイルは、LaTeXスクリプト
6235 \begin_inset Flex Code
6238 \begin_layout Plain Layout
6245 \begin_inset Flex Code
6248 \begin_layout Plain Layout
6254 を無視する特別なモードで読み込みます。1行目は単なるLaTeXコメントですが、2行目にはテキストクラスの宣言が書かれています。これらの行が
6255 \begin_inset Flex Code
6258 \begin_layout Plain Layout
6265 \begin_inset Flex Code
6268 \begin_layout Plain Layout
6274 (レイアウトファイル名)という名称のテキストクラスを定義し、LaTeX文書クラス
6275 \begin_inset Flex Code
6278 \begin_layout Plain Layout
6284 を使用するようになります(既定ではレイアウトと同じ名称のものを使用します)。上記に現れる「article」という文字列は、
6285 \begin_inset Flex MenuItem
6288 \begin_layout Plain Layout
6289 文書\SpecialChar \menuseparator
6295 ダイアログのテキストクラスの説明に使用されます。
6298 \begin_layout Standard
6300 \begin_inset Flex Code
6303 \begin_layout Plain Layout
6309 文書クラスを使用するテキストクラスを自分で書いたものとしましょう。これを
6310 \begin_inset Flex Code
6313 \begin_layout Plain Layout
6319 というファイルに置いたとすると、このファイルのヘッダは以下のようになります。
6322 \begin_layout LyX-Code
6325 #% Do not delete the line below; configure depends on this
6328 \begin_layout LyX-Code
6339 \begin_layout Plain Layout
6348 eXClass[article]{article (with my own headings)}
6351 \begin_layout Standard
6353 \begin_inset Flex Code
6356 \begin_layout Plain Layout
6362 に関連づけられ、「article (with my own headings)」と表示される、
6363 \begin_inset Flex Code
6366 \begin_layout Plain Layout
6372 テキストクラスを宣言するものです。もしこのテキストクラスが複数のパッケージに依存するならば、以下のように宣言すると良いでしょう。
6375 \begin_layout LyX-Code
6378 #% Do not delete the line below; configure depends on this
6381 \begin_layout LyX-Code
6392 \begin_layout Plain Layout
6401 eXClass[article,foo.sty]{article (with my own headings)}
6404 \begin_layout Standard
6406 \begin_inset Flex Code
6409 \begin_layout Plain Layout
6415 パッケージを使用することを示しています。最後に、DocBookコード向けのクラスを宣言することもできることを見ます。典型的な宣言は以下のようになります。
6418 \begin_layout LyX-Code
6421 #% Do not delete the line below; configure depends on this
6424 \begin_layout LyX-Code
6429 DeclareDocBookClass[article]{SGML (DocBook article)}
6432 \begin_layout Standard
6433 これらの宣言には、文書クラス名を宣言する非必須パラメータ(ただしリストではない)を与えることができることに注意してください。
6436 \begin_layout Standard
6437 できる限り明示的に要約すると、レイアウト宣言は以下の形をとります。
6440 \begin_layout LyX-Code
6451 \begin_layout Plain Layout
6460 eXClass[クラス,パッケージ名.sty]{レイアウトの説明}
6463 \begin_layout Standard
6464 ここで「クラス」は、LaTeXクラスファイル名とレイアウトファイル名が異なるときのみ、指定する必要があります。クラスファイル名が指定されなければ、LyXは単純に
6465 、クラスファイル名がレイアウトファイル名と同じであると仮定します。
6468 \begin_layout Standard
6469 テキストクラスがあなたの嗜好に合うように修正できたならば、他にしなくてはならないことは、それを
6470 \begin_inset Flex Code
6473 \begin_layout Plain Layout
6478 \begin_layout Plain Layout
6491 \begin_inset Flex Code
6494 \begin_layout Plain Layout
6501 \begin_inset Flex MenuItem
6504 \begin_layout Plain Layout
6505 ツール\SpecialChar \menuseparator
6511 を実行し、LyXを終了して再起動するだけです。そうすれば、この新しいテキストクラスが、他のテキストクラスと同様に使用できるようになります。
6514 \begin_layout Standard
6515 レイアウトファイルが導入されたならば、これを編集して、再初期設定したりLyXを再起動したりすることなく、その変更を確認することができます
6519 \begin_layout Plain Layout
6520 第1.6版よりも前のLyXでは、これを行うことはできませんでした。その結果、レイアウトファイルに加えた変更を反映させるには、その度にLyXを再起動しなくてはならな
6521 かったので、レイアウトファイルを編集する作業は、たいへん時間を浪費する作業だったのです。
6527 \begin_inset Flex MenuItem
6530 \begin_layout Plain Layout
6536 を使用すれば、現在使っているレイアウトの再読み込みを強制することができるのです。この関数への既定のキー割り当てはありません—もちろん自分でどれかのキーに割り当て
6537 ることもできますが—。しかし、通常は、この関数を使用する場合は、これをミニバッファに入力します。
6540 \begin_layout Standard
6546 \begin_inset Flex MenuItem
6549 \begin_layout Plain Layout
6555 はかなり「高度な機能」です。この機能を利用する前に、作業中の文書を保存しておくことを
6559 勧めます。もっと言えば、大事な文書の作業をしているときに、同時にレイアウト情報の編集をしようとしないことを
6563 勧めます。テスト用文書を使用してください。レイアウトファイル中の文法エラー等が奇妙な挙動を引き起こす可能性があります。特に、そのようなエラーが起こると、LyXは
6564 現在のレイアウトが無効であるものと判断して、別のレイアウトに切り替えようとする可能性があります
6568 \begin_layout Plain Layout
6569 非常に悪質な文法エラーの場合には、LyXが終了してしまうことさえあります。これは、ある種のエラーでは、LyXがレイアウト情報を全く読めなくなる可能性があるからで
6575 。LyX開発陣は、このような状況下でも安定性を保つよう努力していますが、後悔よりも安心の方が良いでしょう
6579 \begin_layout Plain Layout
6580 重ねての助言ですが、つねにバックアップを取ってください。それから、お母さんのお片づけに注意。
6588 \begin_layout Subsection
6592 \begin_layout Standard
6593 モジュールは、以下のような行で始まらなくてはなりません。
6596 \begin_layout LyX-Code
6603 \begin_layout Plain Layout
6610 yXModule[endnotes.sty]{Endnotes}
6613 \begin_layout Standard
6614 波括弧内に入っている必須引数はモジュール名で、これは
6615 \begin_inset Flex MenuItem
6618 \begin_layout Plain Layout
6619 文書\SpecialChar \menuseparator
6625 内に表示されます。角括弧内の引数は非必須です。これは、モジュールが依存するLaTeXパッケージをすべて宣言します。角括弧の中には、LyXにとって既知のパッケージ
6626 だけしか、列挙することはできないことに注意してください。
6630 \begin_layout Plain Layout
6631 既知のパッケージのリストは、ソースコード中でしか、ドキュメント化されていません。
6636 LyXは、任意のパッケージをチェックすることはしません。また、非必須引数として、
6637 \begin_inset Flex Code
6640 \begin_layout Plain Layout
6647 \begin_inset Flex Code
6650 \begin_layout Plain Layout
6657 \begin_inset Flex Code
6660 \begin_layout Plain Layout
6666 書式への変換鎖が存在するときのみ、このモジュールを使用できることを宣言するものです。
6669 \begin_layout Standard
6670 それから、以下のようなモジュール宣言を行います。
6673 \begin_layout LyX-Code
6677 \begin_layout LyX-Code
6678 #Adds an endnote command, in addition to footnotes.
6682 \begin_layout LyX-Code
6683 #You will need to add
6689 \begin_layout Plain Layout
6699 \begin_layout LyX-Code
6700 #want the endnotes to appear.
6704 \begin_layout LyX-Code
6708 \begin_layout LyX-Code
6709 #Requires: somemodule | othermodule
6712 \begin_layout LyX-Code
6713 #Excludes: badmodule
6716 \begin_layout Standard
6717 ここで説明(Description)は、
6718 \begin_inset Flex MenuItem
6721 \begin_layout Plain Layout
6722 文書\SpecialChar \menuseparator
6728 でこのモジュールが何をするものか、ユーザに情報を与えるために使用されます。
6729 \begin_inset Flex Code
6732 \begin_layout Plain Layout
6738 行は、このモジュールが共に使用する必要がある、他のモジュールを特定するのに用いられます。一方、
6739 \begin_inset Flex Code
6742 \begin_layout Plain Layout
6748 行は、このモジュールが共に使用してはならない、他のモジュールを特定するのに用いられます。この2つの行は必須ではなく、上記のようにモジュールが複数ある場合には、パ
6749 イプ記号「|」で区切らなくてはなりません。
6750 \begin_inset Flex Code
6753 \begin_layout Plain Layout
6759 に指定されたモジュールは、選言的に取り扱われることに注意してください。つまり、
6760 \begin_inset Flex Code
6763 \begin_layout Plain Layout
6773 が使用されていればよいということです。同様に、
6774 \begin_inset Flex Code
6777 \begin_layout Plain Layout
6783 に指定されたモジュールは、一つも使用されてはなりません。ここでモジュールは、
6784 \begin_inset Flex Code
6787 \begin_layout Plain Layout
6797 で認識されることに注意してください。つまり
6798 \begin_inset Flex Code
6801 \begin_layout Plain Layout
6808 \begin_inset Flex Code
6811 \begin_layout Plain Layout
6820 \begin_layout Subsection
6824 \begin_layout Standard
6825 レイアウトファイルやインクルードされたファイル、またはモジュールの最初の非コメント行には、以下のように、かならずファイル書式番号が記されていなくてはなりません。
6828 \begin_layout Description
6829 \begin_inset Flex Code
6832 \begin_layout Plain Layout
6839 \begin_inset Flex Code
6842 \begin_layout Plain Layout
6851 \begin_layout Standard
6852 このタグはLyX 1.4.0で導入されました。LyX 1.3.x以前のレイアウトファイルには、明示されたファイル書式がないため、書式1と解されます。LyX現行版のファイ
6853 ル書式は、書式21です。しかし、LyXの各版は、旧版のLyXで作成されたファイルを読むことができるように、旧版のレイアウトファイルも読むことができます。しかしな
6854 がら、以前の書式に変換する方法はありません。したがって、LyX 1.6.xは、書式11以前のファイルのみを読むことができますが、書式21は読むことができません。
6857 \begin_layout Subsection
6858 \begin_inset CommandInset label
6860 name "sub:汎用テキストクラスパラメータ"
6867 \begin_layout Standard
6868 以下は、文書クラス全体の挙動を決定する汎用パラメータです(これは、
6869 \begin_inset Flex Code
6872 \begin_layout Plain Layout
6878 ファイルのみに使用されるべきで、モジュールでは使ってはならない、ということを意味するものでは
6882 。モジュールには、すべてのレイアウトタグを使用することができます)。
6885 \begin_layout Description
6886 \begin_inset Flex Code
6889 \begin_layout Plain Layout
6895 この文書クラスがXHTMLに出力されるときに、
6896 \begin_inset Flex Code
6899 \begin_layout Plain Layout
6905 ブロックに追加出力される情報です。典型的には、これはCSSスタイル情報を出力するのに用いられますが、
6906 \begin_inset Flex Code
6909 \begin_layout Plain Layout
6915 に出力するものであれば、何でも使用することができます。「
6916 \begin_inset Flex Code
6919 \begin_layout Plain Layout
6928 \begin_layout Description
6929 \begin_inset Flex Code
6932 \begin_layout Plain Layout
6938 文書プリアンブルに書き加えられる情報です。「
6939 \begin_inset Flex Code
6942 \begin_layout Plain Layout
6951 \begin_layout Description
6952 \begin_inset Flex Code
6955 \begin_layout Plain Layout
6961 書誌情報の表示に使う書式を定義します。詳細については、第
6962 \begin_inset CommandInset ref
6964 reference "sub:引用書式指定"
6969 \begin_inset Flex Code
6972 \begin_layout Plain Layout
6981 \begin_layout Description
6982 \begin_inset Flex Code
6985 \begin_layout Plain Layout
6991 文書クラスがサポートする様々な大域オプションを記します。説明は、第
6992 \begin_inset CommandInset ref
6994 reference "sub:ClassOptions"
6999 \begin_inset Flex Code
7002 \begin_layout Plain Layout
7011 \begin_layout Description
7012 \begin_inset Flex Code
7015 \begin_layout Plain Layout
7022 \begin_inset Flex Code
7025 \begin_layout Plain Layout
7034 \begin_inset Flex Code
7037 \begin_layout Plain Layout
7043 ] 文書クラスが既定で1段組か2段組かを指定します。
7044 \begin_inset Flex MenuItem
7047 \begin_layout Plain Layout
7048 文書\SpecialChar \menuseparator
7057 \begin_layout Description
7058 \begin_inset Flex Code
7061 \begin_layout Plain Layout
7068 \begin_inset Flex Code
7071 \begin_layout Plain Layout
7077 ] この部分はカウンタの特性を定義します。カウンタがまだ存在していなければ、生成されます。もし存在しなければ修正されます。「
7078 \begin_inset Flex Code
7081 \begin_layout Plain Layout
7088 \begin_inset Newline newline
7092 \begin_inset CommandInset ref
7094 reference "sub:カウンタ"
7101 \begin_layout Description
7102 \begin_inset Flex Code
7105 \begin_layout Plain Layout
7111 文書を表示するのに用いられる既定フォントを設定します。フォントの宣言の仕方については、第
7112 \begin_inset CommandInset ref
7114 reference "sub:フォント指定"
7119 \begin_inset Flex Code
7122 \begin_layout Plain Layout
7131 \begin_layout Description
7132 \begin_inset Flex Code
7135 \begin_layout Plain Layout
7142 \begin_inset Flex Code
7145 \begin_layout Plain Layout
7151 ] この文書クラスに、既定で取り込むモジュールを指定します。モジュールは、
7152 \begin_inset Flex Code
7155 \begin_layout Plain Layout
7161 拡張子を除いたファイル名で指定します。ユーザはこのモジュールを除外することができますが、当初は有効の状態になっています(これは新しいファイルが作成されたときや、
7162 既存の文書にこの文書クラスが選択したときのみ該当します)。
7165 \begin_layout Description
7166 \begin_inset Flex Code
7169 \begin_layout Plain Layout
7176 \begin_inset Flex Code
7179 \begin_layout Plain Layout
7185 ] これは新規段落に割り当てられる様式であり、通常は
7186 \begin_inset Flex MenuItem
7189 \begin_layout Plain Layout
7195 です。もしこれを指定しなければ、最初に定義される様式がこれに割り当てられるようにはなっていますが、このディレクティブを使用することが推奨されます。
7198 \begin_layout Description
7199 \begin_inset Flex Code
7202 \begin_layout Plain Layout
7209 \begin_inset Flex Code
7212 \begin_layout Plain Layout
7219 \begin_inset Flex Code
7222 \begin_layout Plain Layout
7228 拡張子を除いたファイル名で指定します—が、この文書クラスでは使用できないように設定します。これはたとえば、特定の学術誌用レイアウトファイルの中で、定理番号を節毎
7230 \begin_inset Flex Code
7233 \begin_layout Plain Layout
7239 モジュールが使用されるのを防ぐために用いたりすることができます。このタグは、モジュール内で
7243 。モジュールは、他のモジュールを排除する独自の枠組みがあります(第
7244 \begin_inset CommandInset ref
7246 reference "sub:レイアウトモジュール"
7253 \begin_layout Description
7254 \begin_inset Flex Code
7257 \begin_layout Plain Layout
7264 \begin_inset CommandInset ref
7266 reference "sub:フロート"
7271 \begin_inset Flex Code
7274 \begin_layout Plain Layout
7283 \begin_layout Description
7284 \begin_inset Flex Code
7287 \begin_layout Plain Layout
7293 この文書クラスがXHTMLに出力されるときに、
7294 \begin_inset Flex Code
7297 \begin_layout Plain Layout
7303 ブロックに出力される情報です。これより前に出現した
7304 \begin_inset Flex Code
7307 \begin_layout Plain Layout
7314 \begin_inset Flex Code
7317 \begin_layout Plain Layout
7323 宣言は、すべて完全に上書きされることに注意してください。(プリアンブルに何かを追加したい時には、
7324 \begin_inset Flex Code
7327 \begin_layout Plain Layout
7334 \begin_inset Flex Code
7337 \begin_layout Plain Layout
7346 \begin_layout Description
7347 \begin_inset Flex Code
7350 \begin_layout Plain Layout
7357 \begin_inset Flex Code
7360 \begin_layout Plain Layout
7366 ] 文書がHTMLに出力されるときに、目次や書誌情報などに使用されるレイアウトです。articleの場合には、これは通常「節」であり、bookの場合は「章」です
7367 。これを指定しない場合には、LyXはどのレイアウトを使用するべきか、解析しようと試みます。
7370 \begin_layout Description
7371 \begin_inset Flex Code
7374 \begin_layout Plain Layout
7381 \begin_inset Flex Code
7384 \begin_layout Plain Layout
7390 ] 与えられたカウンタの特性を修正します。カウンタが存在しない場合には、この節は無視されます。「
7391 \begin_inset Flex Code
7394 \begin_layout Plain Layout
7401 \begin_inset Newline newline
7405 \begin_inset CommandInset ref
7407 reference "sub:カウンタ"
7414 \begin_layout Description
7415 \begin_inset Flex Code
7418 \begin_layout Plain Layout
7425 \begin_inset Flex Code
7428 \begin_layout Plain Layout
7434 ] 与えられた段落様式の特性を修正します。様式が存在しない場合には、この節は無視されます。「
7435 \begin_inset Flex Code
7438 \begin_layout Plain Layout
7447 \begin_layout Description
7448 \begin_inset Flex Code
7451 \begin_layout Plain Layout
7457 名称の指し示すように、このコマンドは、同じコマンドを何度も指定せずに済むように、別のレイアウト定義ファイルを取り込ませます。よく使われる例は、基本的なレイアウ
7459 \begin_inset Flex Code
7462 \begin_layout Plain Layout
7471 \begin_layout Description
7472 \begin_inset Flex Code
7475 \begin_layout Plain Layout
7481 このセクションは、差込枠のレイアウトを定義(再定義)します。これは、既存の差込枠にも、新しい文字様式のような新規のユーザ定義差込枠にも使用することができます。
7483 \begin_inset Flex Code
7486 \begin_layout Plain Layout
7493 \begin_inset Newline newline
7497 \begin_inset CommandInset ref
7499 reference "sub:任意設定差込枠"
7506 \begin_layout Description
7507 \begin_inset Flex Code
7510 \begin_layout Plain Layout
7516 画面上の左余白の幅を指示する文字列。例:「MMMMM」。(これは、「2ex」のような「長さ」ではないことに注意してください。)
7519 \begin_layout Description
7520 \begin_inset Flex Code
7523 \begin_layout Plain Layout
7529 このコマンドは既存のフロートを削除します。これは特に、Inputで取り込んだファイルに定義されていたフロートを抑制するのに便利です。
7532 \begin_layout Description
7533 \begin_inset Flex Code
7536 \begin_layout Plain Layout
7542 このコマンドは既存の様式を削除します。これは特に、Inputで取り込んだファイルに定義されていた様式を抑制するのに便利です。
7545 \begin_layout Description
7546 \begin_inset Flex Code
7549 \begin_layout Plain Layout
7555 このクラスによって生成されるファイル書式を示す文字列(
7559 ダイアログで定義される形のもの)。おもに、
7560 \begin_inset Flex Code
7563 \begin_layout Plain Layout
7569 が「literate」になっていて、新しい型のliterate文書を定義したい時に便利です。対応する
7570 \begin_inset Flex Code
7573 \begin_layout Plain Layout
7579 パラメーターに遭遇したときには、この文字列は、「docbook」・「latex」・「literate」のいずれかにリセットされます。
7582 \begin_layout Description
7583 \begin_inset Flex Code
7586 \begin_layout Plain Layout
7592 このクラスを使用する文書がどのような種類の出力をするかを示す文字列。現在のところ、取り得る値は「docbook」・「latex」・「literate」です。
7595 \begin_layout Description
7596 \begin_inset Flex Code
7599 \begin_layout Plain Layout
7608 \begin_inset Flex Code
7611 \begin_layout Plain Layout
7620 \begin_inset Flex Code
7623 \begin_layout Plain Layout
7630 \begin_inset Flex Code
7633 \begin_layout Plain Layout
7640 \begin_inset Flex MenuItem
7643 \begin_layout Plain Layout
7644 文書\SpecialChar \menuseparator
7653 \begin_layout Description
7654 \begin_inset Flex Code
7657 \begin_layout Plain Layout
7663 LaTeX文書のプリアンブルを設定します。前に行った
7664 \begin_inset Flex Code
7667 \begin_layout Plain Layout
7674 \begin_inset Flex Code
7677 \begin_layout Plain Layout
7683 宣言は、すべて上書きされてしまうので注意してください。(プリアンブルに何かを追加したい時には、
7684 \begin_inset Flex Code
7687 \begin_layout Plain Layout
7694 \begin_inset Flex Code
7697 \begin_layout Plain Layout
7706 \begin_layout Description
7707 \begin_inset Flex Code
7710 \begin_layout Plain Layout
7717 \begin_inset Flex Code
7720 \begin_layout Plain Layout
7727 \begin_inset Flex Code
7730 \begin_layout Plain Layout
7739 \begin_inset Flex Code
7742 \begin_layout Plain Layout
7749 \begin_inset Flex Code
7752 \begin_layout Plain Layout
7758 で示される機能を既に提供しているかどうかを示します。機能は、一般的にパッケージ名(
7759 \begin_inset Flex Code
7762 \begin_layout Plain Layout
7769 \begin_inset Flex Code
7772 \begin_layout Plain Layout
7778 ・\SpecialChar \ldots{}
7780 \begin_inset Flex Code
7783 \begin_layout Plain Layout
7790 \begin_inset Flex Code
7793 \begin_layout Plain Layout
7799 ・\SpecialChar \ldots{}
7800 )です。サポートされている機能の全覧は、LyXソースコード以外には残念ながら文書化されていませんが、興味があれば
7801 \begin_inset Flex Code
7804 \begin_layout Plain Layout
7811 \begin_inset Flex MenuItem
7814 \begin_layout Plain Layout
7815 ヘルプ\SpecialChar \menuseparator
7821 もサポートされているパッケージの概要を提供します。
7824 \begin_layout Description
7825 \begin_inset Flex Code
7828 \begin_layout Plain Layout
7835 \begin_inset Flex Code
7838 \begin_layout Plain Layout
7845 \begin_inset Flex Code
7848 \begin_layout Plain Layout
7854 で表されているモジュールの機能を提供することを示し、
7855 \begin_inset Flex Code
7858 \begin_layout Plain Layout
7865 \begin_inset Flex Code
7868 \begin_layout Plain Layout
7874 タグを使用すると、モジュールを使用しなくてはならないことを示しますが、このタグは主に、このレイアウトがモジュールを直接取り込んでしまっていることを示すのに用いら
7875 れます。同じ機能を別に実装しているモジュール中で使用するなどすることもできます。
7878 \begin_layout Description
7879 \begin_inset Flex Code
7882 \begin_layout Plain Layout
7889 \begin_inset Flex Code
7892 \begin_layout Plain Layout
7899 \begin_inset Flex Code
7902 \begin_layout Plain Layout
7908 で表されている機能を要求することを示します。機能が複数ある場合には、コンマで区切らなくてはなりません。サポートされている機能以外は要求できないことに注意してくだ
7910 \begin_inset Flex Code
7913 \begin_layout Plain Layout
7922 \begin_layout Description
7923 \begin_inset Flex Code
7926 \begin_layout Plain Layout
7932 画面上の右余白の幅を指示する文字列。例:「MMMMM」。
7935 \begin_layout Description
7936 \begin_inset Flex Code
7939 \begin_layout Plain Layout
7945 どの節区切りまで連番を振るかを指定します。LaTeXにおける
7946 \begin_inset Flex Code
7949 \begin_layout Plain Layout
7958 \begin_layout Description
7959 \begin_inset Flex Code
7962 \begin_layout Plain Layout
7971 \begin_inset Flex Code
7974 \begin_layout Plain Layout
7983 \begin_inset Flex Code
7986 \begin_layout Plain Layout
7992 ] クラスの既定値として、用紙の片面に印字するか両面に印字するかを指定します。
7993 \begin_inset Flex MenuItem
7996 \begin_layout Plain Layout
7997 文書\SpecialChar \menuseparator
8006 \begin_layout Description
8007 \begin_inset Flex Code
8010 \begin_layout Plain Layout
8016 この部分は段落様式を定義します。様式がまだ存在していなければ、生成されます。既に存在していれば、そのパラメータが修正されます。「
8017 \begin_inset Flex Code
8020 \begin_layout Plain Layout
8027 \begin_inset Newline newline
8031 \begin_inset CommandInset ref
8033 reference "sub:段落様式-XHTML"
8040 \begin_layout Description
8041 \begin_inset Flex Code
8044 \begin_layout Plain Layout
8051 \begin_inset Flex Code
8054 \begin_layout Plain Layout
8061 \begin_inset Flex Code
8064 \begin_layout Plain Layout
8070 で使用すべきコマンド名あるいは環境名。The name of the command or environment to be used with
8072 \begin_inset Flex Code
8075 \begin_layout Plain Layout
8084 \begin_layout Description
8085 \begin_inset Flex Code
8088 \begin_layout Plain Layout
8095 \begin_inset Flex Code
8098 \begin_layout Plain Layout
8107 \begin_inset Flex Code
8110 \begin_layout Plain Layout
8116 ] 文書のタイトルを定義するのに、どのようなマークアップを使用するのかを示します。
8117 \begin_inset Flex Code
8120 \begin_layout Plain Layout
8127 \begin_inset Flex Code
8130 \begin_layout Plain Layout
8136 」が指定されている最後のレイアウトの後に、
8137 \begin_inset Flex Code
8140 \begin_layout Plain Layout
8146 で指定したマクロ名を挿入することを意味します。
8147 \begin_inset Flex Code
8150 \begin_layout Plain Layout
8157 \begin_inset Flex Code
8160 \begin_layout Plain Layout
8167 \begin_inset Flex Code
8170 \begin_layout Plain Layout
8176 で指定した環境でくるむ場合に対応します。
8179 \begin_layout Description
8180 \begin_inset Flex Code
8183 \begin_layout Plain Layout
8189 どの節区切りまで目次に取り込むかを指定します。LaTeXの
8190 \begin_inset Flex Code
8193 \begin_layout Plain Layout
8202 \begin_layout Subsection
8203 \begin_inset Flex Code
8206 \begin_layout Plain Layout
8213 \begin_inset CommandInset label
8215 name "sub:ClassOptions"
8222 \begin_layout Standard
8223 \begin_inset Flex Code
8226 \begin_layout Plain Layout
8235 \begin_layout Description
8236 \begin_inset Flex Code
8239 \begin_layout Plain Layout
8246 \begin_inset Flex Code
8249 \begin_layout Plain Layout
8255 ] 文書のメインフォントが使用できるフォント寸法の一覧です。「
8256 \begin_inset Flex Code
8259 \begin_layout Plain Layout
8268 \begin_layout Description
8269 \begin_inset Flex Code
8272 \begin_layout Plain Layout
8278 XMLベースの出力クラスで、DTD行を設定するのに使用されます。例:PUBLIC
8279 \begin_inset Quotes eld
8282 -//OASIS//DTD DocBook V4.2//EN
8283 \begin_inset Quotes erd
8289 \begin_layout Description
8290 \begin_inset Flex Code
8293 \begin_layout Plain Layout
8300 \begin_inset Flex Code
8303 \begin_layout Plain Layout
8304 文字列="empty|plain|headings|fancy"
8310 \begin_inset Flex Code
8313 \begin_layout Plain Layout
8322 \begin_layout Description
8323 \begin_inset Flex Code
8326 \begin_layout Plain Layout
8333 \begin_inset Flex Code
8336 \begin_layout Plain Layout
8343 \begin_inset Flex Code
8346 \begin_layout Plain Layout
8354 コマンドの非必須パラメータとして付け加える文書クラスオプションです。コンマで区切ります。
8357 \begin_layout Standard
8358 \begin_inset Flex Code
8361 \begin_layout Plain Layout
8368 \begin_inset Flex Code
8371 \begin_layout Plain Layout
8380 \begin_layout Subsection
8382 \begin_inset CommandInset label
8391 \begin_layout Standard
8396 \begin_layout Plain Layout
8397 これは新しいレイアウトを定義するか、既存のレイアウトを修正することになることに注意してください。
8405 \begin_layout LyX-Code
8412 \begin_layout LyX-Code
8416 \begin_layout LyX-Code
8420 \begin_layout Standard
8421 ここでは、以下のコマンドを使用することができます。
8424 \begin_layout Description
8425 \begin_inset Flex Code
8428 \begin_layout Plain Layout
8435 \begin_inset Flex Code
8438 \begin_layout Plain Layout
8443 , left, right, center
8451 \begin_layout Description
8452 \begin_inset Flex Code
8455 \begin_layout Plain Layout
8462 \begin_inset Flex Code
8465 \begin_layout Plain Layout
8470 , left, right, center
8475 ] 使用できる揃えのコンマ区切りリスト(LaTeXスタイルには、意味を成さない一部の揃えが禁じられているものがあります。たとえば、連番箇条書きを右揃えや中央揃え
8479 \begin_layout Description
8480 \begin_inset Flex Code
8483 \begin_layout Plain Layout
8490 \begin_inset Flex Code
8493 \begin_layout Plain Layout
8499 宣言をすべて、完全に上書きしますので注意してください。「
8500 \begin_inset Flex Code
8503 \begin_layout Plain Layout
8509 」で閉じる必要があります。これの利用法についての詳細は、第
8510 \begin_inset CommandInset ref
8512 reference "sub:段落様式の国際化"
8519 \begin_layout Description
8520 \begin_inset Flex Code
8523 \begin_layout Plain Layout
8530 \begin_inset Flex Code
8533 \begin_layout Plain Layout
8543 \begin_layout Plain Layout
8544 ここで「浮動小数点型」とは1.5のような実数を指します。
8549 このレイアウト型の段落塊の最後の段落と、次の段落とを分離する垂直空白。次の段落が別のレイアウト型である場合、分離幅は足し上げられるのではなく、最大値がとられま
8553 \begin_layout Description
8554 \begin_inset Flex Code
8557 \begin_layout Plain Layout
8564 \begin_inset Flex Code
8567 \begin_layout Plain Layout
8573 ] この様式のカテゴリです。これは、ツールバーのレイアウト・コンボボックスで関連した様式をグループ化するのに用いられます。任意の文字列を使用することができますが
8574 、作成した様式に既存のカテゴリを使用したいと思うことが多いでしょう。
8577 \begin_layout Description
8578 \begin_inset Flex Code
8581 \begin_layout Plain Layout
8587 XMLコマンドの深度。XML型の書式でのみ使用されます。
8590 \begin_layout Description
8591 \begin_inset Flex Code
8594 \begin_layout Plain Layout
8601 \begin_inset CommandInset label
8603 name "des:CopyStyle"
8608 \begin_inset Flex Code
8611 \begin_layout Plain Layout
8617 ] 既存の様式から、すべての機能を現在の様式にコピーします。
8620 \begin_layout Description
8621 \begin_inset Flex Code
8624 \begin_layout Plain Layout
8634 プリアンブルを出力させる様式名。マクロ定義がお互いに依存関係にある場合に、プリアンブルの断片の順序を確実にするためのものです
8638 \begin_layout Plain Layout
8639 この機能以外には、プリアンブルの順序を確定する方法はないことに注意してください。LyXの特定のバージョンで観察された順序は、将来のバージョンで警告なしに変わる可
8648 \begin_layout Description
8649 \begin_inset Flex Code
8652 \begin_layout Plain Layout
8659 \begin_inset Flex Code
8662 \begin_layout Plain Layout
8667 , Box, Filled_Box, Static
8673 \begin_inset Flex Code
8676 \begin_layout Plain Layout
8683 \begin_inset Flex Code
8686 \begin_layout Plain Layout
8693 \begin_inset Flex Code
8696 \begin_layout Plain Layout
8703 \begin_inset Flex Code
8706 \begin_layout Plain Layout
8712 のいずれかの場合は、段落群の最後)に置くラベル。
8713 \begin_inset Flex Code
8716 \begin_layout Plain Layout
8723 \begin_inset Flex Code
8726 \begin_layout Plain Layout
8733 \begin_inset Flex Code
8736 \begin_layout Plain Layout
8742 )の場合は、証明終了マーカ用の白い箱型(あるいは黒い箱型)を指し、
8743 \begin_inset Flex Code
8746 \begin_layout Plain Layout
8755 \begin_layout Description
8756 \begin_inset Flex Code
8759 \begin_layout Plain Layout
8766 \begin_inset Flex Code
8769 \begin_layout Plain Layout
8776 \begin_inset Flex Code
8779 \begin_layout Plain Layout
8786 \begin_inset Flex Code
8789 \begin_layout Plain Layout
8798 \begin_layout Description
8799 \begin_inset Flex Code
8802 \begin_layout Plain Layout
8809 \begin_inset Flex Code
8812 \begin_layout Plain Layout
8823 \begin_inset Flex Code
8826 \begin_layout Plain Layout
8835 \begin_layout Description
8836 \begin_inset Flex Code
8839 \begin_layout Plain Layout
8846 \begin_inset Flex Code
8849 \begin_layout Plain Layout
8859 ] このパラメータは、この様式で段落を初期化する際に設定される、
8860 \begin_inset Flex MenuItem
8863 \begin_layout Plain Layout
8864 編集\SpecialChar \menuseparator
8871 \begin_inset Flex MenuItem
8874 \begin_layout Plain Layout
8884 \begin_layout Plain Layout
8889 :この設定にどれほど使途があるかは定かでなく、おそらく将来のバージョンで取り除かれます。
8897 \begin_layout Description
8898 \begin_inset Flex Code
8901 \begin_layout Plain Layout
8912 \begin_inset CommandInset ref
8914 reference "sub:フォント指定"
8918 節を参照。このフォントを定義すると、自動的に
8919 \begin_inset Flex Code
8922 \begin_layout Plain Layout
8928 も同じ値で定義されることに注意してください。したがって、
8929 \begin_inset Flex Code
8932 \begin_layout Plain Layout
8938 も同時に定義したい場合には、これを先に定義してください。
8941 \begin_layout Description
8942 \begin_inset Flex Code
8945 \begin_layout Plain Layout
8952 \begin_inset CommandInset label
8954 name "des:FreeSpacing"
8961 \begin_inset Flex Code
8964 \begin_layout Plain Layout
8973 \begin_inset Flex Code
8976 \begin_layout Plain Layout
8982 ] LyXは、空白をそれ自体文字や記号ではなく、2つの単語の間の分割子として捉えているため、単語間に2つ以上の空白を入れることは、通常許可していません。これ自体
8983 はとても素晴らしいことですが、たとえばプログラムコードや生のLaTeXコードを入力しようとするときなどに、煩わしくなることがあります。このことから、
8984 \begin_inset Flex Code
8987 \begin_layout Plain Layout
8993 を有効にすることが認められています。LyXは、LaTeXモード以外では2つめ以降の空白には、保護された空白を使用することに注意してください。
8996 \begin_layout Description
8997 \begin_inset Flex Code
9000 \begin_layout Plain Layout
9006 これらのタグは、XHTML出力で使用されます。第
9007 \begin_inset CommandInset ref
9009 reference "sub:段落様式-XHTML"
9016 \begin_layout Description
9017 \begin_inset Flex Code
9020 \begin_layout Plain Layout
9026 [[FIXME]] (XML型書式でのみ使用されます。)
9029 \begin_layout Description
9030 \begin_inset Flex Code
9033 \begin_layout Plain Layout
9040 \begin_inset Flex Code
9043 \begin_layout Plain Layout
9049 1の場合、このレイアウトをタイトルブロックの一部としてマークします(大域項目の
9050 \begin_inset Flex Code
9053 \begin_layout Plain Layout
9060 \begin_inset Flex Code
9063 \begin_layout Plain Layout
9072 \begin_layout Description
9073 \begin_inset Flex Code
9076 \begin_layout Plain Layout
9083 \begin_inset Flex Code
9086 \begin_layout Plain Layout
9092 ] これは、同じレイアウトを持つ段落群の間に追加する空白を与えるものです。複数のレイアウトを一つの環境に入れると、それぞれのレイアウトは、その環境の
9093 \begin_inset Flex Code
9096 \begin_layout Plain Layout
9102 だけ分離されます。しかし、その環境の項目全体は、さらにこの
9103 \begin_inset Flex Code
9106 \begin_layout Plain Layout
9119 \begin_layout Description
9120 \begin_inset Flex Code
9123 \begin_layout Plain Layout
9129 [[FIXME]] (XML型書式でのみ使用されます。)
9132 \begin_layout Description
9133 \begin_inset Flex Code
9136 \begin_layout Plain Layout
9143 \begin_inset CommandInset label
9145 name "des:KeepEmpty"
9152 \begin_inset Flex Code
9155 \begin_layout Plain Layout
9164 \begin_inset Flex Code
9167 \begin_layout Plain Layout
9173 ] 段落を空のままにすると、LaTeX出力が空になってしまうので、通常、LyXは段落を空にすることを許可しません。しかしながら、これを無効にすることが望ましい場
9174 合が存在します。たとえば、書簡のひな型では、必須フィールドを人々が忘れないように、空のフィールドのまま提供する手もあります。特別なクラスにおいては、レイアウトを
9175 実際には文章を含まないある種の改行として使用することもあります。
9178 \begin_layout Description
9179 \begin_inset Flex Code
9182 \begin_layout Plain Layout
9189 \begin_inset Flex Code
9192 \begin_layout Plain Layout
9198 ] ラベルと本文テキストとの間の垂直余白。本文テキストの上に来るラベルにのみ使用されます(
9199 \begin_inset Flex Code
9202 \begin_layout Plain Layout
9209 \begin_inset Newline linebreak
9213 \begin_inset Flex Code
9216 \begin_layout Plain Layout
9217 Centered_Top_Environment
9225 \begin_layout Description
9226 \begin_inset Flex Code
9229 \begin_layout Plain Layout
9236 \begin_inset Flex Code
9239 \begin_layout Plain Layout
9246 \begin_inset Newline newline
9249 自動連番に使われるカウンタ名(詳しくは第
9250 \begin_inset CommandInset ref
9252 reference "sub:カウンタ"
9257 \begin_inset Newline newline
9261 \begin_inset Flex Code
9264 \begin_layout Plain Layout
9271 \begin_inset Flex Code
9274 \begin_layout Plain Layout
9284 です。この場合には、この様式が出現するたびにカウンタが増えます。
9285 \begin_inset Newline newline
9289 \begin_inset Flex Code
9292 \begin_layout Plain Layout
9299 \begin_inset Flex Code
9302 \begin_layout Plain Layout
9308 型のときにも、若干複雑にはなりますが、本項目を使うことができます。たとえば、「
9309 \begin_inset Flex Code
9312 \begin_layout Plain Layout
9318 」と宣言したものとしましょう。すると、LaTeXにおけるのと同様、実際に使われるカウンタは、
9319 \begin_inset Flex Code
9322 \begin_layout Plain Layout
9329 \begin_inset Flex Code
9332 \begin_layout Plain Layout
9339 \begin_inset Flex Code
9342 \begin_layout Plain Layout
9349 \begin_inset Flex Code
9352 \begin_layout Plain Layout
9358 のようになります。これらのカウンタは、全て別々に宣言されなくてはなりません。
9359 \begin_inset Newline newline
9363 \begin_inset CommandInset ref
9365 reference "sub:カウンタ"
9372 \begin_layout Description
9373 \begin_inset Flex Code
9376 \begin_layout Plain Layout
9383 \begin_inset CommandInset ref
9385 reference "sub:フォント指定"
9392 \begin_layout Description
9393 \begin_inset Flex Code
9396 \begin_layout Plain Layout
9402 ラベルをどれくらい行頭下げすべきかを示す文字列。
9405 \begin_layout Description
9406 \begin_inset Flex Code
9409 \begin_layout Plain Layout
9416 \begin_inset Flex Code
9419 \begin_layout Plain Layout
9425 ] ラベルと本文テキストの間の水平余白。本文テキストの上に来ないラベルにのみ使用されます。
9428 \begin_layout Description
9429 \begin_inset Flex Code
9432 \begin_layout Plain Layout
9439 \begin_inset Flex Code
9442 \begin_layout Plain Layout
9449 \begin_inset Flex Code
9452 \begin_layout Plain Layout
9459 \begin_inset Flex Code
9462 \begin_layout Plain Layout
9469 \begin_inset CommandInset ref
9471 reference "sub:カウンタ"
9475 節に述べられている特別な整形コマンドを含めることができます
9479 \begin_layout Plain Layout
9481 \begin_inset Flex Code
9484 \begin_layout Plain Layout
9495 \begin_inset Flex Code
9498 \begin_layout Plain Layout
9507 \begin_inset Flex Code
9510 \begin_layout Plain Layout
9516 を展開したものに置換されます。この機能は既に廃されたものとなっているので、第
9517 \begin_inset CommandInset ref
9519 reference "sub:カウンタ"
9523 節の機構に置き換えられなくてはなりません。
9531 \begin_layout Description
9532 \begin_inset Flex Code
9535 \begin_layout Plain Layout
9542 \begin_inset Flex Code
9545 \begin_layout Plain Layout
9552 \begin_inset Flex Code
9555 \begin_layout Plain Layout
9562 \begin_inset Flex Code
9565 \begin_layout Plain Layout
9572 \begin_inset Flex Code
9575 \begin_layout Plain Layout
9581 をもリセットすることに注意してください。
9584 \begin_layout Description
9585 \begin_inset Flex Code
9588 \begin_layout Plain Layout
9594 [FIXME] (XML型書式でのみ使用されます。)
9597 \begin_layout Description
9598 \begin_inset Flex Code
9601 \begin_layout Plain Layout
9608 \begin_inset Flex Code
9611 \begin_layout Plain Layout
9616 , Manual, Static, Top_Environment, Centered_Top_Environment, Counter, Sensitive,
9617 Enumerate, Itemize, Bibliography
9626 \begin_layout Itemize
9627 \begin_inset Flex Code
9630 \begin_layout Plain Layout
9636 は、ラベルが最初の単語(最初の本当の空白まで)であることを示します。ラベルに2単語以上使用したいときは、保護された空白を使用してください。
9639 \begin_layout Itemize
9640 \begin_inset Flex Code
9643 \begin_layout Plain Layout
9650 \begin_inset Flex Code
9653 \begin_layout Plain Layout
9659 で宣言したものであることを示します。これは「静的」であることに注意してください。
9662 \begin_layout Itemize
9663 \begin_inset Flex Code
9666 \begin_layout Plain Layout
9673 \begin_inset Flex Code
9676 \begin_layout Plain Layout
9677 Centered_Top_Environment
9683 \begin_inset Flex Code
9686 \begin_layout Plain Layout
9692 の特別な場合です。ラベルは段落の上に印字されるのですが、それは単一の環境の上か、このレイアウトを持つ連続した段落群の上だけに印字されます。たとえば、
9693 \begin_inset Flex MenuItem
9696 \begin_layout Plain Layout
9705 \begin_layout Itemize
9706 \begin_inset Flex Code
9709 \begin_layout Plain Layout
9715 はキャプションラベルの「図」や「表」の特別な場合です。
9716 \begin_inset Flex Code
9719 \begin_layout Plain Layout
9725 は、(ハードコードされた)ラベル文字列がフロートの種類に依存することを示します。これは、フロートに関連付けられたカウンタの値がNであるものとすると、「Float
9726 Type N」にハードコードされています。
9729 \begin_layout Itemize
9730 \begin_inset Flex Code
9733 \begin_layout Plain Layout
9739 ラベル型は、自動的に連番が付されるラベルを定義します。
9740 \begin_inset Flex Code
9743 \begin_layout Plain Layout
9749 は、それが含むカウンタ参照をすべて解決するために展開されます。これは、たとえば
9750 \begin_inset Flex Code
9753 \begin_layout Plain Layout
9764 \begin_inset CommandInset ref
9766 reference "sub:カウンタ"
9773 \begin_layout Itemize
9774 \begin_inset Flex Code
9777 \begin_layout Plain Layout
9783 は、通常の連番ラベルを生成します。現在のところ、これは、第4階層まで順に、アラビア数字・小文字・小文字ローマ数字・大文字を使用するようにハードコードされています
9787 \begin_layout Itemize
9788 \begin_inset Flex Code
9791 \begin_layout Plain Layout
9797 は、各階層でさまざまなブリットを生成します。これもハードコードされています。
9800 \begin_layout Itemize
9801 \begin_inset Flex Code
9804 \begin_layout Plain Layout
9811 \begin_inset Flex Code
9814 \begin_layout Plain Layout
9815 LatexType BibEnvironment
9824 \begin_layout Description
9825 \begin_inset Flex Code
9828 \begin_layout Plain Layout
9835 \begin_inset Flex Code
9838 \begin_layout Plain Layout
9844 宣言をすべて、完全に上書きしますので、注意してください。使用法についての詳細は、第
9845 \begin_inset CommandInset ref
9847 reference "sub:段落様式の国際化"
9854 \begin_layout Description
9855 \begin_inset Flex Code
9858 \begin_layout Plain Layout
9864 対応するLaTeXの名称です。環境名かコマンド名を指します。
9867 \begin_layout Description
9868 \begin_inset Flex Code
9871 \begin_layout Plain Layout
9878 \begin_inset Flex Code
9881 \begin_layout Plain Layout
9887 の非必須パラメータです。このパラメータは、LyX内部から変更することはできません。
9890 \begin_layout Description
9891 \begin_inset Flex Code
9894 \begin_layout Plain Layout
9901 \begin_inset CommandInset label
9903 name "des:LatexType"
9908 \begin_inset Flex Code
9911 \begin_layout Plain Layout
9916 , Command, Environment, Item_Environment,
9922 \begin_inset Flex Code
9925 \begin_layout Plain Layout
9926 List_Environmen, Bib_Environment
9931 ] レイアウトがどのようにLaTeXに変換されるべきかを示します
9935 \begin_layout Plain Layout
9936 これらのルールはSGMLクラスにも適用されるので、
9937 \begin_inset Flex Code
9940 \begin_layout Plain Layout
9946 の名称は、少しミスリーディングかもしれません。特定の例については、SGMLクラスファイルを見てください。
9955 \begin_layout Itemize
9956 \begin_inset Flex Code
9959 \begin_layout Plain Layout
9968 \begin_layout Itemize
9969 \begin_inset Flex Code
9972 \begin_layout Plain Layout
9979 \begin_inset Flex Code
9982 \begin_layout Plain Layout
9989 {\SpecialChar \ldots{}
9998 \begin_layout Itemize
9999 \begin_inset Flex Code
10002 \begin_layout Plain Layout
10009 \begin_inset Flex Code
10012 \begin_layout Plain Layout
10019 }\SpecialChar \ldots{}
10034 \begin_layout Itemize
10035 \begin_inset Flex Code
10038 \begin_layout Plain Layout
10045 \begin_inset Flex Code
10048 \begin_layout Plain Layout
10055 \begin_inset Flex Code
10058 \begin_layout Plain Layout
10066 がこの環境のすべての段落に付けられるところだけが異なっています。
10069 \begin_layout Itemize
10070 \begin_inset Flex Code
10073 \begin_layout Plain Layout
10080 \begin_inset Flex Code
10083 \begin_layout Plain Layout
10090 \begin_inset Flex Code
10093 \begin_layout Plain Layout
10099 が環境の引数として渡されるところだけが異なっています。
10100 \begin_inset Flex Code
10103 \begin_layout Plain Layout
10110 \begin_inset Flex MenuItem
10113 \begin_layout Plain Layout
10114 編集\SpecialChar \menuseparator
10123 \begin_layout Standard
10124 上記最後のいくつかをまとめると、LaTeX出力は、LaTeX型に依存して
10127 \begin_layout LyX-Code
10130 latexname[latexparam]{\SpecialChar \ldots{}
10134 \begin_layout Standard
10138 \begin_layout LyX-Code
10141 begin{latexname}[latexparam] \SpecialChar \ldots{}
10147 \begin_layout Standard
10152 \begin_layout Description
10153 \begin_inset Flex Code
10156 \begin_layout Plain Layout
10163 \begin_inset Flex Code
10166 \begin_layout Plain Layout
10172 ] レイアウトを環境の中に入れた場合、左余白は単純に加えられるのではなく、因子
10173 \begin_inset Formula $\frac{4}{depth+4}$
10176 をかけて加えられます。このパラメータは、
10177 \begin_inset Flex Code
10180 \begin_layout Plain Layout
10187 \begin_inset Flex Code
10190 \begin_layout Plain Layout
10197 \begin_inset Flex Code
10200 \begin_layout Plain Layout
10206 に設定されているときにも用いられることに注意してください。その場合には、これは手動設定余白または動的設定余白に加えられることに注意してください。
10207 \begin_inset Newline newline
10210 引数は文字列として渡されます。たとえば「
10211 \begin_inset Flex Code
10214 \begin_layout Plain Layout
10220 」と指定すると、段落を通常フォントの「
10221 \begin_inset Flex Code
10224 \begin_layout Plain Layout
10230 」の幅だけ行頭下げを行います。文字列の前に「
10231 \begin_inset Flex Code
10234 \begin_layout Plain Layout
10240 」を付けると、負の幅を与えることができます。この方法が採用されたのは、どの画面フォントでも見かけが同じになるようにするためです。
10243 \begin_layout Description
10244 \begin_inset Flex Code
10247 \begin_layout Plain Layout
10254 \begin_inset Flex Code
10257 \begin_layout Plain Layout
10262 , Manual, Dynamic, First_Dynamic, Right_Address_Box
10268 \begin_inset Newline newline
10272 \begin_inset Flex Code
10275 \begin_layout Plain Layout
10282 \begin_inset Flex Code
10285 \begin_layout Plain Layout
10292 \begin_inset Flex MenuItem
10295 \begin_layout Plain Layout
10296 編集\SpecialChar \menuseparator
10302 ダイアログで入力した文字列によって決められることを示します。これは、タブを用いずに整った一覧表を組むのに使用されます。
10303 \begin_inset Flex Code
10306 \begin_layout Plain Layout
10312 は、余白がラベルの大きさに依存することを示します。これは、自動連番の見出しに使用されます。「5.4.3.2.1 非常に長い見出し」という見出し行が、「3.2
10313 非常に長い見出し」よりも広い左余白(5.4.3.2.1足す空白と同じ幅)を必要とすることは明らかでしょう(標準的「ワープロ」はこんなことはやってくれませんが)。
10314 \begin_inset Flex Code
10317 \begin_layout Plain Layout
10323 は似ていますが、段落の最初の行だけがDynamicでその他の行はStaticです。これは、たとえば、箇条書き(記述)に使用されます。
10324 \begin_inset Flex Code
10327 \begin_layout Plain Layout
10333 は、段落中、最も長い行が右余白に合うように余白を選択します。これは、ページの右端に住所を組版するのに用いられます。
10336 \begin_layout Description
10337 \begin_inset Flex Code
10340 \begin_layout Plain Layout
10347 \begin_inset Flex Code
10350 \begin_layout Plain Layout
10359 \begin_inset Flex Code
10362 \begin_layout Plain Layout
10368 ] このレイアウト中の脆弱なコマンドが
10369 \begin_inset Flex Code
10372 \begin_layout Plain Layout
10380 されるべきか否か(註:これはこのコマンド自体が
10381 \begin_inset Flex Code
10384 \begin_layout Plain Layout
10399 \begin_layout Description
10400 \begin_inset Flex Code
10403 \begin_layout Plain Layout
10410 \begin_inset Flex Code
10413 \begin_layout Plain Layout
10420 \begin_inset Flex Code
10423 \begin_layout Plain Layout
10432 \begin_inset Flex Code
10435 \begin_layout Plain Layout
10445 )に変換するか否か。LyX中でLaTeX編集をやりやすくするために、変換は無効にすることができます。
10448 \begin_layout Description
10449 \begin_inset Flex Code
10452 \begin_layout Plain Layout
10459 \begin_inset Flex Code
10462 \begin_layout Plain Layout
10469 \begin_inset Flex Code
10472 \begin_layout Plain Layout
10480 ] 次の段落に最初の行の行頭下げを許すか否か。
10481 \begin_inset Flex Code
10484 \begin_layout Plain Layout
10491 \begin_inset Flex Code
10494 \begin_layout Plain Layout
10500 は望むならば行頭下げできることを意味します。
10503 \begin_layout Description
10504 \begin_inset Flex Code
10507 \begin_layout Plain Layout
10513 このレイアウトが置き換えられたレイアウト名。これは、後方互換性を維持しながら、レイアウトの名称を変更するのに使用されます。
10516 \begin_layout Description
10517 \begin_inset Flex Code
10520 \begin_layout Plain Layout
10527 \begin_inset Flex Code
10530 \begin_layout Plain Layout
10536 ] このレイアウトに使用することのできる非必須引数の数。節見出しのようなものに有用であり、LaTeXでのみ意味を持ちます。出力時には、非必須引数は、すべての必須
10537 引数の前に来ることに注意してください(以下参照)。つまり、
10541 \begin_layout LyX-Code
10544 mycmd[非必須引数1]{必須引数1}{段落の内容}
10547 \begin_layout Standard
10551 \begin_layout LyX-Code
10554 mycmd[非必須引数1]{必須引数1}[非必須引数2]{段落の内容}
10557 \begin_layout Standard
10558 のようなコマンドは、TeXコード(これを使えば何でもできます)を使用することなしには、生成することができません。
10562 \begin_layout Description
10563 \begin_inset Flex Code
10566 \begin_layout Plain Layout
10573 \begin_inset CommandInset label
10575 name "des:ParbreakIsNewline"
10580 \begin_inset Flex Code
10583 \begin_layout Plain Layout
10592 \begin_inset Flex Code
10595 \begin_layout Plain Layout
10601 ] LaTeX出力中で、段落を空行ではなく、改行で区切るよう指定します。
10602 \begin_inset Flex Code
10605 \begin_layout Plain Layout
10611 と併用すれば、(TeXコードを使用したときのように)テキストエディタをエミュレートすることができます。
10614 \begin_layout Description
10615 \begin_inset Flex Code
10618 \begin_layout Plain Layout
10625 \begin_inset Flex Code
10628 \begin_layout Plain Layout
10634 ] 段落の最初の行の行頭下げ。レイアウトによっては
10635 \begin_inset Flex Code
10638 \begin_layout Plain Layout
10644 は固定されています。例外には標準レイアウトがあり、標準レイアウトの段落の行頭下げは、
10645 \begin_inset Flex Code
10648 \begin_layout Plain Layout
10654 で禁止することができるようになっています。また、環境中の標準レイアウト段落は、当該段落の
10655 \begin_inset Flex Code
10658 \begin_layout Plain Layout
10665 \begin_inset Flex Code
10668 \begin_layout Plain Layout
10674 を使用します。たとえば、箇条書き(連番)内の標準段落は、行頭下げされません。
10677 \begin_layout Description
10678 \begin_inset Flex Code
10681 \begin_layout Plain Layout
10688 \begin_inset Flex Code
10691 \begin_layout Plain Layout
10697 ] このレイアウトの2段落間の垂直余白。
10700 \begin_layout Description
10701 \begin_inset Flex Code
10704 \begin_layout Plain Layout
10711 \begin_inset Flex Code
10714 \begin_layout Plain Layout
10720 ] LyXでは、文書を組版するのに、ユーザが「行頭下げ」か「スキップ」を選ぶことができます。「行頭下げ」を選択した際には、この値は完全に無視されます。「スキップ
10721 」を選択した際には、LaTeX型「段落」レイアウトの
10722 \begin_inset Flex Code
10725 \begin_layout Plain Layout
10732 \begin_inset Flex Code
10735 \begin_layout Plain Layout
10741 引数分だけ引き離されます。垂直余白は、
10742 \begin_inset Flex Code
10745 \begin_layout Plain Layout
10751 を標準フォントでの1行の高さとすると、
10752 \begin_inset Flex Code
10755 \begin_layout Plain Layout
10762 \begin_inset Formula $\times$
10766 \begin_inset Flex Code
10769 \begin_layout Plain Layout
10775 によって計算されます。このようにして、画面フォントを変更しても同じように表示されるのです。
10778 \begin_layout Description
10779 \begin_inset Flex Code
10782 \begin_layout Plain Layout
10789 \begin_inset CommandInset label
10791 name "des:PathThru"
10798 \begin_inset Flex Code
10801 \begin_layout Plain Layout
10810 \begin_inset Flex Code
10813 \begin_layout Plain Layout
10819 ] この段落の内容が、LaTeXが必要とするような特別な変換を行わずに、生の形で出力されるべきかどうか。
10822 \begin_layout Description
10823 \begin_inset Flex Code
10826 \begin_layout Plain Layout
10833 \begin_inset CommandInset label
10835 name "des:Preamble"
10839 この様式が使用されたときに、LaTeXプリアンブルに付け加えるべき情報。この特定の様式が要求するマクロを定義したり、パッケージを読み込んだりと言ったことに使用し
10841 \begin_inset Flex Code
10844 \begin_layout Plain Layout
10853 \begin_layout Description
10854 \begin_inset Flex Code
10857 \begin_layout Plain Layout
10864 \begin_inset Flex Code
10867 \begin_layout Plain Layout
10873 ] この型の段落を参照する際、生成されるラベルに使用する前置句。これによって、整形参照を使用することができるようになります。
10876 \begin_layout Description
10877 \begin_inset Flex Code
10880 \begin_layout Plain Layout
10887 \begin_inset Flex Code
10890 \begin_layout Plain Layout
10896 ] このレイアウトに対応するLaTeXコマンドやLaTeX環境が予期している、必須引数の数。コマンドの場合には、段落の内容自体に関連付けられている引数
10900 、必要な引数の数のことです。これらの引数は、実際には渡されなくても構いません。必要な場合は、LyXが空の引数を生成します。非必須引数は、必須引数の前に出力される
10901 ことに注意してください。詳細については、上記
10902 \begin_inset Flex Code
10905 \begin_layout Plain Layout
10914 \begin_layout Description
10915 \begin_inset Flex Code
10918 \begin_layout Plain Layout
10925 \begin_inset Flex Code
10928 \begin_layout Plain Layout
10935 \begin_inset CommandInset label
10937 name "des:Requires"
10942 \begin_inset Flex Code
10945 \begin_layout Plain Layout
10951 で表される機能を必要するか否か。「機能」に関する情報は、上記
10952 \begin_inset Flex Code
10955 \begin_layout Plain Layout
10962 \begin_inset CommandInset ref
10963 LatexCommand pageref
10964 reference "des:FreeSpacing"
10971 \begin_layout Description
10972 \begin_inset Flex Code
10975 \begin_layout Plain Layout
10982 \begin_inset Flex Code
10985 \begin_layout Plain Layout
10992 \begin_inset Flex Code
10995 \begin_layout Plain Layout
11004 \begin_layout Description
11005 \begin_inset Flex Code
11008 \begin_layout Plain Layout
11015 \begin_inset Flex Code
11018 \begin_layout Plain Layout
11023 , onehalf, double, other
11032 ] これはレイアウト中の既定の行間をどうすべきか定義するものです。引数の
11033 \begin_inset Flex Code
11036 \begin_layout Plain Layout
11043 \begin_inset Flex Code
11046 \begin_layout Plain Layout
11053 \begin_inset Flex Code
11056 \begin_layout Plain Layout
11062 は、それぞれ乗数1・1.25・1.667に対応します。引数
11063 \begin_inset Flex Code
11066 \begin_layout Plain Layout
11072 を指定した場合には、実際の乗数値も引数として指定しなくてはなりません。他のパラメータと違って
11073 \begin_inset Flex Code
11076 \begin_layout Plain Layout
11083 \begin_inset Flex Code
11086 \begin_layout Plain Layout
11092 パッケージを使用した、限定的なLaTeXコードを生成することを意味することにご注意ください。
11095 \begin_layout Description
11096 \begin_inset Flex Code
11099 \begin_layout Plain Layout
11106 \begin_inset Flex Code
11109 \begin_layout Plain Layout
11116 \begin_inset Flex Code
11119 \begin_layout Plain Layout
11125 ] この様式の段落をスペルチェックするか否か。既定値は真です。
11128 \begin_layout Description
11129 \begin_inset Flex Code
11132 \begin_layout Plain Layout
11139 \begin_inset CommandInset ref
11141 reference "sub:フォント指定"
11148 \begin_layout Description
11149 \begin_inset Flex Code
11152 \begin_layout Plain Layout
11159 \begin_inset Flex Code
11162 \begin_layout Plain Layout
11168 ] 目次中でのこの様式の階層。これは、節見出しの自動連番に使用されます。
11171 \begin_layout Description
11172 \begin_inset Flex Code
11175 \begin_layout Plain Layout
11182 \begin_inset Flex Code
11185 \begin_layout Plain Layout
11191 ] このレイアウトを持つ一連の段落群の最初の段落と、その前の段落の間の垂直余白。前の段落が別のレイアウトを持っていれば、余白は単純に追加されるのではなく、それら
11195 \begin_layout Subsection
11196 \begin_inset CommandInset label
11198 name "sub:段落様式の国際化"
11205 \begin_layout Standard
11206 LyXは、長きにわたってレイアウト情報の国際化をサポートしてきましたが、第2.0版までは、これは操作画面にのみ適用されるものであって、たとえばPDF出力には適用さ
11207 れませんでした。たとえば、フランスの著者が、「Theorem 1」の代わりに「
11211 1」としたければ、醜いハックに頼るしかありませんでした。Georg Baumのおかげで、これは解消されました。
11214 \begin_layout Standard
11216 \begin_inset Flex MenuItem
11219 \begin_layout Plain Layout
11225 が、組版文書に出力される文字列を定義するのであれば、非英語文書や複数言語文書をサポートするために、
11226 \begin_inset Flex MenuItem
11229 \begin_layout Plain Layout
11236 \begin_inset Flex MenuItem
11239 \begin_layout Plain Layout
11245 を使用することができます。以下の抜粋(
11246 \begin_inset Flex MenuItem
11249 \begin_layout Plain Layout
11255 より)は、これがどう動作するかを示すものです。
11258 \begin_layout LyX-Code
11263 \begin_layout LyX-Code
11266 theoremstyle{remark}
11269 \begin_layout LyX-Code
11272 newtheorem{claim}[thm]{
11279 \begin_layout LyX-Code
11283 \begin_layout LyX-Code
11287 \begin_layout LyX-Code
11292 claimname}{_(Claim)}
11295 \begin_layout LyX-Code
11299 \begin_layout LyX-Code
11303 \begin_layout LyX-Code
11312 claimname}{_(Claim)}}
11315 \begin_layout LyX-Code
11320 \begin_layout Standard
11322 \begin_inset Flex MenuItem
11325 \begin_layout Plain Layout
11332 \begin_inset Flex MenuItem
11335 \begin_layout Plain Layout
11341 タグ内には、有効なLaTeXコードはすべて用いることができますが、実際においては、ここで典型的に示したような形になるでしょう。組版文字列が正しく翻訳されるための
11343 \begin_inset Flex Code
11346 \begin_layout Plain Layout
11355 \begin_inset Flex Code
11358 \begin_layout Plain Layout
11369 \begin_layout Standard
11370 \begin_inset Flex Code
11373 \begin_layout Plain Layout
11379 タグは、文書全体の言語に基づいた国際化を提供します。タグの内容は、
11380 \begin_inset Flex Code
11383 \begin_layout Plain Layout
11389 タグと同様、プリアンブルに置かれるのですが、これを特別なものにしているのは、「関数」
11390 \begin_inset Flex Code
11393 \begin_layout Plain Layout
11399 が使用されていることです。これは、LyXがLaTeX出力を生成する際、その引数を文書言語に翻訳したもので置き換えられます。
11402 \begin_layout Standard
11403 \begin_inset Flex Code
11406 \begin_layout Plain Layout
11413 \begin_inset Flex Code
11416 \begin_layout Plain Layout
11422 パッケージへのインタフェースを提供することを意図しているので、もう少し複雑です。その内容は、文書に現れる言語それぞれについて一度、プリアンブルに追加されます。こ
11424 \begin_inset Flex Code
11427 \begin_layout Plain Layout
11433 の引数は、その当該言語への翻訳で置き換えられ、
11434 \begin_inset Flex Code
11437 \begin_layout Plain Layout
11443 は言語名(babelパッケージで使用されるもの)で置き換えられます。
11446 \begin_layout Standard
11447 したがって、フランス語のセクションを持つドイツ語文書では、以下のような内容がプリアンブルに追加されます
11450 \begin_layout LyX-Code
11459 claimname}{Affirmation}}
11467 claimname}{Behauptung}}
11471 claimname}{Behauptung}
11474 \begin_layout Standard
11476 \begin_inset Flex Code
11479 \begin_layout Plain Layout
11485 は協力して、出力に正しい文字列を生成します。
11488 \begin_layout Standard
11489 ここで注意しなくてはならない重要な点は、翻訳は、操作画面の国際化に使われるのと同じ機構を通じて、LyX自身によって提供されるということです。つまり、ユーザー作成
11490 のレイアウトファイルに入力された文字列は、LyXの国際化ルーチンでは取り扱われないので、
11491 \begin_inset Flex MenuItem
11494 \begin_layout Plain Layout
11501 \begin_inset Flex MenuItem
11504 \begin_layout Plain Layout
11510 は、事実上、LyXとともに提供されるレイアウトファイルでのみ、使うことができるということを意味します。とはいえ、こういうことでありますので、将来的にLyXに同梱
11511 させようという意図を以て作成されたレイアウトは、適切なところではすべて、これらのタグを使用するべきです。
11514 \begin_layout Subsection
11516 \begin_inset CommandInset label
11525 \begin_layout Standard
11526 LyX第1.3.0版以来、テキストクラス自体の中でフロート(
11527 \begin_inset Flex MenuItem
11530 \begin_layout Plain Layout
11537 \begin_inset Flex MenuItem
11540 \begin_layout Plain Layout
11546 ・\SpecialChar \ldots{}
11547 )を定義することが可能となり、かつ必要となりました。標準的なフロートは
11548 \begin_inset Flex Code
11551 \begin_layout Plain Layout
11557 ファイルに含まれているので、作業中のレイアウトファイルに
11560 \begin_layout LyX-Code
11561 Input stdfloats.inc
11564 \begin_layout Standard
11565 と加えるだけで済むことも多いでしょう。LyXに同梱されているAGUクラスのように、それ以外のフロート型を提供するテキストクラスを実装するには、以下の情報が役立つ
11569 \begin_layout Description
11570 \begin_inset Flex Code
11573 \begin_layout Plain Layout
11580 \begin_inset Flex Code
11583 \begin_layout Plain Layout
11590 \begin_inset Quotes erd
11594 \begin_inset Quotes erd
11597 ] 図などのリストを含む外部ファイルのファイル拡張子名。LaTeXがキャプションを書き込むファイルです。
11600 \begin_layout Description
11601 \begin_inset Flex Code
11604 \begin_layout Plain Layout
11611 \begin_inset Flex Code
11614 \begin_layout Plain Layout
11621 \begin_inset Quotes erd
11625 \begin_inset Quotes erd
11628 ] メニューとキャプションに使用される文字列。babelが使用される場合には、これは現在の言語に翻訳されます。
11631 \begin_layout Description
11632 \begin_inset Flex Code
11635 \begin_layout Plain Layout
11641 これらは、XHTML出力で使用されます。第
11642 \begin_inset CommandInset ref
11644 reference "sec:XHTML出力のタグ"
11651 \begin_layout Description
11652 \begin_inset Flex Code
11655 \begin_layout Plain Layout
11662 \begin_inset Flex Code
11665 \begin_layout Plain Layout
11672 \begin_inset Quotes erd
11676 \begin_inset Quotes erd
11679 ] この型のフロートの一覧を生成するのに使用するコマンド。頭部の「
11682 \begin_inset Flex Code
11685 \begin_layout Plain Layout
11691 が偽の時には、このコマンドを生成する標準的な方法はないので、これは
11696 \begin_inset Flex Code
11699 \begin_layout Plain Layout
11705 が真の時は、標準的な方法が存在するので、これは無視されます。
11708 \begin_layout Description
11709 \begin_inset Flex Code
11712 \begin_layout Plain Layout
11719 \begin_inset Flex Code
11722 \begin_layout Plain Layout
11729 \begin_inset Quotes erd
11733 \begin_inset Quotes erd
11736 ] この種類のフロート一覧(図一覧・表一覧など)に使用される見出し。LyX中では、これは画面上のラベルとして使用されます。また、見出しとして使用するために、La
11737 TeXに渡され、XHTML出力でも見出しとして使用されます。これは、文書言語に翻訳されます。
11740 \begin_layout Description
11741 \begin_inset Flex Code
11744 \begin_layout Plain Layout
11751 \begin_inset Flex Code
11754 \begin_layout Plain Layout
11761 \begin_inset Flex Code
11764 \begin_layout Plain Layout
11772 ] フロートが文書クラス中に既に定義されているか、あるいは代わりに
11773 \begin_inset Flex Code
11776 \begin_layout Plain Layout
11782 を読み込んで、それが提供しているものを使用する必要があるかを示します。既定値は
11783 \begin_inset Flex Code
11786 \begin_layout Plain Layout
11793 \begin_inset Flex Code
11796 \begin_layout Plain Layout
11802 を使用します。LaTeX文書クラスでフロートが既に定義されているときには、
11803 \begin_inset Flex Code
11806 \begin_layout Plain Layout
11815 \begin_layout Description
11816 \begin_inset Flex Code
11819 \begin_layout Plain Layout
11826 \begin_inset Flex Code
11829 \begin_layout Plain Layout
11836 \begin_inset Quotes erd
11840 \begin_inset Quotes erd
11843 ] この(非必須の)引数は、このクラスのフロートが文書中のある節単位ごとに番号を振り直されるべきかどうかを規定します。たとえば、引数に
11844 \begin_inset Flex Code
11847 \begin_layout Plain Layout
11853 と指定されていれば、フロートは章ごとに番号が振り直されます。
11856 \begin_layout Description
11857 \begin_inset Flex Code
11860 \begin_layout Plain Layout
11867 \begin_inset Flex Code
11870 \begin_layout Plain Layout
11877 \begin_inset Quotes erd
11881 \begin_inset Quotes erd
11884 ] このクラスのフロートの既定の配置法。文字列は、標準的なLaTeX表記に従い、
11885 \begin_inset Flex Code
11888 \begin_layout Plain Layout
11895 \begin_inset Flex Code
11898 \begin_layout Plain Layout
11905 \begin_inset Flex Code
11908 \begin_layout Plain Layout
11915 \begin_inset Flex Code
11918 \begin_layout Plain Layout
11928 \begin_layout Plain Layout
11929 LaTeX同様、文字列中でのこれらの文字の順序は関係ありません。
11935 \begin_inset Flex Code
11938 \begin_layout Plain Layout
11944 があり、これはフロートを「ここ」に置いていいけれども他の場所はだめ、というものなので、本当はフロートにあるものではありません。しかし、
11945 \begin_inset Flex Code
11948 \begin_layout Plain Layout
11954 指定子は特別なものであり、その細かい実装上の理由で、組み込み以外のフロート型では使用することができません。これが何を意味するかおわかりにならない場合には、代わり
11956 \begin_inset Flex Code
11959 \begin_layout Plain Layout
11968 \begin_layout Description
11969 \begin_inset Flex Code
11972 \begin_layout Plain Layout
11979 \begin_inset Flex Code
11982 \begin_layout Plain Layout
11988 ] この型のフロートを参照する際、生成されるラベルに使用する前置句。これによって、整形参照を使用することができるようになります。コピーした様式が設定した
11989 \begin_inset Flex Code
11992 \begin_layout Plain Layout
11998 は、特別な文字列「OFF」(すべて大文字)を使えば、いつでも削除することができます。
12001 \begin_layout Description
12002 \begin_inset Flex Code
12005 \begin_layout Plain Layout
12012 \begin_inset Flex Code
12015 \begin_layout Plain Layout
12022 \begin_inset Quotes erd
12026 \begin_inset Quotes erd
12030 \begin_inset Flex Code
12033 \begin_layout Plain Layout
12041 を使用してフロートを定義する際に使用される様式。
12044 \begin_layout Description
12045 \begin_inset Flex Code
12048 \begin_layout Plain Layout
12055 \begin_inset Flex Code
12058 \begin_layout Plain Layout
12065 \begin_inset Quotes erd
12069 \begin_inset Quotes erd
12072 ] プログラムやアルゴリズムのような、フロートの新しいクラス「型」。適切な
12073 \begin_inset Flex Code
12076 \begin_layout Plain Layout
12085 \begin_inset Flex Code
12088 \begin_layout Plain Layout
12097 \begin_inset Flex Code
12100 \begin_layout Plain Layout
12111 \begin_layout Standard
12112 \begin_inset Flex Code
12115 \begin_layout Plain Layout
12128 \begin_inset Flex Code
12131 \begin_layout Plain Layout
12142 \begin_layout Subsection
12144 \begin_inset CommandInset label
12153 \begin_layout Standard
12154 LyXは第1.4.0版から文字様式をサポートしています。第1.6.0版以降、これは任意設定差込枠と呼ばれています。
12157 \begin_layout Standard
12158 任意設定差込枠には次の3種類があります。
12161 \begin_layout Itemize
12163 \begin_inset Flex Code
12166 \begin_layout Plain Layout
12173 \begin_inset Flex Code
12176 \begin_layout Plain Layout
12185 \begin_inset Flex Code
12188 \begin_layout Plain Layout
12196 などのLaTeXコマンドに対応した意味論的マークアップを定義するものです。
12199 \begin_layout Itemize
12201 \begin_inset Flex Code
12204 \begin_layout Plain Layout
12210 )。これは、TeXコードや脚注などに似たユーザ設定の折りたたみ式差込枠を定義するのに使用することができます。わかりやすい例はendnote差込枠で、これは
12211 \begin_inset Flex Code
12214 \begin_layout Plain Layout
12223 \begin_layout Itemize
12225 \begin_inset Flex Code
12228 \begin_layout Plain Layout
12234 )。DocBookクラスで使用するものです。
12237 \begin_layout Standard
12239 \begin_inset Flex Code
12242 \begin_layout Plain Layout
12251 \begin_layout Standard
12252 \begin_inset Flex Code
12255 \begin_layout Plain Layout
12261 タグは、もう一つ別の機能も提供します。これを使えば、いろいろな種類の差込枠全体のレイアウトを設定するのに使用することができるのです。現在のところ、
12262 \begin_inset Flex Code
12265 \begin_layout Plain Layout
12271 は任意設定差込枠を定義することの他に、脚注・傍注・注釈差込枠・TeXコード(ERT)差込枠・派生枝・リスト・索引・ボックス・表・アルゴリズム・URL・オプション
12272 引数のレイアウトパラメータを設定するのに使用することができます。
12275 \begin_layout Standard
12276 \begin_inset Flex Code
12279 \begin_layout Plain Layout
12285 定義は以下の形の行では始まらなくてはなりません。
12288 \begin_layout LyX-Code
12292 \begin_layout Standard
12294 \begin_inset Flex Code
12297 \begin_layout Plain Layout
12303 は、レイアウトを定義しようとしている差込枠を指し、以下の2つの場合がありえます。
12306 \begin_layout Enumerate
12307 既存の差込枠のレイアウトを変更する場合。この場合、
12308 \begin_inset Flex Code
12311 \begin_layout Plain Layout
12318 \begin_inset Flex Code
12321 \begin_layout Plain Layout
12328 \begin_inset Flex Code
12331 \begin_layout Plain Layout
12338 \begin_inset Flex Code
12341 \begin_layout Plain Layout
12348 \begin_inset Flex Code
12351 \begin_layout Plain Layout
12358 \begin_inset Flex Code
12361 \begin_layout Plain Layout
12368 \begin_inset Flex Code
12371 \begin_layout Plain Layout
12378 \begin_inset Flex Code
12381 \begin_layout Plain Layout
12388 \begin_inset Flex Code
12391 \begin_layout Plain Layout
12398 \begin_inset Flex Code
12401 \begin_layout Plain Layout
12408 \begin_inset Flex Code
12411 \begin_layout Plain Layout
12418 \begin_inset Flex Code
12421 \begin_layout Plain Layout
12428 \begin_inset Flex Code
12431 \begin_layout Plain Layout
12438 \begin_inset Flex Code
12441 \begin_layout Plain Layout
12448 \begin_inset Flex Code
12451 \begin_layout Plain Layout
12458 \begin_inset Flex Code
12461 \begin_layout Plain Layout
12468 \begin_inset Flex Code
12471 \begin_layout Plain Layout
12478 \begin_inset Flex Code
12481 \begin_layout Plain Layout
12488 \begin_inset Flex Code
12491 \begin_layout Plain Layout
12498 \begin_inset Flex Code
12501 \begin_layout Plain Layout
12508 \begin_inset Flex Code
12511 \begin_layout Plain Layout
12520 \begin_layout Enumerate
12521 任意設定差込枠のレイアウトを定義する場合。この場合には、
12522 \begin_inset Flex Code
12525 \begin_layout Plain Layout
12531 は既存の差込枠で使用されていないもので有効な識別子であれば、何でも指定できます。任意設定差込枠の定義には、
12532 \begin_inset Flex Code
12535 \begin_layout Plain Layout
12545 含まれていて、これがどの型の差込枠なのかが宣言されている必要があります。
12548 \begin_layout Standard
12549 \begin_inset Flex Code
12552 \begin_layout Plain Layout
12558 定義には以下の項目を入れることができます。
12561 \begin_layout Description
12562 \begin_inset Flex Code
12565 \begin_layout Plain Layout
12572 \begin_inset Flex Code
12575 \begin_layout Plain Layout
12584 \begin_layout Description
12585 \begin_inset Flex Code
12588 \begin_layout Plain Layout
12595 \begin_inset Flex Code
12598 \begin_layout Plain Layout
12607 \begin_inset Flex Code
12610 \begin_layout Plain Layout
12616 ] 差込枠を閉じた際、差込枠の内容をラベルとして使用するか否か。既定値は偽です。
12619 \begin_layout Description
12620 \begin_inset Flex Code
12623 \begin_layout Plain Layout
12630 \begin_inset CommandInset ref
12632 reference "des:CopyStyle"
12639 \begin_layout Description
12640 \begin_inset Flex Code
12643 \begin_layout Plain Layout
12650 \begin_inset Flex Code
12653 \begin_layout Plain Layout
12662 \begin_inset Flex Code
12665 \begin_layout Plain Layout
12671 ] 段落を設定するのに、段落設定ダイアログをユーザが使えるかどうかを指定します。
12674 \begin_layout Description
12675 \begin_inset Flex Code
12678 \begin_layout Plain Layout
12684 差込枠の枠とボタンをレンダリングするのに使用する様式を指定するもので、
12685 \begin_inset Flex Code
12688 \begin_layout Plain Layout
12695 \begin_inset Flex Code
12698 \begin_layout Plain Layout
12705 \begin_inset Flex Code
12708 \begin_layout Plain Layout
12714 のいずれかを指定することができます。脚注は通常
12715 \begin_inset Flex Code
12718 \begin_layout Plain Layout
12725 \begin_inset Flex Code
12728 \begin_layout Plain Layout
12735 \begin_inset Flex Code
12738 \begin_layout Plain Layout
12747 \begin_layout Description
12748 \begin_inset Flex Code
12751 \begin_layout Plain Layout
12757 InsetLayout宣言を閉じるのに必要です。
12760 \begin_layout Description
12761 \begin_inset Flex Code
12764 \begin_layout Plain Layout
12775 \begin_inset CommandInset ref
12777 reference "sub:フォント指定"
12781 節を参照。このフォントを定義すると自動的に
12782 \begin_inset Flex Code
12785 \begin_layout Plain Layout
12791 も同じ値に定義されるので、これらを別々の値にしたいときは、これを先に定義してから後に
12792 \begin_inset Flex Code
12795 \begin_layout Plain Layout
12801 を定義しなくてはならないことに注意してください。
12804 \begin_layout Description
12805 \begin_inset Flex Code
12808 \begin_layout Plain Layout
12814 たとえばTeXコードやURLで「latex」言語が「左から右」(ラテン式)出力になるように強制します。うまく機能しません。
12817 \begin_layout Description
12818 \begin_inset Flex Code
12821 \begin_layout Plain Layout
12828 \begin_inset Flex Code
12831 \begin_layout Plain Layout
12840 \begin_inset Flex Code
12843 \begin_layout Plain Layout
12849 ] PlainLayoutを使用するべきなのか、それともユーザが差込枠で使用されている段落様式を変更できるのかを指定します。既定値は偽です。
12852 \begin_layout Description
12853 \begin_inset Flex Code
12856 \begin_layout Plain Layout
12863 \begin_inset CommandInset ref
12864 LatexCommand pageref
12865 reference "des:FreeSpacing"
12872 \begin_layout Description
12873 \begin_inset Flex Code
12876 \begin_layout Plain Layout
12882 これらは、XHTML出力で使用されます。第
12883 \begin_inset CommandInset ref
12885 reference "sec:XHTML出力のタグ"
12892 \begin_layout Description
12893 \begin_inset Flex Code
12896 \begin_layout Plain Layout
12903 \begin_inset Flex Code
12906 \begin_layout Plain Layout
12915 \begin_inset Flex Code
12918 \begin_layout Plain Layout
12924 ] 「文書構造」ペイン用に出力される文字列に、この差込枠の内容を含めるかどうか。たとえば、節見出しの脚注の内容が、文書構造の目次に表示されることは望まないでしょ
12925 うが、通常、文字様式の内容は表示されることを望むでしょう。既定値は偽、すなわち含めません。
12928 \begin_layout Description
12929 \begin_inset Flex Code
12932 \begin_layout Plain Layout
12939 \begin_inset CommandInset ref
12940 LatexCommand pageref
12941 reference "des:KeepEmpty"
12948 \begin_layout Description
12949 \begin_inset Flex Code
12952 \begin_layout Plain Layout
12959 \begin_inset CommandInset ref
12961 reference "sub:フォント指定"
12965 節を参照。非効率を回避するため、この定義は
12966 \begin_inset Flex Code
12969 \begin_layout Plain Layout
12978 \begin_layout Description
12979 \begin_inset Flex Code
12982 \begin_layout Plain Layout
12988 ボタンなどに差込枠のラベルとして表示されるもの。差込枠型によっては(TeXコードや派生枝)、ラベルが動的に変更されます。
12991 \begin_layout Description
12992 \begin_inset Flex Code
12995 \begin_layout Plain Layout
13001 対応するLaTeX関連物の名称。環境名ないしはコマンド名。
13004 \begin_layout Description
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
13034 のような括弧対を含む。このパラメータはLyX内部から変更することはできません。
13037 \begin_layout Description
13038 \begin_inset Flex Code
13041 \begin_layout Plain Layout
13048 \begin_inset CommandInset ref
13049 LatexCommand pageref
13050 reference "des:LatexType"
13057 \begin_layout Description
13058 \begin_inset Flex Code
13061 \begin_layout Plain Layout
13068 \begin_inset Flex Code
13071 \begin_layout Plain Layout
13078 \begin_inset Flex Code
13081 \begin_layout Plain Layout
13088 \begin_inset Flex Code
13091 \begin_layout Plain Layout
13098 \begin_inset Flex Code
13101 \begin_layout Plain Layout
13107 (charstyleの定義の終わりなどを示すダミー定義)の各値を取ることができます。この項目は、任意設定差込枠に必須であり、かつ任意設定差込枠でしか意味を持ちま
13108 せん。この項目は、就中、差込枠がどのメニューに表示されるかを決定します。
13109 \begin_inset Flex Code
13112 \begin_layout Plain Layout
13119 \begin_inset Flex Code
13122 \begin_layout Plain Layout
13129 \begin_inset Flex Code
13132 \begin_layout Plain Layout
13139 \begin_inset Flex Code
13142 \begin_layout Plain Layout
13149 \begin_inset Flex Code
13152 \begin_layout Plain Layout
13162 設定すれば、真に設定することができます。
13165 \begin_layout Description
13166 \begin_inset Flex Code
13169 \begin_layout Plain Layout
13176 \begin_inset Flex Code
13179 \begin_layout Plain Layout
13188 \begin_inset Flex Code
13191 \begin_layout Plain Layout
13197 ] この差込枠中に複数の段落を入れることができるかどうか。これは同時に、
13198 \begin_inset Flex Code
13201 \begin_layout Plain Layout
13208 \begin_inset Flex Code
13211 \begin_layout Plain Layout
13218 \begin_inset Flex Code
13221 \begin_layout Plain Layout
13231 指定されれば、他の値に指定し直すことができます。既定値は真です。
13234 \begin_layout Description
13235 \begin_inset Flex Code
13238 \begin_layout Plain Layout
13245 \begin_inset Flex Code
13248 \begin_layout Plain Layout
13257 \begin_inset Flex Code
13260 \begin_layout Plain Layout
13267 \begin_inset Flex Code
13270 \begin_layout Plain Layout
13278 するか否か(註:当該コマンド自身をprotectするかどうかでは
13285 \begin_layout Description
13286 \begin_inset Flex Code
13289 \begin_layout Plain Layout
13296 \begin_inset Flex Code
13299 \begin_layout Plain Layout
13308 \begin_inset Flex Code
13311 \begin_layout Plain Layout
13318 \begin_inset CommandInset ref
13320 reference "des:PathThru"
13327 \begin_layout Description
13328 \begin_inset Flex Code
13331 \begin_layout Plain Layout
13338 \begin_inset Flex Code
13341 \begin_layout Plain Layout
13350 \begin_inset Flex Code
13353 \begin_layout Plain Layout
13360 \begin_inset CommandInset ref
13362 reference "des:PathThru"
13369 \begin_layout Description
13370 \begin_inset Flex Code
13373 \begin_layout Plain Layout
13380 \begin_inset CommandInset ref
13381 LatexCommand pageref
13382 reference "des:Preamble"
13389 \begin_layout Description
13390 \begin_inset Flex Code
13393 \begin_layout Plain Layout
13400 \begin_inset Flex Code
13403 \begin_layout Plain Layout
13409 ] この型の差込枠を参照する際、生成されるラベルに使用する前置句。これによって、整形参照を使用することができるようになります。
13412 \begin_layout Description
13413 \begin_inset Flex Code
13416 \begin_layout Plain Layout
13423 \begin_inset Flex Code
13426 \begin_layout Plain Layout
13433 \begin_inset CommandInset ref
13434 LatexCommand pageref
13435 reference "des:Requires"
13442 \begin_layout Description
13443 \begin_inset Flex Code
13446 \begin_layout Plain Layout
13453 \begin_inset Flex Code
13456 \begin_layout Plain Layout
13463 \begin_inset Flex Code
13466 \begin_layout Plain Layout
13474 ] この差込枠が周囲の環境と同じフォントを用いるか、独自のフォントを用いるか。既定値は真、すなわち独自のフォントを用います。
13477 \begin_layout Description
13478 \begin_inset Flex Code
13481 \begin_layout Plain Layout
13488 \begin_inset Flex Code
13491 \begin_layout Plain Layout
13498 \begin_inset Flex Code
13501 \begin_layout Plain Layout
13509 ] この差込枠の内容をスペルチェックするか否か。既定値は真です。
13512 \begin_layout Subsection
13514 \begin_inset CommandInset label
13523 \begin_layout Standard
13524 LyX第1.3.0版以来、テキストクラス自体の中でカウンタ(
13525 \begin_inset Flex MenuItem
13528 \begin_layout Plain Layout
13535 \begin_inset Flex MenuItem
13538 \begin_layout Plain Layout
13544 ・\SpecialChar \ldots{}
13545 )を定義することが可能となり、かつ必要となりました。標準的なフロートは
13546 \begin_inset Flex Code
13549 \begin_layout Plain Layout
13555 ファイルに含まれているので、作業中のレイアウトファイルに
13558 \begin_layout LyX-Code
13559 Input stdcounters.inc
13562 \begin_layout Standard
13563 と加えるだけで済むことも多いでしょう。しかし自製カウンタを定義したければ、そうすることもできます。カウンタ宣言は、
13566 \begin_layout LyX-Code
13570 \begin_layout Standard
13572 \begin_inset Flex Code
13575 \begin_layout Plain Layout
13581 」はカウンタ名で置き換えます。また、宣言は「
13582 \begin_inset Flex Code
13585 \begin_layout Plain Layout
13591 」で終わらなくてはなりません。以下のパラメータを使用することができます。
13594 \begin_layout Description
13595 \begin_inset Flex Code
13598 \begin_layout Plain Layout
13599 LabelString [文字列=""]
13604 定義されていると、ここで指定した文字列がカウンタの表示の仕方を定義します。この値を指定すると、
13605 \begin_inset Flex Code
13608 \begin_layout Plain Layout
13609 LabelStringAppendix
13614 も同じ値に設定されます。文字列中では、以下の構成要素を使用することができます。
13618 \begin_layout Itemize
13619 \begin_inset Flex Code
13622 \begin_layout Plain Layout
13631 \begin_inset Flex Code
13634 \begin_layout Plain Layout
13641 \begin_inset Flex Code
13644 \begin_layout Plain Layout
13651 \begin_inset Newline linebreak
13655 \begin_inset Flex Code
13658 \begin_layout Plain Layout
13659 LabelStringAppendix
13667 \begin_layout Itemize
13669 \begin_inset Flex Code
13672 \begin_layout Plain Layout
13688 を用いて表現することができます。ここで
13689 \begin_inset Flex Code
13692 \begin_layout Plain Layout
13704 \begin_layout Plain Layout
13705 実は、事態はもう少し複雑です。以下に説明されているもの以外の
13709 は何であれ、アラビア数字を生成します。これが将来変更されたとしても不思議ではないでしょう。
13715 \begin_inset Flex Code
13718 \begin_layout Plain Layout
13724 :1, 2, 3,\SpecialChar \ldots{}
13726 \begin_inset Flex Code
13729 \begin_layout Plain Layout
13735 :a, b, c, \SpecialChar \ldots{}
13737 \begin_inset Flex Code
13740 \begin_layout Plain Layout
13746 :A, B, C, \SpecialChar \ldots{}
13748 \begin_inset Flex Code
13751 \begin_layout Plain Layout
13757 :i, ii, iii, \SpecialChar \ldots{}
13759 \begin_inset Flex Code
13762 \begin_layout Plain Layout
13768 :I, II, III\SpecialChar \ldots{}
13770 \begin_inset Flex Code
13773 \begin_layout Plain Layout
13783 \begin_layout Standard
13784 LabelStringが定義されていないときは、既定値は以下のように組み立てられます。このカウンタに親カウンタ
13785 \begin_inset Flex Code
13788 \begin_layout Plain Layout
13795 \begin_inset Flex Code
13798 \begin_layout Plain Layout
13805 \begin_inset Newline linebreak
13809 \begin_inset Flex Code
13812 \begin_layout Plain Layout
13823 \begin_inset Flex Code
13826 \begin_layout Plain Layout
13837 \begin_layout Description
13838 \begin_inset Flex Code
13841 \begin_layout Plain Layout
13842 LabelStringAppendix
13848 \begin_inset Flex Code
13851 \begin_layout Plain Layout
13858 \begin_inset Flex Code
13861 \begin_layout Plain Layout
13867 と同様ですが、付録で使用するためのものです。
13870 \begin_layout Description
13871 \begin_inset Flex Code
13874 \begin_layout Plain Layout
13881 \begin_inset Flex Code
13884 \begin_layout Plain Layout
13891 \begin_inset Quotes erd
13895 \begin_inset Quotes erd
13898 ] このカウンタの整形参照で使用する書式。たとえば、節番号への参照を「Section 2.4」のように表示させたい場合には、文字列に「##」を含めます。これは、カ
13899 ウンタ番号で置換されます。したがって、節の場合には「Section ##」のようにします。
13902 \begin_layout Description
13903 \begin_inset Flex Code
13906 \begin_layout Plain Layout
13913 \begin_inset Flex Code
13916 \begin_layout Plain Layout
13923 \begin_inset Quotes erd
13927 \begin_inset Quotes erd
13930 ] これを別のカウンタ名に設定すると、現在のカウンタは、別のカウンタが増加する毎にリセットされます。たとえば、
13931 \begin_inset Flex Code
13934 \begin_layout Plain Layout
13941 \begin_inset Flex Code
13944 \begin_layout Plain Layout
13953 \begin_layout Subsection
13955 \begin_inset CommandInset label
13964 \begin_layout Standard
13965 フォント指定は、以下のような形を取ります。
13968 \begin_layout LyX-Code
13978 \begin_layout LyX-Code
13982 \begin_layout LyX-Code
13986 \begin_layout Standard
13987 以下のコマンドを使用することができます。
13990 \begin_layout Description
13991 \begin_inset Flex Code
13994 \begin_layout Plain Layout
14001 \begin_inset Flex Code
14004 \begin_layout Plain Layout
14013 \begin_inset Flex Code
14016 \begin_layout Plain Layout
14023 \begin_inset Flex Code
14026 \begin_layout Plain Layout
14033 \begin_inset Flex Code
14036 \begin_layout Plain Layout
14043 \begin_inset Flex Code
14046 \begin_layout Plain Layout
14053 \begin_inset Flex Code
14056 \begin_layout Plain Layout
14063 \begin_inset Flex Code
14066 \begin_layout Plain Layout
14073 \begin_inset Flex Code
14076 \begin_layout Plain Layout
14083 \begin_inset Flex Code
14086 \begin_layout Plain Layout
14095 \begin_layout Description
14096 \begin_inset Flex Code
14099 \begin_layout Plain Layout
14108 \begin_inset Flex Code
14111 \begin_layout Plain Layout
14120 \begin_inset Flex Code
14123 \begin_layout Plain Layout
14130 \begin_inset Flex Code
14133 \begin_layout Plain Layout
14142 \begin_layout Description
14143 \begin_inset Flex Code
14146 \begin_layout Plain Layout
14153 \begin_inset Flex Code
14156 \begin_layout Plain Layout
14163 \begin_inset Flex Code
14166 \begin_layout Plain Layout
14173 \begin_inset Flex Code
14176 \begin_layout Plain Layout
14183 \begin_inset Flex Code
14186 \begin_layout Plain Layout
14193 \begin_inset Flex Code
14196 \begin_layout Plain Layout
14203 \begin_inset Flex Code
14206 \begin_layout Plain Layout
14213 \begin_inset Flex Code
14216 \begin_layout Plain Layout
14222 です。それぞれ、対応する属性を有効にしたり無効にしたりします。
14223 \begin_inset Newline newline
14227 \begin_inset Flex Code
14230 \begin_layout Plain Layout
14237 \begin_inset Flex Code
14240 \begin_layout Plain Layout
14246 はそれを無効にします。もし後者がわかりにくければ、現在のコンテクストのフォント設定は、一般的に周囲のコンテクストから継承していることを思い出してください。ですか
14248 \begin_inset Flex Code
14251 \begin_layout Plain Layout
14257 は、たとえば定理環境で、何をせずとも有効となっている強調を無効にするのです。
14260 \begin_layout Description
14261 \begin_inset Flex Code
14264 \begin_layout Plain Layout
14273 \begin_inset Flex Code
14276 \begin_layout Plain Layout
14285 \begin_inset Flex Code
14288 \begin_layout Plain Layout
14297 \begin_layout Description
14298 \begin_inset Flex Code
14301 \begin_layout Plain Layout
14310 \begin_inset Flex Code
14313 \begin_layout Plain Layout
14322 \begin_inset Flex Code
14325 \begin_layout Plain Layout
14332 \begin_inset Flex Code
14335 \begin_layout Plain Layout
14342 \begin_inset Flex Code
14345 \begin_layout Plain Layout
14354 \begin_layout Description
14355 \begin_inset Flex Code
14358 \begin_layout Plain Layout
14365 \begin_inset Flex Code
14368 \begin_layout Plain Layout
14375 \begin_inset Flex Code
14378 \begin_layout Plain Layout
14385 \begin_inset Flex Code
14388 \begin_layout Plain Layout
14397 \begin_inset Flex Code
14400 \begin_layout Plain Layout
14407 \begin_inset Flex Code
14410 \begin_layout Plain Layout
14417 \begin_inset Flex Code
14420 \begin_layout Plain Layout
14427 \begin_inset Flex Code
14430 \begin_layout Plain Layout
14437 \begin_inset Flex Code
14440 \begin_layout Plain Layout
14449 \begin_layout Subsection
14450 \begin_inset CommandInset label
14459 \begin_layout Standard
14460 (引用ダイアログやツールチップなどの)LyX内部やXHTML出力において、書誌情報をどのように表示するべきかの叙述には、
14461 \begin_inset Flex Code
14464 \begin_layout Plain Layout
14470 ブロックが使用されています。このブロックは、以下のような形をしています。
14473 \begin_layout LyX-Code
14477 \begin_layout LyX-Code
14481 \begin_layout LyX-Code
14485 \begin_layout LyX-Code
14489 \begin_layout Standard
14490 上記の各行は、それぞれarticleやbookに関連付けられた書誌情報をどのように表示するべきかを定義するものですが、このような定義は、BibTeXファイル中に
14491 存在しうる「項目型」すべてについて与えることができます。特定の定義が与えられなければ、LyXは、ソースコード中に定義されている既定書式を使用します。LyXは、い
14493 \begin_inset Flex Code
14496 \begin_layout Plain Layout
14502 ファイルで事前定義しており、これはほとんどのLyX文書クラスにインクルードされています。
14505 \begin_layout Standard
14506 この定義は、BibTeXキーをその値で置換できる機能を持った、簡単な言語を使用しています。キーは、
14507 \begin_inset Flex Code
14510 \begin_layout Plain Layout
14517 \begin_inset Flex Code
14520 \begin_layout Plain Layout
14526 記号でくくらなくてはなりません。したがって、簡単な定義は以下のようになります。
14529 \begin_layout LyX-Code
14531 \begin_inset Quotes eld
14535 \begin_inset Quotes erd
14541 \begin_layout Standard
14542 これは、「著者名・コンマ・引用に囲まれたタイトル・終止符」を出力します。
14545 \begin_layout Standard
14546 もちろん、キーが存在するときのみ、キーを出力したい時があるはずです。このようなときには
14547 \begin_inset Flex Code
14550 \begin_layout Plain Layout
14552 \begin_inset space ~
14560 のように、条件付きの構成を使用することができます。これは、
14561 \begin_inset Flex Code
14564 \begin_layout Plain Layout
14571 \begin_inset space ~
14574 」とvolumeキーを出力するという意味です。また、
14575 \begin_inset Flex Code
14578 \begin_layout Plain Layout
14579 {%author%[[%author%]][[%editor%, ed.]]}
14584 のように、条件の中にelse節を含めることも可能です。ここでは、もし
14585 \begin_inset Flex Code
14588 \begin_layout Plain Layout
14594 キーが存在するならば出力され、そうでなければeditorキーと「,
14595 \begin_inset space ~
14598 ed.」が出力されます。ここでもキーは、
14599 \begin_inset Flex Code
14602 \begin_layout Plain Layout
14608 記号でくくられていることに注意してください。条件全体は、波括弧で囲まれています。if節およびelse節は、「
14609 \begin_inset Flex Code
14612 \begin_layout Plain Layout
14619 \begin_inset Flex Code
14622 \begin_layout Plain Layout
14628 」の二重角括弧で囲まれています。これらすべてのあいだには,空白は入ってはなりません。
14631 \begin_layout Standard
14632 もう一つ、定義中で使用することのできる文法として、
14633 \begin_inset Flex Code
14636 \begin_layout Plain Layout
14642 という形をしたものがあります。これは、「リッチテキスト」を生成するときに使われる整形情報を定義するものです。当然のことながら、平文を書き出すときには、HTMLタ
14643 グを出力させたくはありませんから、HTMLタグは「
14644 \begin_inset Flex Code
14647 \begin_layout Plain Layout
14654 \begin_inset Flex Code
14657 \begin_layout Plain Layout
14663 」でくるんでやらなくてはならないのです。
14666 \begin_layout Standard
14667 \begin_inset Flex Code
14670 \begin_layout Plain Layout
14676 ブロックでは、他に2つの特殊な定義が可能です。一つめの例としては、
14679 \begin_layout LyX-Code
14681 \begin_inset Quotes eld
14685 \begin_inset Quotes erd
14691 \begin_layout Standard
14692 といった例が挙げられます。これは、短縮形ないしはマクロであり、
14693 \begin_inset Flex Code
14696 \begin_layout Plain Layout
14702 のように、これがキーであるかのように扱って使用することができます。LyXは、
14703 \begin_inset Flex Code
14706 \begin_layout Plain Layout
14712 を、そこで定義されているものを扱う場合と同じように取り扱います。ですから、明白な警告を敢えてさせて頂くと、
14715 \begin_layout LyX-Code
14719 \begin_layout Standard
14720 のようなことはしないでください。LyXは、無限ループに陥るようなことはありませんが、諦めるまでに長いループに入るかもしれません。
14723 \begin_layout Standard
14727 \begin_layout LyX-Code
14731 \begin_layout Standard
14732 のようなものです。これは、文字列の翻訳可能な部分を定義するもので、書誌情報中の関連部分が翻訳されるようにすることができます。
14733 \begin_inset Flex Code
14736 \begin_layout Plain Layout
14742 のように、これをキーとして扱って、定義の中に入れることもできます。これらのうちいくつかは、
14743 \begin_inset Flex Code
14746 \begin_layout Plain Layout
14752 中に事前定義されています。これは、上記で述べたような意味でのマクロではないことに注意してください。
14755 \begin_layout Standard
14756 以下は、これらの機能を全て使った例です。
14759 \begin_layout LyX-Code
14760 !authoredit {%author%[[%author%, ]][[{%editor%[[%editor%, %_edtext%, ]]}]]}
14763 \begin_layout Standard
14765 \begin_inset Flex Code
14768 \begin_layout Plain Layout
14774 キーが定義されているならば、著者とコンマを出力し、
14775 \begin_inset Flex Code
14778 \begin_layout Plain Layout
14785 \begin_inset Flex Code
14788 \begin_layout Plain Layout
14794 キーが定義されているならば、編集者名の後に
14795 \begin_inset Flex Code
14798 \begin_layout Plain Layout
14804 ないしはその翻訳(既定では「ed.」)を出力します。これは実は
14805 \begin_inset Flex Code
14808 \begin_layout Plain Layout
14814 の中で定義されていますので、このファイルをまず読みこめば、ご自身の定義ないしは再定義の中で使用することができます。
14817 \begin_layout Section
14818 \begin_inset CommandInset label
14820 name "sec:XHTML出力のタグ"
14827 \begin_layout Standard
14828 LaTeXやDocBookと同様、LyXのXHTML出力の書式も、レイアウト情報によって制御することができます。一般的に、LyXは適切な既定値を提供し、前述した
14829 ように、他のレイアウトタグに基づいて、既定のCSSスタイルの構成まで行ないます。たとえば、章見出しを適切に整形するためのCSSを書き出すために、LyXは、章様式
14831 \begin_inset Flex Code
14834 \begin_layout Plain Layout
14840 宣言で提供されている情報を利用しようと試みます。
14843 \begin_layout Standard
14844 したがって、多くの場合、使いたい環境や任意設定差込枠などのために満足のいくXHTML出力を得るために、まったく何もしなくてよいことになるでしょう。しかしながら、
14845 これが必要になる場合もあるので、LyXは、生成されるXHTMLやCSSをカスタマイズするために使用できるレイアウトタグを、たくさん提供しています。
14848 \begin_layout Standard
14849 様式宣言や差込枠宣言の外で使用することができるタグに、
14850 \begin_inset Flex Code
14853 \begin_layout Plain Layout
14860 \begin_inset Flex Code
14863 \begin_layout Plain Layout
14869 の2つがあることに注意してください。これらの詳細については、第
14870 \begin_inset CommandInset ref
14872 reference "sub:汎用テキストクラスパラメータ"
14879 \begin_layout Subsection
14880 \begin_inset CommandInset label
14882 name "sub:段落様式-XHTML"
14889 \begin_layout Standard
14890 LyXが段落のために出力するXHTMLの種類は、通常の段落を取り扱っているのか、コマンドを取り扱っているのか、あるいは環境を取り扱っているのかに依存し、これは対
14892 \begin_inset Flex Code
14895 \begin_layout Plain Layout
14904 \begin_layout Standard
14905 コマンドや通常の段落の場合には、XHTML出力は以下の形になります。
14908 \begin_layout LyX-Code
14910 \begin_inset Quotes erd
14914 \begin_inset Quotes erd
14920 \begin_layout LyX-Code
14922 \begin_inset Quotes erd
14926 \begin_inset Quotes erd
14932 \begin_layout LyX-Code
14936 \begin_layout LyX-Code
14940 \begin_layout Standard
14941 もちろん、段落にラベルがなければ、ラベルタグは省略することができます。
14944 \begin_layout Standard
14945 環境のうち、リストの変種でないものに関しては、XHTMLは以下の形を取ります。
14948 \begin_layout LyX-Code
14950 \begin_inset Quotes erd
14954 \begin_inset Quotes erd
14960 \begin_layout LyX-Code
14962 \begin_inset Quotes erd
14966 \begin_inset Quotes erd
14970 \begin_inset Quotes erd
14974 \begin_inset Quotes erd
14977 >環境ラベル</labeltag>最初の段落。
14980 \begin_layout LyX-Code
14984 \begin_layout LyX-Code
14985 <itemtag>二つめの段落。</itemtag>
14988 \begin_layout LyX-Code
14992 \begin_layout Standard
14993 ラベルは、たとえば定理の場合にそうであるように、最初の段落にだけ出力されることに注意してください。
14996 \begin_layout Standard
14997 リストに関しては、次のような形になります。
15000 \begin_layout LyX-Code
15002 \begin_inset Quotes erd
15006 \begin_inset Quotes erd
15012 \begin_layout LyX-Code
15014 \begin_inset Quotes erd
15018 \begin_inset Quotes erd
15022 \begin_inset Quotes erd
15026 \begin_inset Quotes erd
15029 >リストのラベル</labeltag>最初の項目。</itemtag>
15032 \begin_layout LyX-Code
15034 \begin_inset Quotes erd
15038 \begin_inset Quotes erd
15042 \begin_inset Quotes erd
15046 \begin_inset Quotes erd
15049 >リストのラベル</labeltag>二つめの項目。</itemtag>
15052 \begin_layout LyX-Code
15056 \begin_layout LyX-Code
15060 \begin_layout LyX-Code
15062 \begin_inset Quotes erd
15066 \begin_inset Quotes erd
15072 \begin_layout LyX-Code
15074 \begin_inset Quotes erd
15078 \begin_inset Quotes erd
15081 >リストのラベル</labeltag><itemtag attr=
15082 \begin_inset Quotes erd
15086 \begin_inset Quotes erd
15092 \begin_layout LyX-Code
15094 \begin_inset Quotes erd
15098 \begin_inset Quotes erd
15101 >リストのラベル</labeltag><itemtag attr=
15102 \begin_inset Quotes erd
15106 \begin_inset Quotes erd
15112 \begin_layout LyX-Code
15116 \begin_layout Standard
15118 \begin_inset Flex Code
15121 \begin_layout Plain Layout
15128 \begin_inset Flex Code
15131 \begin_layout Plain Layout
15137 の順序が違っていることに注意してください。どちらの順序になるかは、
15138 \begin_inset Flex Code
15141 \begin_layout Plain Layout
15148 \begin_inset Flex Code
15151 \begin_layout Plain Layout
15157 が偽であれば(既定値)、最初のケースのようになり、これが真であれば、二番めのケースのように、labelがitemの外側に来るようになります。
15160 \begin_layout Standard
15161 各段落の特定のタグ出力や属性出力は、以下に述べるようなレイアウトタグを使って制御することができます。しかしながら、前述のように、多くの場合、LyXは適切な既定値
15162 を生成するので、たいしたことをしなくても、望ましいXHTML出力を得ることができるということになるはずです。ここで利用出来るタグは、自分の好みにあわせて微調整す
15163 る目的でここにあるものと考えてください。
15166 \begin_layout Description
15167 \begin_inset Flex Code
15170 \begin_layout Plain Layout
15177 \begin_inset Flex Code
15180 \begin_layout Plain Layout
15186 ] 主幹タグと共に出力される属性情報を指定します。たとえば、「
15187 \begin_inset Flex Code
15190 \begin_layout Plain Layout
15196 」のようなものです。既定においては、LyXは「
15197 \begin_inset Flex Code
15200 \begin_layout Plain Layout
15207 \begin_inset Flex Code
15210 \begin_layout Plain Layout
15216 は、レイアウトのLyX名であり、chapterのように小文字で記述します。
15219 \begin_layout Description
15220 \begin_inset Flex Code
15223 \begin_layout Plain Layout
15230 \begin_inset Flex Code
15233 \begin_layout Plain Layout
15244 \begin_inset Flex Code
15247 \begin_layout Plain Layout
15253 で追加情報が明示的に与えられているときでも、LyXがこのレイアウト用に生成する既定CSS情報を出力するか否か。これを
15254 \begin_inset Flex Code
15257 \begin_layout Plain Layout
15263 にすると、生成されたCSSを完全に上書きする代わりに、変更したり追加したりすることができます。既定値は
15264 \begin_inset Flex Code
15267 \begin_layout Plain Layout
15276 \begin_layout Description
15277 \begin_inset Flex Code
15280 \begin_layout Plain Layout
15287 \begin_inset Flex Code
15290 \begin_layout Plain Layout
15296 ] 環境の段落に使用されるタグ。上記各例の
15297 \begin_inset Flex Code
15300 \begin_layout Plain Layout
15307 \begin_inset Flex Code
15310 \begin_layout Plain Layout
15319 \begin_layout Description
15320 \begin_inset Flex Code
15323 \begin_layout Plain Layout
15330 \begin_inset Flex Code
15333 \begin_layout Plain Layout
15340 \begin_inset Flex Code
15343 \begin_layout Plain Layout
15344 class=`レイアウト名_item'
15352 \begin_layout Description
15353 \begin_inset Flex Code
15356 \begin_layout Plain Layout
15363 \begin_inset Flex Code
15366 \begin_layout Plain Layout
15372 ] 段落と項目ラベルに使用されるタグ。上記各例の
15373 \begin_inset Flex Code
15376 \begin_layout Plain Layout
15383 \begin_inset Flex Code
15386 \begin_layout Plain Layout
15395 \begin_layout Description
15396 \begin_inset Flex Code
15399 \begin_layout Plain Layout
15406 \begin_inset Flex Code
15409 \begin_layout Plain Layout
15416 \begin_inset Flex Code
15419 \begin_layout Plain Layout
15420 class=`レイアウト名_label'
15428 \begin_layout Description
15429 \begin_inset Flex Code
15432 \begin_layout Plain Layout
15439 \begin_inset Flex Code
15442 \begin_layout Plain Layout
15452 ] このタグは、リスト関係環境でのみ意味を持ち、labelタグが、itemタグの前に出力されるか、中に出力されるかを制御します。これは、たとえば、descrip
15454 \begin_inset Flex Code
15457 \begin_layout Plain Layout
15458 `<dt>\SpecialChar \ldots{}
15459 </dt><dd>\SpecialChar \ldots{}
15465 という形を得るために使用されます。既定値は
15466 \begin_inset Flex Code
15469 \begin_layout Plain Layout
15475 で、labelタグはitemタグの中に出力されます。
15478 \begin_layout Description
15479 \begin_inset Flex Code
15482 \begin_layout Plain Layout
15489 \begin_inset Flex Code
15492 \begin_layout Plain Layout
15498 セクションに出力される情報。これは、たとえば、
15499 \begin_inset Flex Code
15502 \begin_layout Plain Layout
15509 \begin_inset Flex Code
15512 \begin_layout Plain Layout
15518 ブロックをインクルードするのに使用することができます。
15521 \begin_layout Description
15522 \begin_inset Flex Code
15525 \begin_layout Plain Layout
15531 この様式が使用されたときに、インクルードするCSSスタイル情報。これは、レイアウトが生成する
15532 \begin_inset Flex Code
15535 \begin_layout Plain Layout
15541 ブロックで自動的に包まれますので、CSS自体をインクルードするだけで大丈夫です。
15544 \begin_layout Description
15545 \begin_inset Flex Code
15548 \begin_layout Plain Layout
15555 \begin_inset Flex Code
15558 \begin_layout Plain Layout
15564 ] 主幹ラベルに使用されるタグ。上記各例の
15565 \begin_inset Flex Code
15568 \begin_layout Plain Layout
15575 \begin_inset Flex Code
15578 \begin_layout Plain Layout
15587 \begin_layout Description
15588 \begin_inset Flex Code
15591 \begin_layout Plain Layout
15598 \begin_inset Flex Code
15601 \begin_layout Plain Layout
15612 \begin_inset Flex Code
15615 \begin_layout Plain Layout
15621 タグを生成するのに使用する様式であるという印をつけます。既定値は偽です。
15622 \begin_inset Flex Code
15625 \begin_layout Plain Layout
15632 \begin_inset Flex Code
15635 \begin_layout Plain Layout
15644 \begin_layout Subsection
15648 \begin_layout Standard
15649 差込枠のXHTML出力も、レイアウトファイル内の情報によって制御することができます
15653 \begin_layout Plain Layout
15654 現在のところ、これは「テキスト」差込枠(中に書き込みができる差込枠)にのみ有効で、「コマンド」差込枠(ダイアログボックスに関連付けられた差込枠)には適用されませ
15660 。ここでも、LyXは適切な既定値を提供しようと試み、既定のCSS様式を構成します。しかし、すべてカスタマイズ可能です。
15663 \begin_layout Standard
15664 LyXが差込枠用に出力するXHTMLは、以下の形を取ります。
15667 \begin_layout LyX-Code
15669 \begin_inset Quotes erd
15673 \begin_inset Quotes erd
15679 \begin_layout LyX-Code
15680 <labeltag>ラベル</labeltag>
15683 \begin_layout LyX-Code
15685 \begin_inset Quotes erd
15689 \begin_inset Quotes erd
15692 >差込枠の内容。</innertag>
15695 \begin_layout LyX-Code
15699 \begin_layout Standard
15700 差込枠が多段落を許可している---つまり
15701 \begin_inset Flex Code
15704 \begin_layout Plain Layout
15710 が真---ならば、差込枠の内容は、それ自身段落として出力され、それらの段落に用いられる様式(標準、引用など)を用いて整形されます。もちろん、段落にラベルがなけれ
15711 ば、labelタグは省略され、ラベルがあれば、現在のところ、つねに
15712 \begin_inset Flex Code
15715 \begin_layout Plain Layout
15721 が用いられます。innerタグは非必須であり、既定では出力されません。各差込枠用に出力される特定のタグや属性は、以下のレイアウトタグによって制御することができま
15725 \begin_layout Description
15726 \begin_inset Flex Code
15729 \begin_layout Plain Layout
15736 \begin_inset Flex Code
15739 \begin_layout Plain Layout
15745 ] 主幹タグと共に出力される属性情報を指定します。たとえば、「
15746 \begin_inset Flex Code
15749 \begin_layout Plain Layout
15755 」のようなものです。既定においては、LyXは「
15756 \begin_inset Flex Code
15759 \begin_layout Plain Layout
15766 \begin_inset Flex Code
15769 \begin_layout Plain Layout
15775 は、レイアウトのLyX名であり、chapterのように小文字で記述します。
15778 \begin_layout Description
15779 \begin_inset Flex Code
15782 \begin_layout Plain Layout
15789 \begin_inset Flex Code
15792 \begin_layout Plain Layout
15803 \begin_inset Flex Code
15806 \begin_layout Plain Layout
15812 で追加情報が明示的に与えられているときでも、LyXがこのレイアウト用に生成する既定CSS情報を出力するか否か。これを
15813 \begin_inset Flex Code
15816 \begin_layout Plain Layout
15822 にすると、生成されたCSSを完全に上書きする代わりに、変更したり追加したりすることができます。既定値は
15823 \begin_inset Flex Code
15826 \begin_layout Plain Layout
15835 \begin_layout Description
15836 \begin_inset Flex Code
15839 \begin_layout Plain Layout
15846 \begin_inset Flex Code
15849 \begin_layout Plain Layout
15856 \begin_inset Flex Code
15859 \begin_layout Plain Layout
15868 \begin_layout Description
15869 \begin_inset Flex Code
15872 \begin_layout Plain Layout
15879 \begin_inset Flex Code
15882 \begin_layout Plain Layout
15889 \begin_inset Flex Code
15892 \begin_layout Plain Layout
15901 \begin_layout Description
15902 \begin_inset Flex Code
15905 \begin_layout Plain Layout
15912 \begin_inset Flex Code
15915 \begin_layout Plain Layout
15923 ] この差込枠が(脚注のように)独立した文字列ブロックを表すのか、それとも、(派生枝のように)周囲の文字列の中に取り込まれる素材を表すのか。既定値は1です。
15926 \begin_layout Description
15927 \begin_inset Flex Code
15930 \begin_layout Plain Layout
15937 \begin_inset Flex Code
15940 \begin_layout Plain Layout
15946 ] 場合によっては、カウンタへの参照を含む、この差込枠のラベル。たとえば、脚注用には
15947 \begin_inset Flex Code
15950 \begin_layout Plain Layout
15958 など。これは非必須であり、既定値はありません。
15961 \begin_layout Description
15962 \begin_inset Flex Code
15965 \begin_layout Plain Layout
15972 \begin_inset Flex Code
15975 \begin_layout Plain Layout
15981 セクションに出力される情報。これは、たとえば、
15982 \begin_inset Flex Code
15985 \begin_layout Plain Layout
15992 \begin_inset Flex Code
15995 \begin_layout Plain Layout
16001 ブロックをインクルードするのに使用することができます。
16004 \begin_layout Description
16005 \begin_inset Flex Code
16008 \begin_layout Plain Layout
16014 この様式が使用されたときに、インクルードするCSSスタイル情報。これは、レイアウトが生成する
16015 \begin_inset Flex Code
16018 \begin_layout Plain Layout
16024 ブロックで自動的に包まれますので、CSS自体をインクルードするだけで大丈夫です。
16027 \begin_layout Description
16028 \begin_inset Flex Code
16031 \begin_layout Plain Layout
16038 \begin_inset Flex Code
16041 \begin_layout Plain Layout
16047 ] 主幹ラベルに使用されるタグ。上記各例の
16048 \begin_inset Flex Code
16051 \begin_layout Plain Layout
16058 \begin_inset Flex Code
16061 \begin_layout Plain Layout
16068 \begin_inset Flex Code
16071 \begin_layout Plain Layout
16078 \begin_inset Flex Code
16081 \begin_layout Plain Layout
16088 \begin_inset Flex Code
16091 \begin_layout Plain Layout
16100 \begin_layout Subsection
16104 \begin_layout Standard
16105 フロートのXHTML出力も、レイアウトファイル内の情報によって制御することができます。出力は、以下の形を取ります。
16108 \begin_layout LyX-Code
16110 \begin_inset Quotes erd
16114 \begin_inset Quotes erd
16120 \begin_layout LyX-Code
16124 \begin_layout LyX-Code
16128 \begin_layout Standard
16129 キャプションは、存在している場合には、独立した差込枠となり、そのような形で出力されます。その外観は、キャプション差込枠のInsetLayoutで制御することがで
16133 \begin_layout Description
16134 \begin_inset Flex Code
16137 \begin_layout Plain Layout
16144 \begin_inset Flex Code
16147 \begin_layout Plain Layout
16153 ] 主幹タグと共に出力される属性情報を指定します。たとえば、「
16154 \begin_inset Flex Code
16157 \begin_layout Plain Layout
16158 class=`myfloat' onclick=`\SpecialChar \ldots{}
16164 」のようなものです。既定においては、LyXは「
16165 \begin_inset Flex Code
16168 \begin_layout Plain Layout
16169 class=`float float-フロート型'
16175 \begin_inset Flex Code
16178 \begin_layout Plain Layout
16185 \begin_inset CommandInset ref
16187 reference "sub:フロート"
16191 参照)、この型のフロートのLyX名です。ただし、小文字に変換され、アルファベットや数字でない文字はアンダースコアに変換されます。例:float-table。
16194 \begin_layout Description
16195 \begin_inset Flex Code
16198 \begin_layout Plain Layout
16204 このフロートが使用されたときに、インクルードするCSSスタイル情報。これは、レイアウトが生成する
16205 \begin_inset Flex Code
16208 \begin_layout Plain Layout
16214 ブロックで自動的に包まれますので、CSS自体をインクルードするだけで大丈夫です。
16217 \begin_layout Description
16218 \begin_inset Flex Code
16221 \begin_layout Plain Layout
16228 \begin_inset Flex Code
16231 \begin_layout Plain Layout
16237 ] このフロートに使用されるタグ。上記各例の
16238 \begin_inset Flex Code
16241 \begin_layout Plain Layout
16248 \begin_inset Flex Code
16251 \begin_layout Plain Layout
16257 であり、ほとんどの場合変更する必要はありません。
16260 \begin_layout Subsection
16264 \begin_layout Standard
16266 \begin_inset Flex Code
16269 \begin_layout Plain Layout
16275 ブロックを使用して整形することができます。詳細については、第
16276 \begin_inset CommandInset ref
16278 reference "sub:引用書式指定"
16285 \begin_layout Subsection
16289 \begin_layout Standard
16290 LyXは、提供されている他のレイアウト情報に基づいて、差込枠と段落様式の両方の既定CSS様式ルールを生成ということすることを、これまでに何度か触れました。この節
16291 では、LyXがどのレイアウト情報を、どのように使うのか、ひとこと述べておきたいと思います。
16294 \begin_layout Standard
16296 \begin_inset Flex Code
16299 \begin_layout Plain Layout
16306 \begin_inset Flex Code
16309 \begin_layout Plain Layout
16316 \begin_inset Flex Code
16319 \begin_layout Plain Layout
16326 \begin_inset Flex Code
16329 \begin_layout Plain Layout
16336 \begin_inset Flex Code
16339 \begin_layout Plain Layout
16345 を利用して、フォント情報についてのみCSSを自動生成します(第
16346 \begin_inset CommandInset ref
16348 reference "sub:フォント指定"
16352 節を参照)。この変換は、きわめて分かりやすく自明です。たとえば、「
16353 \begin_inset Flex Code
16356 \begin_layout Plain Layout
16363 \begin_inset Flex Code
16366 \begin_layout Plain Layout
16367 font-family: sans-serif
16372 」になります。LyXの寸法とCSSの寸法のあいだの対応は、少し複雑ですが、それでも直感的に分かります。詳細については、
16373 \begin_inset Flex URL
16376 \begin_layout Plain Layout
16384 \begin_inset Flex Code
16387 \begin_layout Plain Layout
16396 \begin_layout Chapter
16400 \begin_layout Standard
16401 \begin_inset Box Shadowbox
16411 height_special "totalheight"
16414 \begin_layout Plain Layout
16415 【警告】本説明書のこの部分は、しばらく更新されていません。もちろんまだ正確であることを期待していますが、保証の限りではありません。
16423 \begin_layout Standard
16424 LyX外部のソースから素材を使用する方法は、取扱説明書
16428 で詳細にカバーされています。本章は、新種の素材を取り込む際に、舞台裏で何をする必要があるかをカバーします。
16431 \begin_layout Section
16435 \begin_layout Standard
16436 外部素材の機能は、ひな型の概念に基づいています。ひな型は、LyXがある型の素材とどのように橋渡しをするべきかを指定するものです。同梱物として、LyXは、Xfig
16437 の図や、様々なラスター形式画像、チェス棋譜、LilyPond楽譜用のひな型を事前に定義されたものとして含んでいます。実際に何が入っているかは、
16438 \begin_inset Flex MenuItem
16441 \begin_layout Plain Layout
16442 挿入\SpecialChar \menuseparator
16443 ファイル\SpecialChar \menuseparator
16449 メニューで見ることができます。さらに、特定の型の素材をサポートするのに、自分自身のひな型を作成することも可能です。後でどのようなことをすればいいか詳細に説明しま
16450 すが、できればあなたが作ったすべてのひな型を投稿して、我々がLyXの後の版に取り込むことができるようにしてくださることを希望します。
16453 \begin_layout Standard
16454 外部素材の機能におけるもう一つの基本的な発想は、最終素材の元となるオリジナルファイルと、書き出された文書や印刷された文書に取り込むための生成ファイルとを区別して
16456 \begin_inset Flex Code
16459 \begin_layout Plain Layout
16465 で作成した図の場合を考えてみましょう。Xfigアプリケーション自体は、
16466 \begin_inset Flex Code
16469 \begin_layout Plain Layout
16475 拡張子を持つオリジナルファイルを操作します。Xfigで図を作成したり変更したりして、作業が終われば
16476 \begin_inset Flex Code
16479 \begin_layout Plain Layout
16485 ファイルに保存します。この図をお使いの文書に取り込みたいときには、LaTeXファイルにそのままインクルードできるように、
16486 \begin_inset Flex Code
16489 \begin_layout Plain Layout
16495 を呼び出してPostScriptファイルを生成します。この場合には、
16496 \begin_inset Flex Code
16499 \begin_layout Plain Layout
16505 ファイルがオリジナルファイルであり、PostScriptファイルが生成ファイルになります。
16508 \begin_layout Standard
16509 この区別は、文書を執筆している最中に、素材を更新することができるようにするために重要です。さらに、これによって、複数の書き出し書式をサポートするために必要な柔軟
16510 性が提供されます。たとえば、平文テキストファイルの場合には、図を生のPostScriptファイルとして取り込むのは、とても褒められた発想とはいえません。むしろ、
16511 その図への参照だけを含めるか、最終出力が実際の画像に近いものとなるように画像からASCIIへの変換子を呼び出したいと考えることでしょう。LyXの外部素材マネジメ
16512 ントは、LyXがサポートする各書き出し書式別に仕分けしているので、ユーザがこれを行うことが可能となっています。
16515 \begin_layout Standard
16516 LyXの外部素材マネジメントは、書き出し書式によって異なる生成物をサポートすることの他に、編集・閲覧アプリケーションを緊密に統合することもサポートします。Xfi
16517 gの図の場合には、LyXの外部素材ダイアログからシングルクリックでオリジナルファイルをXfigで開くことができ、ダブルクリックすることで生成されたPostScr
16518 iptファイルをGhostviewで閲覧することができます。もうコマンドラインをもてあそんだり、オリジナルファイルや生成ファイルがどこにあるか探したり変更を加え
16519 るためにファイルブラウザをいじくり回す必要はないのです。このようにして、文書を執筆する際に必要となる多くのアプリケーションを最大限に利用し、最終的により生産性を
16523 \begin_layout Section
16527 \begin_layout Standard
16528 LyXに自製の外用ひな型を付け加えるのは、比較的簡単です。しかしながら、これを不用心に行ってしまうと、たいていの場合、簡単に濫用されてしまうようなセキュリティホ
16529 ールを作ってしまいがちであることを心に留めておいてください。したがって、これを実行に移す前に、第
16530 \begin_inset CommandInset ref
16532 reference "sec:セキュリティに関する論点"
16536 節のセキュリティに関する議論を読んでおいてください。
16539 \begin_layout Standard
16540 このことに言及した上で、あなたが作成した面白いひな型は、ぜひ投稿してください。
16543 \begin_layout Standard
16545 \begin_inset Flex Code
16548 \begin_layout Plain Layout
16549 LyXDir/lib/external_templates
16554 ファイルで定義されています。自分用の版を
16555 \begin_inset Flex Code
16558 \begin_layout Plain Layout
16559 UserDir/external_templates
16567 \begin_layout Standard
16568 典型的なひな型は以下のようになります。
16571 \begin_layout LyX-Code
16575 \begin_layout LyX-Code
16576 GuiName "XFig: $$AbsOrRelPathParent$$Basename"
16579 \begin_layout LyX-Code
16583 \begin_layout LyX-Code
16587 \begin_layout LyX-Code
16591 \begin_layout LyX-Code
16595 \begin_layout LyX-Code
16599 \begin_layout LyX-Code
16600 AutomaticProduction true
16603 \begin_layout LyX-Code
16607 \begin_layout LyX-Code
16611 \begin_layout LyX-Code
16616 \begin_layout Plain Layout
16626 \begin_layout LyX-Code
16627 TransformCommand Rotate RotationLatexCommand
16630 \begin_layout LyX-Code
16631 TransformCommand Resize ResizeLatexCommand
16634 \begin_layout LyX-Code
16635 Product "$$RotateFront$$ResizeFront
16638 \begin_layout LyX-Code
16643 input{$$AbsOrRelPathMaster$$Basename.pstex_t}
16646 \begin_layout LyX-Code
16647 $$ResizeBack$$RotateBack"
16650 \begin_layout LyX-Code
16654 \begin_layout LyX-Code
16655 UpdateResult "$$AbsPath$$Basename.pstex_t"
16658 \begin_layout LyX-Code
16659 Requirement "graphicx"
16662 \begin_layout LyX-Code
16663 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
16666 \begin_layout LyX-Code
16667 ReferencedFile latex "$$AbsPath$$Basename.eps"
16670 \begin_layout LyX-Code
16671 ReferencedFile dvi "$$AbsPath$$Basename.eps"
16674 \begin_layout LyX-Code
16678 \begin_layout LyX-Code
16683 \begin_layout Plain Layout
16693 \begin_layout LyX-Code
16694 TransformCommand Rotate RotationLatexCommand
16697 \begin_layout LyX-Code
16698 TransformCommand Resize ResizeLatexCommand
16701 \begin_layout LyX-Code
16702 Product "$$RotateFront$$ResizeFront
16705 \begin_layout LyX-Code
16710 input{$$AbsOrRelPathMaster$$Basename.pdftex_t}
16713 \begin_layout LyX-Code
16714 $$ResizeBack$$RotateBack"
16717 \begin_layout LyX-Code
16718 UpdateFormat pdftex
16721 \begin_layout LyX-Code
16722 UpdateResult "$$AbsPath$$Basename.pdftex_t"
16725 \begin_layout LyX-Code
16726 Requirement "graphicx"
16729 \begin_layout LyX-Code
16730 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pdftex_t"
16733 \begin_layout LyX-Code
16734 ReferencedFile latex "$$AbsPath$$Basename.pdf"
16737 \begin_layout LyX-Code
16741 \begin_layout LyX-Code
16745 \begin_layout LyX-Code
16746 Product "$$Contents(
16748 "$$AbsPath$$Basename.asc
16753 \begin_layout LyX-Code
16754 UpdateFormat asciixfig
16757 \begin_layout LyX-Code
16758 UpdateResult "$$AbsPath$$Basename.asc"
16761 \begin_layout LyX-Code
16765 \begin_layout LyX-Code
16769 \begin_layout LyX-Code
16770 Product "<graphic fileref=
16772 "$$AbsOrRelPathMaster$$Basename.eps
16777 \begin_layout LyX-Code
16781 \begin_layout LyX-Code
16785 \begin_layout LyX-Code
16786 UpdateResult "$$AbsPath$$Basename.eps"
16789 \begin_layout LyX-Code
16790 ReferencedFile docbook "$$AbsPath$$Basename.eps"
16793 \begin_layout LyX-Code
16794 ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"
16797 \begin_layout LyX-Code
16801 \begin_layout LyX-Code
16802 Product "[XFig: $$FName]"
16805 \begin_layout LyX-Code
16809 \begin_layout LyX-Code
16813 \begin_layout Standard
16815 \begin_inset Flex Code
16818 \begin_layout Plain Layout
16824 \SpecialChar \ldots{}
16826 \begin_inset Flex Code
16829 \begin_layout Plain Layout
16835 で閉じられます。ひな型には、一般的な設定を行うヘッダ部と、サポートされている主要な文書ファイル書式の設定を行う
16836 \begin_inset Flex Code
16839 \begin_layout Plain Layout
16845 \SpecialChar \ldots{}
16847 \begin_inset Flex Code
16850 \begin_layout Plain Layout
16859 \begin_layout Subsection
16863 \begin_layout Description
16864 \begin_inset Flex Code
16867 \begin_layout Plain Layout
16868 AutomaticProduction
16869 \begin_inset space ~
16877 このひな型で扱うファイルをLyXが生成しなくてはならないか否か。このコマンドは、一度だけ必ず現れなくてはなりません。
16880 \begin_layout Description
16881 \begin_inset Flex Code
16884 \begin_layout Plain Layout
16886 \begin_inset space ~
16894 望むファイル群を表示するために、ファイルダイアログで使用するフィルタ用globパターン。2つ以上のファイル拡張子があり得る場合(たとえば、tgifには
16895 \begin_inset Flex Code
16898 \begin_layout Plain Layout
16905 \begin_inset Flex Code
16908 \begin_layout Plain Layout
16915 \begin_inset Flex Code
16918 \begin_layout Plain Layout
16924 」の様なパターンを使用してください。このコマンドは、一度だけ必ず現れなくてはなりません。
16927 \begin_layout Description
16928 \begin_inset Flex Code
16931 \begin_layout Plain Layout
16933 \begin_inset space ~
16941 この文字列はボタン上に表示されます。このコマンドは、一度だけ必ず現れなくてはなりません。
16944 \begin_layout Description
16945 \begin_inset Flex Code
16948 \begin_layout Plain Layout
16950 \begin_inset space ~
16954 \begin_inset space ~
16962 外部素材ダイアログで使用されるヘルプ文。このひな型がユーザに何を提供できるのか、ユーザに説明するのに十分な情報を盛り込んでください。このコマンドは、一度だけ必
16966 \begin_layout Description
16967 \begin_inset Flex Code
16970 \begin_layout Plain Layout
16972 \begin_inset space ~
16980 オリジナルファイルのファイル書式。これは、LyXが知っている書式名でなくてはなりません(第
16981 \begin_inset CommandInset ref
16987 章参照)。このひな型が、2つ以上の書式のオリジナルファイルを取り扱える場合は、「
16988 \begin_inset Flex Code
16991 \begin_layout Plain Layout
16997 」を使用してください。この場合、LyXはファイル書式を推定するために、ファイル自体に詮索を試みます。このコマンドは、一度だけ必ず現れなくてはなりません。
17000 \begin_layout Description
17001 \begin_inset Flex Code
17004 \begin_layout Plain Layout
17006 \begin_inset space ~
17014 このひな型の(他と重複しない)名称。代入マクロを含めてはなりません(下記参照)。
17017 \begin_layout Description
17018 \begin_inset Flex Code
17021 \begin_layout Plain Layout
17023 \begin_inset space ~
17026 Rotate|Resize|Clip|Extra
17031 このコマンドは、このひな型がどのような変換をサポートしているかを指定します。これは全く登場しなくても1回以上現れても構いません。このコマンドは、外部素材ダイア
17032 ログ中の対応するタブを使用可能にします。
17033 \begin_inset Flex Code
17036 \begin_layout Plain Layout
17043 \begin_inset Flex Code
17046 \begin_layout Plain Layout
17053 \begin_inset Flex Code
17056 \begin_layout Plain Layout
17063 \begin_inset Flex Code
17066 \begin_layout Plain Layout
17072 コマンドを置かなくてはなりません。これを行わないと、この書式での変換はサポートされません。
17075 \begin_layout Subsection
17076 \begin_inset Flex Code
17079 \begin_layout Plain Layout
17088 \begin_layout Description
17089 \begin_inset Flex Code
17092 \begin_layout Plain Layout
17094 \begin_inset space ~
17101 \begin_layout Plain Layout
17112 \begin_layout Plain Layout
17119 eX|PlainText|DocBook
17124 この書式定義が定める主要な文書ファイル書式。すべてのひな型が、全文書ファイル書式に対して意味のある表示ができるわけではありません。それでも、全書式に対して
17125 \begin_inset Flex Code
17128 \begin_layout Plain Layout
17134 部を定義してください。表示する方法がないときは、ダミーテキストを使用してください。これによって、書き出した文書内で、少なくとも外部素材への参照を見ることができる
17138 \begin_layout Description
17139 \begin_inset Flex Code
17142 \begin_layout Plain Layout
17144 \begin_inset space ~
17148 \begin_inset space ~
17157 \begin_inset Flex Code
17160 \begin_layout Plain Layout
17167 \begin_inset Flex Code
17170 \begin_layout Plain Layout
17177 \begin_inset Flex Code
17180 \begin_layout Plain Layout
17186 自体にも代入マクロを使うことができます。
17187 \begin_inset Flex Code
17190 \begin_layout Plain Layout
17197 \begin_inset Flex Code
17200 \begin_layout Plain Layout
17207 \begin_inset Flex Code
17210 \begin_layout Plain Layout
17216 に代入された値が、その文書書式で有効な非必須引数となるように健全化されることです。このコマンドは全く登場しなくても1回以上現れても構いません。
17219 \begin_layout Description
17220 \begin_inset Flex Code
17223 \begin_layout Plain Layout
17225 \begin_inset space ~
17233 書き出された文書に挿入される文。実のところ、これが最も重要なコマンドであり、とても複雑になることがあります。このコマンドは、一度だけ必ず現れなくてはなりません
17237 \begin_layout Description
17238 \begin_inset Flex Code
17241 \begin_layout Plain Layout
17243 \begin_inset space ~
17251 このコマンドは、LaTeXプリアンブルに入れるプリアンブル片を指定します。これは
17252 \begin_inset Flex Code
17255 \begin_layout Plain Layout
17261 \SpecialChar \ldots{}
17263 \begin_inset Flex Code
17266 \begin_layout Plain Layout
17272 を使用して定義しなくてはなりません。このコマンドは全く登場しなくても1回以上現れても構いません。
17275 \begin_layout Description
17276 \begin_inset Flex Code
17279 \begin_layout Plain Layout
17281 \begin_inset space ~
17285 \begin_inset space ~
17293 このコマンドは、変換過程で生成され、特定の書き出し書式に必要とされるファイルを示します。ファイル名が相対パスである場合には、親文書に対する相対パスとして解釈さ
17294 れます。このコマンドは全く登場しなくても1回以上現れても構いません。
17297 \begin_layout Description
17298 \begin_inset Flex Code
17301 \begin_layout Plain Layout
17303 \begin_inset space ~
17311 必要とされるLaTeXパッケージ名。パッケージは、LaTeXプリアンブル中で
17312 \begin_inset Flex Code
17315 \begin_layout Plain Layout
17323 を使って取り込まれます。このコマンドは全く登場しなくても1回以上現れても構いません。
17326 \begin_layout Description
17327 \begin_inset Flex Code
17330 \begin_layout Plain Layout
17332 \begin_inset space ~
17336 \begin_inset space ~
17339 RotationLatexCommand
17344 このコマンドは、回転用に、組み込みのLaTeXコマンドを使用するように指定します。このコマンドは、1回現れても全く現れなくても構いません。
17347 \begin_layout Description
17348 \begin_inset Flex Code
17351 \begin_layout Plain Layout
17353 \begin_inset space ~
17357 \begin_inset space ~
17365 このコマンドは、伸縮用に、組み込みのLaTeXコマンドを使用するように指定します。このコマンドは、1回現れても全く現れなくても構いません。
17368 \begin_layout Description
17369 \begin_inset Flex Code
17372 \begin_layout Plain Layout
17374 \begin_inset space ~
17378 \begin_inset space ~
17381 RotationLatexOption
17386 このコマンドは、回転が非必須引数を通じて行われるように指定します。このコマンドは、1回現れても全く現れなくても構いません。
17389 \begin_layout Description
17390 \begin_inset Flex Code
17393 \begin_layout Plain Layout
17395 \begin_inset space ~
17399 \begin_inset space ~
17407 このコマンドは、伸縮が非必須引数を通じて行われるように指定します。このコマンドは、1回現れても全く現れなくても構いません。
17410 \begin_layout Description
17411 \begin_inset Flex Code
17414 \begin_layout Plain Layout
17416 \begin_inset space ~
17420 \begin_inset space ~
17428 このコマンドは、切り抜きが非必須引数を通じて行われるように指定します。このコマンドは、1回現れても全く現れなくても構いません。
17431 \begin_layout Description
17432 \begin_inset Flex Code
17435 \begin_layout Plain Layout
17437 \begin_inset space ~
17441 \begin_inset space ~
17449 このコマンドは、追加の非必須引数を使用することを指定します。このコマンドは、1回現れても全く現れなくても構いません。
17452 \begin_layout Description
17453 \begin_inset Flex Code
17456 \begin_layout Plain Layout
17458 \begin_inset space ~
17466 変換されたファイルのファイル書式。これは、LyXが知っている書式名でなくてはなりません(
17467 \begin_inset Flex MenuItem
17470 \begin_layout Plain Layout
17471 ツール\SpecialChar \menuseparator
17477 ダイアログを参照)。このコマンドは、一度だけ必ず現れなくてはなりません。
17480 \begin_layout Description
17481 \begin_inset Flex Code
17484 \begin_layout Plain Layout
17486 \begin_inset space ~
17494 変換されたファイルのファイル名。ファイル名は絶対パスでなくてはなりません。このコマンドは、一度だけ必ず現れなくてはなりません。
17497 \begin_layout Subsection
17501 \begin_layout Standard
17503 \begin_inset Flex Code
17506 \begin_layout Plain Layout
17512 \SpecialChar \ldots{}
17514 \begin_inset Flex Code
17517 \begin_layout Plain Layout
17523 で囲んだプリアンブル定義を追加することができます。これらの定義は、ひな型の
17524 \begin_inset Flex Code
17527 \begin_layout Plain Layout
17536 \begin_layout Section
17540 \begin_layout Standard
17541 外部素材機構が外部プログラムを呼び出すときには、ひな型設定ファイルで定義されたコマンドにしたがって行われます。これらのコマンドには、実行前に展開されるマクロをい
17542 ろいろ入れることができます。実行は、つねに元の文書があるディレクトリで行われます。
17545 \begin_layout Standard
17546 また、外部素材が表示されるときにはいつでも、その名称は代入機構によって組み立てられ、ひな型定義中の他のほとんどのコマンドも代入をサポートしています。
17549 \begin_layout Standard
17553 \begin_layout Description
17554 \begin_inset Flex Code
17557 \begin_layout Plain Layout
17558 $$AbsOrRelPathMaster
17563 LyX親文書への絶対ファイルパスないしは相対ファイルパス
17566 \begin_layout Description
17567 \begin_inset Flex Code
17570 \begin_layout Plain Layout
17571 $$AbsOrRelPathParent
17576 LyX文書への絶対ファイルパスないしは相対ファイルパス
17579 \begin_layout Description
17580 \begin_inset Flex Code
17583 \begin_layout Plain Layout
17592 \begin_layout Description
17593 \begin_inset Flex Code
17596 \begin_layout Plain Layout
17605 \begin_layout Description
17606 \begin_inset Flex Code
17609 \begin_layout Plain Layout
17611 \begin_inset Quotes eld
17615 \begin_inset Quotes erd
17624 \begin_inset Flex Code
17627 \begin_layout Plain Layout
17633 と云う名のファイルの中身を展開します。
17636 \begin_layout Description
17637 \begin_inset Flex Code
17640 \begin_layout Plain Layout
17649 \begin_layout Description
17650 \begin_inset Flex Code
17653 \begin_layout Plain Layout
17659 外部素材ダイアログで指定されたファイルのファイル名。これはLyX文書への絶対パスでも良いですし、相対パスでも構いません。
17662 \begin_layout Description
17663 \begin_inset Flex Code
17666 \begin_layout Plain Layout
17673 \begin_inset Flex Code
17676 \begin_layout Plain Layout
17682 のパス部分(LyX文書への絶対パス名か相対パス名)
17685 \begin_layout Description
17686 \begin_inset Flex Code
17689 \begin_layout Plain Layout
17698 \begin_layout Description
17699 \begin_inset Flex Code
17702 \begin_layout Plain Layout
17711 \begin_layout Description
17712 \begin_inset Flex Code
17715 \begin_layout Plain Layout
17721 このマクロは、システムディレクトリの絶対パスを展開します。これは、典型的には、LyXに同梱されているヘルパースクリプト群を示したりするのに使用されます。
17724 \begin_layout Description
17725 \begin_inset Flex Code
17728 \begin_layout Plain Layout
17734 元の文書が閉じられたり、挿入されていた外部素材が削除されたりすると自動的に削除される一時ファイルのフルパスとファイル名。
17737 \begin_layout Standard
17738 パスを示すマクロはすべて最後のディレクトリ区切りも含んでいますので、たとえば絶対パスのファイル名を
17739 \begin_inset Flex Code
17742 \begin_layout Plain Layout
17743 $$AbsPath$$Basename$$Extension
17751 \begin_layout Standard
17752 上記マクロは、特記しない限りはすべてのコマンドで代入が行われます。
17753 \begin_inset Flex Code
17756 \begin_layout Plain Layout
17763 \begin_inset Flex Code
17766 \begin_layout Plain Layout
17773 \begin_inset Flex Code
17776 \begin_layout Plain Layout
17782 コマンドは、これらに加えて以下の代入もサポートします。
17785 \begin_layout Description
17786 \begin_inset Flex Code
17789 \begin_layout Plain Layout
17798 \begin_layout Description
17799 \begin_inset Flex Code
17802 \begin_layout Plain Layout
17811 \begin_layout Description
17812 \begin_inset Flex Code
17815 \begin_layout Plain Layout
17824 \begin_layout Description
17825 \begin_inset Flex Code
17828 \begin_layout Plain Layout
17837 \begin_layout Standard
17838 \begin_inset Flex Code
17841 \begin_layout Plain Layout
17848 \begin_inset Flex Code
17851 \begin_layout Plain Layout
17858 \begin_inset Flex Code
17861 \begin_layout Plain Layout
17867 コマンドが有効にされていれば、以下の代入もサポートされます。
17870 \begin_layout Description
17871 \begin_inset Flex Code
17874 \begin_layout Plain Layout
17883 \begin_layout Description
17884 \begin_inset Flex Code
17887 \begin_layout Plain Layout
17896 \begin_layout Description
17897 \begin_inset Flex Code
17900 \begin_layout Plain Layout
17909 \begin_layout Description
17910 \begin_inset Flex Code
17913 \begin_layout Plain Layout
17922 \begin_layout Standard
17923 どうしてこんなに多くのパス関連マクロがあるのか不思議に思われるかもしれません。主に以下の二つの理由があります。
17926 \begin_layout Enumerate
17927 相対ファイル名と絶対ファイル名は、それぞれ相対的あるいは絶対的なままで維持されなくてはなりません。ユーザにはどちらかの形を好む理由があるのかもしれません。たとえ
17928 ば相対名は、いろいろなマシンで作業をする持ち運び用の文書で役立ちます。絶対名は、プログラムによっては必要とされることがあり得ます。
17931 \begin_layout Enumerate
17932 LaTeXは、相対ファイル名に関して、LyXや入れ子にした取り込みファイル中の他のプログラムとは異なった取り扱いを行います。LyXにとって相対ファイル名とは、常
17933 にこのファイル名が書かれている文書に対して相対的なものになります。LaTeXにとっての相対ファイル名は、常に親文書に対するものになります。これら二つの定義は、一
17934 つの文書しかないときには同じですが、部分文書を含む親文書があるときには異なったものとなってきます。つまり、相対ファイル名は、LaTeXに提示されるときに変換され
17935 なくてはならないのです。幸い、正しいマクロを選びさえすれば、これはLyXが自動的に行ってくれます。
17938 \begin_layout Standard
17939 すると、新しく作ったひな型定義では、どのパス関連マクロを使うべきでしょうか。このルールは難しくありません。つまり、
17942 \begin_layout Itemize
17944 \begin_inset Flex Code
17947 \begin_layout Plain Layout
17956 \begin_layout Itemize
17957 代入された文字列が、LaTeXインプットの一種である場合には、
17958 \begin_inset Flex Code
17961 \begin_layout Plain Layout
17962 $$AbsOrRelPathMaster
17970 \begin_layout Itemize
17971 それ以外ならば、ユーザの選択を尊重するために
17972 \begin_inset Flex Code
17975 \begin_layout Plain Layout
17976 $$AbsOrRelPathParent
17984 \begin_layout Standard
17985 このルールが機能せずに、たとえば相対名が必要となる特殊な場合もありますが、通常、上記でうまく動作します。特殊例の例としては、上述のXFigひな型での
17986 \begin_inset Flex Code
17989 \begin_layout Plain Layout
17990 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
17996 \begin_inset Flex Code
17999 \begin_layout Plain Layout
18005 ファイルの複写子は、ファイル内容を書き換えるのに相対名を必要とするために、絶対名を使用することができないのです。
18008 \begin_layout Section
18010 \begin_inset CommandInset label
18012 name "sec:セキュリティに関する論点"
18019 \begin_layout Standard
18020 外部素材機能は、多くの外部プログラムとの橋渡しをし、しかもそれを自動的に行うので、そのセキュリティ面での帰結を考慮しなくてはなりません。特に、ユーザは好きなファ
18021 イル名やパラメータ文字列を含めることが許されていて、しかもそれらがコマンドに展開されるので、ユーザが文書を閲覧したり印刷したりしたときに、任意のコマンドを実行す
18022 ることができるような悪意ある文書を作成することが可能となりましょう。これは、我々がぜひとも避けたいことなのです。
18025 \begin_layout Standard
18026 しかしながら、外部プログラムコマンドはひな型設定ファイルでのみ指定されているので、LyXが安全なひな型でのみ適切に設定されているならば、セキュリティ上の問題は発
18028 \begin_inset Flex Code
18031 \begin_layout Plain Layout
18038 \begin_inset Flex Code
18041 \begin_layout Plain Layout
18047 システムコールで呼び出されているため、ファイル名やパラメータ部からシェル経由で任意のコマンドを実行することはできないためです。
18050 \begin_layout Standard
18051 これは、外部素材ひな型でどのようなコマンド文字列を使用することのできるかについて、制限があることを意味します。特に、パイプやリダイレクトはそのまま使用することは
18052 できません。これは、LyXの安全性を維持するためにそうしなくてはならないのです。もしシェル機能の一部を使用したいとすると、これを完全に統御の下においたまま行う安
18053 全なスクリプトを書いた上で、このスクリプトをコマンド文字列から呼び出すようにしなくてはなりません。
18056 \begin_layout Standard
18057 シェルと直接やりとりするひな型を設計することは可能ではありますが、悪意のあるユーザが狡猾なファイル名やパラメータを書くことによって、任意のコマンドを実行できるよ
18058 うになるため、一般的には、統御下に置いた状態で
18059 \begin_inset Flex Code
18062 \begin_layout Plain Layout
18068 システムコールを使用する安全なスクリプトのみを使用することをお勧めします。確かに、管理された環境下で使用する分には、通常のシェルスクリプトを使用する方に流れる誘
18069 惑はあります。そうした場合には、お使いのシステムに簡単に濫用することのできるセキュリティホールを、
18073 導入することを理解しておいてください。オープンソースの伝統に従って、私たちは人々に新しいひな型を投稿してくれるよう促していますが、そのような安全でないひな型はL
18074 yXの標準頒布版には取り入れるべきでないとすることには当然の正当性があります。公式の頒布チャンネルから出荷されているLyXには、安全でないひな型は決して入ってい
18078 \begin_layout Standard
18079 外部素材を含めることで強力な力を手に入れることができますが、この力とともにセキュリティ上の危険を導入してしまわないように気をつける必要があります。無防備なスクリ
18080 プトのたった一行に入り込んだ、ちょっとしたエラーが、巨大なセキュリティ上の問題に扉を開きうるのです。したがって、もしこの問題を完全に理解していないならば、特定の
18081 ひな型が安全であるかどうか疑問がある際には、知識豊富なセキュリティの専門家か、LyX開発チームに相談してみてください。そしてこの相談は、管理されていない環境下で
18082 これを使用する前に、行うようにしてください。