]> git.lyx.org Git - lyx.git/blob - lib/doc/ja/Customization.lyx
Merge branch 'master' of git.lyx.org:lyx
[lyx.git] / lib / doc / ja / Customization.lyx
1 #LyX 2.0 created this file. For more info see http://www.lyx.org/
2 \lyxformat 413
3 \begin_document
4 \begin_header
5 \textclass jbook
6 \begin_preamble
7 % DO NOT ALTER THIS PREAMBLE!!!
8 %
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
15
16 \usepackage{ifpdf} % part of the hyperref bundle
17 \ifpdf % if pdflatex is used
18
19  % set fonts for nicer pdf view
20  \IfFileExists{lmodern.sty}
21   {\usepackage{lmodern}}{}
22
23 \fi % end if pdflatex is used
24
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{%
29   \frontmatter
30   \pdfbookmark[1]{\contentsname}{}
31   \myTOC
32   \mainmatter }
33
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
43 \end_preamble
44 \options fleqn,bibliography=totoc,index=totoc,BCOR7.5mm,titlepage,captions=tableheading
45 \use_default_options false
46 \begin_modules
47 logicalmkup
48 \end_modules
49 \maintain_unincluded_children false
50 \begin_local_layout
51 Format 7
52 InsetLayout CharStyle:MenuItem
53 LyxType               charstyle
54 LabelString           menu
55 LatexType             command
56 LatexName             menuitem
57 Font
58 Family              Sans
59 EndFont
60 Preamble
61 \newcommand*{\menuitem}[1]{{\sffamily #1}}
62 EndPreamble
63 End
64 \end_local_layout
65 \language japanese
66 \language_package default
67 \inputencoding auto
68 \fontencoding global
69 \font_roman default
70 \font_sans default
71 \font_typewriter default
72 \font_default_family default
73 \use_non_tex_fonts false
74 \font_sc false
75 \font_osf false
76 \font_sf_scale 100
77 \font_tt_scale 100
78
79 \graphics default
80 \default_output_format default
81 \output_sync 0
82 \bibtex_command default
83 \index_command default
84 \paperfontsize 12
85 \spacing single
86 \use_hyperref true
87 \pdf_title "LyX Configuration Manual"
88 \pdf_author "LyX Team"
89 \pdf_subject "LyX-Documentation Customization"
90 \pdf_keywords "LyX, documentation, customization"
91 \pdf_bookmarks true
92 \pdf_bookmarksnumbered true
93 \pdf_bookmarksopen true
94 \pdf_bookmarksopenlevel 1
95 \pdf_breaklinks false
96 \pdf_pdfborder false
97 \pdf_colorlinks true
98 \pdf_backref false
99 \pdf_pdfusetitle false
100 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue,pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
101 \papersize default
102 \use_geometry false
103 \use_amsmath 0
104 \use_esint 0
105 \use_mhchem 0
106 \use_mathdots 0
107 \cite_engine basic
108 \use_bibtopic false
109 \use_indices false
110 \paperorientation portrait
111 \suppress_date false
112 \use_refstyle 0
113 \branch OutDated
114 \selected 0
115 \filename_suffix 0
116 \color #f5fae7
117 \end_branch
118 \index 索引
119 \shortcut idx
120 \color #008000
121 \end_index
122 \secnumdepth 3
123 \tocdepth 3
124 \paragraph_separation indent
125 \paragraph_indentation default
126 \quotes_language english
127 \papercolumns 1
128 \papersides 2
129 \paperpagestyle headings
130 \tracking_changes false
131 \output_changes false
132 \html_math_output 0
133 \html_css_as_file 0
134 \html_be_strict true
135 \end_header
136
137 \begin_body
138
139 \begin_layout Title
140 LyXの高度設定
141 \begin_inset Newline newline
142 \end_inset
143
144 熟練ユーザのための各機能
145 \end_layout
146
147 \begin_layout Author
148 LyX開発チーム
149 \begin_inset Foot
150 status collapsed
151
152 \begin_layout Plain Layout
153 \noindent
154 もしコメントや誤りの修正をお持ちでしたら、LyX文書化メーリングリスト
155 \begin_inset CommandInset href
156 LatexCommand href
157 target "lyx-docs@lists.lyx.org"
158 type "mailto:"
159
160 \end_inset
161
162 宛お送りください。件名ヘッダに「[Customization]」という文字を入れ、このファイルの現在のメンテナRichard Heck <rgheck@comc
163 ast.net>をccにして送ってください。
164 \end_layout
165
166 \end_inset
167
168
169 \begin_inset Newline newline
170 \end_inset
171
172
173 \begin_inset Newline newline
174 \end_inset
175
176 第2.0.x版 
177 \end_layout
178
179 \begin_layout Standard
180 \begin_inset CommandInset toc
181 LatexCommand tableofcontents
182
183 \end_inset
184
185
186 \begin_inset Note Note
187 status open
188
189 \begin_layout Plain Layout
190 本文書を修正する際には、変更追跡機能を使用してください。これによって、
191 \end_layout
192
193 \begin_layout Plain Layout
194 LyX翻訳者陣が変更点を認識しやすくなり、メンテナが最新の状態を維持することが容易になります。
195 \end_layout
196
197 \end_inset
198
199
200 \end_layout
201
202 \begin_layout Chapter
203 はじめに
204 \end_layout
205
206 \begin_layout Standard
207 この取扱説明書は、LyXに備わっている高度設定機能を取り扱います。ここでは、短絡キーや画面プレビューオプション、プリンタオプション、LyXサーバ経由でのLyXへ
208 のコマンド送信、国際化、新しいLaTeXクラスやLyXレイアウトの導入などの題材について論じます。おそらくは変更可能なことすべてについて触れることは無理でしょう
209 が—私たちの開発者たちは私たちが文書化できる速さよりも速く新しい機能を付け加えてしまうので—、もっとも一般的な高度設定については説明を行い、わかりにくいものにつ
210 いては正しい方向を指し示すことができるようにしていくつもりです。
211 \end_layout
212
213 \begin_layout Standard
214 \begin_inset Branch OutDated
215 status collapsed
216
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.
221 \end_layout
222
223 \end_inset
224
225
226 \end_layout
227
228 \begin_layout Chapter
229 LyX設定ファイル
230 \end_layout
231
232 \begin_layout Standard
233 本章の目的は、LyX設定ファイル群を理解するための一助となることです。本章を読み進める前に、
234 \begin_inset Flex MenuItem
235 status collapsed
236
237 \begin_layout Plain Layout
238 ヘルプ\SpecialChar \menuseparator
239 L
240 \begin_inset ERT
241 status collapsed
242
243 \begin_layout Plain Layout
244
245 {}
246 \end_layout
247
248 \end_inset
249
250 yXについて
251 \end_layout
252
253 \end_inset
254
255 を使って、LyXライブラリとユーザディレクトリがどこにあるかを確認しておいてください。ライブラリディレクトリは、LyXがシステム全体の設定ファイルを置いておくと
256 ころです。一方、ユーザディレクトリは、自身がそれを修正した版を置いておくところです。私たちは、本書の以下の部分で、前者を
257 \begin_inset Flex Code
258 status collapsed
259
260 \begin_layout Plain Layout
261 L
262 \begin_inset ERT
263 status collapsed
264
265 \begin_layout Plain Layout
266
267 {}
268 \end_layout
269
270 \end_inset
271
272 yXDir
273 \end_layout
274
275 \end_inset
276
277 と呼び、後者を
278 \begin_inset Flex MenuItem
279 status collapsed
280
281 \begin_layout Plain Layout
282 UserDir
283 \end_layout
284
285 \end_inset
286
287 と呼ぶことにします。
288 \end_layout
289
290 \begin_layout Section
291 \begin_inset Flex Code
292 status collapsed
293
294 \begin_layout Plain Layout
295 L
296 \begin_inset ERT
297 status collapsed
298
299 \begin_layout Plain Layout
300
301 {}
302 \end_layout
303
304 \end_inset
305
306 yXDir
307 \end_layout
308
309 \end_inset
310
311 にはなにがあるの?
312 \end_layout
313
314 \begin_layout Standard
315 \begin_inset Flex Code
316 status collapsed
317
318 \begin_layout Plain Layout
319 L
320 \begin_inset ERT
321 status collapsed
322
323 \begin_layout Plain Layout
324
325 {}
326 \end_layout
327
328 \end_inset
329
330 yXDir
331 \end_layout
332
333 \end_inset
334
335 とそのサブディレクトリには、多くのファイルがあり、LyXの挙動を高度設定するのに使用されます。これらのファイルの多くは、LyX内の
336 \begin_inset Flex MenuItem
337 status collapsed
338
339 \begin_layout Plain Layout
340 ツール\SpecialChar \menuseparator
341 設定
342 \end_layout
343
344 \end_inset
345
346 ダイアログから変更することができます。LyX中で行いたいと思うような高度設定は、ほとんどこのダイアログから行うことができるようになっています。しかしながら、Ly
347 Xの他の多くの内部動作は、
348 \begin_inset Flex Code
349 status collapsed
350
351 \begin_layout Plain Layout
352 L
353 \begin_inset ERT
354 status collapsed
355
356 \begin_layout Plain Layout
357
358 {}
359 \end_layout
360
361 \end_inset
362
363 yXDir
364 \end_layout
365
366 \end_inset
367
368 のファイルを修正することで高度設定されます。これらのファイルは様々なカテゴリに分類しうるので、以下の各小節で説明します。
369 \end_layout
370
371 \begin_layout Subsection
372 自動的に生成されるファイル
373 \end_layout
374
375 \begin_layout Standard
376 \begin_inset Flex MenuItem
377 status collapsed
378
379 \begin_layout Plain Layout
380 UserDir
381 \end_layout
382
383 \end_inset
384
385 にある各ファイルは、LyXが自動設定を行ったときに生成されます。これらのファイルは、内部調査中に推測された様々な既定値が置かれています。これらは、随時上書きされ
386 てしまうので、一般的には修正しないことが望まれます。
387 \end_layout
388
389 \begin_layout Labeling
390 \labelwidthstring 00.00.0000
391 \begin_inset Flex Code
392 status collapsed
393
394 \begin_layout Plain Layout
395 lyxrc.defaults
396 \end_layout
397
398 \end_inset
399
400  このファイルには、様々な既定コマンドが置かれています。
401 \end_layout
402
403 \begin_layout Labeling
404 \labelwidthstring 00.00.0000
405 \begin_inset Flex Code
406 status collapsed
407
408 \begin_layout Plain Layout
409 packages.lst
410 \end_layout
411
412 \end_inset
413
414  このファイルには、LyXが認識したパッケージの一覧が収められています。現在のところ、これはLyXプログラム自体には使用されていませんが、抽出された情報その他は
415
416 \begin_inset Flex MenuItem
417 status collapsed
418
419 \begin_layout Plain Layout
420 ヘルプ\SpecialChar \menuseparator
421 LaT
422 \begin_inset ERT
423 status collapsed
424
425 \begin_layout Plain Layout
426
427 {}
428 \end_layout
429
430 \end_inset
431
432 eXの設定
433 \end_layout
434
435 \end_inset
436
437 で見ることができます。
438 \end_layout
439
440 \begin_layout Labeling
441 \labelwidthstring 00.00.0000
442 \begin_inset Flex Code
443 status collapsed
444
445 \begin_layout Plain Layout
446 textclass.lst
447 \end_layout
448
449 \end_inset
450
451  ユーザの
452 \begin_inset Flex Code
453 status collapsed
454
455 \begin_layout Plain Layout
456 layout/
457 \end_layout
458
459 \end_inset
460
461 ディレクトリで検出されたテキストクラスと、関連したLaTeX文書クラスおよびその説明の一覧です。
462 \end_layout
463
464 \begin_layout Labeling
465 \labelwidthstring 00.00.0000
466 \begin_inset Flex Code
467 status collapsed
468
469 \begin_layout Plain Layout
470 lyxmodules.lst
471 \end_layout
472
473 \end_inset
474
475  ユーザの
476 \begin_inset Flex Code
477 status collapsed
478
479 \begin_layout Plain Layout
480 layout/
481 \end_layout
482
483 \end_inset
484
485 ディレクトリで検出されたレイアウトモジュールの一覧です。
486 \end_layout
487
488 \begin_layout Labeling
489 \labelwidthstring 00.00.0000
490 \begin_inset Flex Code
491 status collapsed
492
493 \begin_layout Plain Layout
494 *files.lst
495 \end_layout
496
497 \end_inset
498
499  ご使用のシステムで検出された様々な種類のLaTeX関連ファイルの一覧です。
500 \end_layout
501
502 \begin_layout Labeling
503 \labelwidthstring 00.00.0000
504 \begin_inset Flex Code
505 status collapsed
506
507 \begin_layout Plain Layout
508 doc/LaT
509 \begin_inset ERT
510 status collapsed
511
512 \begin_layout Plain Layout
513
514 {}
515 \end_layout
516
517 \end_inset
518
519 eXConfig.lyx
520 \end_layout
521
522 \end_inset
523
524  このファイルは、自動設定中に
525 \begin_inset Flex Code
526 status collapsed
527
528 \begin_layout Plain Layout
529 LaT
530 \begin_inset ERT
531 status collapsed
532
533 \begin_layout Plain Layout
534
535 {}
536 \end_layout
537
538 \end_inset
539
540 eXConfig.lyx.in
541 \end_layout
542
543 \end_inset
544
545 から自動的に生成されます。ご使用中のLaTeXの設定に関する情報が納められています。
546 \end_layout
547
548 \begin_layout Subsection
549 ディレクトリ
550 \end_layout
551
552 \begin_layout Standard
553 以下の各ディレクトリは、
554 \begin_inset Flex Code
555 status collapsed
556
557 \begin_layout Plain Layout
558 L
559 \begin_inset ERT
560 status collapsed
561
562 \begin_layout Plain Layout
563
564 {}
565 \end_layout
566
567 \end_inset
568
569 yXDir
570 \end_layout
571
572 \end_inset
573
574
575 \begin_inset Flex Code
576 status collapsed
577
578 \begin_layout Plain Layout
579 UserDir
580 \end_layout
581
582 \end_inset
583
584 に重複して存在します。特定のファイルが両方の場所にある場合には、
585 \begin_inset Flex Code
586 status collapsed
587
588 \begin_layout Plain Layout
589 UserDir
590 \end_layout
591
592 \end_inset
593
594 の方にあるものが使用されます。
595 \end_layout
596
597 \begin_layout Labeling
598 \labelwidthstring 00.00.0000
599 \begin_inset Flex Code
600 status collapsed
601
602 \begin_layout Plain Layout
603 bind/
604 \end_layout
605
606 \end_inset
607
608  このディレクトリには、LyXで使用されるキー割当を定義している、拡張子が
609 \begin_inset Flex Code
610 status collapsed
611
612 \begin_layout Plain Layout
613 .bind
614 \end_layout
615
616 \end_inset
617
618 のファイルが置かれています。
619 \begin_inset Flex Code
620 status collapsed
621
622 \begin_layout Plain Layout
623 $LANG_xxx.bind
624 \end_layout
625
626 \end_inset
627
628 という名称の割当ファイルの各国語版がある場合には、そちらが用いられます。
629 \end_layout
630
631 \begin_layout Labeling
632 \labelwidthstring 00.00.0000
633 \begin_inset Flex Code
634 status collapsed
635
636 \begin_layout Plain Layout
637 clipart/
638 \end_layout
639
640 \end_inset
641
642  このディレクトリには、文書に取り込むことのできる画像ファイルが納められています。
643 \end_layout
644
645 \begin_layout Labeling
646 \labelwidthstring 00.00.0000
647 \begin_inset Flex Code
648 status collapsed
649
650 \begin_layout Plain Layout
651 doc/
652 \end_layout
653
654 \end_inset
655
656  このディレクトリには、LyXの取扱説明書ファイル(今お読みのものも含めて)が納められています。上述のように、
657 \begin_inset Flex Code
658 status collapsed
659
660 \begin_layout Plain Layout
661 LaT
662 \begin_inset ERT
663 status collapsed
664
665 \begin_layout Plain Layout
666
667 {}
668 \end_layout
669
670 \end_inset
671
672 eXConfig.lyx
673 \end_layout
674
675 \end_inset
676
677 ファイルは特に注目に値します。各国語版のヘルプ文書は、
678 \begin_inset Flex Code
679 status collapsed
680
681 \begin_layout Plain Layout
682 doc/xx
683 \end_layout
684
685 \end_inset
686
687 (「xx」はISO言語コード)サブディレクトリにあります。詳しくは、第
688 \begin_inset CommandInset ref
689 LatexCommand ref
690 reference "cha:LyXの各国語対応"
691
692 \end_inset
693
694 章をご覧ください。
695 \end_layout
696
697 \begin_layout Labeling
698 \labelwidthstring 00.00.0000
699 \begin_inset Flex Code
700 status collapsed
701
702 \begin_layout Plain Layout
703 examples/
704 \end_layout
705
706 \end_inset
707
708  このディレクトリには、何らかの機能の使い方を説明する例示ファイルが納められています。ファイルブラウザ中で
709 \begin_inset Flex MenuItem
710 status collapsed
711
712 \begin_layout Plain Layout
713 用例
714 \end_layout
715
716 \end_inset
717
718 ボタンを押すと、このディレクトリが表示されます。
719 \end_layout
720
721 \begin_layout Labeling
722 \labelwidthstring 00.00.0000
723 \begin_inset Flex Code
724 status collapsed
725
726 \begin_layout Plain Layout
727 images/
728 \end_layout
729
730 \end_inset
731
732  このディレクトリには、
733 \begin_inset Flex MenuItem
734 status collapsed
735
736 \begin_layout Plain Layout
737 文書
738 \end_layout
739
740 \end_inset
741
742 ダイアログで使用される画像ファイルが納められています。さらに、ツールバーの各アイコンや、LyXを起動したときに現れるバナーも納められています。
743 \end_layout
744
745 \begin_layout Labeling
746 \labelwidthstring 00.00.0000
747 \begin_inset Flex Code
748 status collapsed
749
750 \begin_layout Plain Layout
751 kbd/
752 \end_layout
753
754 \end_inset
755
756  このディレクトリには、キーボードのキー割当ファイルが納められています。詳細については、第
757 \begin_inset CommandInset ref
758 LatexCommand ref
759 reference "sec:国際キー配列"
760
761 \end_inset
762
763 章をご覧ください。
764 \end_layout
765
766 \begin_layout Labeling
767 \labelwidthstring 00.00.0000
768 \begin_inset Flex Code
769 status collapsed
770
771 \begin_layout Plain Layout
772 layouts/
773 \end_layout
774
775 \end_inset
776
777  このディレクトリには、第
778 \begin_inset CommandInset ref
779 LatexCommand ref
780 reference "cha:新規文書を導入"
781
782 \end_inset
783
784 章に述べられているテキストクラスおよびモジュールのファイルが納められています。
785 \end_layout
786
787 \begin_layout Labeling
788 \labelwidthstring 00.00.0000
789 \begin_inset Flex Code
790 status collapsed
791
792 \begin_layout Plain Layout
793 lyx2lyx
794 \end_layout
795
796 \end_inset
797
798  このディレクトリには、LyXの各バージョン間の変換に使用される
799 \begin_inset Flex Code
800 status collapsed
801
802 \begin_layout Plain Layout
803 lyx2lyx
804 \end_layout
805
806 \end_inset
807
808  Pythonスクリプトが納められています。たとえば、複数のファイルの変換をバッチ処理したい場合には、これらをコマンドラインから実行することもできます。
809 \end_layout
810
811 \begin_layout Labeling
812 \labelwidthstring 00.00.0000
813 \begin_inset Flex Code
814 status collapsed
815
816 \begin_layout Plain Layout
817 scripts/
818 \end_layout
819
820 \end_inset
821
822  このディレクトリには、
823 \begin_inset Flex MenuItem
824 status collapsed
825
826 \begin_layout Plain Layout
827 外用ひな型
828 \end_layout
829
830 \end_inset
831
832 機能の有用性を示すためのファイルがいくつか納められています。LyX自身が使用するスクリプトもいくつか収められています。
833 \end_layout
834
835 \begin_layout Labeling
836 \labelwidthstring 00.00.0000
837 \begin_inset Flex Code
838 status collapsed
839
840 \begin_layout Plain Layout
841 templates/
842 \end_layout
843
844 \end_inset
845
846  このディレクトリには、第
847 \begin_inset CommandInset ref
848 LatexCommand ref
849 reference "sec:ひな型を作成する"
850
851 \end_inset
852
853 章で述べられている標準のLyXひな型ファイルが納められています。
854 \end_layout
855
856 \begin_layout Labeling
857 \labelwidthstring 00.00.0000
858 \begin_inset Flex Code
859 status collapsed
860
861 \begin_layout Plain Layout
862 ui/
863 \end_layout
864
865 \end_inset
866
867  このディレクトリには、LyXの操作画面を定義する拡張子
868 \begin_inset Flex Code
869 status collapsed
870
871 \begin_layout Plain Layout
872 .ui
873 \end_layout
874
875 \end_inset
876
877 のファイルが納められています。つまり、これらのファイルは、どのメニュー項目がどのメニューに現れるかを定義し、どの項目がツールバーに現れるかを定義しています。
878 \end_layout
879
880 \begin_layout Subsection
881 変更を加えない方がよいファイル
882 \end_layout
883
884 \begin_layout Standard
885 これらのファイルはLyXが内部的に使用するもので、あなたが開発者でない限りは、凡そこれらに変更を加える必要はありません。
886 \end_layout
887
888 \begin_layout Labeling
889 \labelwidthstring 00.00.0000
890 \begin_inset Flex Code
891 status collapsed
892
893 \begin_layout Plain Layout
894 CREDITS
895 \end_layout
896
897 \end_inset
898
899  このファイルは、LyX開発陣の名簿です。この内容は、メニュー項目
900 \begin_inset Flex MenuItem
901 status collapsed
902
903 \begin_layout Plain Layout
904 ヘルプ\SpecialChar \menuseparator
905 L
906 \begin_inset ERT
907 status collapsed
908
909 \begin_layout Plain Layout
910
911 {}
912 \end_layout
913
914 \end_inset
915
916 yXについて
917 \end_layout
918
919 \end_inset
920
921 で表示されます。
922 \end_layout
923
924 \begin_layout Labeling
925 \labelwidthstring 00.00.0000
926 \begin_inset Flex Code
927 status collapsed
928
929 \begin_layout Plain Layout
930 chkconfig.ltx
931 \end_layout
932
933 \end_inset
934
935  これは、自動設定プロセスによって使用されるLaTeXスクリプトです。直接実行しないでください。
936 \end_layout
937
938 \begin_layout Labeling
939 \labelwidthstring 00.00.0000
940 \begin_inset Flex Code
941 status collapsed
942
943 \begin_layout Plain Layout
944 configure.py
945 \end_layout
946
947 \end_inset
948
949  これは、LyXの再設定によって使用されるスクリプトです。これは、このスクリプトを実行したディレクトリに設定ファイルを生成します。
950 \end_layout
951
952 \begin_layout Subsection
953 ひとこと必要なファイル群...
954 \end_layout
955
956 \begin_layout Labeling
957 \labelwidthstring 00.00.0000
958 \begin_inset Flex Code
959 status collapsed
960
961 \begin_layout Plain Layout
962 encodings
963 \end_layout
964
965 \end_inset
966
967  このファイルには、各文字エンコーディングがどのようにUnicodeにマップされるかを示した表が載っています。
968 \end_layout
969
970 \begin_layout Labeling
971 \labelwidthstring 00.00.0000
972 \begin_inset Flex Code
973 status collapsed
974
975 \begin_layout Plain Layout
976 external_templates
977 \end_layout
978
979 \end_inset
980
981  このファイルには、新しく導入された
982 \begin_inset Flex MenuItem
983 status collapsed
984
985 \begin_layout Plain Layout
986 外用ひな型
987 \end_layout
988
989 \end_inset
990
991 機能で使用できるひな型が載っています。
992 \end_layout
993
994 \begin_layout Labeling
995 \labelwidthstring 00.00.0000
996 \begin_inset Flex Code
997 status collapsed
998
999 \begin_layout Plain Layout
1000 languages
1001 \end_layout
1002
1003 \end_inset
1004
1005  このファイルには、現在LyXがサポートしている言語の全一覧が載っています。
1006 \end_layout
1007
1008 \begin_layout Section
1009 ユーザのローカル設定ディレクトリ
1010 \end_layout
1011
1012 \begin_layout Standard
1013 LyXを非特権ユーザとして利用している場合でも、自分自身で使うために、LyXの設定を変更したいと思うかもしれません。
1014 \begin_inset Flex Code
1015 status collapsed
1016
1017 \begin_layout Plain Layout
1018 UserDir
1019 \end_layout
1020
1021 \end_inset
1022
1023 ディレクトリには、すべての個人設定ファイルが収められています。これは、
1024 \begin_inset Flex MenuItem
1025 status collapsed
1026
1027 \begin_layout Plain Layout
1028 ヘルプ\SpecialChar \menuseparator
1029 L
1030 \begin_inset ERT
1031 status collapsed
1032
1033 \begin_layout Plain Layout
1034
1035 {}
1036 \end_layout
1037
1038 \end_inset
1039
1040
1041 \begin_inset ERT
1042 status collapsed
1043
1044 \begin_layout Plain Layout
1045
1046 {}
1047 \end_layout
1048
1049 \end_inset
1050
1051 yXについて
1052 \end_layout
1053
1054 \end_inset
1055
1056 で「ユーザーディレクトリ」として言及されているディレクトリです。このディレクトリは、
1057 \begin_inset Flex Code
1058 status collapsed
1059
1060 \begin_layout Plain Layout
1061 L
1062 \begin_inset ERT
1063 status collapsed
1064
1065 \begin_layout Plain Layout
1066
1067 {}
1068 \end_layout
1069
1070 \end_inset
1071
1072 yXDir
1073 \end_layout
1074
1075 \end_inset
1076
1077 のミラーとして使用されており、これは
1078 \begin_inset Flex Code
1079 status collapsed
1080
1081 \begin_layout Plain Layout
1082 UserDir
1083 \end_layout
1084
1085 \end_inset
1086
1087 内のすべてのファイルが、
1088 \begin_inset Flex Code
1089 status collapsed
1090
1091 \begin_layout Plain Layout
1092 L
1093 \begin_inset ERT
1094 status collapsed
1095
1096 \begin_layout Plain Layout
1097
1098 {}
1099 \end_layout
1100
1101 \end_inset
1102
1103 yXDir
1104 \end_layout
1105
1106 \end_inset
1107
1108 の対応するファイルを置き換えるものとして機能していることを意味します。前節で述べられた設定はどれも、全ユーザに影響する全システム用ディレクトリに置くこともできま
1109 すし、自分自身で使うために個人のローカルディレクトリに置くこともできます。
1110 \end_layout
1111
1112 \begin_layout Standard
1113 わかりやすくするために、いくつか例を挙げましょう。
1114 \end_layout
1115
1116 \begin_layout Itemize
1117 \begin_inset Flex MenuItem
1118 status collapsed
1119
1120 \begin_layout Plain Layout
1121 ツール\SpecialChar \menuseparator
1122 設定
1123 \end_layout
1124
1125 \end_inset
1126
1127 ダイアログで設定されるユーザ設定は、
1128 \begin_inset Flex Code
1129 status collapsed
1130
1131 \begin_layout Plain Layout
1132 UserDir
1133 \end_layout
1134
1135 \end_inset
1136
1137 中の
1138 \begin_inset Flex Code
1139 status collapsed
1140
1141 \begin_layout Plain Layout
1142 preferences
1143 \end_layout
1144
1145 \end_inset
1146
1147 ファイルに保存されます。
1148 \end_layout
1149
1150 \begin_layout Itemize
1151 \begin_inset Flex MenuItem
1152 status collapsed
1153
1154 \begin_layout Plain Layout
1155 ツール\SpecialChar \menuseparator
1156 再設定
1157 \end_layout
1158
1159 \end_inset
1160
1161 を使用して再設定を行うと、LyXは
1162 \begin_inset Flex Code
1163 status collapsed
1164
1165 \begin_layout Plain Layout
1166 configure.py
1167 \end_layout
1168
1169 \end_inset
1170
1171 スクリプトを実行し、その結果のファイルは、ご自身のローカル設定ディレクトリに書き込まれます。これはすなわち、
1172 \begin_inset Flex Code
1173 status collapsed
1174
1175 \begin_layout Plain Layout
1176 UserDir/layouts
1177 \end_layout
1178
1179 \end_inset
1180
1181 にご自身で追加したテキストファイルは、
1182 \begin_inset Flex MenuItem
1183 status collapsed
1184
1185 \begin_layout Plain Layout
1186 文書\SpecialChar \menuseparator
1187 設定
1188 \end_layout
1189
1190 \end_inset
1191
1192 ダイアログのクラス一覧に表示されるようになることを意味します。
1193 \end_layout
1194
1195 \begin_layout Itemize
1196 たとえば、LyXのFTPサイトから最新の取扱説明書をとってきたものの、使用中のシステム上で管理者権限がないために、それをインストールすることができなかったとして
1197 も、それらのファイルを
1198 \begin_inset Flex Code
1199 status collapsed
1200
1201 \begin_layout Plain Layout
1202 UserDir/doc/
1203 \end_layout
1204
1205 \end_inset
1206
1207 ディレクトリにコピーすれば、
1208 \begin_inset Flex MenuItem
1209 status collapsed
1210
1211 \begin_layout Plain Layout
1212 ヘルプ
1213 \end_layout
1214
1215 \end_inset
1216
1217 メニュー項目はこれらを開くようになります!
1218 \end_layout
1219
1220 \begin_layout Section
1221 LyXを複数の設定を使って実行するには
1222 \end_layout
1223
1224 \begin_layout Standard
1225 ローカル設定ディレクトリにおいて設定の自由度があるだけでは、2つ以上の設定を自由に使いこなしたい場合には充分ではないかもしれません。たとえば、使用する度に異なる
1226 キー割当を使用したり、異なるプリンタ設定を使用したいことがあるかもしれません。これは、複数の設定ディレクトリを作ることで実現することができます。そして、実行時に
1227 どのディレクトリを使用するか指定するのです。
1228 \end_layout
1229
1230 \begin_layout Standard
1231 LyXをコマンドラインスイッチ
1232 \begin_inset Flex Code
1233 status collapsed
1234
1235 \begin_layout Plain Layout
1236 -userdir
1237 \end_layout
1238
1239 \end_inset
1240
1241  
1242 \emph on
1243 <ディレクトリ名>
1244 \emph default
1245 と共に起動すると、設定を既定のディレクトリではなく、指定したディレクトリから読み込むように、指示することになります(LyXを
1246 \begin_inset Flex Code
1247 status collapsed
1248
1249 \begin_layout Plain Layout
1250 -userdir
1251 \end_layout
1252
1253 \end_inset
1254
1255 スイッチなしで実行すれば、既定ディレクトリを指定することになります)。指定したディレクトリが存在しない場合には、LyXは、初めてLyXを実行したときに既定ディレ
1256 クトリを訊いてくるのと同様に、そのディレクトリを作るかどうか訊いてきます。この追加したユーザディレクトリでは、既定ディレクトリで行うのと全く同じように設定オプシ
1257 ョンを修正することができます。これらのディレクトリは完全に独立しています(が、読み進めてください)。また、環境変数
1258 \begin_inset Flex Code
1259 status collapsed
1260
1261 \begin_layout Plain Layout
1262 LYX_USERDIR_VER
1263 \end_layout
1264
1265 \end_inset
1266
1267 を特定の値に設定しても、全く同じ効果があります。
1268 \end_layout
1269
1270 \begin_layout Standard
1271 複数の設定を持つことはまた、維持の手間も増えるということです。もし新しいレイアウトを
1272 \begin_inset Flex Code
1273 status collapsed
1274
1275 \begin_layout Plain Layout
1276 NewUserDir/layouts
1277 \end_layout
1278
1279 \end_inset
1280
1281 に加えて、これをすべての設定で利用できるようにしたいならば、これをすべての設定ディレクトリで個々に付け加えなくてはなりません。これを避けるには、次のようなトリッ
1282 クを使用してください。LyXが新しい設定ディレクトリを生成すると、そのサブディレクトリ(上記参照)はほとんど空です。新しい設定が既存のものをミラーするようにする
1283 には、空のサブディレクトリを、既存の設定の対応するサブディレクトリへのシンボリックリンクに置き換えてください。ただし
1284 \begin_inset Flex Code
1285 status collapsed
1286
1287 \begin_layout Plain Layout
1288 doc/
1289 \end_layout
1290
1291 \end_inset
1292
1293 サブディレクトリには、設定スクリプト(
1294 \begin_inset Flex MenuItem
1295 status collapsed
1296
1297 \begin_layout Plain Layout
1298 ツール\SpecialChar \menuseparator
1299 再設定
1300 \end_layout
1301
1302 \end_inset
1303
1304 で使用可能)が書き出した、設定毎に異なるファイルが含まれていますので、注意を払ってください。
1305 \end_layout
1306
1307 \begin_layout Chapter
1308 設定ダイアログ
1309 \end_layout
1310
1311 \begin_layout Standard
1312 設定ダイアログのオプションのすべては、
1313 \emph on
1314 ユーザーの手引き
1315 \emph default
1316 の付録
1317 \emph on
1318 設定ダイアログ
1319 \emph default
1320 に述べられています。オプションのうちいくつかについて、ここでさらに詳細に説明します。
1321 \end_layout
1322
1323 \begin_layout Section
1324 書式
1325 \begin_inset CommandInset label
1326 LatexCommand label
1327 name "sec:書式"
1328
1329 \end_inset
1330
1331
1332 \end_layout
1333
1334 \begin_layout Standard
1335 ファイル書式が定義されていない場合、はじめの一歩は、使いたいと思うファイル書式を定義することです。それには、
1336 \begin_inset Flex MenuItem
1337 status collapsed
1338
1339 \begin_layout Plain Layout
1340 ツール\SpecialChar \menuseparator
1341 設定
1342 \end_layout
1343
1344 \end_inset
1345
1346 ダイアログを開いてください。
1347 \begin_inset Flex MenuItem
1348 status collapsed
1349
1350 \begin_layout Plain Layout
1351 ファイル処理\SpecialChar \menuseparator
1352 ファイル書式
1353 \end_layout
1354
1355 \end_inset
1356
1357 の中で
1358 \begin_inset Flex MenuItem
1359 status collapsed
1360
1361 \begin_layout Plain Layout
1362 新規\SpecialChar \ldots{}
1363
1364 \end_layout
1365
1366 \end_inset
1367
1368 ボタンを押して、登録する新しい書式を定義してください。
1369 \begin_inset Flex MenuItem
1370 status collapsed
1371
1372 \begin_layout Plain Layout
1373 書式
1374 \end_layout
1375
1376 \end_inset
1377
1378 フィールドは、GUI中で書式を認識するために用いられる名称です。
1379 \begin_inset Flex MenuItem
1380 status collapsed
1381
1382 \begin_layout Plain Layout
1383 短縮名
1384 \end_layout
1385
1386 \end_inset
1387
1388 は、書式を内部的に識別するために用いられます。さらにファイル拡張子も入力する必要があります。これらはすべて必須事項です。オプションの
1389 \begin_inset Flex MenuItem
1390 status collapsed
1391
1392 \begin_layout Plain Layout
1393 短絡キー
1394 \end_layout
1395
1396 \end_inset
1397
1398 フィールドは、メニュー中で短絡キーを提供するのに使用されます(たとえば、
1399 \begin_inset Flex MenuItem
1400 status collapsed
1401
1402 \begin_layout Plain Layout
1403 Alt-V D
1404 \end_layout
1405
1406 \end_inset
1407
1408 を押すと
1409 \begin_inset Flex MenuItem
1410 status collapsed
1411
1412 \begin_layout Plain Layout
1413 表示\SpecialChar \menuseparator
1414 DVI
1415 \end_layout
1416
1417 \end_inset
1418
1419 となります)。
1420 \end_layout
1421
1422 \begin_layout Standard
1423 書式には、
1424 \begin_inset Flex MenuItem
1425 status collapsed
1426
1427 \begin_layout Plain Layout
1428 閲覧プログラム
1429 \end_layout
1430
1431 \end_inset
1432
1433
1434 \begin_inset Flex MenuItem
1435 status collapsed
1436
1437 \begin_layout Plain Layout
1438 編集プログラム
1439 \end_layout
1440
1441 \end_inset
1442
1443 を関連づけることができます。たとえば、PostScriptファイルを閲覧するのに
1444 \begin_inset Flex MenuItem
1445 status collapsed
1446
1447 \begin_layout Plain Layout
1448 Ghostview
1449 \end_layout
1450
1451 \end_inset
1452
1453 を使用したいとしましょう。このプログラムを起動するのに必要なコマンドを対応するフィールドに入力します。ここで、コマンドを定義するのに、次節に掲げる4つの変数を用
1454 いることができます。この閲覧プログラムは、LyX中で画像を閲覧したり
1455 \begin_inset Flex MenuItem
1456 status collapsed
1457
1458 \begin_layout Plain Layout
1459 表示
1460 \end_layout
1461
1462 \end_inset
1463
1464 メニューを使用したときに起動されます。一方、編集プログラムは、たとえば、画像を右クリックして現れるコンテクストメニューで
1465 \begin_inset Flex MenuItem
1466 status collapsed
1467
1468 \begin_layout Plain Layout
1469 外部で編集
1470 \end_layout
1471
1472 \end_inset
1473
1474 を選択したときに起動します。
1475 \end_layout
1476
1477 \begin_layout Standard
1478 \begin_inset Flex MenuItem
1479 status collapsed
1480
1481 \begin_layout Plain Layout
1482 文書書式
1483 \end_layout
1484
1485 \end_inset
1486
1487 オプションは、LyXに、この書式が文書として書き出すのに適していることを指示するものです。このオプションが有効となっていて、適切な変換経路が存在する場合には(第
1488 \begin_inset CommandInset ref
1489 LatexCommand ref
1490 reference "sec:変換子"
1491
1492 \end_inset
1493
1494 節を参照)、この書式が
1495 \begin_inset Flex MenuItem
1496 status collapsed
1497
1498 \begin_layout Plain Layout
1499 ファイル\SpecialChar \menuseparator
1500 書き出し
1501 \end_layout
1502
1503 \end_inset
1504
1505 メニューに表示されます。また、この書式に閲覧プログラムが指定されている場合には、この書式は
1506 \begin_inset Flex MenuItem
1507 status collapsed
1508
1509 \begin_layout Plain Layout
1510 表示
1511 \end_layout
1512
1513 \end_inset
1514
1515 メニューにも表示されます。
1516 \begin_inset Flex Code
1517 status collapsed
1518
1519 \begin_layout Plain Layout
1520 png
1521 \end_layout
1522
1523 \end_inset
1524
1525 のような純粋な画像書式は、このオプションを有効にしてはいけません。
1526 \begin_inset Flex Code
1527 status collapsed
1528
1529 \begin_layout Plain Layout
1530 pdf
1531 \end_layout
1532
1533 \end_inset
1534
1535 のようにベクター画像であると同時に文書でもあるような書式は、これを有効にします。
1536 \end_layout
1537
1538 \begin_layout Standard
1539 \begin_inset Flex MenuItem
1540 status collapsed
1541
1542 \begin_layout Plain Layout
1543 ベクター画像書式
1544 \end_layout
1545
1546 \end_inset
1547
1548 オプションは、LyXにこの書式がベクター画像を含みうることを教示するものです。この情報は、
1549 \begin_inset Flex MenuItem
1550 status collapsed
1551
1552 \begin_layout Plain Layout
1553 pdflatex
1554 \end_layout
1555
1556 \end_inset
1557
1558 を書き出す際に、内包されている画像をどの書式に変換するかを決定するのに使用されます。
1559 \begin_inset Flex MenuItem
1560 status collapsed
1561
1562 \begin_layout Plain Layout
1563 pdflatex
1564 \end_layout
1565
1566 \end_inset
1567
1568 は、
1569 \begin_inset Flex MenuItem
1570 status collapsed
1571
1572 \begin_layout Plain Layout
1573 pdf
1574 \end_layout
1575
1576 \end_inset
1577
1578
1579 \begin_inset Flex MenuItem
1580 status collapsed
1581
1582 \begin_layout Plain Layout
1583 png
1584 \end_layout
1585
1586 \end_inset
1587
1588
1589 \begin_inset Flex MenuItem
1590 status collapsed
1591
1592 \begin_layout Plain Layout
1593 jpg
1594 \end_layout
1595
1596 \end_inset
1597
1598 以外の画像書式を取り扱うことができないので、内包されている画像は、これらの書式に変換される必要があるかもしれない為です。内包されている画像が既に
1599 \begin_inset Flex MenuItem
1600 status collapsed
1601
1602 \begin_layout Plain Layout
1603 pdf
1604 \end_layout
1605
1606 \end_inset
1607
1608
1609 \begin_inset Flex MenuItem
1610 status collapsed
1611
1612 \begin_layout Plain Layout
1613 png
1614 \end_layout
1615
1616 \end_inset
1617
1618
1619 \begin_inset Flex MenuItem
1620 status collapsed
1621
1622 \begin_layout Plain Layout
1623 jpg
1624 \end_layout
1625
1626 \end_inset
1627
1628 のいずれかになっていない場合には、ベクター画像書式オプションが有効になっている場合には
1629 \begin_inset Flex MenuItem
1630 status collapsed
1631
1632 \begin_layout Plain Layout
1633 pdf
1634 \end_layout
1635
1636 \end_inset
1637
1638 に変換され、そうでない場合には
1639 \begin_inset Flex MenuItem
1640 status collapsed
1641
1642 \begin_layout Plain Layout
1643 png
1644 \end_layout
1645
1646 \end_inset
1647
1648 に変換されます。
1649 \end_layout
1650
1651 \begin_layout Section
1652 複写子
1653 \end_layout
1654
1655 \begin_layout Standard
1656 書式の変換はすべて、LyXの一時ディレクトリで行われるため、変換用にファイルを一時ディレクトリにコピーする前段階で、ファイルに変更を加える必要のあることがありま
1657
1658 \begin_inset Foot
1659 status collapsed
1660
1661 \begin_layout Plain Layout
1662 たとえば、ファイルが他のファイル—たとえば画像—を、相対ファイル名を用いて参照している場合、このファイルが一時ディレクトリにコピーされると参照が無効になる場合が
1663 あります。
1664 \end_layout
1665
1666 \end_inset
1667
1668 。これは複写子によって取り扱われ、複写子は、ファイルを一時ディレクトリに(あるいは一時ディレクトリから)コピーすると同時に、その過程でファイルに変更を加えます。
1669 \end_layout
1670
1671 \begin_layout Standard
1672 複写子の定義においては、以下の4つの変数を用いることができます。
1673 \end_layout
1674
1675 \begin_layout Labeling
1676 \labelwidthstring 00.00.0000
1677 \begin_inset Flex Code
1678 status collapsed
1679
1680 \begin_layout Plain Layout
1681 $$s
1682 \end_layout
1683
1684 \end_inset
1685
1686  LyXのシステムディレクトリ(例:
1687 \begin_inset Flex MenuItem
1688 status collapsed
1689
1690 \begin_layout Plain Layout
1691 /usr/share/lyx
1692 \end_layout
1693
1694 \end_inset
1695
1696
1697 \end_layout
1698
1699 \begin_layout Labeling
1700 \labelwidthstring 00.00.0000
1701 \begin_inset Flex Code
1702 status collapsed
1703
1704 \begin_layout Plain Layout
1705 $$i
1706 \end_layout
1707
1708 \end_inset
1709
1710  入力ファイル
1711 \end_layout
1712
1713 \begin_layout Labeling
1714 \labelwidthstring 00.00.0000
1715 \begin_inset Flex Code
1716 status collapsed
1717
1718 \begin_layout Plain Layout
1719 $$o
1720 \end_layout
1721
1722 \end_inset
1723
1724  出力ファイル
1725 \end_layout
1726
1727 \begin_layout Labeling
1728 \labelwidthstring 00.00.0000
1729 \begin_inset Flex Code
1730 status collapsed
1731
1732 \begin_layout Plain Layout
1733 $$l
1734 \end_layout
1735
1736 \end_inset
1737
1738  「LaTeX名」
1739 \end_layout
1740
1741 \begin_layout Standard
1742 最後の変数は、LaTeXの
1743 \series bold
1744
1745 \backslash
1746 include
1747 \series default
1748 コマンドで使用されるのと同形式のファイル名です。これは、書き出すファイルがそのようなインクルードに適している場合のみ、使用さるべきものです。
1749 \end_layout
1750
1751 \begin_layout Standard
1752 複写子は、出力ファイルに関する操作であれば、ほとんどすべてに対応することができます。たとえば、生成したPDFファイルを、
1753 \begin_inset Flex Code
1754 status collapsed
1755
1756 \begin_layout Plain Layout
1757 /home/you/pdf/
1758 \end_layout
1759
1760 \end_inset
1761
1762 という特別なディレクトリにコピーしたいものとしましょう。その場合には、以下のようなシェルスクリプトを書きます。
1763 \end_layout
1764
1765 \begin_layout Standard
1766 \begin_inset listings
1767 inline false
1768 status open
1769
1770 \begin_layout Plain Layout
1771
1772 #!/bin/bash
1773 \end_layout
1774
1775 \begin_layout Plain Layout
1776
1777 FROMFILE=$1
1778 \end_layout
1779
1780 \begin_layout Plain Layout
1781
1782 TOFILE=`basename $2`
1783 \end_layout
1784
1785 \begin_layout Plain Layout
1786
1787 cp $FROMFILE /home/you/pdf/$TOFILE
1788 \end_layout
1789
1790 \end_inset
1791
1792 これを、自身のローカルLyXディレクトリ—たとえば
1793 \begin_inset Flex Code
1794 status collapsed
1795
1796 \begin_layout Plain Layout
1797 /home/you/.lyx/scripts/pdfcopier.sh
1798 \end_layout
1799
1800 \end_inset
1801
1802 —に保存し、お使いのプラットフォームが必要とするならば、実行可能属性を付与します。それから、
1803 \begin_inset Flex MenuItem
1804 status collapsed
1805
1806 \begin_layout Plain Layout
1807 ツール\SpecialChar \menuseparator
1808 設定
1809 \end_layout
1810
1811 \end_inset
1812
1813 ダイアログの
1814 \begin_inset Flex MenuItem
1815 status collapsed
1816
1817 \begin_layout Plain Layout
1818 ファイル処理\SpecialChar \menuseparator
1819 ファイル書式
1820 \end_layout
1821
1822 \end_inset
1823
1824 の中で、
1825 \begin_inset Flex MenuItem
1826 status collapsed
1827
1828 \begin_layout Plain Layout
1829 PDF(pdflatex)
1830 \end_layout
1831
1832 \end_inset
1833
1834 書式—あるいは他のPDF書式のうちどれか—を選択し、
1835 \begin_inset Flex MenuItem
1836 status collapsed
1837
1838 \begin_layout Plain Layout
1839 複写子
1840 \end_layout
1841
1842 \end_inset
1843
1844 フィールドに
1845 \begin_inset Flex Code
1846 status collapsed
1847
1848 \begin_layout Plain Layout
1849 pdfcopier.sh $$i $$o
1850 \end_layout
1851
1852 \end_inset
1853
1854 と入力します。
1855 \end_layout
1856
1857 \begin_layout Standard
1858 複写子は、LyX自身が様々な変換に使用します。たとえば、適切なプログラムが検出された場合、LyXは自動的に
1859 \begin_inset Flex MenuItem
1860 status collapsed
1861
1862 \begin_layout Plain Layout
1863 HTML
1864 \end_layout
1865
1866 \end_inset
1867
1868 書式と
1869 \begin_inset Flex MenuItem
1870 status collapsed
1871
1872 \begin_layout Plain Layout
1873 HTML
1874 \begin_inset space ~
1875 \end_inset
1876
1877 (MS Word)
1878 \end_layout
1879
1880 \end_inset
1881
1882 書式の複写子を導入します。これらの書式を書き出す際、複写子は、本体のHTMLファイルだけでなく、関連した様々なファイル(スタイルファイルや画像など)もコピーされ
1883 るように手配します。これらのファイルはすべて、元のLyXファイルのあるディレクトリのサブディレクトリに書き込まれます
1884 \begin_inset Foot
1885 status collapsed
1886
1887 \begin_layout Plain Layout
1888 この複写子の挙動は調整することができます。非必須の「-e」オプションは、コピーする拡張子をコンマ区切りで羅列したものを引数にとります。これを省略した場合には、す
1889 べてのファイルがコピーされます。「-t」引数は、生成したディレクトリに書き加える拡張子を指定するものです。既定値では、これは「
1890 \begin_inset Flex MenuItem
1891 status collapsed
1892
1893 \begin_layout Plain Layout
1894 L
1895 \begin_inset ERT
1896 status collapsed
1897
1898 \begin_layout Plain Layout
1899
1900 {}
1901 \end_layout
1902
1903 \end_inset
1904
1905 yXconv
1906 \end_layout
1907
1908 \end_inset
1909
1910 」となっているので、
1911 \begin_inset Flex MenuItem
1912 status collapsed
1913
1914 \begin_layout Plain Layout
1915 /path/to/filename.lyx
1916 \end_layout
1917
1918 \end_inset
1919
1920 から生成されたHTMLファイルは、
1921 \begin_inset Flex MenuItem
1922 status collapsed
1923
1924 \begin_layout Plain Layout
1925 /path/to/filename.html.L
1926 \begin_inset ERT
1927 status collapsed
1928
1929 \begin_layout Plain Layout
1930
1931 {}
1932 \end_layout
1933
1934 \end_inset
1935
1936 yXconv
1937 \end_layout
1938
1939 \end_inset
1940
1941 となります。.
1942  
1943 \end_layout
1944
1945 \end_inset
1946
1947
1948 \end_layout
1949
1950 \begin_layout Section
1951 変換子
1952 \begin_inset CommandInset label
1953 LatexCommand label
1954 name "sec:変換子"
1955
1956 \end_inset
1957
1958
1959 \end_layout
1960
1961 \begin_layout Standard
1962 各書式間でファイルを変換するために、ご自身の変換子を定義することができます。これは、
1963 \begin_inset Flex MenuItem
1964 status collapsed
1965
1966 \begin_layout Plain Layout
1967 ツール\SpecialChar \menuseparator
1968 設定\SpecialChar \menuseparator
1969 ファイル処理\SpecialChar \menuseparator
1970 変換子
1971 \end_layout
1972
1973 \end_inset
1974
1975 ダイアログで行います。
1976 \end_layout
1977
1978 \begin_layout Standard
1979 新規に変換子を定義するには、ドロップダウンリストから
1980 \begin_inset Flex MenuItem
1981 status collapsed
1982
1983 \begin_layout Plain Layout
1984 変換元の書式
1985 \end_layout
1986
1987 \end_inset
1988
1989
1990 \begin_inset Flex MenuItem
1991 status collapsed
1992
1993 \begin_layout Plain Layout
1994 変換先の書式
1995 \end_layout
1996
1997 \end_inset
1998
1999 を選択し、変換に必要なコマンドを入力してから
2000 \begin_inset Flex MenuItem
2001 status collapsed
2002
2003 \begin_layout Plain Layout
2004 追加
2005 \end_layout
2006
2007 \end_inset
2008
2009 ボタンを押してください。変換子の定義には、以下のような変数を使用することができます。
2010 \end_layout
2011
2012 \begin_layout Labeling
2013 \labelwidthstring 00.00.0000
2014 \begin_inset Flex Code
2015 status collapsed
2016
2017 \begin_layout Plain Layout
2018 $$s
2019 \end_layout
2020
2021 \end_inset
2022
2023  LyXシステムディレクトリ
2024 \end_layout
2025
2026 \begin_layout Labeling
2027 \labelwidthstring 00.00.0000
2028 \begin_inset Flex Code
2029 status collapsed
2030
2031 \begin_layout Plain Layout
2032 $$i
2033 \end_layout
2034
2035 \end_inset
2036
2037  入力ファイル
2038 \end_layout
2039
2040 \begin_layout Labeling
2041 \labelwidthstring 00.00.0000
2042 \begin_inset Flex Code
2043 status collapsed
2044
2045 \begin_layout Plain Layout
2046 $$o
2047 \end_layout
2048
2049 \end_inset
2050
2051  出力ファイル
2052 \end_layout
2053
2054 \begin_layout Labeling
2055 \labelwidthstring 00.00.0000
2056 \begin_inset Flex Code
2057 status collapsed
2058
2059 \begin_layout Plain Layout
2060 $$b
2061 \end_layout
2062
2063 \end_inset
2064
2065  入力ファイルのベースファイル名(拡張子をとった部分)
2066 \end_layout
2067
2068 \begin_layout Labeling
2069 \labelwidthstring 00.00.0000
2070 \begin_inset Flex Code
2071 status collapsed
2072
2073 \begin_layout Plain Layout
2074 $$p
2075 \end_layout
2076
2077 \end_inset
2078
2079  入力ファイルのパス
2080 \end_layout
2081
2082 \begin_layout Labeling
2083 \labelwidthstring 00.00.0000
2084 \begin_inset Flex Code
2085 status collapsed
2086
2087 \begin_layout Plain Layout
2088 $$r
2089 \end_layout
2090
2091 \end_inset
2092
2093  元の入力ファイルのパス(変換子が連鎖して呼び出されたときの挙動が$$pとは異なります)
2094 \end_layout
2095
2096 \begin_layout Labeling
2097 \labelwidthstring 00.00.0000
2098 \begin_inset Flex Code
2099 status collapsed
2100
2101 \begin_layout Plain Layout
2102 $$e
2103 \end_layout
2104
2105 \end_inset
2106
2107  文書エンコーディングのiconv名
2108 \end_layout
2109
2110 \begin_layout Standard
2111 \begin_inset Flex MenuItem
2112 status collapsed
2113
2114 \begin_layout Plain Layout
2115 追加フラグ
2116 \end_layout
2117
2118 \end_inset
2119
2120 フィールドには、以下のフラグをコンマで区切って入力することができます。
2121 \end_layout
2122
2123 \begin_layout Labeling
2124 \labelwidthstring 00.00.0000
2125 \begin_inset Flex Code
2126 status collapsed
2127
2128 \begin_layout Plain Layout
2129 latex
2130 \end_layout
2131
2132 \end_inset
2133
2134  この変換子がLaTeXの一種を実行することを示します。これによって、LyXのLaTeXエラーログに記録を残せるようになります。
2135 \end_layout
2136
2137 \begin_layout Labeling
2138 \labelwidthstring 00.00.0000
2139 \begin_inset Flex Code
2140 status collapsed
2141
2142 \begin_layout Plain Layout
2143 needaux
2144 \end_layout
2145
2146 \end_inset
2147
2148  変換にLaTeXの
2149 \begin_inset Flex MenuItem
2150 status collapsed
2151
2152 \begin_layout Plain Layout
2153 .aux
2154 \end_layout
2155
2156 \end_inset
2157
2158 ファイルが必要であることを示します。
2159 \end_layout
2160
2161 \begin_layout Labeling
2162 \labelwidthstring 00.00.0000
2163 \begin_inset Flex Code
2164 status collapsed
2165
2166 \begin_layout Plain Layout
2167 xml
2168 \end_layout
2169
2170 \end_inset
2171
2172  出力がXMLであることを示します。
2173 \end_layout
2174
2175 \begin_layout Standard
2176 以下の3つのフラグは 
2177 \begin_inset Flex MenuItem
2178 status collapsed
2179
2180 \begin_layout Plain Layout
2181 key
2182 \begin_inset space ~
2183 \end_inset
2184
2185 =
2186 \begin_inset space ~
2187 \end_inset
2188
2189 value
2190 \end_layout
2191
2192 \end_inset
2193
2194 形式の引数をとります(したがって厳密にはフラグとは呼べません)。
2195 \end_layout
2196
2197 \begin_layout Labeling
2198 \labelwidthstring 00.00.0000
2199 \begin_inset Flex Code
2200 status collapsed
2201
2202 \begin_layout Plain Layout
2203 parselog
2204 \end_layout
2205
2206 \end_inset
2207
2208  これを指定すると、変換子の標準エラーが
2209 \begin_inset Flex Code
2210 status collapsed
2211
2212 \begin_layout Plain Layout
2213 infile.out
2214 \end_layout
2215
2216 \end_inset
2217
2218 ファイルにリダイレクトされ、引数に指定されたスクリプトが
2219 \begin_inset Flex Code
2220 status collapsed
2221
2222 \begin_layout Plain Layout
2223 script < infile.out > infile.log
2224 \end_layout
2225
2226 \end_inset
2227
2228 の形で実行されるようになります。引数には
2229 \begin_inset Flex Code
2230 status collapsed
2231
2232 \begin_layout Plain Layout
2233 $$s
2234 \end_layout
2235
2236 \end_inset
2237
2238 を指定することができます。
2239 \end_layout
2240
2241 \begin_layout Labeling
2242 \labelwidthstring 00.00.0000
2243 \begin_inset Flex Code
2244 status collapsed
2245
2246 \begin_layout Plain Layout
2247 resultdir
2248 \end_layout
2249
2250 \end_inset
2251
2252  これには、変換子が生成したファイルをダンプするディレクトリ名を指定します。LyXはこのディレクトリを作成せず、ここに何もコピーしませんが、このディレクトリを宛
2253 先にコピーします。引数には、
2254 \begin_inset Flex Code
2255 status collapsed
2256
2257 \begin_layout Plain Layout
2258 $$b
2259 \end_layout
2260
2261 \end_inset
2262
2263 を使用することができ、これはディレクトリがコピーされる際に、入力ファイルおよび出力ファイルのベース名で置換されます。
2264 \begin_inset Newline newline
2265 \end_inset
2266
2267 resultdirとusetempdirは、同時に用いることはできませんのでご注意ください。前者が指定されているときには、後者は無視されます。
2268 \end_layout
2269
2270 \begin_layout Labeling
2271 \labelwidthstring 00.00.0000
2272 \begin_inset Flex Code
2273 status collapsed
2274
2275 \begin_layout Plain Layout
2276 resultfile
2277 \end_layout
2278
2279 \end_inset
2280
2281  これは出力ファイル名を指定するもので、
2282 \begin_inset Flex Code
2283 status collapsed
2284
2285 \begin_layout Plain Layout
2286 $$b
2287 \end_layout
2288
2289 \end_inset
2290
2291 を使用することができます。resultdirが指定されているときのみ有効で、必ず用いる必要はありません。指定されていなければ、既定値は「index」です。
2292 \end_layout
2293
2294 \begin_layout Standard
2295 最後の3つは、LyXとともに導入される変換子には、現在いずれも使用されておりません。
2296 \end_layout
2297
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 ~
2305 \end_inset
2306
2307 直接
2308 \begin_inset Flex MenuItem
2309 status collapsed
2310
2311 \begin_layout Plain Layout
2312 pdflatex
2313 \end_layout
2314
2315 \end_inset
2316
2317 を使用するもの。(2)
2318 \begin_inset space ~
2319 \end_inset
2320
2321 (DVIと)PostScriptを経由して
2322 \begin_inset Flex MenuItem
2323 status collapsed
2324
2325 \begin_layout Plain Layout
2326 ps2pdf
2327 \end_layout
2328
2329 \end_inset
2330
2331 を使用するもの。(3)
2332 \begin_inset space ~
2333 \end_inset
2334
2335 DVI経由で
2336 \begin_inset Flex MenuItem
2337 status collapsed
2338
2339 \begin_layout Plain Layout
2340 dvipdfm
2341 \end_layout
2342
2343 \end_inset
2344
2345 を使用するもの。このように代替連鎖を定義するには、第
2346 \begin_inset CommandInset ref
2347 LatexCommand ref
2348 reference "sec:書式"
2349
2350 \end_inset
2351
2352 節に述べられているように、ターゲットとなる「ファイル書式」を複数定義しなくてはなりません。たとえば、標準設定では、
2353 \begin_inset Flex MenuItem
2354 status collapsed
2355
2356 \begin_layout Plain Layout
2357 pdf
2358 \end_layout
2359
2360 \end_inset
2361
2362
2363 \begin_inset Flex MenuItem
2364 status collapsed
2365
2366 \begin_layout Plain Layout
2367 pdf2
2368 \end_layout
2369
2370 \end_inset
2371
2372
2373 \begin_inset Flex MenuItem
2374 status collapsed
2375
2376 \begin_layout Plain Layout
2377 pdf3
2378 \end_layout
2379
2380 \end_inset
2381
2382 と命名された書式が定義されていて、すべて共通の拡張子
2383 \begin_inset Flex MenuItem
2384 status collapsed
2385
2386 \begin_layout Plain Layout
2387 .pdf
2388 \end_layout
2389
2390 \end_inset
2391
2392 を持ち、上記で言及した各変換方法に対応しています。
2393 \end_layout
2394
2395 \begin_layout Chapter
2396 LyXの各国語対応
2397 \begin_inset CommandInset label
2398 LatexCommand label
2399 name "cha:LyXの各国語対応"
2400
2401 \end_inset
2402
2403
2404 \end_layout
2405
2406 \begin_layout Standard
2407 LyXは、翻訳された操作画面の利用をサポートしています。私たちが最後に確かめたところでは、LyXは30言語の翻訳を提供しています。選択した言語は、使用する
2408 \emph on
2409 ロケール
2410 \emph default
2411 と呼ばれます(ロケール設定についての詳しい資料は、お使いの基本ソフトに添付のロケール関連説明書をご覧ください。Linuxの場合は、マニュアルページの
2412 \begin_inset Flex Code
2413 status collapsed
2414
2415 \begin_layout Plain Layout
2416 locale(5)
2417 \end_layout
2418
2419 \end_inset
2420
2421 から見ると良いかもしれません)。
2422 \end_layout
2423
2424 \begin_layout Standard
2425 これらの翻訳は適切に機能しますが、欠点もいくつかあることに注意してください。たとえば、ダイアログはすべて英文を念頭にデザインされているため、翻訳文の一部は、割り
2426 当てられたスペースに収めるには大きすぎるかもしれません。これは表示上の問題に過ぎず、他の障害は引き起こしません。また、翻訳によっては、すべての短絡キーが定義され
2427 ていないことに気づかれるでしょう。短絡キーのために空いている文字が十分ないことが時々あるのです。単に翻訳者がまだ短絡キーを定義していないこともあるでしょう。もち
2428 ろん、私たちの各国語対応チーム—あなたも参加したいと思われるかもしれません
2429 \begin_inset Foot
2430 status collapsed
2431
2432 \begin_layout Plain Layout
2433 もしあなたが英語以外の言語を流暢に操れるならば、これらのチームに参加することは、LyXコミュニティに報いるたいへん素晴らしい方法です!
2434 \end_layout
2435
2436 \end_inset
2437
2438 —は、LyXの将来のバージョンでこれらの欠点を修正しようとするでしょう。
2439 \end_layout
2440
2441 \begin_layout Section
2442 LyXを翻訳する
2443 \end_layout
2444
2445 \begin_layout Subsection
2446 グラフィカル・ユーザ・インタフェース(テキスト・メッセージ)を翻訳する
2447 \begin_inset Argument
2448 status collapsed
2449
2450 \begin_layout Plain Layout
2451 GUI(テキストメッセージ)を翻訳する
2452 \end_layout
2453
2454 \end_inset
2455
2456
2457 \end_layout
2458
2459 \begin_layout Standard
2460 LyXは、操作画面の国際化対応にGNU 
2461 \begin_inset Flex Code
2462 status collapsed
2463
2464 \begin_layout Plain Layout
2465 gettext
2466 \end_layout
2467
2468 \end_inset
2469
2470 ライブラリを使用します。LyXのすべてのメニューやダイアログでお好みの言語を話させたいときには、その言語の
2471 \begin_inset Flex Code
2472 status collapsed
2473
2474 \begin_layout Plain Layout
2475 po
2476 \end_layout
2477
2478 \end_inset
2479
2480 ファイルが必要です。このファイルが利用可能であれば、そこから
2481 \begin_inset Flex Code
2482 status collapsed
2483
2484 \begin_layout Plain Layout
2485 mo
2486 \end_layout
2487
2488 \end_inset
2489
2490 ファイルを生成して、この
2491 \begin_inset Flex Code
2492 status collapsed
2493
2494 \begin_layout Plain Layout
2495 mo
2496 \end_layout
2497
2498 \end_inset
2499
2500 ファイルをインストールしなくてはなりません。この全過程は、GNU 
2501 \begin_inset Flex Code
2502 status collapsed
2503
2504 \begin_layout Plain Layout
2505 gettext
2506 \end_layout
2507
2508 \end_inset
2509
2510 の取扱説明書に説明があります。この作業をあなたのためだけに行うこともできますが、もしせっかくするのであれば、あなたの骨折りの結果をLyXコミュニティの他の人々と
2511 分かち合いませんか。どのように段取りを進めればよいか、詳しくはLyX開発者メーリングリストにメールを送ってください。
2512 \end_layout
2513
2514 \begin_layout Standard
2515 要約すれば、以下のように行います(xxは言語コードを表します)。
2516 \end_layout
2517
2518 \begin_layout Itemize
2519 LyXソースコードをチェックアウトしてください(
2520 \begin_inset CommandInset href
2521 LatexCommand href
2522 name "ウェブ上の情報"
2523 target "http://www.lyx.org/devel/cvs.php"
2524
2525 \end_inset
2526
2527 参照)。
2528 \end_layout
2529
2530 \begin_layout Itemize
2531 \begin_inset Flex Code
2532 status collapsed
2533
2534 \begin_layout Plain Layout
2535 lyx.pot
2536 \end_layout
2537
2538 \end_inset
2539
2540 ファイルを
2541 \begin_inset Flex Code
2542 status collapsed
2543
2544 \begin_layout Plain Layout
2545 **.po
2546 \end_layout
2547
2548 \end_inset
2549
2550 ファイルのあるフォルダにコピーして、
2551 \begin_inset Flex Code
2552 status collapsed
2553
2554 \begin_layout Plain Layout
2555 xx.po
2556 \end_layout
2557
2558 \end_inset
2559
2560 に名前を付け替えてください(
2561 \begin_inset Flex Code
2562 status collapsed
2563
2564 \begin_layout Plain Layout
2565 lyx.pot
2566 \end_layout
2567
2568 \end_inset
2569
2570 がどこにもない場合には、コンソールからそのディレクトリで
2571 \begin_inset Flex Code
2572 status collapsed
2573
2574 \begin_layout Plain Layout
2575 make lyx.pot
2576 \end_layout
2577
2578 \end_inset
2579
2580 コマンドを実行し、作成し直すか、他言語の既存のpoファイルをひな型として使用することができます)。
2581 \end_layout
2582
2583 \begin_layout Itemize
2584 \begin_inset Flex Code
2585 status collapsed
2586
2587 \begin_layout Plain Layout
2588 xx.po
2589 \end_layout
2590
2591 \end_inset
2592
2593 を編集します
2594 \begin_inset Foot
2595 status collapsed
2596
2597 \begin_layout Plain Layout
2598 これは単なるテキストファイルなので、どのテキストエディタでも編集できます。しかし、
2599 \family typewriter
2600 Poedit
2601 \family default
2602 (全プラットフォーム用)や
2603 \family typewriter
2604 KBabel
2605 \family default
2606 (KDE用)のように、この目的の編集をサポートする特別なプログラムがあります。
2607 \family typewriter
2608 Emacs
2609 \family default
2610 にも
2611 \begin_inset Flex Code
2612 status collapsed
2613
2614 \begin_layout Plain Layout
2615 po
2616 \end_layout
2617
2618 \end_inset
2619
2620 ファイルを編集するための「モード」があります。
2621 \end_layout
2622
2623 \end_inset
2624
2625 。メニューラベルやウィジェットラベルのうちには、翻訳しなくてはならない短絡キーがある場合があります。これらのキーは「|」の後に記されており、当該言語の単語やフレ
2626 ーズに対応して翻訳しなくてはなりません。さらに、新しい
2627 \begin_inset Flex Code
2628 status collapsed
2629
2630 \begin_layout Plain Layout
2631 po
2632 \end_layout
2633
2634 \end_inset
2635
2636 ファイルの冒頭に、あなたの電子メールアドレスなどの情報も書き加えて、人々があなたに提案や、滑稽な怒りのメッセージを届けることができるようにしてください。
2637 \end_layout
2638
2639 \begin_layout Standard
2640 もし、あなたがこれを自身のためだけに行っているのであれば、
2641 \end_layout
2642
2643 \begin_layout Itemize
2644 \begin_inset Flex Code
2645 status collapsed
2646
2647 \begin_layout Plain Layout
2648 xx.mo
2649 \end_layout
2650
2651 \end_inset
2652
2653 を生成してください。これは
2654 \begin_inset Flex Code
2655 status collapsed
2656
2657 \begin_layout Plain Layout
2658 msgfmt -o xx.mo < xx.po
2659 \end_layout
2660
2661 \end_inset
2662
2663 でできます。
2664 \end_layout
2665
2666 \begin_layout Itemize
2667 この
2668 \begin_inset Flex Code
2669 status collapsed
2670
2671 \begin_layout Plain Layout
2672 mo
2673 \end_layout
2674
2675 \end_inset
2676
2677 ファイルを、お使いのロケールツリー中、言語xxのアプリケーションメッセージ用の正式なディレクトリにコピーして、
2678 \begin_inset Flex Code
2679 status collapsed
2680
2681 \begin_layout Plain Layout
2682 lyx.mo
2683 \end_layout
2684
2685 \end_inset
2686
2687 という名称にしてください(例:
2688 \begin_inset Flex Code
2689 status collapsed
2690
2691 \begin_layout Plain Layout
2692 /usr/local/share/locale/xx/LC_MESSAGES/lyx.mo
2693 \end_layout
2694
2695 \end_inset
2696
2697 )。
2698 \end_layout
2699
2700 \begin_layout Standard
2701 しかしながら前述のように、この新しい
2702 \begin_inset Flex Code
2703 status collapsed
2704
2705 \begin_layout Plain Layout
2706 po
2707 \end_layout
2708
2709 \end_inset
2710
2711 ファイルを他の人たちが使用できるよう、LyX頒布版に追加できることが最善です。これを追加するには、LyXに変更を加える必要がありますので、もしその気があれば、開
2712 発者メーリングリストに電子メールを送ってください。
2713 \end_layout
2714
2715 \begin_layout Subsubsection
2716 多義訳語メッセージ
2717 \end_layout
2718
2719 \begin_layout Standard
2720 時には、一つの英語のメッセージが、翻訳先の言語では複数のメッセージに翻訳されなくてはならないことが判明することがあります。一つの例は、
2721 \begin_inset Flex Code
2722 status collapsed
2723
2724 \begin_layout Plain Layout
2725 To
2726 \end_layout
2727
2728 \end_inset
2729
2730 というメッセージで、これは英語で「to」がどういう意味を持っているかによって、独語ではNachと訳されたりBisと訳されたりします。GNU 
2731 \begin_inset Flex Code
2732 status collapsed
2733
2734 \begin_layout Plain Layout
2735 gettext
2736 \end_layout
2737
2738 \end_inset
2739
2740 は、このような多義訳語を
2741 \begin_inset Flex Code
2742 status collapsed
2743
2744 \begin_layout Plain Layout
2745 To
2746 \end_layout
2747
2748 \end_inset
2749
2750 の代わりに、
2751 \begin_inset Flex Code
2752 status collapsed
2753
2754 \begin_layout Plain Layout
2755 To[[as in 'From format x to format y']]
2756 \end_layout
2757
2758 \end_inset
2759
2760
2761 \begin_inset Flex Code
2762 status collapsed
2763
2764 \begin_layout Plain Layout
2765 To[[as in 'From page x to page y']]
2766 \end_layout
2767
2768 \end_inset
2769
2770 としなくてはなりません。これによって、これら2つの
2771 \begin_inset Flex Code
2772 status collapsed
2773
2774 \begin_layout Plain Layout
2775 To
2776 \end_layout
2777
2778 \end_inset
2779
2780 は、
2781 \begin_inset Flex Code
2782 status collapsed
2783
2784 \begin_layout Plain Layout
2785 gettext
2786 \end_layout
2787
2788 \end_inset
2789
2790 には別物と解釈され、それぞれ正しくNachとBisに訳すことができるようになります。
2791 \end_layout
2792
2793 \begin_layout Standard
2794 もちろん、この文脈情報は、翻訳が存在しないときには取り去られる必要がありますので、メッセージの終わりに二重大括弧で囲わなくてはなりません(上例参照)。LyXの翻
2795 訳機構では、メッセージの終わりに二重大括弧で囲われているものはすべて、メッセージを表示する前に取り去るようにされています。
2796 \end_layout
2797
2798 \begin_layout Subsection
2799 説明書を翻訳する
2800 \end_layout
2801
2802 \begin_layout Standard
2803
2804 \begin_inset Flex MenuItem
2805 status collapsed
2806
2807 \begin_layout Plain Layout
2808 Help
2809 \end_layout
2810
2811 \end_inset
2812
2813 メニュー中の)オンライン説明書は翻訳することができます(そして翻訳されるべきです!)。説明書の翻訳版が利用可能であり
2814 \begin_inset Foot
2815 status collapsed
2816
2817 \begin_layout Plain Layout
2818 2008年3月現在、説明書の少なくとも一部が翻訳されている言語は14言語に上り、入門編が訳されているものはさらにいくつかあります。
2819 \end_layout
2820
2821 \end_inset
2822
2823 、ロケールがその言語に設定されている場合、LyXはこれを自動的に使用します。LyXは、翻訳版を
2824 \begin_inset Flex Code
2825 status collapsed
2826
2827 \begin_layout Plain Layout
2828 L
2829 \begin_inset ERT
2830 status collapsed
2831
2832 \begin_layout Plain Layout
2833
2834 {}
2835 \end_layout
2836
2837 \end_inset
2838
2839 yXDir/doc/xx/DocName.lyx
2840 \end_layout
2841
2842 \end_inset
2843
2844
2845 \begin_inset Flex Code
2846 status collapsed
2847
2848 \begin_layout Plain Layout
2849 xx
2850 \end_layout
2851
2852 \end_inset
2853
2854 は現在使用している言語コード)で探します。翻訳文書がない場合には、既定の英語版が表示されます。翻訳版は、原典と同じファイル名(上述の
2855 \begin_inset Flex Code
2856 status collapsed
2857
2858 \begin_layout Plain Layout
2859 DocName
2860 \end_layout
2861
2862 \end_inset
2863
2864 )を持っていなくてはならないことに注意してください。説明書を翻訳する気がおありであれば(これは原典の校正としてもたいへん役立ちます!)、以下のような点をすぐに行
2865 うべきです。
2866 \end_layout
2867
2868 \begin_layout Itemize
2869 説明書翻訳ウェブページ
2870 \begin_inset CommandInset href
2871 LatexCommand href
2872 name "http://www.lyx.org/Translation"
2873 target "http://www.lyx.org/Translation"
2874
2875 \end_inset
2876
2877 を確認してください。ここで、どの文書が(もしあれば)お使いの言語に既に翻訳されているかを見つけることができます。また、説明書をお使いの言語に翻訳する作業の面倒を
2878 見ている人を(もしいれば)見つけることができます。この作業の面倒を見ている人がいない場合には、私たちにあなたが興味をお持ちであることを知らせてください。
2879 \end_layout
2880
2881 \begin_layout Standard
2882 いったん実際の翻訳の仕事に取りかかったならば、トラブルを回避するいくつかのヒントがあります。
2883 \end_layout
2884
2885 \begin_layout Itemize
2886 文書化チームに所属してください!そのための情報が
2887 \begin_inset Flex Code
2888 status collapsed
2889
2890 \begin_layout Plain Layout
2891 Intro.lyx
2892 \end_layout
2893
2894 \end_inset
2895
2896
2897 \begin_inset Flex MenuItem
2898 status collapsed
2899
2900 \begin_layout Plain Layout
2901 ヘルプ\SpecialChar \menuseparator
2902 はじめの一歩
2903 \end_layout
2904
2905 \end_inset
2906
2907 )にあります。また、この
2908 \begin_inset Flex Code
2909 status collapsed
2910
2911 \begin_layout Plain Layout
2912 Intro.lyx
2913 \end_layout
2914
2915 \end_inset
2916
2917 が最初に訳すべき文書です。
2918 \end_layout
2919
2920 \begin_layout Itemize
2921 翻訳しようとする言語での印刷慣行を学んでください。活版印刷は古来の技術であり、何世紀にもわたって世界の至る所で、様々な慣行を発達させてきました。また、あなたの国
2922 で活版工が用いる専門用語も学んでください。自分で勝手な専門用語を捻出するとユーザを混乱させるだけです。(
2923 \emph on
2924 警告!活版技術は病みつきになる可能性があるので注意してくさい!
2925 \emph default
2926
2927 \end_layout
2928
2929 \begin_layout Itemize
2930 文書のコピーをとってください。これを作業用コピーとします。これをお使いの
2931 \begin_inset Flex Code
2932 status collapsed
2933
2934 \begin_layout Plain Layout
2935 UserDir/doc/xx/
2936 \end_layout
2937
2938 \end_inset
2939
2940 ディレクトリにコピーすれば、個人用の翻訳ヘルプファイルとして使用することができます。
2941 \end_layout
2942
2943 \begin_layout Itemize
2944 (LyXチームが維持している)原典の説明書は、時折更新されます。変更点については、
2945 \begin_inset CommandInset href
2946 LatexCommand href
2947 name "http://www.lyx.org/trac/timeline"
2948 target "http://www.lyx.org/trac/timeline"
2949
2950 \end_inset
2951
2952 のソースビューアでご覧ください。この方法で、翻訳文書のどの部分を更新しなくてはならないか、たやすく見つけることができます。
2953 \end_layout
2954
2955 \begin_layout Standard
2956 もし原典に誤りを見つけたならば、修正して文書化チームの他のメンバーに変更したことを知らせてください(文書化チームに参加することをお忘れになっていませんよね)。
2957 \end_layout
2958
2959 \begin_layout Standard
2960 \begin_inset Branch OutDated
2961 status collapsed
2962
2963 \begin_layout Section
2964 International Keyboard Support
2965 \end_layout
2966
2967 \begin_layout Standard
2968
2969 \emph on
2970 [Editor's Note: The following section is by
2971 \emph default
2972  
2973 \shape smallcaps
2974 \emph on
2975 Ivan Schreter
2976 \shape default
2977 .
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)]
2982 \end_layout
2983
2984 \begin_layout Subsection
2985 Defining Own Keymaps: Keymap File Format
2986 \end_layout
2987
2988 \begin_layout Standard
2989 Let's look at a keyboard definition file a little closer.
2990  It is a plain text file defining
2991 \end_layout
2992
2993 \begin_layout Itemize
2994 key-to-key or key-to-string translations
2995 \end_layout
2996
2997 \begin_layout Itemize
2998 dead keys
2999 \end_layout
3000
3001 \begin_layout Itemize
3002 dead keys exceptions
3003 \end_layout
3004
3005 \begin_layout Standard
3006 To define key-to-key or key-to-string translation, use this command:
3007 \end_layout
3008
3009 \begin_layout Quotation
3010 \begin_inset Flex Code
3011 status collapsed
3012
3013 \begin_layout Plain Layout
3014
3015 \backslash
3016 kmap
3017 \end_layout
3018
3019 \end_inset
3020
3021  
3022 \begin_inset Flex Code
3023 status collapsed
3024
3025 \begin_layout Plain Layout
3026 key
3027 \end_layout
3028
3029 \end_inset
3030
3031  outstring 
3032 \end_layout
3033
3034 \begin_layout Standard
3035 where 
3036 \begin_inset Flex Code
3037 status collapsed
3038
3039 \begin_layout Plain Layout
3040 key
3041 \end_layout
3042
3043 \end_inset
3044
3045  is the key to be translated and 
3046 \begin_inset Flex Code
3047 status collapsed
3048
3049 \begin_layout Plain Layout
3050 outstring
3051 \end_layout
3052
3053 \end_inset
3054
3055  is the string to be inserted into the document.
3056  To define dead keys, use:
3057 \end_layout
3058
3059 \begin_layout Quotation
3060 \begin_inset Flex Code
3061 status collapsed
3062
3063 \begin_layout Plain Layout
3064
3065 \backslash
3066 kmod
3067 \end_layout
3068
3069 \end_inset
3070
3071  
3072 \begin_inset Flex Code
3073 status collapsed
3074
3075 \begin_layout Plain Layout
3076 key
3077 \end_layout
3078
3079 \end_inset
3080
3081  deadkey
3082 \end_layout
3083
3084 \begin_layout Standard
3085 where 
3086 \begin_inset Flex Code
3087 status collapsed
3088
3089 \begin_layout Plain Layout
3090 key
3091 \end_layout
3092
3093 \end_inset
3094
3095  is a keyboard key and 
3096 \begin_inset Flex Code
3097 status collapsed
3098
3099 \begin_layout Plain Layout
3100 deadkey
3101 \end_layout
3102
3103 \end_inset
3104
3105  is dead key name.
3106  The following dead keys are supported (shortcut name is in parentheses):
3107 \end_layout
3108
3109 \begin_layout Quotation
3110
3111 \emph on
3112 Name
3113 \begin_inset space \hfill{}
3114 \end_inset
3115
3116 Example
3117 \end_layout
3118
3119 \begin_layout Quotation
3120 acute (acu)
3121 \begin_inset space \hfill{}
3122 \end_inset
3123
3124
3125 \lang english
3126 áéíóú
3127 \end_layout
3128
3129 \begin_layout Quotation
3130 grave (gra)
3131 \begin_inset space \hfill{}
3132 \end_inset
3133
3134
3135 \lang english
3136 àèìòù
3137 \end_layout
3138
3139 \begin_layout Quotation
3140 macron (mac)
3141 \begin_inset space \hfill{}
3142 \end_inset
3143
3144
3145 \lang english
3146  ō
3147 \end_layout
3148
3149 \begin_layout Quotation
3150 tilde (til)
3151 \begin_inset space \hfill{}
3152 \end_inset
3153
3154
3155 \lang english
3156 ñÑ
3157 \end_layout
3158
3159 \begin_layout Quotation
3160 underbar (underb)
3161 \begin_inset space \hfill{}
3162 \end_inset
3163
3164
3165 \begin_inset ERT
3166 status open
3167
3168 \begin_layout Plain Layout
3169
3170
3171 \backslash
3172 b o
3173 \end_layout
3174
3175 \end_inset
3176
3177
3178 \end_layout
3179
3180 \begin_layout Quotation
3181 cedilla (ced)
3182 \begin_inset space \hfill{}
3183 \end_inset
3184
3185
3186 \lang english
3187 çÇ
3188 \end_layout
3189
3190 \begin_layout Quotation
3191 underdot (underd)
3192 \begin_inset space \hfill{}
3193 \end_inset
3194
3195
3196 \begin_inset ERT
3197 status open
3198
3199 \begin_layout Plain Layout
3200
3201
3202 \backslash
3203 d o
3204 \end_layout
3205
3206 \end_inset
3207
3208
3209 \end_layout
3210
3211 \begin_layout Quotation
3212 circumflex (circu)
3213 \begin_inset space \hfill{}
3214 \end_inset
3215
3216
3217 \lang english
3218 âêîôû
3219 \end_layout
3220
3221 \begin_layout Quotation
3222 circle (circl)
3223 \begin_inset space \hfill{}
3224 \end_inset
3225
3226
3227 \lang english
3228 ÅůŮ
3229 \end_layout
3230
3231 \begin_layout Quotation
3232 tie (tie)
3233 \begin_inset space \hfill{}
3234 \end_inset
3235
3236
3237 \begin_inset ERT
3238 status open
3239
3240 \begin_layout Plain Layout
3241
3242
3243 \backslash
3244 t o
3245 \end_layout
3246
3247 \end_inset
3248
3249
3250 \end_layout
3251
3252 \begin_layout Quotation
3253 breve (bre)
3254 \begin_inset space \hfill{}
3255 \end_inset
3256
3257
3258 \lang english
3259 ă
3260 \lang japanese
3261
3262 \begin_inset ERT
3263 status open
3264
3265 \begin_layout Plain Layout
3266
3267
3268 \backslash
3269 u o
3270 \end_layout
3271
3272 \end_inset
3273
3274
3275 \end_layout
3276
3277 \begin_layout Quotation
3278 caron (car)
3279 \begin_inset space \hfill{}
3280 \end_inset
3281
3282
3283 \lang english
3284 čšž
3285 \end_layout
3286
3287 \begin_layout Quotation
3288 hungarian umlaut (hug)
3289 \begin_inset space \hfill{}
3290 \end_inset
3291
3292
3293 \lang english
3294 őű
3295 \end_layout
3296
3297 \begin_layout Quotation
3298 umlaut (uml)
3299 \begin_inset space \hfill{}
3300 \end_inset
3301
3302
3303 \lang english
3304 äöü
3305 \end_layout
3306
3307 \begin_layout Quotation
3308 dot (dot)
3309 \begin_inset space \hfill{}
3310 \end_inset
3311
3312
3313 \lang english
3314 ż
3315 \lang japanese
3316
3317 \begin_inset ERT
3318 status open
3319
3320 \begin_layout Plain Layout
3321
3322
3323 \backslash
3324 .s
3325 \end_layout
3326
3327 \end_inset
3328
3329
3330 \end_layout
3331
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
3335 \end_layout
3336
3337 \begin_layout Quotation
3338 \begin_inset Flex Code
3339 status collapsed
3340
3341 \begin_layout Plain Layout
3342
3343 \backslash
3344 kxmod
3345 \end_layout
3346
3347 \end_inset
3348
3349  deadkey key outstring
3350 \end_layout
3351
3352 \begin_layout Standard
3353 For example, on Slovak keyboard, if you enter caron-o, it generates circumflex-o
3354 , so you put in
3355 \end_layout
3356
3357 \begin_layout Quotation
3358 \begin_inset Flex Code
3359 status collapsed
3360
3361 \begin_layout Plain Layout
3362
3363 \backslash
3364 kxmod
3365 \end_layout
3366
3367 \end_inset
3368
3369  caron o "
3370 \backslash
3371 ^o"
3372 \end_layout
3373
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.
3379 \end_layout
3380
3381 \begin_layout Standard
3382 Oh, and about characters: backslash is escaped, so to enter it, you'll need
3383  double backslash.
3384  Also, quotes and 
3385 \begin_inset Flex Code
3386 status collapsed
3387
3388 \begin_layout Plain Layout
3389 #
3390 \end_layout
3391
3392 \end_inset
3393
3394  have different meaning.
3395  
3396 \begin_inset Flex Code
3397 status collapsed
3398
3399 \begin_layout Plain Layout
3400 #
3401 \end_layout
3402
3403 \end_inset
3404
3405  marks comments, quotes start and end LaTeX-style commands.
3406  To enter quote, you'll need to use 
3407 \begin_inset Flex Code
3408 status collapsed
3409
3410 \begin_layout Plain Layout
3411
3412 \backslash
3413 "
3414 \end_layout
3415
3416 \end_inset
3417
3418 , to enter 
3419 \begin_inset Flex Code
3420 status collapsed
3421
3422 \begin_layout Plain Layout
3423 #
3424 \end_layout
3425
3426 \end_inset
3427
3428 , use 
3429 \begin_inset Flex Code
3430 status collapsed
3431
3432 \begin_layout Plain Layout
3433
3434 \backslash
3435 #
3436 \end_layout
3437
3438 \end_inset
3439
3440 .
3441 \end_layout
3442
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.
3446 \end_layout
3447
3448 \begin_layout Standard
3449 More keywords will be supported in keymap configuration file in future,
3450  like
3451 \end_layout
3452
3453 \begin_layout Itemize
3454 \begin_inset Flex Code
3455 status collapsed
3456
3457 \begin_layout Plain Layout
3458
3459 \backslash
3460 kinclude filename
3461 \end_layout
3462
3463 \end_inset
3464
3465
3466 \emph on
3467
3468 \begin_inset space \hfill{}
3469 \end_inset
3470
3471
3472 \begin_inset Flex Code
3473 status collapsed
3474
3475 \begin_layout Plain Layout
3476 include
3477 \end_layout
3478
3479 \end_inset
3480
3481  another file
3482 \end_layout
3483
3484 \begin_layout Itemize
3485 \begin_inset Flex Code
3486 status collapsed
3487
3488 \begin_layout Plain Layout
3489
3490 \backslash
3491 kprog program
3492 \end_layout
3493
3494 \end_inset
3495
3496
3497 \emph on
3498
3499 \begin_inset space \hfill{}
3500 \end_inset
3501
3502
3503 \begin_inset Flex Code
3504 status collapsed
3505
3506 \begin_layout Plain Layout
3507 define
3508 \end_layout
3509
3510 \end_inset
3511
3512  an external keymap translation program 
3513 \end_layout
3514
3515 \begin_layout Standard
3516 Also, it should look into 
3517 \begin_inset Flex Code
3518 status collapsed
3519
3520 \begin_layout Plain Layout
3521 lyxrc
3522 \end_layout
3523
3524 \end_inset
3525
3526  file for defaults, too (for example, a 
3527 \begin_inset Flex Code
3528 status collapsed
3529
3530 \begin_layout Plain Layout
3531
3532 \backslash
3533 kinclude
3534 \end_layout
3535
3536 \end_inset
3537
3538  option to include default keyboard).
3539 \end_layout
3540
3541 \end_inset
3542
3543
3544 \end_layout
3545
3546 \begin_layout Section
3547 国際キー配列
3548 \begin_inset CommandInset label
3549 LatexCommand label
3550 name "sec:国際キー配列"
3551
3552 \end_inset
3553
3554
3555 \end_layout
3556
3557 \begin_layout Standard
3558 \begin_inset Note Note
3559 status open
3560
3561 \begin_layout Plain Layout
3562 2008年3月にこの文書を改訂するに当たって、改訂者が本節の内容に詳しくなかったために、本節は改訂されていません。他に改訂してくださる方がおられれば幸いです。
3563 \end_layout
3564
3565 \begin_layout Plain Layout
3566 (RH)
3567 \end_layout
3568
3569 \end_inset
3570
3571
3572 \end_layout
3573
3574 \begin_layout Standard
3575 以下の2節では、
3576 \begin_inset Flex Code
3577 status collapsed
3578
3579 \begin_layout Plain Layout
3580 .kmap
3581 \end_layout
3582
3583 \end_inset
3584
3585 および
3586 \begin_inset Flex Code
3587 status collapsed
3588
3589 \begin_layout Plain Layout
3590 .cdef
3591 \end_layout
3592
3593 \end_inset
3594
3595 ファイルの文法を詳細に解説します。これらの節は、提供されているキー配列があなたのニーズに合わない場合に、自身用のキー配列をデザインする手助けとなるでしょう。
3596 \end_layout
3597
3598 \begin_layout Subsection
3599 .kmapファイル
3600 \end_layout
3601
3602 \begin_layout Standard
3603 \begin_inset Flex Code
3604 status collapsed
3605
3606 \begin_layout Plain Layout
3607 .kmap
3608 \end_layout
3609
3610 \end_inset
3611
3612 ファイルは、打鍵したものを文字や文字列に割り当てます。名前が示唆するように、これはキーボード配列表を定義します。
3613 \begin_inset Flex Code
3614 status collapsed
3615
3616 \begin_layout Plain Layout
3617 .kmap
3618 \end_layout
3619
3620 \end_inset
3621
3622 ファイルは、以下の各項で説明するように、
3623 \begin_inset Flex Code
3624 status collapsed
3625
3626 \begin_layout Plain Layout
3627 kmap
3628 \end_layout
3629
3630 \end_inset
3631
3632
3633 \begin_inset Flex Code
3634 status collapsed
3635
3636 \begin_layout Plain Layout
3637 kmod
3638 \end_layout
3639
3640 \end_inset
3641
3642
3643 \begin_inset Flex Code
3644 status collapsed
3645
3646 \begin_layout Plain Layout
3647 ksmod
3648 \end_layout
3649
3650 \end_inset
3651
3652
3653 \begin_inset Flex Code
3654 status collapsed
3655
3656 \begin_layout Plain Layout
3657 kcomb
3658 \end_layout
3659
3660 \end_inset
3661
3662 のキーワードを定義します。
3663 \end_layout
3664
3665 \begin_layout Labeling
3666 \labelwidthstring 00.00.0000
3667 \begin_inset Flex Code
3668 status collapsed
3669
3670 \begin_layout Plain Layout
3671 kmap
3672 \end_layout
3673
3674 \end_inset
3675
3676  文字を文字列に割り当てる
3677 \end_layout
3678
3679 \begin_layout LyX-Code
3680
3681 \backslash
3682 kmap 
3683 \family roman
3684 \emph on
3685 文字
3686 \family default
3687 \emph default
3688  
3689 \family roman
3690 \emph on
3691 文字列
3692 \end_layout
3693
3694 \begin_layout Standard
3695 これは、
3696 \emph on
3697 文字
3698 \emph default
3699
3700 \emph on
3701 文字列
3702 \emph default
3703 に割り当てます。
3704 \emph on
3705 文字列
3706 \emph default
3707 中では、二重引用符(")とバックスラッシュ(
3708 \backslash
3709 )は、前にバックスラッシュ(
3710 \backslash
3711 )を付けてエスケープしなくてはならないことに注意してください。
3712 \end_layout
3713
3714 \begin_layout Standard
3715 \begin_inset Flex MenuItem
3716 status collapsed
3717
3718 \begin_layout Plain Layout
3719 &
3720 \end_layout
3721
3722 \end_inset
3723
3724 を打鍵すると
3725 \begin_inset Flex MenuItem
3726 status collapsed
3727
3728 \begin_layout Plain Layout
3729 /
3730 \end_layout
3731
3732 \end_inset
3733
3734 記号が出力される
3735 \begin_inset Flex MenuItem
3736 status collapsed
3737
3738 \begin_layout Plain Layout
3739 kmap
3740 \end_layout
3741
3742 \end_inset
3743
3744 ステートメントを、一例としてあげると、
3745 \end_layout
3746
3747 \begin_layout LyX-Code
3748
3749 \backslash
3750 kmap & /
3751 \end_layout
3752
3753 \begin_layout Standard
3754 のようになります。
3755 \end_layout
3756
3757 \begin_layout Labeling
3758 \labelwidthstring 00.00.0000
3759 \begin_inset Flex Code
3760 status collapsed
3761
3762 \begin_layout Plain Layout
3763 kmod
3764 \end_layout
3765
3766 \end_inset
3767
3768  アクセント文字を指定する
3769 \end_layout
3770
3771 \begin_layout LyX-Code
3772
3773 \backslash
3774 kmod 
3775 \family roman
3776 \emph on
3777 文字 アクセント 許可文字
3778 \end_layout
3779
3780 \begin_layout Standard
3781 これは
3782 \emph on
3783 文字
3784 \emph default
3785
3786 \emph on
3787 許可文字
3788 \emph default
3789 のアクセントとするものです。これはデッドキー
3790 \begin_inset Foot
3791 status collapsed
3792
3793 \begin_layout Plain Layout
3794
3795 \emph on
3796 デッドキー
3797 \emph default
3798 という用語は、それ自身で文字を出力しないけれども、別のキーを続けて打つと、望んだアクセント文字を出力するキーのことを指し示します。たとえば、独語で
3799 \emph on
3800 ä
3801 \emph default
3802 のようなウムラウトのついた文字は、このようにして出すことができます。
3803 \end_layout
3804
3805 \end_inset
3806
3807 機構です。
3808 \end_layout
3809
3810 \begin_layout Standard
3811
3812 \emph on
3813 文字
3814 \emph default
3815 を打鍵してから
3816 \emph on
3817 許可文字
3818 \emph default
3819 にないキーを打鍵すると、
3820 \emph on
3821 文字
3822 \emph default
3823 の後に許可文字ではないその文字が出力として表示されます。
3824 \begin_inset Flex MenuItem
3825 status collapsed
3826
3827 \begin_layout Plain Layout
3828 Backspace
3829 \end_layout
3830
3831 \end_inset
3832
3833 はデッドキーを取り消しますので、
3834 \emph on
3835 文字
3836 \emph default
3837
3838 \begin_inset Flex MenuItem
3839 status collapsed
3840
3841 \begin_layout Plain Layout
3842 Backspace
3843 \end_layout
3844
3845 \end_inset
3846
3847 と打鍵すると、カーソルは一文字戻ることなく、文字が次の打鍵したものに及ぼしたはずの効力を取り消します。
3848 \end_layout
3849
3850 \begin_layout Standard
3851 以下の例は、'文字をacuteアクセントとして、a・e・i・o・u・A・E・I・O・Uの文字に許可するものです。
3852 \end_layout
3853
3854 \begin_layout LyX-Code
3855
3856 \backslash
3857 kmod ' acute aeiouAEIOU
3858 \end_layout
3859
3860 \begin_layout Labeling
3861 \labelwidthstring 00.00.0000
3862 \begin_inset Flex Code
3863 status collapsed
3864
3865 \begin_layout Plain Layout
3866 ksmod
3867 \end_layout
3868
3869 \end_inset
3870
3871  アクセント文字に例外を指定する
3872 \end_layout
3873
3874 \begin_layout LyX-Code
3875
3876 \backslash
3877 kxmod  
3878 \family roman
3879 \emph on
3880 アクセント 文字 結果
3881 \end_layout
3882
3883 \begin_layout Standard
3884 これは
3885 \emph on
3886 文字
3887 \emph default
3888 上の
3889 \emph on
3890 アクセント
3891 \emph default
3892 について例外を指定するものです。ここで
3893 \emph on
3894 アクセント
3895 \emph default
3896 には、前出の
3897 \begin_inset Flex Code
3898 status collapsed
3899
3900 \begin_layout Plain Layout
3901
3902 \backslash
3903 kmod
3904 \end_layout
3905
3906 \end_inset
3907
3908 宣言で打鍵キーを既に割り当てられてなくてはならず、
3909 \emph on
3910 文字
3911 \emph default
3912
3913 \emph on
3914 アクセント
3915 \emph default
3916
3917 \emph on
3918 許可文字
3919 \emph default
3920 の集合に属していてはなりません。こうして
3921 \emph on
3922 アクセント
3923 \emph default
3924
3925 \emph on
3926 文字
3927 \emph default
3928 の順に入力すると、
3929 \emph on
3930 結果
3931 \emph default
3932 が出力されるようになります。
3933 \begin_inset Flex Code
3934 status collapsed
3935
3936 \begin_layout Plain Layout
3937 .kmap
3938 \end_layout
3939
3940 \end_inset
3941
3942 ファイルにこの宣言がない場合には、
3943 \emph on
3944 アクセント
3945 \emph default
3946
3947 \emph on
3948 文字
3949 \emph default
3950 と入力すると、
3951 \emph on
3952 アクセントキー
3953 \emph default
3954
3955 \emph on
3956 文字
3957 \emph default
3958
3959 \emph on
3960 アクセントキー
3961 \emph default
3962
3963 \begin_inset Flex Code
3964 status collapsed
3965
3966 \begin_layout Plain Layout
3967
3968 \backslash
3969 kmod
3970 \end_layout
3971
3972 \end_inset
3973
3974 宣言の最初の変数)と出力されます。
3975 \end_layout
3976
3977 \begin_layout Standard
3978 以下のコマンドを用いると、acute-i('i)と入力した場合、äiと出力されるようになります。
3979 \end_layout
3980
3981 \begin_layout LyX-Code
3982
3983 \backslash
3984 kxmod acute i "
3985 \backslash
3986
3987 \backslash
3988 '{
3989 \backslash
3990
3991 \backslash
3992 i}"
3993 \end_layout
3994
3995 \begin_layout Labeling
3996 \labelwidthstring 00.00.0000
3997 \begin_inset Flex Code
3998 status collapsed
3999
4000 \begin_layout Plain Layout
4001 kcomb
4002 \end_layout
4003
4004 \end_inset
4005
4006  2つのアクセント文字を結合する
4007 \end_layout
4008
4009 \begin_layout LyX-Code
4010
4011 \backslash
4012 kcomb 
4013 \family roman
4014 \emph on
4015 アクセント1 アクセント2 許可文字
4016 \end_layout
4017
4018 \begin_layout Standard
4019 これはなかなか難解になってきます。これは
4020 \emph on
4021 アクセント1
4022 \emph default
4023
4024 \emph on
4025 アクセント2
4026 \emph default
4027 を(この順番で)結びつけて、
4028 \emph on
4029 許可文字
4030 \emph default
4031 に効果を及ぼすようにします。
4032 \emph on
4033 アクセント1
4034 \emph default
4035
4036 \emph on
4037 アクセント2
4038 \emph default
4039 の打鍵キーは、ファイル内のこのコマンド
4040 \emph on
4041 よりも前に
4042 \emph default
4043
4044 \begin_inset Flex Code
4045 status collapsed
4046
4047 \begin_layout Plain Layout
4048
4049 \backslash
4050 kmod
4051 \end_layout
4052
4053 \end_inset
4054
4055 コマンドで設定されていなくてはなりません。
4056 \end_layout
4057
4058 \begin_layout Standard
4059 \begin_inset Flex Code
4060 status collapsed
4061
4062 \begin_layout Plain Layout
4063 greek.kmap
4064 \end_layout
4065
4066 \end_inset
4067
4068 ファイル上にある例をとってみましょう。
4069 \end_layout
4070
4071 \begin_layout LyX-Code
4072
4073 \backslash
4074 kmod ; acute aeioyvhAEIOYVH 
4075 \backslash
4076 kmod : umlaut iyIY 
4077 \backslash
4078 kcomb acute umlaut iyIY
4079 \end_layout
4080
4081 \begin_layout Standard
4082 これは
4083 \begin_inset Flex MenuItem
4084 status collapsed
4085
4086 \begin_layout Plain Layout
4087 ;:i
4088 \end_layout
4089
4090 \end_inset
4091
4092 を押すと
4093 \begin_inset Flex Code
4094 status collapsed
4095
4096 \begin_layout Plain Layout
4097
4098 \backslash
4099 '{
4100 \backslash
4101 "{i}}
4102 \end_layout
4103
4104 \end_inset
4105
4106 という効果を得るようにするものです。この場合のバックスペースは、最後のデッドキーを取り消すので、
4107 \begin_inset Flex MenuItem
4108 status collapsed
4109
4110 \begin_layout Plain Layout
4111 ;: Backspace i
4112 \end_layout
4113
4114 \end_inset
4115
4116 と押した場合には、
4117 \begin_inset Flex Code
4118 status collapsed
4119
4120 \begin_layout Plain Layout
4121
4122 \backslash
4123 '{i}
4124 \end_layout
4125
4126 \end_inset
4127
4128 となります。
4129 \end_layout
4130
4131 \begin_layout Subsection
4132 .cdefファイル
4133 \end_layout
4134
4135 \begin_layout Standard
4136 \begin_inset Flex Code
4137 status collapsed
4138
4139 \begin_layout Plain Layout
4140 .kmap
4141 \end_layout
4142
4143 \end_inset
4144
4145 による割り当てが行われた後、
4146 \begin_inset Flex Code
4147 status collapsed
4148
4149 \begin_layout Plain Layout
4150 .cdef
4151 \end_layout
4152
4153 \end_inset
4154
4155 ファイルは、記号の作り出す文字列を現在のフォントの文字に割り当てます。LyX頒布版には、現在のところ、少なくとも
4156 \begin_inset Flex Code
4157 status collapsed
4158
4159 \begin_layout Plain Layout
4160 iso8859-1.cdef
4161 \end_layout
4162
4163 \end_inset
4164
4165 ファイルと
4166 \begin_inset Flex Code
4167 status collapsed
4168
4169 \begin_layout Plain Layout
4170 iso8859-2.cdef
4171 \end_layout
4172
4173 \end_inset
4174
4175 ファイルが含まれています。
4176 \end_layout
4177
4178 \begin_layout Standard
4179 一般的に
4180 \begin_inset Flex Code
4181 status collapsed
4182
4183 \begin_layout Plain Layout
4184 .cdef
4185 \end_layout
4186
4187 \end_inset
4188
4189 ファイルは、
4190 \end_layout
4191
4192 \begin_layout LyX-Code
4193
4194 \family roman
4195 \emph on
4196 セット中の文字番号
4197 \family default
4198 \emph default
4199  
4200 \family roman
4201 \emph on
4202  文字列
4203 \end_layout
4204
4205 \begin_layout Standard
4206 という形の宣言の羅列です。たとえば、
4207 \begin_inset Flex MenuItem
4208 status collapsed
4209
4210 \begin_layout Plain Layout
4211
4212 \backslash
4213 '{e}
4214 \end_layout
4215
4216 \end_inset
4217
4218 をiso-8859-1セットの対応する文字(233)に割り当てるには、以下の宣言を用います。
4219 \end_layout
4220
4221 \begin_layout LyX-Code
4222 233 "
4223 \backslash
4224
4225 \backslash
4226 '{e}"
4227 \end_layout
4228
4229 \begin_layout Standard
4230 ここで、
4231 \emph on
4232 文字列
4233 \emph default
4234 中の
4235 \begin_inset Flex Code
4236 status collapsed
4237
4238 \begin_layout Plain Layout
4239
4240 \backslash
4241
4242 \end_layout
4243
4244 \end_inset
4245
4246
4247 \begin_inset Flex Code
4248 status collapsed
4249
4250 \begin_layout Plain Layout
4251 "
4252 \end_layout
4253
4254 \end_inset
4255
4256 はエスケープされています。同一の文字を二つ以上の文字列に充てることができることに注意してください。
4257 \begin_inset Flex Code
4258 status collapsed
4259
4260 \begin_layout Plain Layout
4261 iso-8859-7.cdef
4262 \end_layout
4263
4264 \end_inset
4265
4266 ファイルには、
4267 \end_layout
4268
4269 \begin_layout LyX-Code
4270 192 "
4271 \backslash
4272
4273 \backslash
4274 '{
4275 \backslash
4276
4277 \backslash
4278
4279 \backslash
4280 "{i}}"
4281 \begin_inset Newline newline
4282 \end_inset
4283
4284 192 "
4285 \backslash
4286
4287 \backslash
4288
4289 \backslash
4290 "{
4291 \backslash
4292
4293 \backslash
4294 '{i}}"
4295 \end_layout
4296
4297 \begin_layout Standard
4298 という例があります。LyXは、キー打鍵やデッドキーの組み合わせで生成される文字列の割り当てを見つけることができないとき、それがアクセント付き文字のように解釈がで
4299 きないかどうかチェックして、画面上の文字にアクセントを引くことを試みます。
4300 \end_layout
4301
4302 \begin_layout Subsection
4303 デッドキー
4304 \end_layout
4305
4306 \begin_layout Standard
4307 国際文字のサポートを追加する第2の方法として、いわゆるデッドキーによる方法があります。デッドキーは文字と一緒に用いて、アクセント付き文字を生成します。ここではそ
4308 の機能を説明するために、きわめて単純なデッドキーの作り方を説明します。
4309 \end_layout
4310
4311 \begin_layout Standard
4312 仮に、曲折アクセント記号「 ̂」が必要になったものとしましょう。この場合、自身の
4313 \begin_inset Flex Code
4314 status collapsed
4315
4316 \begin_layout Plain Layout
4317 lyxrc
4318 \end_layout
4319
4320 \end_inset
4321
4322 ファイル中で、
4323 \begin_inset Flex MenuItem
4324 status collapsed
4325
4326 \begin_layout Plain Layout
4327 ^
4328 \end_layout
4329
4330 \end_inset
4331
4332 キー(すなわち
4333 \begin_inset Flex MenuItem
4334 status collapsed
4335
4336 \begin_layout Plain Layout
4337 Shift-6
4338 \end_layout
4339
4340 \end_inset
4341
4342 キー)を、LyXコマンドの
4343 \begin_inset Flex Code
4344 status collapsed
4345
4346 \begin_layout Plain Layout
4347 accent-circumflex
4348 \end_layout
4349
4350 \end_inset
4351
4352 に結びつけることができます。すると
4353 \begin_inset Flex MenuItem
4354 status collapsed
4355
4356 \begin_layout Plain Layout
4357 ^
4358 \end_layout
4359
4360 \end_inset
4361
4362 キーの後に文字を打ったときはいつでも、この文字上に曲折アクセントが付けられるようになります。たとえば「
4363 \begin_inset Flex MenuItem
4364 status collapsed
4365
4366 \begin_layout Plain Layout
4367 ^e
4368 \end_layout
4369
4370 \end_inset
4371
4372 」という打鍵順は「ê」という文字を生成します。しかしながら、もし「
4373 \begin_inset Flex MenuItem
4374 status collapsed
4375
4376 \begin_layout Plain Layout
4377 ^t
4378 \end_layout
4379
4380 \end_inset
4381
4382 」と打鍵したならば、「
4383 \begin_inset Flex MenuItem
4384 status collapsed
4385
4386 \begin_layout Plain Layout
4387 t
4388 \end_layout
4389
4390 \end_inset
4391
4392 」は曲折アクセントをとることは決してないために、LyXはビープを鳴らして文句を付けます。デッドキーの後に
4393 \begin_inset Flex MenuItem
4394 status collapsed
4395
4396 \begin_layout Plain Layout
4397 スペース
4398 \end_layout
4399
4400 \end_inset
4401
4402 を打つと、アクセントだけが生成されます。この最後の点に注意してください。あるキーをデッドキーに割り当てる場合には、このキー上の文字を別のキーに割り当て直す必要が
4403 あります。たとえば、
4404 \begin_inset Flex MenuItem
4405 status collapsed
4406
4407 \begin_layout Plain Layout
4408 ,キー
4409 \end_layout
4410
4411 \end_inset
4412
4413 をセディーユに割り当てるのはよくありません。コンマを入力しようとすると必ずセディーユが出てくるようになるためです。
4414 \end_layout
4415
4416 \begin_layout Standard
4417 デッドキーを割り当てるのによく用いられる方法は、
4418 \begin_inset Flex MenuItem
4419 status collapsed
4420
4421 \begin_layout Plain Layout
4422 Meta-
4423 \end_layout
4424
4425 \end_inset
4426
4427
4428 \begin_inset Flex MenuItem
4429 status collapsed
4430
4431 \begin_layout Plain Layout
4432 Ctrl-
4433 \end_layout
4434
4435 \end_inset
4436
4437
4438 \begin_inset Flex MenuItem
4439 status collapsed
4440
4441 \begin_layout Plain Layout
4442 Shift-
4443 \end_layout
4444
4445 \end_inset
4446
4447 キーを、「
4448 \begin_inset Flex MenuItem
4449 status collapsed
4450
4451 \begin_layout Plain Layout
4452 ~
4453 \end_layout
4454
4455 \end_inset
4456
4457 」・「
4458 \begin_inset Flex MenuItem
4459 status collapsed
4460
4461 \begin_layout Plain Layout
4462 ,
4463 \end_layout
4464
4465 \end_inset
4466
4467 」・「
4468 \begin_inset Flex MenuItem
4469 status collapsed
4470
4471 \begin_layout Plain Layout
4472 ^
4473 \end_layout
4474
4475 \end_inset
4476
4477 」のようなアクセントと一緒に用いる方法です。また、
4478 \begin_inset Flex Code
4479 status collapsed
4480
4481 \begin_layout Plain Layout
4482 xmodmap
4483 \end_layout
4484
4485 \end_inset
4486
4487
4488 \begin_inset Flex Code
4489 status collapsed
4490
4491 \begin_layout Plain Layout
4492 xkeycaps
4493 \end_layout
4494
4495 \end_inset
4496
4497 を使って、特別な
4498 \begin_inset Flex Code
4499 status collapsed
4500
4501 \begin_layout Plain Layout
4502 Mode_Switch
4503 \end_layout
4504
4505 \end_inset
4506
4507 キーを設定する方法もあります。
4508 \begin_inset Flex Code
4509 status collapsed
4510
4511 \begin_layout Plain Layout
4512 Mode_Switch
4513 \end_layout
4514
4515 \end_inset
4516
4517 キーは、ちょうど
4518 \begin_inset Flex MenuItem
4519 status collapsed
4520
4521 \begin_layout Plain Layout
4522 Shift
4523 \end_layout
4524
4525 \end_inset
4526
4527 キーのように機能するので、アクセント文字を割り当てるのに使用できます。また、特定のキーを
4528 \begin_inset Flex Code
4529 status collapsed
4530
4531 \begin_layout Plain Layout
4532 usldead_cedilla
4533 \end_layout
4534
4535 \end_inset
4536
4537 などに割り当てることで、これらのキーをデッドキーに仕立て、このシンボリックキーを対応するLyXコマンドに割り当てることもできます
4538 \begin_inset Foot
4539 status collapsed
4540
4541 \begin_layout Plain Layout
4542
4543 \noun on
4544 John Weiss
4545 \noun default
4546 からの註:これはまさに私が、自分の
4547 \begin_inset Flex Code
4548 status collapsed
4549
4550 \begin_layout Plain Layout
4551 ~/.lyx/lyxrc
4552 \end_layout
4553
4554 \end_inset
4555
4556
4557 \begin_inset Flex Code
4558 status collapsed
4559
4560 \begin_layout Plain Layout
4561 ~/.xmodmap
4562 \end_layout
4563
4564 \end_inset
4565
4566 で行っていることです。私は、
4567 \begin_inset Flex MenuItem
4568 status collapsed
4569
4570 \begin_layout Plain Layout
4571 Scroll
4572 \begin_inset space ~
4573 \end_inset
4574
4575 Lock
4576 \end_layout
4577
4578 \end_inset
4579
4580 キーを
4581 \begin_inset Flex Code
4582 status collapsed
4583
4584 \begin_layout Plain Layout
4585 Mode_Shift
4586 \end_layout
4587
4588 \end_inset
4589
4590 に仕立てて、多数の
4591 \begin_inset Flex Code
4592 status collapsed
4593
4594 \begin_layout Plain Layout
4595 usldead_*
4596 \end_layout
4597
4598 \end_inset
4599
4600 シンボリックキーを
4601 \begin_inset Flex MenuItem
4602 status collapsed
4603
4604 \begin_layout Plain Layout
4605 Scroll
4606 \begin_inset space ~
4607 \end_inset
4608
4609 Lock-^
4610 \end_layout
4611
4612 \end_inset
4613
4614
4615 \begin_inset Flex MenuItem
4616 status collapsed
4617
4618 \begin_layout Plain Layout
4619 Scroll
4620 \begin_inset space ~
4621 \end_inset
4622
4623 Lock-~
4624 \end_layout
4625
4626 \end_inset
4627
4628 などに割り当てています。私はこの方法でアクセント文字を入力しています。
4629 \end_layout
4630
4631 \end_inset
4632
4633 。この
4634 \begin_inset Flex Code
4635 status collapsed
4636
4637 \begin_layout Plain Layout
4638 Mode_Switch
4639 \end_layout
4640
4641 \end_inset
4642
4643 キーには、
4644 \begin_inset Flex MenuItem
4645 status collapsed
4646
4647 \begin_layout Plain Layout
4648 Ctrl-
4649 \end_layout
4650
4651 \end_inset
4652
4653 キーの片方や使われていないファンクションキーなど、ほぼ何でも指定することができます。アクセントを生み出すLyXコマンドについては、
4654 \emph on
4655 LyX関数説明書
4656 \emph default
4657
4658 \begin_inset Flex Code
4659 status collapsed
4660
4661 \begin_layout Plain Layout
4662 LFUN_ACCENT_*
4663 \end_layout
4664
4665 \end_inset
4666
4667 の項をご覧ください。ここには完備した一覧があります。
4668 \end_layout
4669
4670 \begin_layout Subsection
4671 自分の言語設定を保存する
4672 \end_layout
4673
4674 \begin_layout Standard
4675 \begin_inset Flex MenuItem
4676 status collapsed
4677
4678 \begin_layout Plain Layout
4679 ツール\SpecialChar \menuseparator
4680 設定
4681 \end_layout
4682
4683 \end_inset
4684
4685 ダイアログを使えば、LyXを起動したときに、ご希望の言語環境に自動的に設定されるように、設定を編集することができます。
4686 \end_layout
4687
4688 \begin_layout Chapter
4689 文書クラスやレイアウトやひな型を新規に導入する
4690 \begin_inset CommandInset label
4691 LatexCommand label
4692 name "cha:新規文書を導入"
4693
4694 \end_inset
4695
4696
4697 \begin_inset Argument
4698 status collapsed
4699
4700 \begin_layout Plain Layout
4701 文書クラスを新規に導入する
4702 \end_layout
4703
4704 \end_inset
4705
4706
4707 \end_layout
4708
4709 \begin_layout Standard
4710 この章では、新しくLyXのレイアウトファイルやひな型ファイルを作成して、導入する手順を説明すると共に、新規にLaTeX文書クラス(ドキュメントクラス)を正しく導
4711 入する方法を復習します。
4712 \end_layout
4713
4714 \begin_layout Standard
4715 まず、LyXとLaTeXの間の関係をどのように考えるべきか、若干の注釈を加えておくことにしましょう。理解していただきたいことは、ある意味において、LyXは、La
4716 TeXについて何も知らないと云うことです。実際のところ、LyXの観点からは、LaTeXは、LyXが出力を生成することができる、複数の「バックエンド書式」のうちの
4717 一つに過ぎないということです。同種のバックエンド書式には、DocBook・平文・XHTMLがあります。もちろんLaTeXは、とくに重要な書式ですが、LyXがLa
4718 TeXについて持っている情報のほとんどは、実はプログラム本体には含まれていないのです
4719 \begin_inset Foot
4720 status collapsed
4721
4722 \begin_layout Plain Layout
4723 過度に複雑なため、LyXに「ハードコード化」されているコマンドもありますが、一般的に開発者は、これを「わるいこと」とみなしています。
4724 \end_layout
4725
4726 \end_inset
4727
4728 。このような情報は、
4729 \begin_inset Flex Code
4730 status collapsed
4731
4732 \begin_layout Plain Layout
4733 article.cls
4734 \end_layout
4735
4736 \end_inset
4737
4738 のような標準クラスでも、「レイアウトファイル」に保管されています。同様に、LyXは、DocBookやXHTMLについてもほとんど知りません。LyXが知っているこ
4739 とは、レイアウトファイルの中にあります。
4740 \end_layout
4741
4742 \begin_layout Standard
4743 文書クラス用のレイアウトファイルは、LyX構成体---対応する様式や何らかの差込枠などを有する段落群---と、それに対応するLaTeX構成体・DocBook構成
4744 体・XHTML構成体との間の翻訳指南書のようなものです。たとえば、LyXが
4745 \begin_inset Flex Code
4746 status collapsed
4747
4748 \begin_layout Plain Layout
4749 article.cls
4750 \end_layout
4751
4752 \end_inset
4753
4754 について知っていることのほとんど総ては、
4755 \begin_inset Flex Code
4756 status collapsed
4757
4758 \begin_layout Plain Layout
4759 article.layout
4760 \end_layout
4761
4762 \end_inset
4763
4764 と、それが呼び出す他の様々なファイルに書き込まれています。このことから、レイアウトファイルを書こうとする人は、既存のファイルを研究することを勧めます。とっかかり
4765 としては、
4766 \begin_inset Flex Code
4767 status collapsed
4768
4769 \begin_layout Plain Layout
4770 article.layout
4771 \end_layout
4772
4773 \end_inset
4774
4775
4776 \begin_inset Flex Code
4777 status collapsed
4778
4779 \begin_layout Plain Layout
4780 book.layout
4781 \end_layout
4782
4783 \end_inset
4784
4785 や、文書クラス用の他のレイアウトファイルに取り込まれている
4786 \begin_inset Flex Code
4787 status collapsed
4788
4789 \begin_layout Plain Layout
4790 stdsections.inc
4791 \end_layout
4792
4793 \end_inset
4794
4795 から見始めるのがよいでしょう。このファイルは、節などの定義が為されている場所です。
4796 \begin_inset Flex Code
4797 status collapsed
4798
4799 \begin_layout Plain Layout
4800 stdsections.inc
4801 \end_layout
4802
4803 \end_inset
4804
4805 は、節様式や小節様式などとしてマークされている段落を、対応するLaTeX・DocBook・XHTMLのコマンドやタグにどのように翻訳すべきかをLyXに知らせるも
4806 のです。基本的に
4807 \begin_inset Flex Code
4808 status collapsed
4809
4810 \begin_layout Plain Layout
4811 article.layout
4812 \end_layout
4813
4814 \end_inset
4815
4816 ファイルは、これらの
4817 \begin_inset Flex Code
4818 status collapsed
4819
4820 \begin_layout Plain Layout
4821 std*.inc
4822 \end_layout
4823
4824 \end_inset
4825
4826 ファイルを取り込んでいるだけのものです。
4827 \end_layout
4828
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 ~
4836 \end_inset
4837
4838 LaTeXにどのように翻訳するかをLyXに指示する、(ii)
4839 \begin_inset space ~
4840 \end_inset
4841
4842 それをどのように表示するかをLyXに指示する、という、二つのかなり異なることを行わなくてはならないのです。
4843 \end_layout
4844
4845 \begin_layout Standard
4846 もちろん、LyXの他のバックエンド書式に関しても、ほぼ同じことが言えますが、XHTMLの場合には若干事情が異なり、LyXが、ブラウザ中での段落の表示方法を(CS
4847 Sの形で)出力するにあたって、当該段落をLyXが画面上に出力する仕方の情報を、ある程度利用することができます。しかし、この場合でも、LyXが内部的に行うことと、
4848 外部的に行う物事の間の区別は、依然として有効であり、この2つは独立して制御することができます。詳細に関しては、第
4849 \begin_inset CommandInset ref
4850 LatexCommand ref
4851 reference "sec:XHTML出力のタグ"
4852
4853 \end_inset
4854
4855 節をご覧ください。
4856 \end_layout
4857
4858 \begin_layout Section
4859 新しいLaTeXファイルの導入
4860 \end_layout
4861
4862 \begin_layout Standard
4863 頒布版によっては、LyXで使いたいLaTeXパッケージやクラスファイルが含まれていないことがあるかもしれません。たとえば、オーバーヘッドプロジェクタ用のスライド
4864 を準備するためのパッケージである、FoilTeXがないかもしれません。TeXLive(2008年以降)やMiKTeXのような最近のLaTeX頒布版には、これらの
4865 パッケージを導入するためのユーザーインタフェースが用意されています。たとえば、MiKTeXでは、付属の「Package
4866 \begin_inset space ~
4867 \end_inset
4868
4869 Manager」プログラムを起動すると、利用できるパッケージの一覧を得ることができます。どれかを導入するには、その上で右クリックするかツールバーボタンを押してく
4870 ださい。
4871 \end_layout
4872
4873 \begin_layout Standard
4874 お使いのLaTeX頒布版がこのような「パッケージマネジャー」を提供していなかったり、使用中の頒布版にそのパッケージが入っていない場合には、以下のステップに従って
4875 手動で導入してください。
4876 \end_layout
4877
4878 \begin_layout Enumerate
4879 \begin_inset CommandInset href
4880 LatexCommand href
4881 name "CTAN"
4882 target "http://www.ctan.org/"
4883
4884 \end_inset
4885
4886 などから欲しいパッケージを入手してください。
4887 \end_layout
4888
4889 \begin_layout Enumerate
4890 パッケージに「
4891 \begin_inset Flex Code
4892 status collapsed
4893
4894 \begin_layout Plain Layout
4895 .ins
4896 \end_layout
4897
4898 \end_inset
4899
4900 」で終わるファイル名が入っている場合(FoilTeXがその一例です)は、コンソールを開いて、このファイルのフォルダに移動し、コマンド
4901 \begin_inset Flex Code
4902 status collapsed
4903
4904 \begin_layout Plain Layout
4905 latex foiltex.ins
4906 \end_layout
4907
4908 \end_inset
4909
4910 を実行してください。すると、パッケージが解凍されて、導入すべきすべてのファイルが展開されます。たいていのLaTeXパッケージは圧縮されていないので、このステップ
4911 は飛ばすことができます。
4912 \end_layout
4913
4914 \begin_layout Enumerate
4915 ここで、パッケージを全ユーザーに使用可能にするか自分自身だけで使うかを決定する必要があります。
4916 \end_layout
4917
4918 \begin_deeper
4919 \begin_layout Enumerate
4920 (Linux・OSXなどの)*nix系システムでは、システム上の全ユーザーに新パッケージを利用可能にしたければ、「ローカル」TeXツリーに導入し、そうでなければ
4921 「ユーザー」TeXツリーに導入してください。これらのツリーが存在しない場合にどこに作成すればよいかは、お使いのシステムに依存します。これを見いだすには、
4922 \begin_inset Flex Code
4923 status collapsed
4924
4925 \begin_layout Plain Layout
4926 texmf.cnf
4927 \end_layout
4928
4929 \end_inset
4930
4931 ファイルを参照してください
4932 \begin_inset Foot
4933 status collapsed
4934
4935 \begin_layout Plain Layout
4936 このファイルは、通常
4937 \family sans
4938 $TEXMF/web2c
4939 \family default
4940 ディレクトリにありますが、コマンド
4941 \begin_inset Flex Code
4942 status collapsed
4943
4944 \begin_layout Plain Layout
4945 kpsewhich texmf.cnf
4946 \end_layout
4947
4948 \end_inset
4949
4950 を実行してその場所を見つけることもできます。
4951 \end_layout
4952
4953 \end_inset
4954
4955 。「ローカル」TeXツリーの場所は、
4956 \begin_inset Flex Code
4957 status collapsed
4958
4959 \begin_layout Plain Layout
4960 TEXMFLOCAL
4961 \end_layout
4962
4963 \end_inset
4964
4965 変数で定義されており、通常は
4966 \begin_inset Flex Code
4967 status collapsed
4968
4969 \begin_layout Plain Layout
4970 /usr/local/share/texmf/
4971 \end_layout
4972
4973 \end_inset
4974
4975 のような場所になっています。「ユーザー」TeXツリーの場所は、
4976 \begin_inset Flex Code
4977 status collapsed
4978
4979 \begin_layout Plain Layout
4980 TEXMFHOME
4981 \end_layout
4982
4983 \end_inset
4984
4985 で定義されており、通常は
4986 \begin_inset Flex Code
4987 status collapsed
4988
4989 \begin_layout Plain Layout
4990 $HOME/texmf/
4991 \end_layout
4992
4993 \end_inset
4994
4995 です(もしこれらの変数が事前定義されていなければ、定義しなくてはなりません)。「ローカル」ツリーを作成したり変更したりするには、おそらくroot権限が必要ですが
4996 、「ユーザー」ツリーにはこのような制限はありません。
4997 \begin_inset Newline newline
4998 \end_inset
4999
5000 一般的に、システムをアップグレードした際に、ユーザーが修正されたり上書きされたりということが起こらないので、ユーザーツリーに導入することが推奨されます。こうする
5001 と、自分のホームディレクトリをバックアップする際に、パッケージも他のものと一緒にバックアップされます(もちろん通常行われるようにすればの話です)。
5002 \end_layout
5003
5004 \begin_layout Enumerate
5005 Windowでは、システム上の全ユーザーに新パッケージを利用可能にしたければ、LaTeXの導入されているフォルダに移動し、それからサブフォルダ
5006 \begin_inset Flex Code
5007 status collapsed
5008
5009 \begin_layout Plain Layout
5010 ~
5011 \backslash
5012 tex
5013 \backslash
5014 latex
5015 \end_layout
5016
5017 \end_inset
5018
5019 に移動します(MiKTeXでは、これは既定では
5020 \begin_inset Flex Code
5021 status collapsed
5022
5023 \begin_layout Plain Layout
5024 ~:Programs
5025 \backslash
5026 MiKTeX
5027 \backslash
5028 tex
5029 \backslash
5030 latex
5031 \end_layout
5032
5033 \end_inset
5034
5035 です)
5036 \begin_inset Foot
5037 status collapsed
5038
5039 \begin_layout Plain Layout
5040 これは、英語版でのみ正しいパスになっています。独語版では
5041 \begin_inset Flex Code
5042 status collapsed
5043
5044 \begin_layout Plain Layout
5045 ~:Programme
5046 \backslash
5047 MiKTeX
5048 \backslash
5049 tex
5050 \backslash
5051 latex
5052 \end_layout
5053
5054 \end_inset
5055
5056 となり、他の言語でも同様です。
5057 \end_layout
5058
5059 \end_inset
5060
5061 。ここに新規フォルダ
5062 \begin_inset Flex Code
5063 status collapsed
5064
5065 \begin_layout Plain Layout
5066 foiltex
5067 \end_layout
5068
5069 \end_inset
5070
5071 を作成し、パッケージの全ファイルをそこにコピーしてください。パッケージを自分だけで使用したい場合や、admin権限を持っていない場合には、ローカルLaTeXフォ
5072 ルダで同じことを行います。たとえばMiKTeX
5073 \begin_inset space ~
5074 \end_inset
5075
5076 2.8では、これはWinXP上では
5077 \begin_inset Newline newline
5078 \end_inset
5079
5080
5081 \begin_inset Flex Code
5082 status collapsed
5083
5084 \begin_layout Plain Layout
5085 ~:
5086 \backslash
5087 Documents and Settings
5088 \backslash
5089 <ユーザー名>
5090 \backslash
5091 Application Data
5092 \backslash
5093
5094 \end_layout
5095
5096 \end_inset
5097
5098
5099 \begin_inset Newline newline
5100 \end_inset
5101
5102
5103 \begin_inset Phantom HPhantom
5104 status open
5105
5106 \begin_layout Plain Layout
5107
5108 \family typewriter
5109 ~:
5110 \backslash
5111
5112 \end_layout
5113
5114 \end_inset
5115
5116
5117 \begin_inset Flex Code
5118 status collapsed
5119
5120 \begin_layout Plain Layout
5121 MiKTeX
5122 \backslash
5123 2.8
5124 \backslash
5125 tex
5126 \backslash
5127 latex
5128 \end_layout
5129
5130 \end_inset
5131
5132
5133 \begin_inset Newline newline
5134 \end_inset
5135
5136 フォルダ、WinVista上では
5137 \begin_inset Newline newline
5138 \end_inset
5139
5140
5141 \begin_inset Flex Code
5142 status collapsed
5143
5144 \begin_layout Plain Layout
5145 ~:
5146 \backslash
5147 Users
5148 \backslash
5149 <ユーザー名>
5150 \backslash
5151 AppData
5152 \backslash
5153 Roaming
5154 \backslash
5155 2.8
5156 \backslash
5157 MiKTeX
5158 \backslash
5159 tex
5160 \backslash
5161 latex
5162 \end_layout
5163
5164 \end_inset
5165
5166
5167 \begin_inset Newline newline
5168 \end_inset
5169
5170 フォルダになります。
5171 \end_layout
5172
5173 \end_deeper
5174 \begin_layout Enumerate
5175 ここまで来れば、あとはLaTeXに新しいファイルがあることを告げるだけです。これは使用しているLaTeX頒布版に依存します。
5176 \end_layout
5177
5178 \begin_deeper
5179 \begin_layout Enumerate
5180 TeXLiveの場合には、コンソールから
5181 \begin_inset Flex Code
5182 status collapsed
5183
5184 \begin_layout Plain Layout
5185 texhash
5186 \end_layout
5187
5188 \end_inset
5189
5190 コマンドを実行してください。パッケージを全ユーザー用に導入した場合には、おそらくroot権限で行う必要があります。
5191 \end_layout
5192
5193 \begin_layout Enumerate
5194 MiKTeXでは、パッケージを全ユーザー用に導入した場合には、「Settings
5195 \begin_inset space ~
5196 \end_inset
5197
5198 (Admin)」を起動し、「Refresh FNDB」と記してあるボタンを押してください。そうでない場合には、「Settings」を起動して同様に行ってください
5199
5200 \end_layout
5201
5202 \end_deeper
5203 \begin_layout Enumerate
5204 最後に、LyXに新しいパッケージがあることを告げなくてはなりません。そこで、LyXからツール\SpecialChar \menuseparator
5205 再初期設定メニューを実行して、LyXを再起動します。
5206 \end_layout
5207
5208 \begin_layout Standard
5209 これでパッケージが導入されました。この例では、文書クラス
5210 \begin_inset Flex Code
5211 status collapsed
5212
5213 \begin_layout Plain Layout
5214 Slides
5215 \begin_inset space ~
5216 \end_inset
5217
5218 (FoilTe
5219 \begin_inset ERT
5220 status collapsed
5221
5222 \begin_layout Plain Layout
5223
5224 {}
5225 \end_layout
5226
5227 \end_inset
5228
5229 X)
5230 \end_layout
5231
5232 \end_inset
5233
5234
5235 \begin_inset Flex MenuItem
5236 status collapsed
5237
5238 \begin_layout Plain Layout
5239 文書\SpecialChar \menuseparator
5240 設定\SpecialChar \menuseparator
5241 文書クラス
5242 \end_layout
5243
5244 \end_inset
5245
5246 で利用可能になっているはずです。
5247 \end_layout
5248
5249 \begin_layout Standard
5250 \begin_inset Flex MenuItem
5251 status collapsed
5252
5253 \begin_layout Plain Layout
5254 文書\SpecialChar \menuseparator
5255 設定\SpecialChar \menuseparator
5256 文書クラス
5257 \end_layout
5258
5259 \end_inset
5260
5261 メニューに列挙されてもいないLaTeX文書クラスを使用したい場合には、その「レイアウト」ファイルを作り出さなくてはなりません。これが次節のトピックです。
5262 \end_layout
5263
5264 \begin_layout Section
5265 レイアウトファイルの型
5266 \end_layout
5267
5268 \begin_layout Standard
5269 この節は、レイアウト情報を含む各種LyXファイルについて述べます。これらのファイルは、各種段落様式や文字様式についての記述がされているものであり、LyXがそれら
5270 をどのように表示すべきなのか、また、それらをどのようにLaTeXやDocBook、XHTMLその他の出力書式に翻訳すればよいのかが記されています。
5271 \end_layout
5272
5273 \begin_layout Standard
5274 ここでは、レイアウトファイル作成過程の包括的な解説を試みたいと思いますが、LaTeXクラスだけでもサポートする文書の種類があまりにたくさんあるので、読者が出会い
5275 うるケースや問題をすべてカバーすることはとても望めません。LyXユーザーメーリングリストには、自身の経験を人々と分かち合いたいと望む、レイアウトデザインの経験豊
5276 かな人々がよく顔を出していますので、気軽に質問を投げかけてみてください。
5277 \end_layout
5278
5279 \begin_layout Standard
5280 新しいレイアウトを準備するに当たっては、LyXと共に頒布されているレイアウトの例を見るのがたいへん役立ちます。他の人々も使用できるLaTeX文書クラス用のLyX
5281 レイアウトを作ったり、他の人々にも有用なモジュールをお書きになった場合には、
5282 \begin_inset CommandInset href
5283 LatexCommand href
5284 name "LyX Wikiのレイアウトに関する節"
5285 target "http://wiki.lyx.org/Layouts/Layouts"
5286
5287 \end_inset
5288
5289 か、LyX開発者メーリングリストに投稿して、LyX頒布版に同梱することができるようにしてください
5290 \begin_inset Foot
5291 status collapsed
5292
5293 \begin_layout Plain Layout
5294 LyXはGeneral Public Licenseの下でライセンスされていますので、LyXに寄贈されたものは総て同じライセンス下に置かれることに注意してくださ
5295 い。
5296 \end_layout
5297
5298 \end_inset
5299
5300
5301 \end_layout
5302
5303 \begin_layout Subsection
5304 レイアウトモジュール
5305 \begin_inset CommandInset label
5306 LatexCommand label
5307 name "sub:レイアウトモジュール"
5308
5309 \end_inset
5310
5311
5312 \end_layout
5313
5314 \begin_layout Standard
5315 ここまで、「レイアウトファイル」についてお話してきました。しかし、レイアウト情報を含むものには、他の種類のファイルもあります。厳密にレイアウトファイルと呼ぶとき
5316 、それは
5317 \begin_inset Flex Code
5318 status collapsed
5319
5320 \begin_layout Plain Layout
5321 .layout
5322 \end_layout
5323
5324 \end_inset
5325
5326 拡張子を持ち、文書クラスに関する情報をLyXに提供するものを指します。しかしながら、LyX 1.6以降、レイアウト情報は、拡張子が
5327 \begin_inset Flex Code
5328 status collapsed
5329
5330 \begin_layout Plain Layout
5331 .module
5332 \end_layout
5333
5334 \end_inset
5335
5336 のレイアウト
5337 \emph on
5338 モジュール
5339 \emph default
5340 にも含めることができます。レイアウトがLaTeXクラスに対応しているように、モジュールはLaTeXパッケージに対応するものであり、
5341 \begin_inset Flex Code
5342 status collapsed
5343
5344 \begin_layout Plain Layout
5345 endnotes
5346 \end_layout
5347
5348 \end_inset
5349
5350 モジュールのように、特定のパッケージにサポートを提供するためのモジュールもあります。レイアウトモジュールは、特定の文書レイアウトに特化したものではなく、多くのレ
5351 イアウトで使用できるという意味において、一面、
5352 \begin_inset Flex Code
5353 status collapsed
5354
5355 \begin_layout Plain Layout
5356 stdsections.inc
5357 \end_layout
5358
5359 \end_inset
5360
5361 等のインクルードファイル
5362 \begin_inset Foot
5363 status collapsed
5364
5365 \begin_layout Plain Layout
5366 これらは任意の拡張子をつけることができますが、慣習的に
5367 \begin_inset Flex Code
5368 status collapsed
5369
5370 \begin_layout Plain Layout
5371 .inc
5372 \end_layout
5373
5374 \end_inset
5375
5376 拡張子が用いられます。
5377 \end_layout
5378
5379 \end_inset
5380
5381 のようなものです。相異なる点といえば、
5382 \begin_inset Flex Code
5383 status collapsed
5384
5385 \begin_layout Plain Layout
5386 article.cls
5387 \end_layout
5388
5389 \end_inset
5390
5391 でインクルードファイルを使用するには、そのファイルを編集しなくてはなりませんが、モジュールの場合は、
5392 \begin_inset Flex MenuItem
5393 status collapsed
5394
5395 \begin_layout Plain Layout
5396 文書\SpecialChar \menuseparator
5397 設定
5398 \end_layout
5399
5400 \end_inset
5401
5402 ダイアログで選択するだけですみます。
5403 \end_layout
5404
5405 \begin_layout Standard
5406 モジュール作成は、新しく段落様式を一つ加えたり、任意設定差込枠を加えたりするだけで済むことも多いので、レイアウト編集を学ぶ上でもっとも易しい方法です。しかし原理
5407 的には、レイアウトファイルに入れることのできるものはすべて入れることができます。
5408 \end_layout
5409
5410 \begin_layout Standard
5411 新しいモジュールを作成し、それを
5412 \begin_inset Flex Code
5413 status collapsed
5414
5415 \begin_layout Plain Layout
5416 layout/
5417 \end_layout
5418
5419 \end_inset
5420
5421 フォルダにコピーした後、モジュールがメニューに現れるようにするためには、LyXの再設定を行って再起動しなくてはなりません。しかしながら、モジュールの修正の場合に
5422 は、
5423 \begin_inset Flex MenuItem
5424 status collapsed
5425
5426 \begin_layout Plain Layout
5427 文書\SpecialChar \menuseparator
5428 設定
5429 \end_layout
5430
5431 \end_inset
5432
5433 を開いてどれかを選択し「OK」を押せば、直ちに反映されます。
5434 \emph on
5435 これを実行する前に、作業中の文書を保存しておくことを強く勧めます
5436 \emph default
5437 。もっと言えば、
5438 \emph on
5439 実際の文書で作業しているときに、同時にモジュールの編集をしようとしないことを強く勧めます
5440 \emph default
5441 。もちろん開発陣は、そのような場合でもLyXが安定性を維持するように努力していますが、あなたが作成したモジュール中の文法エラー等によって、奇妙な挙動が引き起こさ
5442 れることがあるからです。
5443 \end_layout
5444
5445 \begin_layout Subsection
5446 \begin_inset Flex MenuItem
5447 status collapsed
5448
5449 \begin_layout Plain Layout
5450 .sty
5451 \end_layout
5452
5453 \end_inset
5454
5455 ファイル用のレイアウト
5456 \end_layout
5457
5458 \begin_layout Standard
5459 新しくLaTeX文書クラスをサポートしようとするとき、LaTeX2eクラス(
5460 \begin_inset Flex Code
5461 status collapsed
5462
5463 \begin_layout Plain Layout
5464 .cls
5465 \end_layout
5466
5467 \end_inset
5468
5469 )ファイルが絡む場合と、スタイル(
5470 \begin_inset Flex Code
5471 status collapsed
5472
5473 \begin_layout Plain Layout
5474 .sty
5475 \end_layout
5476
5477 \end_inset
5478
5479 )ファイルが絡む場合の2つの状況があり得ます。スタイルファイルのサポートは、通常は、かなり容易ですが、新しくクラスファイルをサポートすることは、もう少し難しくな
5480 ります。この節では、前者について述べることとし、後者については次節に譲ります。当然のことながら、新しくDocBook DTDをサポートしたい場合にも、同様の所見
5481 が当てはまります。
5482 \end_layout
5483
5484 \begin_layout Standard
5485 この易しい方の場合では、新しい文書クラスは、既にサポートされている文書クラスと共に使うスタイルファイルとして提供されています。例示のために、スタイルファイルは
5486 \begin_inset Flex MenuItem
5487 status collapsed
5488
5489 \begin_layout Plain Layout
5490 myclass.sty
5491 \end_layout
5492
5493 \end_inset
5494
5495 という名称で、標準的なクラスである
5496 \begin_inset Flex MenuItem
5497 status collapsed
5498
5499 \begin_layout Plain Layout
5500 report.cls
5501 \end_layout
5502
5503 \end_inset
5504
5505 と共に用いられるものと仮定しましょう。
5506 \end_layout
5507
5508 \begin_layout Standard
5509 既存の文書クラスのレイアウトファイルを、以下のように、お使いのローカルディレクトリにコピーすることから始めてください
5510 \begin_inset Foot
5511 status collapsed
5512
5513 \begin_layout Plain Layout
5514 もちろん、どのディレクトリがローカルディレクトリとなるかは、プラットフォームに依存します。LyXでは、起動時に
5515 \begin_inset Flex MenuItem
5516 status collapsed
5517
5518 \begin_layout Plain Layout
5519 -userdir
5520 \end_layout
5521
5522 \end_inset
5523
5524 オプションを指定することによって、ローカルディレクトリを指定することも可能です。
5525 \end_layout
5526
5527 \end_inset
5528
5529
5530 \end_layout
5531
5532 \begin_layout LyX-Code
5533 cp report.layout ~/.lyx/layouts/myclass.layout
5534 \end_layout
5535
5536 \begin_layout Standard
5537 それから、
5538 \begin_inset Flex Code
5539 status collapsed
5540
5541 \begin_layout Plain Layout
5542 myclass.layout
5543 \end_layout
5544
5545 \end_inset
5546
5547 を編集して、
5548 \end_layout
5549
5550 \begin_layout LyX-Code
5551
5552 \backslash
5553 DeclareLaT
5554 \begin_inset ERT
5555 status collapsed
5556
5557 \begin_layout Plain Layout
5558
5559 {}
5560 \end_layout
5561
5562 \end_inset
5563
5564 eXClass{report}
5565 \end_layout
5566
5567 \begin_layout Standard
5568 という行を
5569 \end_layout
5570
5571 \begin_layout LyX-Code
5572
5573 \backslash
5574 DeclareLaT
5575 \bar under
5576 \lang english
5577
5578 \begin_inset ERT
5579 status collapsed
5580
5581 \begin_layout Plain Layout
5582
5583 {}
5584 \end_layout
5585
5586 \end_inset
5587
5588
5589 \bar default
5590 \lang japanese
5591 eXClass[report, myclass.sty]{report (myclass)}
5592 \end_layout
5593
5594 \begin_layout Standard
5595 のように変更してください。それから、ファイル冒頭辺りに
5596 \end_layout
5597
5598 \begin_layout LyX-Code
5599 Preamble 
5600 \begin_inset Newline newline
5601 \end_inset
5602
5603     
5604 \backslash
5605 usepackage{myclass}
5606 \begin_inset Newline newline
5607 \end_inset
5608
5609 EndPreamble
5610 \end_layout
5611
5612 \begin_layout Standard
5613 と書き加えてください。
5614 \end_layout
5615
5616 \begin_layout Standard
5617 LyXを起動して
5618 \begin_inset Flex MenuItem
5619 status collapsed
5620
5621 \begin_layout Plain Layout
5622 ツール\SpecialChar \menuseparator
5623 再設定
5624 \end_layout
5625
5626 \end_inset
5627
5628 を選択してください。それからLyXを再起動し、新規文書を作成してみてください。すると、
5629 \begin_inset Flex MenuItem
5630 status collapsed
5631
5632 \begin_layout Plain Layout
5633 文書\SpecialChar \menuseparator
5634 設定
5635 \end_layout
5636
5637 \end_inset
5638
5639 ダイアログの文書クラスオプションに「
5640 \begin_inset Flex MenuItem
5641 status collapsed
5642
5643 \begin_layout Plain Layout
5644 report (myclass)
5645 \end_layout
5646
5647 \end_inset
5648
5649 」が現れるはずです。新しいクラスにおいて、節区切り用コマンドなどの一部が、基礎となったクラス—この例では
5650 \begin_inset Flex Code
5651 status collapsed
5652
5653 \begin_layout Plain Layout
5654 report
5655 \end_layout
5656
5657 \end_inset
5658
5659 —とは違う挙動をすることはよくありますので、希望に応じて、各節の設定をいじると良いでしょう。各節のレイアウト情報は、
5660 \begin_inset Flex Code
5661 status collapsed
5662
5663 \begin_layout Plain Layout
5664 stdsections.inc
5665 \end_layout
5666
5667 \end_inset
5668
5669 に含まれていますが、このファイルをコピーしたり変更したりする必要はありません。代わりに、自身のレイアウトファイル中、
5670 \begin_inset Flex Code
5671 status collapsed
5672
5673 \begin_layout Plain Layout
5674 stdsections.inc
5675 \end_layout
5676
5677 \end_inset
5678
5679 も取り込む
5680 \begin_inset Flex Code
5681 status collapsed
5682
5683 \begin_layout Plain Layout
5684 Input stdclass.inc
5685 \end_layout
5686
5687 \end_inset
5688
5689 の後に変更を加えるだけです。たとえば、章見だしのフォントをサンセリフ体に変更するには、以下のような行を加えます。
5690 \end_layout
5691
5692 \begin_layout LyX-Code
5693 Style Chapter
5694 \end_layout
5695
5696 \begin_layout LyX-Code
5697     Font
5698 \end_layout
5699
5700 \begin_layout LyX-Code
5701         Family Sans
5702 \end_layout
5703
5704 \begin_layout LyX-Code
5705     EndFont
5706 \end_layout
5707
5708 \begin_layout LyX-Code
5709 End
5710 \end_layout
5711
5712 \begin_layout Standard
5713 これは、既存の章様式宣言を上書き(あるいはこの場合には追加)します。
5714 \end_layout
5715
5716 \begin_layout Standard
5717 新しいパッケージでは、基礎となったクラスには存在しないコマンドや環境を提供することもできます。この場合には、これらをレイアウトファイルに加えます。そのやり方につ
5718 いては、第
5719 \begin_inset CommandInset ref
5720 LatexCommand ref
5721 reference "sec:テキストクラス"
5722
5723 \end_inset
5724
5725 節の情報を参照してください。
5726 \end_layout
5727
5728 \begin_layout Standard
5729 もし
5730 \begin_inset Flex Code
5731 status collapsed
5732
5733 \begin_layout Plain Layout
5734 myclass.sty
5735 \end_layout
5736
5737 \end_inset
5738
5739 が他の文書クラスで使用することができたり、あるいはできない場合でも、基礎となるクラスから読み込むことのできるモジュールを書くのが最も簡単であることがわかるでしょ
5740 う。最も簡単なモジュールの例としては、以下のようなものになります。
5741 \end_layout
5742
5743 \begin_layout LyX-Code
5744 #
5745 \backslash
5746 DeclareLyXModule{My Package}
5747 \end_layout
5748
5749 \begin_layout LyX-Code
5750 #DescriptionBegin
5751 \end_layout
5752
5753 \begin_layout LyX-Code
5754 #Support for mypkg.sty.
5755 \end_layout
5756
5757 \begin_layout LyX-Code
5758 #DescriptionEnd
5759 \begin_inset Newline newline
5760 \end_inset
5761
5762
5763 \end_layout
5764
5765 \begin_layout LyX-Code
5766 Format 21
5767 \begin_inset Newline newline
5768 \end_inset
5769
5770
5771 \end_layout
5772
5773 \begin_layout LyX-Code
5774 Preamble
5775 \begin_inset Newline newline
5776 \end_inset
5777
5778     
5779 \backslash
5780 usepackage{mypkg}
5781 \begin_inset Newline newline
5782 \end_inset
5783
5784 EndPreamble
5785 \end_layout
5786
5787 \begin_layout Standard
5788 もう少し複雑なモジュールでは、既存の構成物の挙動を修正したり、新しい構成物を定義したりすることになるでしょう。この辺りの議論については、第
5789 \begin_inset CommandInset ref
5790 LatexCommand ref
5791 reference "sec:テキストクラス"
5792
5793 \end_inset
5794
5795 節を参照してください。
5796 \end_layout
5797
5798 \begin_layout Subsection
5799 \begin_inset Flex MenuItem
5800 status collapsed
5801
5802 \begin_layout Plain Layout
5803 .cls
5804 \end_layout
5805
5806 \end_inset
5807
5808 ファイル用のレイアウト
5809 \end_layout
5810
5811 \begin_layout Standard
5812 これには2つのケースがありえます。ひとつは、クラスファイル自体が既存の文書クラスに立脚している場合です。たとえば、多くの学位論文用クラスは
5813 \begin_inset Flex MenuItem
5814 status collapsed
5815
5816 \begin_layout Plain Layout
5817 book.cls
5818 \end_layout
5819
5820 \end_inset
5821
5822 に基づいています。お使いのものがどうであるかを見るには、クラスファイル中に
5823 \end_layout
5824
5825 \begin_layout LyX-Code
5826
5827 \backslash
5828 LoadClass{book}
5829 \end_layout
5830
5831 \begin_layout Standard
5832 という行がないかどうか探してください。もしこれがあれば、
5833 \begin_inset Flex Code
5834 status collapsed
5835
5836 \begin_layout Plain Layout
5837 DeclareLaTeXClass
5838 \end_layout
5839
5840 \end_inset
5841
5842 行は異なりますが、おおよそ前節のように進めることができます。あなたが新しく作るクラスが
5843 \begin_inset Flex Code
5844 status collapsed
5845
5846 \begin_layout Plain Layout
5847 thesis
5848 \end_layout
5849
5850 \end_inset
5851
5852 であり、
5853 \begin_inset Flex Code
5854 status collapsed
5855
5856 \begin_layout Plain Layout
5857 book
5858 \end_layout
5859
5860 \end_inset
5861
5862 クラスに基づいていれば、
5863 \begin_inset Flex Code
5864 status collapsed
5865
5866 \begin_layout Plain Layout
5867 DeclareLaTeXClass
5868 \end_layout
5869
5870 \end_inset
5871
5872 行は以下のようにします
5873 \begin_inset Foot
5874 status collapsed
5875
5876 \begin_layout Plain Layout
5877 さらにLyXは、文書クラス名がレイアウトファイル名と同じだと仮定するので、クラスファイルを
5878 \begin_inset Flex Code
5879 status collapsed
5880
5881 \begin_layout Plain Layout
5882 thesis.layout
5883 \end_layout
5884
5885 \end_inset
5886
5887 という名前で保存するのが最も簡単です。 
5888 \end_layout
5889
5890 \end_inset
5891
5892
5893 \end_layout
5894
5895 \begin_layout LyX-Code
5896
5897 \backslash
5898 DeclareLaT
5899 \begin_inset ERT
5900 status collapsed
5901
5902 \begin_layout Plain Layout
5903
5904 {}
5905 \end_layout
5906
5907 \end_inset
5908
5909 eXClass[thesis,book]{thesis}
5910 \end_layout
5911
5912 \begin_layout Standard
5913 他方、新しいクラスが既存のクラスに基づいていない場合には、おそらくあなた自身のレイアウトをしたためる必要があります。もし可能であれば、類似したLaTeXクラスを
5914 使用している既存のレイアウトファイルをコピーして、それに修正を加えるようにすることを強くお勧めします。少なくとも、どの項目を考慮すべきかがわかるように、既存のフ
5915 ァイルを作業の開始点としてください。
5916 \end_layout
5917
5918 \begin_layout Subsection
5919 ひな型を作成する
5920 \begin_inset CommandInset label
5921 LatexCommand label
5922 name "sec:ひな型を作成する"
5923
5924 \end_inset
5925
5926
5927 \end_layout
5928
5929 \begin_layout Standard
5930 新しい文書クラス用のレイアウトファイルを書いたならば、そのレイアウト用のひな型も書くことを検討されるかもしれません。ひな型は、内容はダミーですが、レイアウトの使
5931 い方を示す一種のチュートリアルとして動作します。もちろん、イメージを得るために、LyX添付のひな型をあれこれ見てみるのもよいでしょう。
5932 \end_layout
5933
5934 \begin_layout Standard
5935 ひな型は、通常の文書と同様、LyXを使って作成することができます。唯一違う点は、通常の文書では、フォント構成や用紙寸法を含め、すべてのあり得る設定が為されている
5936 点です。これらの場合、通常ユーザーはひな型が彼の設定値を上書きすることを望みません。この理由から、ひな型の設計者は、
5937 \begin_inset Flex Code
5938 status collapsed
5939
5940 \begin_layout Plain Layout
5941
5942 \backslash
5943 fontscheme
5944 \end_layout
5945
5946 \end_inset
5947
5948
5949 \begin_inset Flex Code
5950 status collapsed
5951
5952 \begin_layout Plain Layout
5953
5954 \backslash
5955 papersize
5956 \end_layout
5957
5958 \end_inset
5959
5960 などの対応するコマンドをひな型LyXファイルから取り除く必要があります。これは、たとえば
5961 \begin_inset Flex Code
5962 status collapsed
5963
5964 \begin_layout Plain Layout
5965 vi
5966 \end_layout
5967
5968 \end_inset
5969
5970
5971 \begin_inset Flex Code
5972 status collapsed
5973
5974 \begin_layout Plain Layout
5975 notepad
5976 \end_layout
5977
5978 \end_inset
5979
5980 のような、どの軽いテキストエディタでも行うことができます。
5981 \end_layout
5982
5983 \begin_layout Standard
5984 編集したひな型を
5985 \begin_inset Flex Code
5986 status collapsed
5987
5988 \begin_layout Plain Layout
5989 UserDir/templates/
5990 \end_layout
5991
5992 \end_inset
5993
5994 に置き、グローバルなひな型ディレクトリ
5995 \begin_inset Flex Code
5996 status collapsed
5997
5998 \begin_layout Plain Layout
5999 LyXDir/templates/
6000 \end_layout
6001
6002 \end_inset
6003
6004 から使用したいものを同じ場所にコピーし、
6005 \begin_inset Flex MenuItem
6006 status collapsed
6007
6008 \begin_layout Plain Layout
6009 ツール\SpecialChar \menuseparator
6010 設定\SpecialChar \menuseparator
6011 パス
6012 \end_layout
6013
6014 \end_inset
6015
6016 ダイアログのひな型パスを再定義してください。
6017 \end_layout
6018
6019 \begin_layout Standard
6020 ところで、特別な意味を持つひな型
6021 \begin_inset Flex Code
6022 status collapsed
6023
6024 \begin_layout Plain Layout
6025 defaults.lyx
6026 \end_layout
6027
6028 \end_inset
6029
6030 があることに注意してください。このひな型は、
6031 \begin_inset Flex MenuItem
6032 status collapsed
6033
6034 \begin_layout Plain Layout
6035 ファイル\SpecialChar \menuseparator
6036 新規
6037 \end_layout
6038
6039 \end_inset
6040
6041 を使って新規文書を作成する際、便利な既定値を提供する目的で必ず読み込まれます。このひな型をLyX内部から作成するのにしなくてはならないことは、対応する設定を持つ
6042 文書を開き、
6043 \begin_inset Flex MenuItem
6044 status collapsed
6045
6046 \begin_layout Plain Layout
6047 文書既定値として保存
6048 \end_layout
6049
6050 \end_inset
6051
6052 ボタンを押すことです。
6053 \end_layout
6054
6055 \begin_layout Subsection
6056 旧レイアウトファイルの更新
6057 \end_layout
6058
6059 \begin_layout Standard
6060 レイアウトファイルの書式は、LyXのリリース毎に変更されますので、古いレイアウトファイルは変換されなくてはなりません。この過程は、LyX第1.4版から自動化されま
6061 した。LyXが古い書式のレイアウトファイルを読み込むと、LyXは、自動的に変換ツール
6062 \begin_inset Flex Code
6063 status collapsed
6064
6065 \begin_layout Plain Layout
6066 LyXDir/scripts/layout2layout.py
6067 \end_layout
6068
6069 \end_inset
6070
6071 を呼び出し、それを現在の書式の一時ファイルに変換します。元のファイルは変更を加えられずに措かれます。もしこのレイアウトファイルをよく使うならば、LyXがこれを毎
6072 回行なわくて済むように、レイアウトファイルを恒久的に変換しておきたいと思うかもしれません。これを行うには、以下のように変換子を手動で呼び出してください。
6073 \end_layout
6074
6075 \begin_layout LyX-Code
6076 mv myclass.layout myclass.old
6077 \end_layout
6078
6079 \begin_layout LyX-Code
6080 python LyXDir/scripts/layout2layout.py myclass.old myclassnew.layout
6081 \end_layout
6082
6083 \begin_layout Standard
6084 もちろん、
6085 \begin_inset Flex Code
6086 status collapsed
6087
6088 \begin_layout Plain Layout
6089 LyXDir
6090 \end_layout
6091
6092 \end_inset
6093
6094 は、お使いのLyXシステムディレクトリ名に置き換えてください。
6095 \end_layout
6096
6097 \begin_layout Standard
6098 手動変換は、インクルードされているファイル内部の変更までは取り扱いませんので、それらのファイルは別に変換されなくてはなりません。
6099 \end_layout
6100
6101 \begin_layout Section
6102 \begin_inset CommandInset label
6103 LatexCommand label
6104 name "sec:テキストクラス"
6105
6106 \end_inset
6107
6108 レイアウトファイルの書式
6109 \end_layout
6110
6111 \begin_layout Standard
6112 以下の各節では、いよいよ自分の手を汚してレイアウトファイルを作成したり編集したりする段階になった際、直面することの説明を行います。私たちからのアドバイスとしては
6113 、ゆっくりと進めるようにして、ちょっと進むごとに保存やテストを行い、心休まる音楽を聴き、好きな大人の飲み物を一二杯口にしながら行うのがいいでしょう。特に行き詰ま
6114 ってしまったときにはそうです。実際にはそんなに難しいことではないのですが、特に一度に多くのことをやろうとすると、選択肢が多くありすぎて圧倒されてしまうのです。さ
6115 て、もう一杯大人向け飲料をどうぞ。適量ね。
6116 \end_layout
6117
6118 \begin_layout Standard
6119 この章で述べられているタグは、すべて大文字小文字を区別しません。つまり、
6120 \begin_inset Flex Code
6121 status collapsed
6122
6123 \begin_layout Plain Layout
6124 Style
6125 \end_layout
6126
6127 \end_inset
6128
6129
6130 \begin_inset Flex Code
6131 status collapsed
6132
6133 \begin_layout Plain Layout
6134 style
6135 \end_layout
6136
6137 \end_inset
6138
6139
6140 \begin_inset Flex Code
6141 status collapsed
6142
6143 \begin_layout Plain Layout
6144 StYlE
6145 \end_layout
6146
6147 \end_inset
6148
6149 は同じコマンドとなります。機能名の後にある角括弧は、その機能が取り得る値を示します。テキストクラス設定内で機能が特定されていない場合には、既定値は
6150 \begin_inset Flex Code
6151 status collapsed
6152
6153 \begin_layout Plain Layout
6154
6155 \emph on
6156 強調
6157 \end_layout
6158
6159 \end_inset
6160
6161 で表記されます。引数が「文字列」や「浮動小数点型」などのデータ型をとる場合には、既定値は
6162 \begin_inset Flex Code
6163 status collapsed
6164
6165 \begin_layout Plain Layout
6166 浮動小数点型=
6167 \emph on
6168 既定値
6169 \end_layout
6170
6171 \end_inset
6172
6173 のように表示されます。
6174 \end_layout
6175
6176 \begin_layout Subsection
6177 文書クラス宣言
6178 \end_layout
6179
6180 \begin_layout Standard
6181 レイアウトファイル中の
6182 \begin_inset Flex Code
6183 status collapsed
6184
6185 \begin_layout Plain Layout
6186 #
6187 \end_layout
6188
6189 \end_inset
6190
6191 で始まる行はコメントです。この規則には一つだけ例外があります。すべての
6192 \begin_inset Flex Code
6193 status collapsed
6194
6195 \begin_layout Plain Layout
6196 *.layout
6197 \end_layout
6198
6199 \end_inset
6200
6201 ファイルは、以下のような行で始めなくてはならないのです。
6202 \end_layout
6203
6204 \begin_layout LyX-Code
6205
6206 \size small
6207 #% Do not delete the line below; configure depends on this 
6208 \end_layout
6209
6210 \begin_layout LyX-Code
6211
6212 \size small
6213 #  
6214 \backslash
6215 DeclareLaT
6216 \size default
6217
6218 \begin_inset ERT
6219 status collapsed
6220
6221 \begin_layout Plain Layout
6222
6223 {}
6224 \end_layout
6225
6226 \end_inset
6227
6228
6229 \size small
6230 eXClass{article}
6231 \end_layout
6232
6233 \begin_layout Standard
6234 この2行目は、LyXを初期設定や(再)設定するときに用いられるのです。このレイアウトファイルは、LaTeXスクリプト
6235 \begin_inset Flex Code
6236 status collapsed
6237
6238 \begin_layout Plain Layout
6239 chkconfig.ltx
6240 \end_layout
6241
6242 \end_inset
6243
6244 が、
6245 \begin_inset Flex Code
6246 status collapsed
6247
6248 \begin_layout Plain Layout
6249 #
6250 \end_layout
6251
6252 \end_inset
6253
6254 を無視する特別なモードで読み込みます。1行目は単なるLaTeXコメントですが、2行目にはテキストクラスの宣言が書かれています。これらの行が
6255 \begin_inset Flex Code
6256 status collapsed
6257
6258 \begin_layout Plain Layout
6259 article.layout
6260 \end_layout
6261
6262 \end_inset
6263
6264 と名付けられたファイルにあると、
6265 \begin_inset Flex Code
6266 status collapsed
6267
6268 \begin_layout Plain Layout
6269 article
6270 \end_layout
6271
6272 \end_inset
6273
6274 (レイアウトファイル名)という名称のテキストクラスを定義し、LaTeX文書クラス
6275 \begin_inset Flex Code
6276 status collapsed
6277
6278 \begin_layout Plain Layout
6279 article.cls
6280 \end_layout
6281
6282 \end_inset
6283
6284 を使用するようになります(既定ではレイアウトと同じ名称のものを使用します)。上記に現れる「article」という文字列は、
6285 \begin_inset Flex MenuItem
6286 status collapsed
6287
6288 \begin_layout Plain Layout
6289 文書\SpecialChar \menuseparator
6290 設定
6291 \end_layout
6292
6293 \end_inset
6294
6295 ダイアログのテキストクラスの説明に使用されます。
6296 \end_layout
6297
6298 \begin_layout Standard
6299 節見出し表示に変更を加えた、
6300 \begin_inset Flex Code
6301 status collapsed
6302
6303 \begin_layout Plain Layout
6304 article.cls
6305 \end_layout
6306
6307 \end_inset
6308
6309 文書クラスを使用するテキストクラスを自分で書いたものとしましょう。これを
6310 \begin_inset Flex Code
6311 status collapsed
6312
6313 \begin_layout Plain Layout
6314 myarticle.layout
6315 \end_layout
6316
6317 \end_inset
6318
6319 というファイルに置いたとすると、このファイルのヘッダは以下のようになります。
6320 \end_layout
6321
6322 \begin_layout LyX-Code
6323
6324 \size small
6325 #% Do not delete the line below; configure depends on this 
6326 \end_layout
6327
6328 \begin_layout LyX-Code
6329
6330 \size small
6331 #  
6332 \backslash
6333 DeclareLaT
6334 \size default
6335
6336 \begin_inset ERT
6337 status collapsed
6338
6339 \begin_layout Plain Layout
6340
6341 {}
6342 \end_layout
6343
6344 \end_inset
6345
6346
6347 \size small
6348 eXClass[article]{article (with my own headings)}
6349 \end_layout
6350
6351 \begin_layout Standard
6352 これは、LaTeX文書クラス
6353 \begin_inset Flex Code
6354 status collapsed
6355
6356 \begin_layout Plain Layout
6357 article.cls
6358 \end_layout
6359
6360 \end_inset
6361
6362 に関連づけられ、「article (with my own headings)」と表示される、
6363 \begin_inset Flex Code
6364 status collapsed
6365
6366 \begin_layout Plain Layout
6367 myarticle
6368 \end_layout
6369
6370 \end_inset
6371
6372 テキストクラスを宣言するものです。もしこのテキストクラスが複数のパッケージに依存するならば、以下のように宣言すると良いでしょう。
6373 \end_layout
6374
6375 \begin_layout LyX-Code
6376
6377 \size small
6378 #% Do not delete the line below; configure depends on this 
6379 \end_layout
6380
6381 \begin_layout LyX-Code
6382
6383 \size small
6384 #  
6385 \backslash
6386 DeclareLaT
6387 \size default
6388
6389 \begin_inset ERT
6390 status collapsed
6391
6392 \begin_layout Plain Layout
6393
6394 {}
6395 \end_layout
6396
6397 \end_inset
6398
6399
6400 \size small
6401 eXClass[article,foo.sty]{article (with my own headings)}
6402 \end_layout
6403
6404 \begin_layout Standard
6405 これは、このテキストクラスが
6406 \begin_inset Flex Code
6407 status collapsed
6408
6409 \begin_layout Plain Layout
6410 foo.sty
6411 \end_layout
6412
6413 \end_inset
6414
6415 パッケージを使用することを示しています。最後に、DocBookコード向けのクラスを宣言することもできることを見ます。典型的な宣言は以下のようになります。
6416 \end_layout
6417
6418 \begin_layout LyX-Code
6419
6420 \size small
6421 #% Do not delete the line below; configure depends on this 
6422 \end_layout
6423
6424 \begin_layout LyX-Code
6425
6426 \size small
6427
6428 \backslash
6429 DeclareDocBookClass[article]{SGML (DocBook article)}
6430 \end_layout
6431
6432 \begin_layout Standard
6433 これらの宣言には、文書クラス名を宣言する非必須パラメータ(ただしリストではない)を与えることができることに注意してください。
6434 \end_layout
6435
6436 \begin_layout Standard
6437 できる限り明示的に要約すると、レイアウト宣言は以下の形をとります。
6438 \end_layout
6439
6440 \begin_layout LyX-Code
6441
6442 \size small
6443 #  
6444 \backslash
6445 DeclareLaT
6446 \size default
6447
6448 \begin_inset ERT
6449 status collapsed
6450
6451 \begin_layout Plain Layout
6452
6453 {}
6454 \end_layout
6455
6456 \end_inset
6457
6458
6459 \size small
6460 eXClass[クラス,パッケージ名.sty]{レイアウトの説明}
6461 \end_layout
6462
6463 \begin_layout Standard
6464 ここで「クラス」は、LaTeXクラスファイル名とレイアウトファイル名が異なるときのみ、指定する必要があります。クラスファイル名が指定されなければ、LyXは単純に
6465 、クラスファイル名がレイアウトファイル名と同じであると仮定します。
6466 \end_layout
6467
6468 \begin_layout Standard
6469 テキストクラスがあなたの嗜好に合うように修正できたならば、他にしなくてはならないことは、それを
6470 \begin_inset Flex Code
6471 status collapsed
6472
6473 \begin_layout Plain Layout
6474 L
6475 \begin_inset ERT
6476 status collapsed
6477
6478 \begin_layout Plain Layout
6479
6480 {}
6481 \end_layout
6482
6483 \end_inset
6484
6485 yXDir/layouts/
6486 \end_layout
6487
6488 \end_inset
6489
6490
6491 \begin_inset Flex Code
6492 status collapsed
6493
6494 \begin_layout Plain Layout
6495 UserDir/layouts
6496 \end_layout
6497
6498 \end_inset
6499
6500 にコピーし、
6501 \begin_inset Flex MenuItem
6502 status collapsed
6503
6504 \begin_layout Plain Layout
6505 ツール\SpecialChar \menuseparator
6506 再初期設定
6507 \end_layout
6508
6509 \end_inset
6510
6511 を実行し、LyXを終了して再起動するだけです。そうすれば、この新しいテキストクラスが、他のテキストクラスと同様に使用できるようになります。
6512 \end_layout
6513
6514 \begin_layout Standard
6515 レイアウトファイルが導入されたならば、これを編集して、再初期設定したりLyXを再起動したりすることなく、その変更を確認することができます
6516 \begin_inset Foot
6517 status collapsed
6518
6519 \begin_layout Plain Layout
6520 第1.6版よりも前のLyXでは、これを行うことはできませんでした。その結果、レイアウトファイルに加えた変更を反映させるには、その度にLyXを再起動しなくてはならな
6521 かったので、レイアウトファイルを編集する作業は、たいへん時間を浪費する作業だったのです。
6522 \end_layout
6523
6524 \end_inset
6525
6526 。LyX関数
6527 \begin_inset Flex MenuItem
6528 status collapsed
6529
6530 \begin_layout Plain Layout
6531 layout-reload
6532 \end_layout
6533
6534 \end_inset
6535
6536 を使用すれば、現在使っているレイアウトの再読み込みを強制することができるのです。この関数への既定のキー割り当てはありません—もちろん自分でどれかのキーに割り当て
6537 ることもできますが—。しかし、通常は、この関数を使用する場合は、これをミニバッファに入力します。
6538 \end_layout
6539
6540 \begin_layout Standard
6541
6542 \emph on
6543 注意
6544 \emph default
6545
6546 \begin_inset Flex MenuItem
6547 status collapsed
6548
6549 \begin_layout Plain Layout
6550 layout-reload
6551 \end_layout
6552
6553 \end_inset
6554
6555 はかなり「高度な機能」です。この機能を利用する前に、作業中の文書を保存しておくことを
6556 \emph on
6557 強く
6558 \emph default
6559 勧めます。もっと言えば、大事な文書の作業をしているときに、同時にレイアウト情報の編集をしようとしないことを
6560 \emph on
6561 強く
6562 \emph default
6563 勧めます。テスト用文書を使用してください。レイアウトファイル中の文法エラー等が奇妙な挙動を引き起こす可能性があります。特に、そのようなエラーが起こると、LyXは
6564 現在のレイアウトが無効であるものと判断して、別のレイアウトに切り替えようとする可能性があります
6565 \begin_inset Foot
6566 status collapsed
6567
6568 \begin_layout Plain Layout
6569 非常に悪質な文法エラーの場合には、LyXが終了してしまうことさえあります。これは、ある種のエラーでは、LyXがレイアウト情報を全く読めなくなる可能性があるからで
6570 す。ご注意ください。
6571 \end_layout
6572
6573 \end_inset
6574
6575 。LyX開発陣は、このような状況下でも安定性を保つよう努力していますが、後悔よりも安心の方が良いでしょう
6576 \begin_inset Foot
6577 status collapsed
6578
6579 \begin_layout Plain Layout
6580 重ねての助言ですが、つねにバックアップを取ってください。それから、お母さんのお片づけに注意。
6581 \end_layout
6582
6583 \end_inset
6584
6585
6586 \end_layout
6587
6588 \begin_layout Subsection
6589 モジュール宣言
6590 \end_layout
6591
6592 \begin_layout Standard
6593 モジュールは、以下のような行で始まらなくてはなりません。
6594 \end_layout
6595
6596 \begin_layout LyX-Code
6597 #
6598 \backslash
6599 DeclareL
6600 \begin_inset ERT
6601 status collapsed
6602
6603 \begin_layout Plain Layout
6604
6605 {}
6606 \end_layout
6607
6608 \end_inset
6609
6610 yXModule[endnotes.sty]{Endnotes} 
6611 \end_layout
6612
6613 \begin_layout Standard
6614 波括弧内に入っている必須引数はモジュール名で、これは
6615 \begin_inset Flex MenuItem
6616 status collapsed
6617
6618 \begin_layout Plain Layout
6619 文書\SpecialChar \menuseparator
6620 設定
6621 \end_layout
6622
6623 \end_inset
6624
6625 内に表示されます。角括弧内の引数は非必須です。これは、モジュールが依存するLaTeXパッケージをすべて宣言します。角括弧の中には、LyXにとって既知のパッケージ
6626 だけしか、列挙することはできないことに注意してください。
6627 \begin_inset Foot
6628 status collapsed
6629
6630 \begin_layout Plain Layout
6631 既知のパッケージのリストは、ソースコード中でしか、ドキュメント化されていません。
6632 \end_layout
6633
6634 \end_inset
6635
6636 LyXは、任意のパッケージをチェックすることはしません。また、非必須引数として、
6637 \begin_inset Flex Code
6638 status collapsed
6639
6640 \begin_layout Plain Layout
6641 変換元->変換先
6642 \end_layout
6643
6644 \end_inset
6645
6646 の形を使用することができます。これは、
6647 \begin_inset Flex Code
6648 status collapsed
6649
6650 \begin_layout Plain Layout
6651 変換元
6652 \end_layout
6653
6654 \end_inset
6655
6656 書式から
6657 \begin_inset Flex Code
6658 status collapsed
6659
6660 \begin_layout Plain Layout
6661 変換先
6662 \end_layout
6663
6664 \end_inset
6665
6666 書式への変換鎖が存在するときのみ、このモジュールを使用できることを宣言するものです。
6667 \end_layout
6668
6669 \begin_layout Standard
6670 それから、以下のようなモジュール宣言を行います。
6671 \end_layout
6672
6673 \begin_layout LyX-Code
6674 #DescriptionBegin 
6675 \end_layout
6676
6677 \begin_layout LyX-Code
6678 #Adds an endnote command, in addition to footnotes.
6679  
6680 \end_layout
6681
6682 \begin_layout LyX-Code
6683 #You will need to add  
6684 \backslash
6685 theendnotes in T
6686 \begin_inset ERT
6687 status collapsed
6688
6689 \begin_layout Plain Layout
6690
6691 {}
6692 \end_layout
6693
6694 \end_inset
6695
6696 eX code where you 
6697 \end_layout
6698
6699 \begin_layout LyX-Code
6700 #want the endnotes to appear.
6701  
6702 \end_layout
6703
6704 \begin_layout LyX-Code
6705 #DescriptionEnd 
6706 \end_layout
6707
6708 \begin_layout LyX-Code
6709 #Requires: somemodule | othermodule
6710 \end_layout
6711
6712 \begin_layout LyX-Code
6713 #Excludes: badmodule
6714 \end_layout
6715
6716 \begin_layout Standard
6717 ここで説明(Description)は、
6718 \begin_inset Flex MenuItem
6719 status collapsed
6720
6721 \begin_layout Plain Layout
6722 文書\SpecialChar \menuseparator
6723 設定
6724 \end_layout
6725
6726 \end_inset
6727
6728 でこのモジュールが何をするものか、ユーザに情報を与えるために使用されます。
6729 \begin_inset Flex Code
6730 status collapsed
6731
6732 \begin_layout Plain Layout
6733 Requires
6734 \end_layout
6735
6736 \end_inset
6737
6738 行は、このモジュールが共に使用する必要がある、他のモジュールを特定するのに用いられます。一方、
6739 \begin_inset Flex Code
6740 status collapsed
6741
6742 \begin_layout Plain Layout
6743 Excludes
6744 \end_layout
6745
6746 \end_inset
6747
6748 行は、このモジュールが共に使用してはならない、他のモジュールを特定するのに用いられます。この2つの行は必須ではなく、上記のようにモジュールが複数ある場合には、パ
6749 イプ記号「|」で区切らなくてはなりません。
6750 \begin_inset Flex Code
6751 status collapsed
6752
6753 \begin_layout Plain Layout
6754 Requires
6755 \end_layout
6756
6757 \end_inset
6758
6759 に指定されたモジュールは、選言的に取り扱われることに注意してください。つまり、
6760 \begin_inset Flex Code
6761 status collapsed
6762
6763 \begin_layout Plain Layout
6764 Requires
6765 \end_layout
6766
6767 \end_inset
6768
6769 に指定されたモジュールのうち、
6770 \emph on
6771 少なくとも一つ
6772 \emph default
6773 が使用されていればよいということです。同様に、
6774 \begin_inset Flex Code
6775 status collapsed
6776
6777 \begin_layout Plain Layout
6778 Excludes
6779 \end_layout
6780
6781 \end_inset
6782
6783 に指定されたモジュールは、一つも使用されてはなりません。ここでモジュールは、
6784 \begin_inset Flex Code
6785 status collapsed
6786
6787 \begin_layout Plain Layout
6788 .module
6789 \end_layout
6790
6791 \end_inset
6792
6793 拡張子を除いた
6794 \emph on
6795 ファイル名
6796 \emph default
6797 で認識されることに注意してください。つまり
6798 \begin_inset Flex Code
6799 status collapsed
6800
6801 \begin_layout Plain Layout
6802 somemodule
6803 \end_layout
6804
6805 \end_inset
6806
6807 とは、実のところ
6808 \begin_inset Flex Code
6809 status collapsed
6810
6811 \begin_layout Plain Layout
6812 somemodule.module
6813 \end_layout
6814
6815 \end_inset
6816
6817 のことです。
6818 \end_layout
6819
6820 \begin_layout Subsection
6821 ファイル書式
6822 \end_layout
6823
6824 \begin_layout Standard
6825 レイアウトファイルやインクルードされたファイル、またはモジュールの最初の非コメント行には、以下のように、かならずファイル書式番号が記されていなくてはなりません。
6826 \end_layout
6827
6828 \begin_layout Description
6829 \begin_inset Flex Code
6830 status collapsed
6831
6832 \begin_layout Plain Layout
6833 Format
6834 \end_layout
6835
6836 \end_inset
6837
6838  [
6839 \begin_inset Flex Code
6840 status collapsed
6841
6842 \begin_layout Plain Layout
6843 整数型
6844 \end_layout
6845
6846 \end_inset
6847
6848 ] このレイアウトファイルの書式
6849 \end_layout
6850
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は読むことができません。
6855 \end_layout
6856
6857 \begin_layout Subsection
6858 \begin_inset CommandInset label
6859 LatexCommand label
6860 name "sub:汎用テキストクラスパラメータ"
6861
6862 \end_inset
6863
6864 汎用テキストクラスパラメータ
6865 \end_layout
6866
6867 \begin_layout Standard
6868 以下は、文書クラス全体の挙動を決定する汎用パラメータです(これは、
6869 \begin_inset Flex Code
6870 status collapsed
6871
6872 \begin_layout Plain Layout
6873 .layout
6874 \end_layout
6875
6876 \end_inset
6877
6878 ファイルのみに使用されるべきで、モジュールでは使ってはならない、ということを意味するものでは
6879 \emph on
6880 ありません
6881 \emph default
6882 。モジュールには、すべてのレイアウトタグを使用することができます)。
6883 \end_layout
6884
6885 \begin_layout Description
6886 \begin_inset Flex Code
6887 status collapsed
6888
6889 \begin_layout Plain Layout
6890 AddToHTMLPreamble
6891 \end_layout
6892
6893 \end_inset
6894
6895  この文書クラスがXHTMLに出力されるときに、
6896 \begin_inset Flex Code
6897 status collapsed
6898
6899 \begin_layout Plain Layout
6900 <head>
6901 \end_layout
6902
6903 \end_inset
6904
6905 ブロックに追加出力される情報です。典型的には、これはCSSスタイル情報を出力するのに用いられますが、
6906 \begin_inset Flex Code
6907 status collapsed
6908
6909 \begin_layout Plain Layout
6910 <head>
6911 \end_layout
6912
6913 \end_inset
6914
6915 に出力するものであれば、何でも使用することができます。「
6916 \begin_inset Flex Code
6917 status collapsed
6918
6919 \begin_layout Plain Layout
6920 EndPreamble
6921 \end_layout
6922
6923 \end_inset
6924
6925 」で閉じる必要があります。
6926 \end_layout
6927
6928 \begin_layout Description
6929 \begin_inset Flex Code
6930 status collapsed
6931
6932 \begin_layout Plain Layout
6933 AddToPreamble
6934 \end_layout
6935
6936 \end_inset
6937
6938  文書プリアンブルに書き加えられる情報です。「
6939 \begin_inset Flex Code
6940 status collapsed
6941
6942 \begin_layout Plain Layout
6943 EndPreamble
6944 \end_layout
6945
6946 \end_inset
6947
6948 」で閉じる必要があります。
6949 \end_layout
6950
6951 \begin_layout Description
6952 \begin_inset Flex Code
6953 status collapsed
6954
6955 \begin_layout Plain Layout
6956 CiteFormat
6957 \end_layout
6958
6959 \end_inset
6960
6961  書誌情報の表示に使う書式を定義します。詳細については、第
6962 \begin_inset CommandInset ref
6963 LatexCommand ref
6964 reference "sub:引用書式指定"
6965
6966 \end_inset
6967
6968 節をご覧ください。「
6969 \begin_inset Flex Code
6970 status collapsed
6971
6972 \begin_layout Plain Layout
6973 End
6974 \end_layout
6975
6976 \end_inset
6977
6978 」で閉じる必要があります。
6979 \end_layout
6980
6981 \begin_layout Description
6982 \begin_inset Flex Code
6983 status collapsed
6984
6985 \begin_layout Plain Layout
6986 ClassOptions
6987 \end_layout
6988
6989 \end_inset
6990
6991  文書クラスがサポートする様々な大域オプションを記します。説明は、第
6992 \begin_inset CommandInset ref
6993 LatexCommand ref
6994 reference "sub:ClassOptions"
6995
6996 \end_inset
6997
6998 節を参照してください。「
6999 \begin_inset Flex Code
7000 status collapsed
7001
7002 \begin_layout Plain Layout
7003 End
7004 \end_layout
7005
7006 \end_inset
7007
7008 」で閉じる必要があります。
7009 \end_layout
7010
7011 \begin_layout Description
7012 \begin_inset Flex Code
7013 status collapsed
7014
7015 \begin_layout Plain Layout
7016 Columns
7017 \end_layout
7018
7019 \end_inset
7020
7021  [
7022 \begin_inset Flex Code
7023 status collapsed
7024
7025 \begin_layout Plain Layout
7026
7027 \emph on
7028 1
7029 \end_layout
7030
7031 \end_inset
7032
7033
7034 \begin_inset Flex Code
7035 status collapsed
7036
7037 \begin_layout Plain Layout
7038 2
7039 \end_layout
7040
7041 \end_inset
7042
7043 ] 文書クラスが既定で1段組か2段組かを指定します。
7044 \begin_inset Flex MenuItem
7045 status collapsed
7046
7047 \begin_layout Plain Layout
7048 文書\SpecialChar \menuseparator
7049 設定
7050 \end_layout
7051
7052 \end_inset
7053
7054 ダイアログで変更することができます。
7055 \end_layout
7056
7057 \begin_layout Description
7058 \begin_inset Flex Code
7059 status collapsed
7060
7061 \begin_layout Plain Layout
7062 Counter
7063 \end_layout
7064
7065 \end_inset
7066
7067  [
7068 \begin_inset Flex Code
7069 status collapsed
7070
7071 \begin_layout Plain Layout
7072 文字列
7073 \end_layout
7074
7075 \end_inset
7076
7077 ] この部分はカウンタの特性を定義します。カウンタがまだ存在していなければ、生成されます。もし存在しなければ修正されます。「
7078 \begin_inset Flex Code
7079 status collapsed
7080
7081 \begin_layout Plain Layout
7082 End
7083 \end_layout
7084
7085 \end_inset
7086
7087 」で閉じる必要があります。
7088 \begin_inset Newline newline
7089 \end_inset
7090
7091 カウンタについての詳細は、第
7092 \begin_inset CommandInset ref
7093 LatexCommand ref
7094 reference "sub:カウンタ"
7095
7096 \end_inset
7097
7098 節を参照してください。
7099 \end_layout
7100
7101 \begin_layout Description
7102 \begin_inset Flex Code
7103 status collapsed
7104
7105 \begin_layout Plain Layout
7106 DefaultFont
7107 \end_layout
7108
7109 \end_inset
7110
7111  文書を表示するのに用いられる既定フォントを設定します。フォントの宣言の仕方については、第
7112 \begin_inset CommandInset ref
7113 LatexCommand ref
7114 reference "sub:フォント指定"
7115
7116 \end_inset
7117
7118 節を参照してください。「
7119 \begin_inset Flex Code
7120 status collapsed
7121
7122 \begin_layout Plain Layout
7123 EndFont
7124 \end_layout
7125
7126 \end_inset
7127
7128 」で閉じる必要があります。
7129 \end_layout
7130
7131 \begin_layout Description
7132 \begin_inset Flex Code
7133 status collapsed
7134
7135 \begin_layout Plain Layout
7136 DefaultModule
7137 \end_layout
7138
7139 \end_inset
7140
7141  [
7142 \begin_inset Flex Code
7143 status collapsed
7144
7145 \begin_layout Plain Layout
7146 文字列
7147 \end_layout
7148
7149 \end_inset
7150
7151 ] この文書クラスに、既定で取り込むモジュールを指定します。モジュールは、
7152 \begin_inset Flex Code
7153 status collapsed
7154
7155 \begin_layout Plain Layout
7156 .module
7157 \end_layout
7158
7159 \end_inset
7160
7161 拡張子を除いたファイル名で指定します。ユーザはこのモジュールを除外することができますが、当初は有効の状態になっています(これは新しいファイルが作成されたときや、
7162 既存の文書にこの文書クラスが選択したときのみ該当します)。
7163 \end_layout
7164
7165 \begin_layout Description
7166 \begin_inset Flex Code
7167 status collapsed
7168
7169 \begin_layout Plain Layout
7170 DefaultStyle
7171 \end_layout
7172
7173 \end_inset
7174
7175  [
7176 \begin_inset Flex Code
7177 status collapsed
7178
7179 \begin_layout Plain Layout
7180 文字列
7181 \end_layout
7182
7183 \end_inset
7184
7185 ] これは新規段落に割り当てられる様式であり、通常は
7186 \begin_inset Flex MenuItem
7187 status collapsed
7188
7189 \begin_layout Plain Layout
7190 標準
7191 \end_layout
7192
7193 \end_inset
7194
7195 です。もしこれを指定しなければ、最初に定義される様式がこれに割り当てられるようにはなっていますが、このディレクティブを使用することが推奨されます。
7196 \end_layout
7197
7198 \begin_layout Description
7199 \begin_inset Flex Code
7200 status collapsed
7201
7202 \begin_layout Plain Layout
7203 ExcludesModule
7204 \end_layout
7205
7206 \end_inset
7207
7208  [
7209 \begin_inset Flex Code
7210 status collapsed
7211
7212 \begin_layout Plain Layout
7213 文字列
7214 \end_layout
7215
7216 \end_inset
7217
7218 ] このタグは、指定されたモジュール—
7219 \begin_inset Flex Code
7220 status collapsed
7221
7222 \begin_layout Plain Layout
7223 .module
7224 \end_layout
7225
7226 \end_inset
7227
7228 拡張子を除いたファイル名で指定します—が、この文書クラスでは使用できないように設定します。これはたとえば、特定の学術誌用レイアウトファイルの中で、定理番号を節毎
7229 に振る
7230 \begin_inset Flex Code
7231 status collapsed
7232
7233 \begin_layout Plain Layout
7234 theorems-sec
7235 \end_layout
7236
7237 \end_inset
7238
7239 モジュールが使用されるのを防ぐために用いたりすることができます。このタグは、モジュール内で
7240 \emph on
7241 使用してはいけません
7242 \emph default
7243 。モジュールは、他のモジュールを排除する独自の枠組みがあります(第
7244 \begin_inset CommandInset ref
7245 LatexCommand ref
7246 reference "sub:レイアウトモジュール"
7247
7248 \end_inset
7249
7250 節参照)。
7251 \end_layout
7252
7253 \begin_layout Description
7254 \begin_inset Flex Code
7255 status collapsed
7256
7257 \begin_layout Plain Layout
7258 Float
7259 \end_layout
7260
7261 \end_inset
7262
7263  フロートを新規に定義します。詳細は、第
7264 \begin_inset CommandInset ref
7265 LatexCommand ref
7266 reference "sub:フロート"
7267
7268 \end_inset
7269
7270 節を参照してください。「
7271 \begin_inset Flex Code
7272 status collapsed
7273
7274 \begin_layout Plain Layout
7275 End
7276 \end_layout
7277
7278 \end_inset
7279
7280 」で閉じる必要があります。
7281 \end_layout
7282
7283 \begin_layout Description
7284 \begin_inset Flex Code
7285 status collapsed
7286
7287 \begin_layout Plain Layout
7288 HTMLPreamble
7289 \end_layout
7290
7291 \end_inset
7292
7293  この文書クラスがXHTMLに出力されるときに、
7294 \begin_inset Flex Code
7295 status collapsed
7296
7297 \begin_layout Plain Layout
7298 <head>
7299 \end_layout
7300
7301 \end_inset
7302
7303 ブロックに出力される情報です。これより前に出現した
7304 \begin_inset Flex Code
7305 status collapsed
7306
7307 \begin_layout Plain Layout
7308 HTMLPreamble
7309 \end_layout
7310
7311 \end_inset
7312
7313
7314 \begin_inset Flex Code
7315 status collapsed
7316
7317 \begin_layout Plain Layout
7318 AddToHTMLPreamble
7319 \end_layout
7320
7321 \end_inset
7322
7323 宣言は、すべて完全に上書きされることに注意してください。(プリアンブルに何かを追加したい時には、
7324 \begin_inset Flex Code
7325 status collapsed
7326
7327 \begin_layout Plain Layout
7328 AddToHTMLPreamble
7329 \end_layout
7330
7331 \end_inset
7332
7333 を使用してください。)「
7334 \begin_inset Flex Code
7335 status collapsed
7336
7337 \begin_layout Plain Layout
7338 EndPreamble
7339 \end_layout
7340
7341 \end_inset
7342
7343 」で閉じる必要があります。
7344 \end_layout
7345
7346 \begin_layout Description
7347 \begin_inset Flex Code
7348 status collapsed
7349
7350 \begin_layout Plain Layout
7351 HTMLTOCSection
7352 \end_layout
7353
7354 \end_inset
7355
7356  [
7357 \begin_inset Flex Code
7358 status collapsed
7359
7360 \begin_layout Plain Layout
7361 文字列
7362 \end_layout
7363
7364 \end_inset
7365
7366 ] 文書がHTMLに出力されるときに、目次や書誌情報などに使用されるレイアウトです。articleの場合には、これは通常「節」であり、bookの場合は「章」です
7367 。これを指定しない場合には、LyXはどのレイアウトを使用するべきか、解析しようと試みます。
7368 \end_layout
7369
7370 \begin_layout Description
7371 \begin_inset Flex Code
7372 status collapsed
7373
7374 \begin_layout Plain Layout
7375 IfCounter 
7376 \end_layout
7377
7378 \end_inset
7379
7380  [
7381 \begin_inset Flex Code
7382 status collapsed
7383
7384 \begin_layout Plain Layout
7385 文字列
7386 \end_layout
7387
7388 \end_inset
7389
7390 ] 与えられたカウンタの特性を修正します。カウンタが存在しない場合には、この節は無視されます。「
7391 \begin_inset Flex Code
7392 status collapsed
7393
7394 \begin_layout Plain Layout
7395 End
7396 \end_layout
7397
7398 \end_inset
7399
7400 」で閉じる必要があります。
7401 \begin_inset Newline newline
7402 \end_inset
7403
7404 カウンタについての詳細は、第
7405 \begin_inset CommandInset ref
7406 LatexCommand ref
7407 reference "sub:カウンタ"
7408
7409 \end_inset
7410
7411 節をご覧ください。
7412 \end_layout
7413
7414 \begin_layout Description
7415 \begin_inset Flex Code
7416 status collapsed
7417
7418 \begin_layout Plain Layout
7419 IfStyle
7420 \end_layout
7421
7422 \end_inset
7423
7424  [
7425 \begin_inset Flex Code
7426 status collapsed
7427
7428 \begin_layout Plain Layout
7429 文字列
7430 \end_layout
7431
7432 \end_inset
7433
7434 ] 与えられた段落様式の特性を修正します。様式が存在しない場合には、この節は無視されます。「
7435 \begin_inset Flex Code
7436 status collapsed
7437
7438 \begin_layout Plain Layout
7439 End
7440 \end_layout
7441
7442 \end_inset
7443
7444 」で閉じる必要があります。
7445 \end_layout
7446
7447 \begin_layout Description
7448 \begin_inset Flex Code
7449 status collapsed
7450
7451 \begin_layout Plain Layout
7452 Input
7453 \end_layout
7454
7455 \end_inset
7456
7457  名称の指し示すように、このコマンドは、同じコマンドを何度も指定せずに済むように、別のレイアウト定義ファイルを取り込ませます。よく使われる例は、基本的なレイアウ
7458 トのほとんどを収録している
7459 \begin_inset Flex Code
7460 status collapsed
7461
7462 \begin_layout Plain Layout
7463 stdclass.inc
7464 \end_layout
7465
7466 \end_inset
7467
7468 のような標準レイアウトファイルです。
7469 \end_layout
7470
7471 \begin_layout Description
7472 \begin_inset Flex Code
7473 status collapsed
7474
7475 \begin_layout Plain Layout
7476 InsetLayout
7477 \end_layout
7478
7479 \end_inset
7480
7481  このセクションは、差込枠のレイアウトを定義(再定義)します。これは、既存の差込枠にも、新しい文字様式のような新規のユーザ定義差込枠にも使用することができます。
7482
7483 \begin_inset Flex Code
7484 status collapsed
7485
7486 \begin_layout Plain Layout
7487 End
7488 \end_layout
7489
7490 \end_inset
7491
7492 」で閉じる必要があります。
7493 \begin_inset Newline newline
7494 \end_inset
7495
7496 詳しい情報は、第
7497 \begin_inset CommandInset ref
7498 LatexCommand ref
7499 reference "sub:任意設定差込枠"
7500
7501 \end_inset
7502
7503 節をご覧ください。
7504 \end_layout
7505
7506 \begin_layout Description
7507 \begin_inset Flex Code
7508 status collapsed
7509
7510 \begin_layout Plain Layout
7511 LeftMargin
7512 \end_layout
7513
7514 \end_inset
7515
7516  画面上の左余白の幅を指示する文字列。例:「MMMMM」。(これは、「2ex」のような「長さ」ではないことに注意してください。)
7517 \end_layout
7518
7519 \begin_layout Description
7520 \begin_inset Flex Code
7521 status collapsed
7522
7523 \begin_layout Plain Layout
7524 NoFloat
7525 \end_layout
7526
7527 \end_inset
7528
7529  このコマンドは既存のフロートを削除します。これは特に、Inputで取り込んだファイルに定義されていたフロートを抑制するのに便利です。
7530 \end_layout
7531
7532 \begin_layout Description
7533 \begin_inset Flex Code
7534 status collapsed
7535
7536 \begin_layout Plain Layout
7537 NoStyle
7538 \end_layout
7539
7540 \end_inset
7541
7542  このコマンドは既存の様式を削除します。これは特に、Inputで取り込んだファイルに定義されていた様式を抑制するのに便利です。
7543 \end_layout
7544
7545 \begin_layout Description
7546 \begin_inset Flex Code
7547 status collapsed
7548
7549 \begin_layout Plain Layout
7550 OutputFormat
7551 \end_layout
7552
7553 \end_inset
7554
7555  このクラスによって生成されるファイル書式を示す文字列(
7556 \family sans
7557 設定
7558 \family default
7559 ダイアログで定義される形のもの)。おもに、
7560 \begin_inset Flex Code
7561 status collapsed
7562
7563 \begin_layout Plain Layout
7564 OutputType
7565 \end_layout
7566
7567 \end_inset
7568
7569 が「literate」になっていて、新しい型のliterate文書を定義したい時に便利です。対応する
7570 \begin_inset Flex Code
7571 status collapsed
7572
7573 \begin_layout Plain Layout
7574 OutputType
7575 \end_layout
7576
7577 \end_inset
7578
7579 パラメーターに遭遇したときには、この文字列は、「docbook」・「latex」・「literate」のいずれかにリセットされます。
7580 \end_layout
7581
7582 \begin_layout Description
7583 \begin_inset Flex Code
7584 status collapsed
7585
7586 \begin_layout Plain Layout
7587 OutputType
7588 \end_layout
7589
7590 \end_inset
7591
7592  このクラスを使用する文書がどのような種類の出力をするかを示す文字列。現在のところ、取り得る値は「docbook」・「latex」・「literate」です。
7593 \end_layout
7594
7595 \begin_layout Description
7596 \begin_inset Flex Code
7597 status collapsed
7598
7599 \begin_layout Plain Layout
7600 PageStyle
7601 \end_layout
7602
7603 \end_inset
7604
7605  [
7606 \emph on
7607
7608 \begin_inset Flex Code
7609 status collapsed
7610
7611 \begin_layout Plain Layout
7612 plain
7613 \end_layout
7614
7615 \end_inset
7616
7617
7618 \emph default
7619
7620 \begin_inset Flex Code
7621 status collapsed
7622
7623 \begin_layout Plain Layout
7624 empty
7625 \end_layout
7626
7627 \end_inset
7628
7629
7630 \begin_inset Flex Code
7631 status collapsed
7632
7633 \begin_layout Plain Layout
7634 headings
7635 \end_layout
7636
7637 \end_inset
7638
7639 ] 既定ページ様式。
7640 \begin_inset Flex MenuItem
7641 status collapsed
7642
7643 \begin_layout Plain Layout
7644 文書\SpecialChar \menuseparator
7645 設定
7646 \end_layout
7647
7648 \end_inset
7649
7650 ダイアログで変更することができます。
7651 \end_layout
7652
7653 \begin_layout Description
7654 \begin_inset Flex Code
7655 status collapsed
7656
7657 \begin_layout Plain Layout
7658 Preamble
7659 \end_layout
7660
7661 \end_inset
7662
7663  LaTeX文書のプリアンブルを設定します。前に行った
7664 \begin_inset Flex Code
7665 status collapsed
7666
7667 \begin_layout Plain Layout
7668 Preamble
7669 \end_layout
7670
7671 \end_inset
7672
7673 宣言や
7674 \begin_inset Flex Code
7675 status collapsed
7676
7677 \begin_layout Plain Layout
7678 AddToPreamble
7679 \end_layout
7680
7681 \end_inset
7682
7683 宣言は、すべて上書きされてしまうので注意してください。(プリアンブルに何かを追加したい時には、
7684 \begin_inset Flex Code
7685 status collapsed
7686
7687 \begin_layout Plain Layout
7688 AddToPreamble
7689 \end_layout
7690
7691 \end_inset
7692
7693 を使用してください。)「
7694 \begin_inset Flex Code
7695 status collapsed
7696
7697 \begin_layout Plain Layout
7698 EndPreamble
7699 \end_layout
7700
7701 \end_inset
7702
7703 」で閉じる必要があります。
7704 \end_layout
7705
7706 \begin_layout Description
7707 \begin_inset Flex Code
7708 status collapsed
7709
7710 \begin_layout Plain Layout
7711 Provides
7712 \end_layout
7713
7714 \end_inset
7715
7716  [
7717 \begin_inset Flex Code
7718 status collapsed
7719
7720 \begin_layout Plain Layout
7721 文字列
7722 \end_layout
7723
7724 \end_inset
7725
7726 ] [
7727 \begin_inset Flex Code
7728 status collapsed
7729
7730 \begin_layout Plain Layout
7731
7732 \emph on
7733 0
7734 \end_layout
7735
7736 \end_inset
7737
7738
7739 \begin_inset Flex Code
7740 status collapsed
7741
7742 \begin_layout Plain Layout
7743 1
7744 \end_layout
7745
7746 \end_inset
7747
7748 ] このクラスが
7749 \begin_inset Flex Code
7750 status collapsed
7751
7752 \begin_layout Plain Layout
7753 文字列
7754 \end_layout
7755
7756 \end_inset
7757
7758 で示される機能を既に提供しているかどうかを示します。機能は、一般的にパッケージ名(
7759 \begin_inset Flex Code
7760 status collapsed
7761
7762 \begin_layout Plain Layout
7763 amsmath
7764 \end_layout
7765
7766 \end_inset
7767
7768
7769 \begin_inset Flex Code
7770 status collapsed
7771
7772 \begin_layout Plain Layout
7773 makeidx
7774 \end_layout
7775
7776 \end_inset
7777
7778 ・\SpecialChar \ldots{}
7779 )やマクロ名(
7780 \begin_inset Flex Code
7781 status collapsed
7782
7783 \begin_layout Plain Layout
7784 url
7785 \end_layout
7786
7787 \end_inset
7788
7789
7790 \begin_inset Flex Code
7791 status collapsed
7792
7793 \begin_layout Plain Layout
7794 boldsymbol
7795 \end_layout
7796
7797 \end_inset
7798
7799 ・\SpecialChar \ldots{}
7800 )です。サポートされている機能の全覧は、LyXソースコード以外には残念ながら文書化されていませんが、興味があれば
7801 \begin_inset Flex Code
7802 status collapsed
7803
7804 \begin_layout Plain Layout
7805 LaTeXFeatures.cpp
7806 \end_layout
7807
7808 \end_inset
7809
7810 をご覧ください。
7811 \begin_inset Flex MenuItem
7812 status collapsed
7813
7814 \begin_layout Plain Layout
7815 ヘルプ\SpecialChar \menuseparator
7816 LaTeXの設定
7817 \end_layout
7818
7819 \end_inset
7820
7821 もサポートされているパッケージの概要を提供します。
7822 \end_layout
7823
7824 \begin_layout Description
7825 \begin_inset Flex Code
7826 status collapsed
7827
7828 \begin_layout Plain Layout
7829 ProvidesModule
7830 \end_layout
7831
7832 \end_inset
7833
7834  [
7835 \begin_inset Flex Code
7836 status collapsed
7837
7838 \begin_layout Plain Layout
7839 文字列
7840 \end_layout
7841
7842 \end_inset
7843
7844 ] このレイアウトが
7845 \begin_inset Flex Code
7846 status collapsed
7847
7848 \begin_layout Plain Layout
7849 文字列
7850 \end_layout
7851
7852 \end_inset
7853
7854 で表されているモジュールの機能を提供することを示し、
7855 \begin_inset Flex Code
7856 status collapsed
7857
7858 \begin_layout Plain Layout
7859 .module
7860 \end_layout
7861
7862 \end_inset
7863
7864 拡張子を除いたファイル名で指定します。
7865 \begin_inset Flex Code
7866 status collapsed
7867
7868 \begin_layout Plain Layout
7869 DefaultModule
7870 \end_layout
7871
7872 \end_inset
7873
7874 タグを使用すると、モジュールを使用しなくてはならないことを示しますが、このタグは主に、このレイアウトがモジュールを直接取り込んでしまっていることを示すのに用いら
7875 れます。同じ機能を別に実装しているモジュール中で使用するなどすることもできます。
7876 \end_layout
7877
7878 \begin_layout Description
7879 \begin_inset Flex Code
7880 status collapsed
7881
7882 \begin_layout Plain Layout
7883 Requires
7884 \end_layout
7885
7886 \end_inset
7887
7888  [
7889 \begin_inset Flex Code
7890 status collapsed
7891
7892 \begin_layout Plain Layout
7893 文字列
7894 \end_layout
7895
7896 \end_inset
7897
7898 ] このクラスが
7899 \begin_inset Flex Code
7900 status collapsed
7901
7902 \begin_layout Plain Layout
7903 文字列
7904 \end_layout
7905
7906 \end_inset
7907
7908 で表されている機能を要求することを示します。機能が複数ある場合には、コンマで区切らなくてはなりません。サポートされている機能以外は要求できないことに注意してくだ
7909 さい。(機能一覧については、これも
7910 \begin_inset Flex Code
7911 status collapsed
7912
7913 \begin_layout Plain Layout
7914 LaTeXFeatures.cpp
7915 \end_layout
7916
7917 \end_inset
7918
7919 をご覧ください。)
7920 \end_layout
7921
7922 \begin_layout Description
7923 \begin_inset Flex Code
7924 status collapsed
7925
7926 \begin_layout Plain Layout
7927 RightMargin
7928 \end_layout
7929
7930 \end_inset
7931
7932  画面上の右余白の幅を指示する文字列。例:「MMMMM」。
7933 \end_layout
7934
7935 \begin_layout Description
7936 \begin_inset Flex Code
7937 status collapsed
7938
7939 \begin_layout Plain Layout
7940 SecNumDepth
7941 \end_layout
7942
7943 \end_inset
7944
7945  どの節区切りまで連番を振るかを指定します。LaTeXにおける
7946 \begin_inset Flex Code
7947 status collapsed
7948
7949 \begin_layout Plain Layout
7950 secnumdepth
7951 \end_layout
7952
7953 \end_inset
7954
7955 カウンタに対応します。
7956 \end_layout
7957
7958 \begin_layout Description
7959 \begin_inset Flex Code
7960 status collapsed
7961
7962 \begin_layout Plain Layout
7963 Sides
7964 \end_layout
7965
7966 \end_inset
7967
7968  [
7969 \emph on
7970
7971 \begin_inset Flex Code
7972 status collapsed
7973
7974 \begin_layout Plain Layout
7975 1
7976 \end_layout
7977
7978 \end_inset
7979
7980
7981 \emph default
7982
7983 \begin_inset Flex Code
7984 status collapsed
7985
7986 \begin_layout Plain Layout
7987 2
7988 \end_layout
7989
7990 \end_inset
7991
7992 ] クラスの既定値として、用紙の片面に印字するか両面に印字するかを指定します。
7993 \begin_inset Flex MenuItem
7994 status collapsed
7995
7996 \begin_layout Plain Layout
7997 文書\SpecialChar \menuseparator
7998 設定
7999 \end_layout
8000
8001 \end_inset
8002
8003 ダイアログで変更することができます。
8004 \end_layout
8005
8006 \begin_layout Description
8007 \begin_inset Flex Code
8008 status collapsed
8009
8010 \begin_layout Plain Layout
8011 Style
8012 \end_layout
8013
8014 \end_inset
8015
8016  この部分は段落様式を定義します。様式がまだ存在していなければ、生成されます。既に存在していれば、そのパラメータが修正されます。「
8017 \begin_inset Flex Code
8018 status collapsed
8019
8020 \begin_layout Plain Layout
8021 End
8022 \end_layout
8023
8024 \end_inset
8025
8026 」で閉じる必要があります。
8027 \begin_inset Newline newline
8028 \end_inset
8029
8030 段落様式に関する詳細は、第
8031 \begin_inset CommandInset ref
8032 LatexCommand ref
8033 reference "sub:段落様式-XHTML"
8034
8035 \end_inset
8036
8037 節をご覧ください。
8038 \end_layout
8039
8040 \begin_layout Description
8041 \begin_inset Flex Code
8042 status collapsed
8043
8044 \begin_layout Plain Layout
8045 TitleLatexName
8046 \end_layout
8047
8048 \end_inset
8049
8050  [
8051 \begin_inset Flex Code
8052 status collapsed
8053
8054 \begin_layout Plain Layout
8055 文字列="maketitle"
8056 \end_layout
8057
8058 \end_inset
8059
8060
8061 \begin_inset Flex Code
8062 status collapsed
8063
8064 \begin_layout Plain Layout
8065 TitleLatexType
8066 \end_layout
8067
8068 \end_inset
8069
8070 で使用すべきコマンド名あるいは環境名。The name of the command or environment to be used with
8071  
8072 \begin_inset Flex Code
8073 status collapsed
8074
8075 \begin_layout Plain Layout
8076 TitleLatexType
8077 \end_layout
8078
8079 \end_inset
8080
8081 .
8082 \end_layout
8083
8084 \begin_layout Description
8085 \begin_inset Flex Code
8086 status collapsed
8087
8088 \begin_layout Plain Layout
8089 TitleLatexType
8090 \end_layout
8091
8092 \end_inset
8093
8094  [
8095 \begin_inset Flex Code
8096 status collapsed
8097
8098 \begin_layout Plain Layout
8099
8100 \emph on
8101 CommandAfter
8102 \end_layout
8103
8104 \end_inset
8105
8106
8107 \begin_inset Flex Code
8108 status collapsed
8109
8110 \begin_layout Plain Layout
8111 Environment
8112 \end_layout
8113
8114 \end_inset
8115
8116 ] 文書のタイトルを定義するのに、どのようなマークアップを使用するのかを示します。
8117 \begin_inset Flex Code
8118 status collapsed
8119
8120 \begin_layout Plain Layout
8121 CommandAfter
8122 \end_layout
8123
8124 \end_inset
8125
8126 は、「
8127 \begin_inset Flex Code
8128 status collapsed
8129
8130 \begin_layout Plain Layout
8131 InTitle 1
8132 \end_layout
8133
8134 \end_inset
8135
8136 」が指定されている最後のレイアウトの後に、
8137 \begin_inset Flex Code
8138 status collapsed
8139
8140 \begin_layout Plain Layout
8141 TitleLatexName
8142 \end_layout
8143
8144 \end_inset
8145
8146 で指定したマクロ名を挿入することを意味します。
8147 \begin_inset Flex Code
8148 status collapsed
8149
8150 \begin_layout Plain Layout
8151 Environment
8152 \end_layout
8153
8154 \end_inset
8155
8156 は、「
8157 \begin_inset Flex Code
8158 status collapsed
8159
8160 \begin_layout Plain Layout
8161 InTitle 1
8162 \end_layout
8163
8164 \end_inset
8165
8166 」を持つ段落群を
8167 \begin_inset Flex Code
8168 status collapsed
8169
8170 \begin_layout Plain Layout
8171 TitleLatexName
8172 \end_layout
8173
8174 \end_inset
8175
8176 で指定した環境でくるむ場合に対応します。
8177 \end_layout
8178
8179 \begin_layout Description
8180 \begin_inset Flex Code
8181 status collapsed
8182
8183 \begin_layout Plain Layout
8184 TocDepth
8185 \end_layout
8186
8187 \end_inset
8188
8189  どの節区切りまで目次に取り込むかを指定します。LaTeXの
8190 \begin_inset Flex Code
8191 status collapsed
8192
8193 \begin_layout Plain Layout
8194 tocdepth
8195 \end_layout
8196
8197 \end_inset
8198
8199 カウンタに対応します。
8200 \end_layout
8201
8202 \begin_layout Subsection
8203 \begin_inset Flex Code
8204 status collapsed
8205
8206 \begin_layout Plain Layout
8207 ClassOptions
8208 \end_layout
8209
8210 \end_inset
8211
8212
8213 \begin_inset CommandInset label
8214 LatexCommand label
8215 name "sub:ClassOptions"
8216
8217 \end_inset
8218
8219
8220 \end_layout
8221
8222 \begin_layout Standard
8223 \begin_inset Flex Code
8224 status collapsed
8225
8226 \begin_layout Plain Layout
8227 ClassOptions
8228 \end_layout
8229
8230 \end_inset
8231
8232 部は、以下の項目を取り得ます。
8233 \end_layout
8234
8235 \begin_layout Description
8236 \begin_inset Flex Code
8237 status collapsed
8238
8239 \begin_layout Plain Layout
8240 FontSize
8241 \end_layout
8242
8243 \end_inset
8244
8245  [
8246 \begin_inset Flex Code
8247 status collapsed
8248
8249 \begin_layout Plain Layout
8250 文字列="10|11|12"
8251 \end_layout
8252
8253 \end_inset
8254
8255 ] 文書のメインフォントが使用できるフォント寸法の一覧です。「
8256 \begin_inset Flex Code
8257 status collapsed
8258
8259 \begin_layout Plain Layout
8260 |
8261 \end_layout
8262
8263 \end_inset
8264
8265 」で区切ります。
8266 \end_layout
8267
8268 \begin_layout Description
8269 \begin_inset Flex Code
8270 status collapsed
8271
8272 \begin_layout Plain Layout
8273 Header
8274 \end_layout
8275
8276 \end_inset
8277
8278  XMLベースの出力クラスで、DTD行を設定するのに使用されます。例:PUBLIC 
8279 \begin_inset Quotes eld
8280 \end_inset
8281
8282 -//OASIS//DTD DocBook V4.2//EN
8283 \begin_inset Quotes erd
8284 \end_inset
8285
8286
8287 \end_layout
8288
8289 \begin_layout Description
8290 \begin_inset Flex Code
8291 status collapsed
8292
8293 \begin_layout Plain Layout
8294 PageStyle
8295 \end_layout
8296
8297 \end_inset
8298
8299  [
8300 \begin_inset Flex Code
8301 status collapsed
8302
8303 \begin_layout Plain Layout
8304 文字列="empty|plain|headings|fancy"
8305 \end_layout
8306
8307 \end_inset
8308
8309 ] 使用できるページ様式の一覧です。「
8310 \begin_inset Flex Code
8311 status collapsed
8312
8313 \begin_layout Plain Layout
8314 |
8315 \end_layout
8316
8317 \end_inset
8318
8319 」で区切ります。
8320 \end_layout
8321
8322 \begin_layout Description
8323 \begin_inset Flex Code
8324 status collapsed
8325
8326 \begin_layout Plain Layout
8327 Other
8328 \end_layout
8329
8330 \end_inset
8331
8332  [
8333 \begin_inset Flex Code
8334 status collapsed
8335
8336 \begin_layout Plain Layout
8337 文字列=""
8338 \end_layout
8339
8340 \end_inset
8341
8342
8343 \begin_inset Flex Code
8344 status collapsed
8345
8346 \begin_layout Plain Layout
8347
8348 \backslash
8349 documentclass
8350 \end_layout
8351
8352 \end_inset
8353
8354 コマンドの非必須パラメータとして付け加える文書クラスオプションです。コンマで区切ります。
8355 \end_layout
8356
8357 \begin_layout Standard
8358 \begin_inset Flex Code
8359 status collapsed
8360
8361 \begin_layout Plain Layout
8362 ClassOptions
8363 \end_layout
8364
8365 \end_inset
8366
8367 部は「
8368 \begin_inset Flex Code
8369 status collapsed
8370
8371 \begin_layout Plain Layout
8372 End
8373 \end_layout
8374
8375 \end_inset
8376
8377 」で閉じる必要があります。
8378 \end_layout
8379
8380 \begin_layout Subsection
8381 段落様式
8382 \begin_inset CommandInset label
8383 LatexCommand label
8384 name "sub:段落様式"
8385
8386 \end_inset
8387
8388
8389 \end_layout
8390
8391 \begin_layout Standard
8392 段落様式の記述は、以下のようになります
8393 \begin_inset Foot
8394 status collapsed
8395
8396 \begin_layout Plain Layout
8397 これは新しいレイアウトを定義するか、既存のレイアウトを修正することになることに注意してください。
8398 \end_layout
8399
8400 \end_inset
8401
8402
8403 \end_layout
8404
8405 \begin_layout LyX-Code
8406 Style 
8407 \family roman
8408 \emph on
8409 名称
8410 \end_layout
8411
8412 \begin_layout LyX-Code
8413  ...
8414 \end_layout
8415
8416 \begin_layout LyX-Code
8417 End
8418 \end_layout
8419
8420 \begin_layout Standard
8421 ここでは、以下のコマンドを使用することができます。
8422 \end_layout
8423
8424 \begin_layout Description
8425 \begin_inset Flex Code
8426 status collapsed
8427
8428 \begin_layout Plain Layout
8429 Align
8430 \end_layout
8431
8432 \end_inset
8433
8434  [
8435 \begin_inset Flex Code
8436 status collapsed
8437
8438 \begin_layout Plain Layout
8439
8440 \emph on
8441 block
8442 \emph default
8443 , left, right, center
8444 \end_layout
8445
8446 \end_inset
8447
8448 ] 段落の揃え。
8449 \end_layout
8450
8451 \begin_layout Description
8452 \begin_inset Flex Code
8453 status collapsed
8454
8455 \begin_layout Plain Layout
8456 AlignPossible
8457 \end_layout
8458
8459 \end_inset
8460
8461  [
8462 \begin_inset Flex Code
8463 status collapsed
8464
8465 \begin_layout Plain Layout
8466
8467 \emph on
8468 block
8469 \emph default
8470 , left, right, center
8471 \end_layout
8472
8473 \end_inset
8474
8475 ] 使用できる揃えのコンマ区切りリスト(LaTeXスタイルには、意味を成さない一部の揃えが禁じられているものがあります。たとえば、連番箇条書きを右揃えや中央揃え
8476 にすることはできません)。
8477 \end_layout
8478
8479 \begin_layout Description
8480 \begin_inset Flex Code
8481 status collapsed
8482
8483 \begin_layout Plain Layout
8484 BabelPreamble
8485 \end_layout
8486
8487 \end_inset
8488
8489  これは、前に現れたこの様式の
8490 \begin_inset Flex Code
8491 status collapsed
8492
8493 \begin_layout Plain Layout
8494 BabelPreamble
8495 \end_layout
8496
8497 \end_inset
8498
8499 宣言をすべて、完全に上書きしますので注意してください。「
8500 \begin_inset Flex Code
8501 status collapsed
8502
8503 \begin_layout Plain Layout
8504 EndBabelPreamble
8505 \end_layout
8506
8507 \end_inset
8508
8509 」で閉じる必要があります。これの利用法についての詳細は、第
8510 \begin_inset CommandInset ref
8511 LatexCommand ref
8512 reference "sub:段落様式の国際化"
8513
8514 \end_inset
8515
8516 節をご覧ください。
8517 \end_layout
8518
8519 \begin_layout Description
8520 \begin_inset Flex Code
8521 status collapsed
8522
8523 \begin_layout Plain Layout
8524 BottomSep
8525 \end_layout
8526
8527 \end_inset
8528
8529  [
8530 \begin_inset Flex Code
8531 status collapsed
8532
8533 \begin_layout Plain Layout
8534 浮動小数点型=0
8535 \end_layout
8536
8537 \end_inset
8538
8539 ]
8540 \begin_inset Foot
8541 status collapsed
8542
8543 \begin_layout Plain Layout
8544 ここで「浮動小数点型」とは1.5のような実数を指します。
8545 \end_layout
8546
8547 \end_inset
8548
8549  このレイアウト型の段落塊の最後の段落と、次の段落とを分離する垂直空白。次の段落が別のレイアウト型である場合、分離幅は足し上げられるのではなく、最大値がとられま
8550 す。
8551 \end_layout
8552
8553 \begin_layout Description
8554 \begin_inset Flex Code
8555 status collapsed
8556
8557 \begin_layout Plain Layout
8558 Category
8559 \end_layout
8560
8561 \end_inset
8562
8563  [
8564 \begin_inset Flex Code
8565 status collapsed
8566
8567 \begin_layout Plain Layout
8568 文字列
8569 \end_layout
8570
8571 \end_inset
8572
8573 ] この様式のカテゴリです。これは、ツールバーのレイアウト・コンボボックスで関連した様式をグループ化するのに用いられます。任意の文字列を使用することができますが
8574 、作成した様式に既存のカテゴリを使用したいと思うことが多いでしょう。
8575 \end_layout
8576
8577 \begin_layout Description
8578 \begin_inset Flex Code
8579 status collapsed
8580
8581 \begin_layout Plain Layout
8582 CommandDepth
8583 \end_layout
8584
8585 \end_inset
8586
8587  XMLコマンドの深度。XML型の書式でのみ使用されます。
8588 \end_layout
8589
8590 \begin_layout Description
8591 \begin_inset Flex Code
8592 status collapsed
8593
8594 \begin_layout Plain Layout
8595 CopyStyle
8596 \end_layout
8597
8598 \end_inset
8599
8600  [
8601 \begin_inset Flex Code
8602 status collapsed
8603
8604 \begin_layout Plain Layout
8605 文字列
8606 \end_layout
8607
8608 \end_inset
8609
8610 ] 既存の様式から、すべての機能を現在の様式にコピーします。
8611 \end_layout
8612
8613 \begin_layout Description
8614 \begin_inset Flex Code
8615 status collapsed
8616
8617 \begin_layout Plain Layout
8618 DependsOn
8619 \end_layout
8620
8621 \end_inset
8622
8623  この
8624 \emph on
8625 前に
8626 \emph default
8627 プリアンブルを出力させる様式名。マクロ定義がお互いに依存関係にある場合に、プリアンブルの断片の順序を確実にするためのものです
8628 \begin_inset Foot
8629 status collapsed
8630
8631 \begin_layout Plain Layout
8632 この機能以外には、プリアンブルの順序を確定する方法はないことに注意してください。LyXの特定のバージョンで観察された順序は、将来のバージョンで警告なしに変わる可
8633 能性があります。
8634 \end_layout
8635
8636 \end_inset
8637
8638
8639 \end_layout
8640
8641 \begin_layout Description
8642 \begin_inset Flex Code
8643 status collapsed
8644
8645 \begin_layout Plain Layout
8646 EndLabeltype
8647 \end_layout
8648
8649 \end_inset
8650
8651  [
8652 \begin_inset Flex Code
8653 status collapsed
8654
8655 \begin_layout Plain Layout
8656
8657 \emph on
8658 No_Label
8659 \emph default
8660 , Box, Filled_Box, Static
8661 \end_layout
8662
8663 \end_inset
8664
8665 ] 段落の最後(あるいは
8666 \begin_inset Flex Code
8667 status collapsed
8668
8669 \begin_layout Plain Layout
8670 LatexType
8671 \end_layout
8672
8673 \end_inset
8674
8675 が、
8676 \begin_inset Flex Code
8677 status collapsed
8678
8679 \begin_layout Plain Layout
8680 Environment
8681 \end_layout
8682
8683 \end_inset
8684
8685
8686 \begin_inset Flex Code
8687 status collapsed
8688
8689 \begin_layout Plain Layout
8690 Item_Environment
8691 \end_layout
8692
8693 \end_inset
8694
8695
8696 \begin_inset Flex Code
8697 status collapsed
8698
8699 \begin_layout Plain Layout
8700 List_Environment
8701 \end_layout
8702
8703 \end_inset
8704
8705 のいずれかの場合は、段落群の最後)に置くラベル。
8706 \begin_inset Flex Code
8707 status collapsed
8708
8709 \begin_layout Plain Layout
8710 No_Label
8711 \end_layout
8712
8713 \end_inset
8714
8715 の場合は「何もない」ことを指し、
8716 \begin_inset Flex Code
8717 status collapsed
8718
8719 \begin_layout Plain Layout
8720 Box
8721 \end_layout
8722
8723 \end_inset
8724
8725 (あるいは
8726 \begin_inset Flex Code
8727 status collapsed
8728
8729 \begin_layout Plain Layout
8730 Filled_Box
8731 \end_layout
8732
8733 \end_inset
8734
8735 )の場合は、証明終了マーカ用の白い箱型(あるいは黒い箱型)を指し、
8736 \begin_inset Flex Code
8737 status collapsed
8738
8739 \begin_layout Plain Layout
8740 Static
8741 \end_layout
8742
8743 \end_inset
8744
8745 は明示したテキスト文字列を指します。
8746 \end_layout
8747
8748 \begin_layout Description
8749 \begin_inset Flex Code
8750 status collapsed
8751
8752 \begin_layout Plain Layout
8753 EndLabelString
8754 \end_layout
8755
8756 \end_inset
8757
8758  [
8759 \begin_inset Flex Code
8760 status collapsed
8761
8762 \begin_layout Plain Layout
8763 文字列=""
8764 \end_layout
8765
8766 \end_inset
8767
8768
8769 \begin_inset Flex Code
8770 status collapsed
8771
8772 \begin_layout Plain Layout
8773 Static
8774 \end_layout
8775
8776 \end_inset
8777
8778
8779 \begin_inset Flex Code
8780 status collapsed
8781
8782 \begin_layout Plain Layout
8783 EndLabelType
8784 \end_layout
8785
8786 \end_inset
8787
8788 のラベルで用いる文字列。
8789 \end_layout
8790
8791 \begin_layout Description
8792 \begin_inset Flex Code
8793 status collapsed
8794
8795 \begin_layout Plain Layout
8796 Fill_Bottom
8797 \end_layout
8798
8799 \end_inset
8800
8801  [
8802 \begin_inset Flex Code
8803 status collapsed
8804
8805 \begin_layout Plain Layout
8806
8807 \emph on
8808 0
8809 \emph default
8810 ,1
8811 \end_layout
8812
8813 \end_inset
8814
8815
8816 \begin_inset Flex Code
8817 status collapsed
8818
8819 \begin_layout Plain Layout
8820 Fill_Top
8821 \end_layout
8822
8823 \end_inset
8824
8825 と同様。
8826 \end_layout
8827
8828 \begin_layout Description
8829 \begin_inset Flex Code
8830 status collapsed
8831
8832 \begin_layout Plain Layout
8833 Fill_Top
8834 \end_layout
8835
8836 \end_inset
8837
8838  [
8839 \begin_inset Flex Code
8840 status collapsed
8841
8842 \begin_layout Plain Layout
8843
8844 \emph on
8845 0
8846 \emph default
8847 ,1
8848 \end_layout
8849
8850 \end_inset
8851
8852 ] このパラメータは、この様式で段落を初期化する際に設定される、
8853 \begin_inset Flex MenuItem
8854 status collapsed
8855
8856 \begin_layout Plain Layout
8857 編集\SpecialChar \menuseparator
8858 段落設定
8859 \end_layout
8860
8861 \end_inset
8862
8863 ダイアログの「上部垂直余白」リストの
8864 \begin_inset Flex MenuItem
8865 status collapsed
8866
8867 \begin_layout Plain Layout
8868 Fill
8869 \end_layout
8870
8871 \end_inset
8872
8873 値を設定します
8874 \begin_inset Foot
8875 status collapsed
8876
8877 \begin_layout Plain Layout
8878
8879 \emph on
8880 Jean-Marcによる註
8881 \emph default
8882 :この設定にどれほど使途があるかは定かでなく、おそらく将来のバージョンで取り除かれます。
8883 \end_layout
8884
8885 \end_inset
8886
8887  。
8888 \end_layout
8889
8890 \begin_layout Description
8891 \begin_inset Flex Code
8892 status collapsed
8893
8894 \begin_layout Plain Layout
8895 Font
8896 \end_layout
8897
8898 \end_inset
8899
8900  本文テキストとラベルの
8901 \emph on
8902 両方で
8903 \emph default
8904 用いられるフォント。第
8905 \begin_inset CommandInset ref
8906 LatexCommand ref
8907 reference "sub:フォント指定"
8908
8909 \end_inset
8910
8911 節を参照。このフォントを定義すると、自動的に
8912 \begin_inset Flex Code
8913 status collapsed
8914
8915 \begin_layout Plain Layout
8916 LabelFont
8917 \end_layout
8918
8919 \end_inset
8920
8921 も同じ値で定義されることに注意してください。したがって、
8922 \begin_inset Flex Code
8923 status collapsed
8924
8925 \begin_layout Plain Layout
8926 LabelFont
8927 \end_layout
8928
8929 \end_inset
8930
8931 も同時に定義したい場合には、これを先に定義してください。
8932 \end_layout
8933
8934 \begin_layout Description
8935 \begin_inset Flex Code
8936 status collapsed
8937
8938 \begin_layout Plain Layout
8939 FreeSpacing
8940 \end_layout
8941
8942 \end_inset
8943
8944  
8945 \begin_inset CommandInset label
8946 LatexCommand label
8947 name "des:FreeSpacing"
8948
8949 \end_inset
8950
8951 [
8952 \emph on
8953
8954 \begin_inset Flex Code
8955 status collapsed
8956
8957 \begin_layout Plain Layout
8958 0
8959 \end_layout
8960
8961 \end_inset
8962
8963
8964 \emph default
8965
8966 \begin_inset Flex Code
8967 status collapsed
8968
8969 \begin_layout Plain Layout
8970 1
8971 \end_layout
8972
8973 \end_inset
8974
8975 ] LyXは、空白をそれ自体文字や記号ではなく、2つの単語の間の分割子として捉えているため、単語間に2つ以上の空白を入れることは、通常許可していません。これ自体
8976 はとても素晴らしいことですが、たとえばプログラムコードや生のLaTeXコードを入力しようとするときなどに、煩わしくなることがあります。このことから、
8977 \begin_inset Flex Code
8978 status collapsed
8979
8980 \begin_layout Plain Layout
8981 FreeSpacing
8982 \end_layout
8983
8984 \end_inset
8985
8986 を有効にすることが認められています。LyXは、LaTeXモード以外では2つめ以降の空白には、保護された空白を使用することに注意してください。
8987 \end_layout
8988
8989 \begin_layout Description
8990 \begin_inset Flex Code
8991 status collapsed
8992
8993 \begin_layout Plain Layout
8994 HTML*
8995 \end_layout
8996
8997 \end_inset
8998
8999  これらのタグは、XHTML出力で使用されます。第
9000 \begin_inset CommandInset ref
9001 LatexCommand ref
9002 reference "sub:段落様式-XHTML"
9003
9004 \end_inset
9005
9006 節をご覧ください。
9007 \end_layout
9008
9009 \begin_layout Description
9010 \begin_inset Flex Code
9011 status collapsed
9012
9013 \begin_layout Plain Layout
9014 InnerTag
9015 \end_layout
9016
9017 \end_inset
9018
9019  [[FIXME]] (XML型書式でのみ使用されます。)
9020 \end_layout
9021
9022 \begin_layout Description
9023 \begin_inset Flex Code
9024 status collapsed
9025
9026 \begin_layout Plain Layout
9027 InTitle
9028 \end_layout
9029
9030 \end_inset
9031
9032  
9033 \begin_inset Flex Code
9034 status collapsed
9035
9036 \begin_layout Plain Layout
9037 [1, 0]
9038 \end_layout
9039
9040 \end_inset
9041
9042  1の場合、このレイアウトをタイトルブロックの一部としてマークします(大域項目の
9043 \begin_inset Flex Code
9044 status collapsed
9045
9046 \begin_layout Plain Layout
9047 TitleLatexType
9048 \end_layout
9049
9050 \end_inset
9051
9052
9053 \begin_inset Flex Code
9054 status collapsed
9055
9056 \begin_layout Plain Layout
9057 TitleLatexName
9058 \end_layout
9059
9060 \end_inset
9061
9062 も参照)。
9063 \end_layout
9064
9065 \begin_layout Description
9066 \begin_inset Flex Code
9067 status collapsed
9068
9069 \begin_layout Plain Layout
9070 ItemSep
9071 \end_layout
9072
9073 \end_inset
9074
9075  [
9076 \begin_inset Flex Code
9077 status collapsed
9078
9079 \begin_layout Plain Layout
9080 浮動小数点型=0
9081 \end_layout
9082
9083 \end_inset
9084
9085 ] これは、同じレイアウトを持つ段落群の間に追加する空白を与えるものです。複数のレイアウトを一つの環境に入れると、それぞれのレイアウトは、その環境の
9086 \begin_inset Flex Code
9087 status collapsed
9088
9089 \begin_layout Plain Layout
9090 Parsep
9091 \end_layout
9092
9093 \end_inset
9094
9095 だけ分離されます。しかし、その環境の項目全体は、さらにこの
9096 \begin_inset Flex Code
9097 status collapsed
9098
9099 \begin_layout Plain Layout
9100 Itemsep
9101 \end_layout
9102
9103 \end_inset
9104
9105 分だけ離されます。これは
9106 \emph on
9107 乗数
9108 \emph default
9109 であることに注意してください。
9110 \end_layout
9111
9112 \begin_layout Description
9113 \begin_inset Flex Code
9114 status collapsed
9115
9116 \begin_layout Plain Layout
9117 ItemTag
9118 \end_layout
9119
9120 \end_inset
9121
9122  [[FIXME]] (XML型書式でのみ使用されます。)
9123 \end_layout
9124
9125 \begin_layout Description
9126 \begin_inset Flex Code
9127 status collapsed
9128
9129 \begin_layout Plain Layout
9130 KeepEmpty
9131 \end_layout
9132
9133 \end_inset
9134
9135  [
9136 \emph on
9137
9138 \begin_inset Flex Code
9139 status collapsed
9140
9141 \begin_layout Plain Layout
9142 0
9143 \end_layout
9144
9145 \end_inset
9146
9147
9148 \emph default
9149
9150 \begin_inset Flex Code
9151 status collapsed
9152
9153 \begin_layout Plain Layout
9154 1
9155 \end_layout
9156
9157 \end_inset
9158
9159 ] 段落を空のままにすると、LaTeX出力が空になってしまうので、通常、LyXは段落を空にすることを許可しません。しかしながら、これを無効にすることが望ましい場
9160 合が存在します。たとえば、書簡のひな型では、必須フィールドを人々が忘れないように、空のフィールドのまま提供する手もあります。特別なクラスにおいては、レイアウトを
9161 実際には文章を含まないある種の改行として使用することもあります。
9162 \end_layout
9163
9164 \begin_layout Description
9165 \begin_inset Flex Code
9166 status collapsed
9167
9168 \begin_layout Plain Layout
9169 LabelBottomsep
9170 \end_layout
9171
9172 \end_inset
9173
9174  [
9175 \begin_inset Flex Code
9176 status collapsed
9177
9178 \begin_layout Plain Layout
9179 浮動小数点型=0
9180 \end_layout
9181
9182 \end_inset
9183
9184 ] ラベルと本文テキストとの間の垂直余白。本文テキストの上に来るラベルにのみ使用されます(
9185 \begin_inset Flex Code
9186 status collapsed
9187
9188 \begin_layout Plain Layout
9189 Top_Environment
9190 \end_layout
9191
9192 \end_inset
9193
9194 および
9195 \begin_inset Newline linebreak
9196 \end_inset
9197
9198
9199 \begin_inset Flex Code
9200 status collapsed
9201
9202 \begin_layout Plain Layout
9203 Centered_Top_Environment
9204 \end_layout
9205
9206 \end_inset
9207
9208 )。
9209 \end_layout
9210
9211 \begin_layout Description
9212 \begin_inset Flex Code
9213 status collapsed
9214
9215 \begin_layout Plain Layout
9216 LabelCounter
9217 \end_layout
9218
9219 \end_inset
9220
9221  [
9222 \begin_inset Flex Code
9223 status collapsed
9224
9225 \begin_layout Plain Layout
9226 文字列=""
9227 \end_layout
9228
9229 \end_inset
9230
9231 ]
9232 \begin_inset Newline newline
9233 \end_inset
9234
9235 自動連番に使われるカウンタ名(詳しくは第
9236 \begin_inset CommandInset ref
9237 LatexCommand ref
9238 reference "sub:カウンタ"
9239
9240 \end_inset
9241
9242 節参照)。
9243 \begin_inset Newline newline
9244 \end_inset
9245
9246
9247 \begin_inset Flex Code
9248 status collapsed
9249
9250 \begin_layout Plain Layout
9251 LabelType
9252 \end_layout
9253
9254 \end_inset
9255
9256
9257 \begin_inset Flex Code
9258 status collapsed
9259
9260 \begin_layout Plain Layout
9261 Counter
9262 \end_layout
9263
9264 \end_inset
9265
9266 型のときには、本項目は
9267 \emph on
9268 必須
9269 \emph default
9270 です。この場合には、この様式が出現するたびにカウンタが増えます。
9271 \begin_inset Newline newline
9272 \end_inset
9273
9274 また、
9275 \begin_inset Flex Code
9276 status collapsed
9277
9278 \begin_layout Plain Layout
9279 LabelType
9280 \end_layout
9281
9282 \end_inset
9283
9284
9285 \begin_inset Flex Code
9286 status collapsed
9287
9288 \begin_layout Plain Layout
9289 Enumerate
9290 \end_layout
9291
9292 \end_inset
9293
9294 型のときにも、若干複雑にはなりますが、本項目を使うことができます。たとえば、「
9295 \begin_inset Flex Code
9296 status collapsed
9297
9298 \begin_layout Plain Layout
9299 LabelCounter myenum
9300 \end_layout
9301
9302 \end_inset
9303
9304 」と宣言したものとしましょう。すると、LaTeXにおけるのと同様、実際に使われるカウンタは、
9305 \begin_inset Flex Code
9306 status collapsed
9307
9308 \begin_layout Plain Layout
9309 myenumi
9310 \end_layout
9311
9312 \end_inset
9313
9314
9315 \begin_inset Flex Code
9316 status collapsed
9317
9318 \begin_layout Plain Layout
9319 myenumii
9320 \end_layout
9321
9322 \end_inset
9323
9324
9325 \begin_inset Flex Code
9326 status collapsed
9327
9328 \begin_layout Plain Layout
9329 myenumii
9330 \end_layout
9331
9332 \end_inset
9333
9334
9335 \begin_inset Flex Code
9336 status collapsed
9337
9338 \begin_layout Plain Layout
9339 myenumiv
9340 \end_layout
9341
9342 \end_inset
9343
9344 のようになります。これらのカウンタは、全て別々に宣言されなくてはなりません。
9345 \begin_inset Newline newline
9346 \end_inset
9347
9348 カウンタの詳細については、第
9349 \begin_inset CommandInset ref
9350 LatexCommand ref
9351 reference "sub:カウンタ"
9352
9353 \end_inset
9354
9355 節をご覧ください。
9356 \end_layout
9357
9358 \begin_layout Description
9359 \begin_inset Flex Code
9360 status collapsed
9361
9362 \begin_layout Plain Layout
9363 LabelFont
9364 \end_layout
9365
9366 \end_inset
9367
9368  ラベルに使用されるフォント。第
9369 \begin_inset CommandInset ref
9370 LatexCommand ref
9371 reference "sub:フォント指定"
9372
9373 \end_inset
9374
9375 節を参照。
9376 \end_layout
9377
9378 \begin_layout Description
9379 \begin_inset Flex Code
9380 status collapsed
9381
9382 \begin_layout Plain Layout
9383 LabelIndent
9384 \end_layout
9385
9386 \end_inset
9387
9388  ラベルをどれくらい行頭下げすべきかを示す文字列。
9389 \end_layout
9390
9391 \begin_layout Description
9392 \begin_inset Flex Code
9393 status collapsed
9394
9395 \begin_layout Plain Layout
9396 Labelsep
9397 \end_layout
9398
9399 \end_inset
9400
9401  [
9402 \begin_inset Flex Code
9403 status collapsed
9404
9405 \begin_layout Plain Layout
9406 文字列=""
9407 \end_layout
9408
9409 \end_inset
9410
9411 ] ラベルと本文テキストの間の水平余白。本文テキストの上に来ないラベルにのみ使用されます。
9412 \end_layout
9413
9414 \begin_layout Description
9415 \begin_inset Flex Code
9416 status collapsed
9417
9418 \begin_layout Plain Layout
9419 LabelString
9420 \end_layout
9421
9422 \end_inset
9423
9424  [
9425 \begin_inset Flex Code
9426 status collapsed
9427
9428 \begin_layout Plain Layout
9429 文字列=""
9430 \end_layout
9431
9432 \end_inset
9433
9434
9435 \begin_inset Flex Code
9436 status collapsed
9437
9438 \begin_layout Plain Layout
9439 Static
9440 \end_layout
9441
9442 \end_inset
9443
9444 ラベル型でラベルに使用する文字列。
9445 \begin_inset Flex Code
9446 status collapsed
9447
9448 \begin_layout Plain Layout
9449 LabelCounter
9450 \end_layout
9451
9452 \end_inset
9453
9454 を設定している場合、第
9455 \begin_inset CommandInset ref
9456 LatexCommand ref
9457 reference "sub:カウンタ"
9458
9459 \end_inset
9460
9461 節に述べられている特別な整形コマンドを含めることができます
9462 \begin_inset Foot
9463 status collapsed
9464
9465 \begin_layout Plain Layout
9466 後方互換性のために、
9467 \begin_inset Flex Code
9468 status collapsed
9469
9470 \begin_layout Plain Layout
9471 @
9472 \emph on
9473 style-name
9474 \emph default
9475 @
9476 \end_layout
9477
9478 \end_inset
9479
9480 という文字列は、
9481 \begin_inset Flex Code
9482 status collapsed
9483
9484 \begin_layout Plain Layout
9485
9486 \emph on
9487 style-name
9488 \end_layout
9489
9490 \end_inset
9491
9492 様式の
9493 \begin_inset Flex Code
9494 status collapsed
9495
9496 \begin_layout Plain Layout
9497 LabelString
9498 \end_layout
9499
9500 \end_inset
9501
9502 を展開したものに置換されます。この機能は既に廃されたものとなっているので、第
9503 \begin_inset CommandInset ref
9504 LatexCommand ref
9505 reference "sub:カウンタ"
9506
9507 \end_inset
9508
9509 節の機構に置き換えられなくてはなりません。
9510 \end_layout
9511
9512 \end_inset
9513
9514
9515 \end_layout
9516
9517 \begin_layout Description
9518 \begin_inset Flex Code
9519 status collapsed
9520
9521 \begin_layout Plain Layout
9522 LabelStringAppendix
9523 \end_layout
9524
9525 \end_inset
9526
9527  [
9528 \begin_inset Flex Code
9529 status collapsed
9530
9531 \begin_layout Plain Layout
9532 文字列=""
9533 \end_layout
9534
9535 \end_inset
9536
9537 ] これは付録の中で
9538 \begin_inset Flex Code
9539 status collapsed
9540
9541 \begin_layout Plain Layout
9542 LabelString
9543 \end_layout
9544
9545 \end_inset
9546
9547 の代わりに用いられます。各
9548 \begin_inset Flex Code
9549 status collapsed
9550
9551 \begin_layout Plain Layout
9552 LabelString
9553 \end_layout
9554
9555 \end_inset
9556
9557 ステートメントは、
9558 \begin_inset Flex Code
9559 status collapsed
9560
9561 \begin_layout Plain Layout
9562 LabelStringAppendix
9563 \end_layout
9564
9565 \end_inset
9566
9567 をもリセットすることに注意してください。
9568 \end_layout
9569
9570 \begin_layout Description
9571 \begin_inset Flex Code
9572 status collapsed
9573
9574 \begin_layout Plain Layout
9575 LabelTag
9576 \end_layout
9577
9578 \end_inset
9579
9580  [FIXME] (XML型書式でのみ使用されます。)
9581 \end_layout
9582
9583 \begin_layout Description
9584 \begin_inset Flex Code
9585 status collapsed
9586
9587 \begin_layout Plain Layout
9588 LabelType
9589 \end_layout
9590
9591 \end_inset
9592
9593  [
9594 \begin_inset Flex Code
9595 status collapsed
9596
9597 \begin_layout Plain Layout
9598
9599 \emph on
9600 No_Label
9601 \emph default
9602 , Manual, Static, Top_Environment, Centered_Top_Environment, Counter, Sensitive,
9603  Enumerate, Itemize, Bibliography
9604 \end_layout
9605
9606 \end_inset
9607
9608 ]
9609 \end_layout
9610
9611 \begin_deeper
9612 \begin_layout Itemize
9613 \begin_inset Flex Code
9614 status collapsed
9615
9616 \begin_layout Plain Layout
9617 Manual
9618 \end_layout
9619
9620 \end_inset
9621
9622 は、ラベルが最初の単語(最初の本当の空白まで)であることを示します。ラベルに2単語以上使用したいときは、保護された空白を使用してください。
9623 \end_layout
9624
9625 \begin_layout Itemize
9626 \begin_inset Flex Code
9627 status collapsed
9628
9629 \begin_layout Plain Layout
9630 Static
9631 \end_layout
9632
9633 \end_inset
9634
9635 は、ラベルが
9636 \begin_inset Flex Code
9637 status collapsed
9638
9639 \begin_layout Plain Layout
9640 LabelString
9641 \end_layout
9642
9643 \end_inset
9644
9645 で宣言したものであることを示します。これは「静的」であることに注意してください。
9646 \end_layout
9647
9648 \begin_layout Itemize
9649 \begin_inset Flex Code
9650 status collapsed
9651
9652 \begin_layout Plain Layout
9653 Top_Environment
9654 \end_layout
9655
9656 \end_inset
9657
9658
9659 \begin_inset Flex Code
9660 status collapsed
9661
9662 \begin_layout Plain Layout
9663 Centered_Top_Environment
9664 \end_layout
9665
9666 \end_inset
9667
9668 は、
9669 \begin_inset Flex Code
9670 status collapsed
9671
9672 \begin_layout Plain Layout
9673 Static
9674 \end_layout
9675
9676 \end_inset
9677
9678 の特別な場合です。ラベルは段落の上に印字されるのですが、それは単一の環境の上か、このレイアウトを持つ連続した段落群の上だけに印字されます。たとえば、
9679 \begin_inset Flex MenuItem
9680 status collapsed
9681
9682 \begin_layout Plain Layout
9683 Abstract
9684 \end_layout
9685
9686 \end_inset
9687
9688 レイアウトが使用したりします。
9689 \end_layout
9690
9691 \begin_layout Itemize
9692 \begin_inset Flex Code
9693 status collapsed
9694
9695 \begin_layout Plain Layout
9696 Sensitive
9697 \end_layout
9698
9699 \end_inset
9700
9701 はキャプションラベルの「図」や「表」の特別な場合です。
9702 \begin_inset Flex Code
9703 status collapsed
9704
9705 \begin_layout Plain Layout
9706 Sensitive
9707 \end_layout
9708
9709 \end_inset
9710
9711 は、(ハードコードされた)ラベル文字列がフロートの種類に依存することを示します。これは、フロートに関連付けられたカウンタの値がNであるものとすると、「Float
9712 Type N」にハードコードされています。
9713 \end_layout
9714
9715 \begin_layout Itemize
9716 \begin_inset Flex Code
9717 status collapsed
9718
9719 \begin_layout Plain Layout
9720 Counter
9721 \end_layout
9722
9723 \end_inset
9724
9725 ラベル型は、自動的に連番が付されるラベルを定義します。
9726 \begin_inset Flex Code
9727 status collapsed
9728
9729 \begin_layout Plain Layout
9730 LabelString
9731 \end_layout
9732
9733 \end_inset
9734
9735 は、それが含むカウンタ参照をすべて解決するために展開されます。これは、たとえば
9736 \begin_inset Flex Code
9737 status collapsed
9738
9739 \begin_layout Plain Layout
9740 Section 
9741 \backslash
9742 thechapter.
9743 \backslash
9744 thesection
9745 \end_layout
9746
9747 \end_inset
9748
9749 のようになります。第
9750 \begin_inset CommandInset ref
9751 LatexCommand ref
9752 reference "sub:カウンタ"
9753
9754 \end_inset
9755
9756 節を参照してください。
9757 \end_layout
9758
9759 \begin_layout Itemize
9760 \begin_inset Flex Code
9761 status collapsed
9762
9763 \begin_layout Plain Layout
9764 Enumerate
9765 \end_layout
9766
9767 \end_inset
9768
9769 は、通常の連番ラベルを生成します。現在のところ、これは、第4階層まで順に、アラビア数字・小文字・小文字ローマ数字・大文字を使用するようにハードコードされています
9770
9771 \end_layout
9772
9773 \begin_layout Itemize
9774 \begin_inset Flex Code
9775 status collapsed
9776
9777 \begin_layout Plain Layout
9778 Itemize
9779 \end_layout
9780
9781 \end_inset
9782
9783 は、各階層でさまざまなブリットを生成します。これもハードコードされています。
9784 \end_layout
9785
9786 \begin_layout Itemize
9787 \begin_inset Flex Code
9788 status collapsed
9789
9790 \begin_layout Plain Layout
9791 Bibliography
9792 \end_layout
9793
9794 \end_inset
9795
9796 は、LyXで内部的に使用され、
9797 \begin_inset Flex Code
9798 status collapsed
9799
9800 \begin_layout Plain Layout
9801 LatexType BibEnvironment
9802 \end_layout
9803
9804 \end_inset
9805
9806 とともにのみ使用されます。
9807 \end_layout
9808
9809 \end_deeper
9810 \begin_layout Description
9811 \begin_inset Flex Code
9812 status collapsed
9813
9814 \begin_layout Plain Layout
9815 LangPreamble
9816 \end_layout
9817
9818 \end_inset
9819
9820  これは、この様式で既に出現した
9821 \begin_inset Flex Code
9822 status collapsed
9823
9824 \begin_layout Plain Layout
9825 LangPreamble
9826 \end_layout
9827
9828 \end_inset
9829
9830 宣言をすべて、完全に上書きしますので、注意してください。使用法についての詳細は、第
9831 \begin_inset CommandInset ref
9832 LatexCommand ref
9833 reference "sub:段落様式の国際化"
9834
9835 \end_inset
9836
9837 節をご覧ください。
9838 \end_layout
9839
9840 \begin_layout Description
9841 \begin_inset Flex Code
9842 status collapsed
9843
9844 \begin_layout Plain Layout
9845 LatexName
9846 \end_layout
9847
9848 \end_inset
9849
9850  対応するLaTeXの名称です。環境名かコマンド名を指します。
9851 \end_layout
9852
9853 \begin_layout Description
9854 \begin_inset Flex Code
9855 status collapsed
9856
9857 \begin_layout Plain Layout
9858 LatexParam
9859 \end_layout
9860
9861 \end_inset
9862
9863  対応する
9864 \begin_inset Flex Code
9865 status collapsed
9866
9867 \begin_layout Plain Layout
9868 LatexName
9869 \end_layout
9870
9871 \end_inset
9872
9873 の非必須パラメータです。このパラメータは、LyX内部から変更することはできません。
9874 \end_layout
9875
9876 \begin_layout Description
9877 \begin_inset Flex Code
9878 status collapsed
9879
9880 \begin_layout Plain Layout
9881 LatexType
9882 \end_layout
9883
9884 \end_inset
9885
9886  [
9887 \begin_inset Flex Code
9888 status collapsed
9889
9890 \begin_layout Plain Layout
9891
9892 \emph on
9893 Paragraph
9894 \emph default
9895 , Command, Environment, Item_Environment,
9896 \end_layout
9897
9898 \end_inset
9899
9900  
9901 \begin_inset Flex Code
9902 status collapsed
9903
9904 \begin_layout Plain Layout
9905 List_Environmen, Bib_Environment
9906 \end_layout
9907
9908 \end_inset
9909
9910 ] レイアウトがどのようにLaTeXに変換されるべきかを示します
9911 \begin_inset Foot
9912 status collapsed
9913
9914 \begin_layout Plain Layout
9915 これらのルールはSGMLクラスにも適用されるので、
9916 \begin_inset Flex Code
9917 status collapsed
9918
9919 \begin_layout Plain Layout
9920 LatexType
9921 \end_layout
9922
9923 \end_inset
9924
9925 の名称は、少しミスリーディングかもしれません。特定の例については、SGMLクラスファイルを見てください。
9926 \end_layout
9927
9928 \end_inset
9929
9930
9931 \end_layout
9932
9933 \begin_deeper
9934 \begin_layout Itemize
9935 \begin_inset Flex Code
9936 status collapsed
9937
9938 \begin_layout Plain Layout
9939 Paragraph
9940 \end_layout
9941
9942 \end_inset
9943
9944 は、何も特別なことは意味しません。
9945 \end_layout
9946
9947 \begin_layout Itemize
9948 \begin_inset Flex Code
9949 status collapsed
9950
9951 \begin_layout Plain Layout
9952 Command
9953 \end_layout
9954
9955 \end_inset
9956
9957 は、
9958 \begin_inset Flex Code
9959 status collapsed
9960
9961 \begin_layout Plain Layout
9962
9963 \backslash
9964
9965 \emph on
9966 LatexName
9967 \emph default
9968 {\SpecialChar \ldots{}
9969 }
9970 \end_layout
9971
9972 \end_inset
9973
9974 を意味します。
9975 \end_layout
9976
9977 \begin_layout Itemize
9978 \begin_inset Flex Code
9979 status collapsed
9980
9981 \begin_layout Plain Layout
9982 Environment
9983 \end_layout
9984
9985 \end_inset
9986
9987 は、
9988 \begin_inset Flex Code
9989 status collapsed
9990
9991 \begin_layout Plain Layout
9992
9993 \backslash
9994 begin{
9995 \emph on
9996 LatexName
9997 \emph default
9998 }\SpecialChar \ldots{}
9999
10000 \backslash
10001 end{
10002 \emph on
10003 LatexName
10004 \emph default
10005 }
10006 \end_layout
10007
10008 \end_inset
10009
10010 を意味します。
10011 \end_layout
10012
10013 \begin_layout Itemize
10014 \begin_inset Flex Code
10015 status collapsed
10016
10017 \begin_layout Plain Layout
10018 Item_Environment
10019 \end_layout
10020
10021 \end_inset
10022
10023
10024 \begin_inset Flex Code
10025 status collapsed
10026
10027 \begin_layout Plain Layout
10028 Environment
10029 \end_layout
10030
10031 \end_inset
10032
10033 と同じですが、
10034 \begin_inset Flex Code
10035 status collapsed
10036
10037 \begin_layout Plain Layout
10038
10039 \backslash
10040 item
10041 \end_layout
10042
10043 \end_inset
10044
10045 がこの環境のすべての段落に付けられるところだけが異なっています。
10046 \end_layout
10047
10048 \begin_layout Itemize
10049 \begin_inset Flex Code
10050 status collapsed
10051
10052 \begin_layout Plain Layout
10053 List_Environment
10054 \end_layout
10055
10056 \end_inset
10057
10058
10059 \begin_inset Flex Code
10060 status collapsed
10061
10062 \begin_layout Plain Layout
10063 Item_Environment
10064 \end_layout
10065
10066 \end_inset
10067
10068 と同じですが、
10069 \begin_inset Flex Code
10070 status collapsed
10071
10072 \begin_layout Plain Layout
10073 LabelWidthString
10074 \end_layout
10075
10076 \end_inset
10077
10078 が環境の引数として渡されるところだけが異なっています。
10079 \begin_inset Flex Code
10080 status collapsed
10081
10082 \begin_layout Plain Layout
10083 LabelWidthString
10084 \end_layout
10085
10086 \end_inset
10087
10088 は、
10089 \begin_inset Flex MenuItem
10090 status collapsed
10091
10092 \begin_layout Plain Layout
10093 編集\SpecialChar \menuseparator
10094 段落設定
10095 \end_layout
10096
10097 \end_inset
10098
10099 ダイアログで定義することができます。
10100 \end_layout
10101
10102 \begin_layout Standard
10103 上記最後のいくつかをまとめると、LaTeX出力は、LaTeX型に依存して
10104 \end_layout
10105
10106 \begin_layout LyX-Code
10107
10108 \backslash
10109 latexname[latexparam]{\SpecialChar \ldots{}
10110 }
10111 \end_layout
10112
10113 \begin_layout Standard
10114 のようになるか、
10115 \end_layout
10116
10117 \begin_layout LyX-Code
10118
10119 \backslash
10120 begin{latexname}[latexparam] \SpecialChar \ldots{}
10121  
10122 \backslash
10123 end{latexname}.
10124 \end_layout
10125
10126 \begin_layout Standard
10127 となります。
10128 \end_layout
10129
10130 \end_deeper
10131 \begin_layout Description
10132 \begin_inset Flex Code
10133 status collapsed
10134
10135 \begin_layout Plain Layout
10136 LeftMargin
10137 \end_layout
10138
10139 \end_inset
10140
10141  [
10142 \begin_inset Flex Code
10143 status collapsed
10144
10145 \begin_layout Plain Layout
10146 文字列=""
10147 \end_layout
10148
10149 \end_inset
10150
10151 ] レイアウトを環境の中に入れた場合、左余白は単純に加えられるのではなく、因子
10152 \begin_inset Formula $\frac{4}{depth+4}$
10153 \end_inset
10154
10155 をかけて加えられます。このパラメータは、
10156 \begin_inset Flex Code
10157 status collapsed
10158
10159 \begin_layout Plain Layout
10160 Margin
10161 \end_layout
10162
10163 \end_inset
10164
10165
10166 \begin_inset Flex Code
10167 status collapsed
10168
10169 \begin_layout Plain Layout
10170 Manual
10171 \end_layout
10172
10173 \end_inset
10174
10175 あるいは
10176 \begin_inset Flex Code
10177 status collapsed
10178
10179 \begin_layout Plain Layout
10180 Dynamic
10181 \end_layout
10182
10183 \end_inset
10184
10185 に設定されているときにも用いられることに注意してください。その場合には、これは手動設定余白または動的設定余白に加えられることに注意してください。
10186 \begin_inset Newline newline
10187 \end_inset
10188
10189 引数は文字列として渡されます。たとえば「
10190 \begin_inset Flex Code
10191 status collapsed
10192
10193 \begin_layout Plain Layout
10194 MM
10195 \end_layout
10196
10197 \end_inset
10198
10199 」と指定すると、段落を通常フォントの「
10200 \begin_inset Flex Code
10201 status collapsed
10202
10203 \begin_layout Plain Layout
10204 MM
10205 \end_layout
10206
10207 \end_inset
10208
10209 」の幅だけ行頭下げを行います。文字列の前に「
10210 \begin_inset Flex Code
10211 status collapsed
10212
10213 \begin_layout Plain Layout
10214 -
10215 \end_layout
10216
10217 \end_inset
10218
10219 」を付けると、負の幅を与えることができます。この方法が採用されたのは、どの画面フォントでも見かけが同じになるようにするためです。
10220 \end_layout
10221
10222 \begin_layout Description
10223 \begin_inset Flex Code
10224 status collapsed
10225
10226 \begin_layout Plain Layout
10227 Margin
10228 \end_layout
10229
10230 \end_inset
10231
10232  [
10233 \begin_inset Flex Code
10234 status collapsed
10235
10236 \begin_layout Plain Layout
10237
10238 \emph on
10239 Static
10240 \emph default
10241 , Manual, Dynamic, First_Dynamic, Right_Address_Box
10242 \end_layout
10243
10244 \end_inset
10245
10246
10247 \begin_inset Newline newline
10248 \end_inset
10249
10250 このレイアウトの左余白の種類です。
10251 \begin_inset Flex Code
10252 status collapsed
10253
10254 \begin_layout Plain Layout
10255 Static
10256 \end_layout
10257
10258 \end_inset
10259
10260 は固定余白を示します。
10261 \begin_inset Flex Code
10262 status collapsed
10263
10264 \begin_layout Plain Layout
10265 Manual
10266 \end_layout
10267
10268 \end_inset
10269
10270 は、左余白が
10271 \begin_inset Flex MenuItem
10272 status collapsed
10273
10274 \begin_layout Plain Layout
10275 編集\SpecialChar \menuseparator
10276 段落設定
10277 \end_layout
10278
10279 \end_inset
10280
10281 ダイアログで入力した文字列によって決められることを示します。これは、タブを用いずに整った一覧表を組むのに使用されます。
10282 \begin_inset Flex Code
10283 status collapsed
10284
10285 \begin_layout Plain Layout
10286 Dynamic
10287 \end_layout
10288
10289 \end_inset
10290
10291 は、余白がラベルの大きさに依存することを示します。これは、自動連番の見出しに使用されます。「5.4.3.2.1 非常に長い見出し」という見出し行が、「3.2
10292  非常に長い見出し」よりも広い左余白(5.4.3.2.1足す空白と同じ幅)を必要とすることは明らかでしょう(標準的「ワープロ」はこんなことはやってくれませんが)。
10293 \begin_inset Flex Code
10294 status collapsed
10295
10296 \begin_layout Plain Layout
10297 First_Dynamic
10298 \end_layout
10299
10300 \end_inset
10301
10302 は似ていますが、段落の最初の行だけがDynamicでその他の行はStaticです。これは、たとえば、箇条書き(記述)に使用されます。
10303 \begin_inset Flex Code
10304 status collapsed
10305
10306 \begin_layout Plain Layout
10307 Right_Address_Box
10308 \end_layout
10309
10310 \end_inset
10311
10312 は、段落中、最も長い行が右余白に合うように余白を選択します。これは、ページの右端に住所を組版するのに用いられます。
10313 \end_layout
10314
10315 \begin_layout Description
10316 \begin_inset Flex Code
10317 status collapsed
10318
10319 \begin_layout Plain Layout
10320 NeedProtect
10321 \end_layout
10322
10323 \end_inset
10324
10325  [
10326 \begin_inset Flex Code
10327 status collapsed
10328
10329 \begin_layout Plain Layout
10330
10331 \emph on
10332 0
10333 \end_layout
10334
10335 \end_inset
10336
10337 ,
10338 \begin_inset Flex Code
10339 status collapsed
10340
10341 \begin_layout Plain Layout
10342 1
10343 \end_layout
10344
10345 \end_inset
10346
10347 ] このレイアウト中の脆弱なコマンドが
10348 \begin_inset Flex Code
10349 status collapsed
10350
10351 \begin_layout Plain Layout
10352
10353 \backslash
10354 protect
10355 \end_layout
10356
10357 \end_inset
10358
10359 されるべきか否か(註:これはこのコマンド自体が
10360 \begin_inset Flex Code
10361 status collapsed
10362
10363 \begin_layout Plain Layout
10364
10365 \backslash
10366 protect
10367 \end_layout
10368
10369 \end_inset
10370
10371 されるべきかでは
10372 \emph on
10373 ありません
10374 \emph default
10375 )。
10376 \end_layout
10377
10378 \begin_layout Description
10379 \begin_inset Flex Code
10380 status collapsed
10381
10382 \begin_layout Plain Layout
10383 Newline
10384 \end_layout
10385
10386 \end_inset
10387
10388  [
10389 \begin_inset Flex Code
10390 status collapsed
10391
10392 \begin_layout Plain Layout
10393 0
10394 \end_layout
10395
10396 \end_inset
10397
10398
10399 \begin_inset Flex Code
10400 status collapsed
10401
10402 \begin_layout Plain Layout
10403
10404 \emph on
10405 1
10406 \end_layout
10407
10408 \end_inset
10409
10410 ] 新規行をLaTeXの新規行(
10411 \begin_inset Flex Code
10412 status collapsed
10413
10414 \begin_layout Plain Layout
10415
10416 \backslash
10417
10418 \backslash
10419
10420 \end_layout
10421
10422 \end_inset
10423
10424 )に変換するか否か。LyX中でLaTeX編集をやりやすくするために、変換は無効にすることができます。
10425 \end_layout
10426
10427 \begin_layout Description
10428 \begin_inset Flex Code
10429 status collapsed
10430
10431 \begin_layout Plain Layout
10432 NextNoIndent
10433 \end_layout
10434
10435 \end_inset
10436
10437  [
10438 \begin_inset Flex Code
10439 status collapsed
10440
10441 \begin_layout Plain Layout
10442 1
10443 \end_layout
10444
10445 \end_inset
10446
10447
10448 \begin_inset Flex Code
10449 status collapsed
10450
10451 \begin_layout Plain Layout
10452
10453 \emph on
10454 0
10455 \end_layout
10456
10457 \end_inset
10458
10459 ] 次の段落に最初の行の行頭下げを許すか否か。
10460 \begin_inset Flex Code
10461 status collapsed
10462
10463 \begin_layout Plain Layout
10464 1
10465 \end_layout
10466
10467 \end_inset
10468
10469 は許可しないことを意味し、
10470 \begin_inset Flex Code
10471 status collapsed
10472
10473 \begin_layout Plain Layout
10474 0
10475 \end_layout
10476
10477 \end_inset
10478
10479 は望むならば行頭下げできることを意味します。
10480 \end_layout
10481
10482 \begin_layout Description
10483 \begin_inset Flex Code
10484 status collapsed
10485
10486 \begin_layout Plain Layout
10487 ObsoletedBy
10488 \end_layout
10489
10490 \end_inset
10491
10492  このレイアウトが置き換えられたレイアウト名。これは、後方互換性を維持しながら、レイアウトの名称を変更するのに使用されます。
10493 \end_layout
10494
10495 \begin_layout Description
10496 \begin_inset Flex Code
10497 status collapsed
10498
10499 \begin_layout Plain Layout
10500 OptionalArgs
10501 \end_layout
10502
10503 \end_inset
10504
10505  [
10506 \begin_inset Flex Code
10507 status collapsed
10508
10509 \begin_layout Plain Layout
10510 整数型=0
10511 \end_layout
10512
10513 \end_inset
10514
10515 ] このレイアウトに使用することのできる非必須引数の数。節見出しのようなものに有用であり、LaTeXでのみ意味を持ちます。出力時には、非必須引数は、すべての必須
10516 引数の前に来ることに注意してください(以下参照)。つまり、
10517 \end_layout
10518
10519 \begin_deeper
10520 \begin_layout LyX-Code
10521
10522 \backslash
10523 mycmd[非必須引数1]{必須引数1}{段落の内容}
10524 \end_layout
10525
10526 \begin_layout Standard
10527 のようなコマンドは生成できますが、
10528 \end_layout
10529
10530 \begin_layout LyX-Code
10531
10532 \backslash
10533 mycmd[非必須引数1]{必須引数1}[非必須引数2]{段落の内容}
10534 \end_layout
10535
10536 \begin_layout Standard
10537 のようなコマンドは、TeXコード(これを使えば何でもできます)を使用することなしには、生成することができません。
10538 \end_layout
10539
10540 \end_deeper
10541 \begin_layout Description
10542 \begin_inset Flex Code
10543 status collapsed
10544
10545 \begin_layout Plain Layout
10546 ParbreakIsNewline
10547 \end_layout
10548
10549 \end_inset
10550
10551  [
10552 \begin_inset Flex Code
10553 status collapsed
10554
10555 \begin_layout Plain Layout
10556
10557 \emph on
10558 0
10559 \end_layout
10560
10561 \end_inset
10562
10563
10564 \begin_inset Flex Code
10565 status collapsed
10566
10567 \begin_layout Plain Layout
10568 1
10569 \end_layout
10570
10571 \end_inset
10572
10573 ] LaTeX出力中で、段落を空行ではなく、改行で区切るよう指定します。
10574 \begin_inset Flex Code
10575 status collapsed
10576
10577 \begin_layout Plain Layout
10578 PassThru 1
10579 \end_layout
10580
10581 \end_inset
10582
10583 と併用すれば、(TeXコードを使用したときのように)テキストエディタをエミュレートすることができます。
10584 \end_layout
10585
10586 \begin_layout Description
10587 \begin_inset Flex Code
10588 status collapsed
10589
10590 \begin_layout Plain Layout
10591 ParIndent
10592 \end_layout
10593
10594 \end_inset
10595
10596  [
10597 \begin_inset Flex Code
10598 status collapsed
10599
10600 \begin_layout Plain Layout
10601 文字列=""
10602 \end_layout
10603
10604 \end_inset
10605
10606 ] 段落の最初の行の行頭下げ。レイアウトによっては
10607 \begin_inset Flex Code
10608 status collapsed
10609
10610 \begin_layout Plain Layout
10611 Parindent
10612 \end_layout
10613
10614 \end_inset
10615
10616 は固定されています。例外には標準レイアウトがあり、標準レイアウトの段落の行頭下げは、
10617 \begin_inset Flex Code
10618 status collapsed
10619
10620 \begin_layout Plain Layout
10621 NextNoIndent
10622 \end_layout
10623
10624 \end_inset
10625
10626 で禁止することができるようになっています。また、環境中の標準レイアウト段落は、当該段落の
10627 \begin_inset Flex Code
10628 status collapsed
10629
10630 \begin_layout Plain Layout
10631 Parindent
10632 \end_layout
10633
10634 \end_inset
10635
10636 ではなく、この環境の
10637 \begin_inset Flex Code
10638 status collapsed
10639
10640 \begin_layout Plain Layout
10641 Parindent
10642 \end_layout
10643
10644 \end_inset
10645
10646 を使用します。たとえば、箇条書き(連番)内の標準段落は、行頭下げされません。
10647 \end_layout
10648
10649 \begin_layout Description
10650 \begin_inset Flex Code
10651 status collapsed
10652
10653 \begin_layout Plain Layout
10654 Parsep
10655 \end_layout
10656
10657 \end_inset
10658
10659  [
10660 \begin_inset Flex Code
10661 status collapsed
10662
10663 \begin_layout Plain Layout
10664 浮動小数点型=0
10665 \end_layout
10666
10667 \end_inset
10668
10669 ] このレイアウトの2段落間の垂直余白。
10670 \end_layout
10671
10672 \begin_layout Description
10673 \begin_inset Flex Code
10674 status collapsed
10675
10676 \begin_layout Plain Layout
10677 Parskip
10678 \end_layout
10679
10680 \end_inset
10681
10682  [
10683 \begin_inset Flex Code
10684 status collapsed
10685
10686 \begin_layout Plain Layout
10687 浮動小数点型=0
10688 \end_layout
10689
10690 \end_inset
10691
10692 ] LyXでは、文書を組版するのに、ユーザが「行頭下げ」か「スキップ」を選ぶことができます。「行頭下げ」を選択した際には、この値は完全に無視されます。「スキップ
10693 」を選択した際には、LaTeX型「段落」レイアウトの
10694 \begin_inset Flex Code
10695 status collapsed
10696
10697 \begin_layout Plain Layout
10698 ParIndent
10699 \end_layout
10700
10701 \end_inset
10702
10703 は無視され、すべての段落はこの
10704 \begin_inset Flex Code
10705 status collapsed
10706
10707 \begin_layout Plain Layout
10708 Parskip
10709 \end_layout
10710
10711 \end_inset
10712
10713 引数分だけ引き離されます。垂直余白は、
10714 \begin_inset Flex Code
10715 status collapsed
10716
10717 \begin_layout Plain Layout
10718 DefaultHeight
10719 \end_layout
10720
10721 \end_inset
10722
10723 を標準フォントでの1行の高さとすると、
10724 \begin_inset Flex Code
10725 status collapsed
10726
10727 \begin_layout Plain Layout
10728 Parskipの値
10729 \end_layout
10730
10731 \end_inset
10732
10733
10734 \begin_inset Formula $\times$
10735 \end_inset
10736
10737
10738 \begin_inset Flex Code
10739 status collapsed
10740
10741 \begin_layout Plain Layout
10742 DefaultHeight
10743 \end_layout
10744
10745 \end_inset
10746
10747 によって計算されます。このようにして、画面フォントを変更しても同じように表示されるのです。
10748 \end_layout
10749
10750 \begin_layout Description
10751 \begin_inset Flex Code
10752 status collapsed
10753
10754 \begin_layout Plain Layout
10755 PassThru
10756 \end_layout
10757
10758 \end_inset
10759
10760  [
10761 \emph on
10762
10763 \begin_inset Flex Code
10764 status collapsed
10765
10766 \begin_layout Plain Layout
10767 0
10768 \end_layout
10769
10770 \end_inset
10771
10772
10773 \emph default
10774
10775 \begin_inset Flex Code
10776 status collapsed
10777
10778 \begin_layout Plain Layout
10779 1
10780 \end_layout
10781
10782 \end_inset
10783
10784 ] この段落の内容が、LaTeXが必要とするような特別な変換を行わずに、生の形で出力されるべきかどうか。
10785 \end_layout
10786
10787 \begin_layout Description
10788 \begin_inset Flex Code
10789 status collapsed
10790
10791 \begin_layout Plain Layout
10792 Preamble
10793 \end_layout
10794
10795 \end_inset
10796
10797  この様式が使用されたときに、LaTeXプリアンブルに付け加えるべき情報。この特定の様式が要求するマクロを定義したり、パッケージを読み込んだりと言ったことに使用
10798 します。「
10799 \begin_inset Flex Code
10800 status collapsed
10801
10802 \begin_layout Plain Layout
10803 EndPreamble
10804 \end_layout
10805
10806 \end_inset
10807
10808 」で閉じる必要があります。
10809 \end_layout
10810
10811 \begin_layout Description
10812 \begin_inset Flex Code
10813 status collapsed
10814
10815 \begin_layout Plain Layout
10816 RefPrefix
10817 \end_layout
10818
10819 \end_inset
10820
10821  [
10822 \begin_inset Flex Code
10823 status collapsed
10824
10825 \begin_layout Plain Layout
10826 文字列
10827 \end_layout
10828
10829 \end_inset
10830
10831 ] この型の段落を参照する際、生成されるラベルに使用する前置句。これによって、整形参照を使用することができるようになります。
10832 \end_layout
10833
10834 \begin_layout Description
10835 \begin_inset Flex Code
10836 status collapsed
10837
10838 \begin_layout Plain Layout
10839 RequiredArgs
10840 \end_layout
10841
10842 \end_inset
10843
10844  [
10845 \begin_inset Flex Code
10846 status collapsed
10847
10848 \begin_layout Plain Layout
10849 整数型=0
10850 \end_layout
10851
10852 \end_inset
10853
10854 ] このレイアウトに対応するLaTeXコマンドやLaTeX環境が予期している、必須引数の数。コマンドの場合には、段落の内容自体に関連付けられている引数
10855 \emph on
10856 以外に
10857 \emph default
10858 、必要な引数の数のことです。これらの引数は、実際には渡されなくても構いません。必要な場合は、LyXが空の引数を生成します。非必須引数は、必須引数の前に出力される
10859 ことに注意してください。詳細については、上記
10860 \begin_inset Flex Code
10861 status collapsed
10862
10863 \begin_layout Plain Layout
10864 OptionalArgs
10865 \end_layout
10866
10867 \end_inset
10868
10869 タグにおける議論をご覧ください。
10870 \end_layout
10871
10872 \begin_layout Description
10873 \begin_inset Flex Code
10874 status collapsed
10875
10876 \begin_layout Plain Layout
10877 Requires
10878 \end_layout
10879
10880 \end_inset
10881
10882  [
10883 \begin_inset Flex Code
10884 status collapsed
10885
10886 \begin_layout Plain Layout
10887 文字列
10888 \end_layout
10889
10890 \end_inset
10891
10892 ] このレイアウトが
10893 \begin_inset Flex Code
10894 status collapsed
10895
10896 \begin_layout Plain Layout
10897 文字列
10898 \end_layout
10899
10900 \end_inset
10901
10902 で表される機能を必要するか否か。「機能」に関する情報は、上記
10903 \begin_inset Flex Code
10904 status collapsed
10905
10906 \begin_layout Plain Layout
10907 Provides
10908 \end_layout
10909
10910 \end_inset
10911
10912 の説明(
10913 \begin_inset CommandInset ref
10914 LatexCommand pageref
10915 reference "des:FreeSpacing"
10916
10917 \end_inset
10918
10919 ページ)をご参照ください。
10920 \end_layout
10921
10922 \begin_layout Description
10923 \begin_inset Flex Code
10924 status collapsed
10925
10926 \begin_layout Plain Layout
10927 RightMargin
10928 \end_layout
10929
10930 \end_inset
10931
10932  [
10933 \begin_inset Flex Code
10934 status collapsed
10935
10936 \begin_layout Plain Layout
10937 文字列=""
10938 \end_layout
10939
10940 \end_inset
10941
10942
10943 \begin_inset Flex Code
10944 status collapsed
10945
10946 \begin_layout Plain Layout
10947 LeftMargin
10948 \end_layout
10949
10950 \end_inset
10951
10952 に同様。
10953 \end_layout
10954
10955 \begin_layout Description
10956 \begin_inset Flex Code
10957 status collapsed
10958
10959 \begin_layout Plain Layout
10960 Spacing
10961 \end_layout
10962
10963 \end_inset
10964
10965  [
10966 \begin_inset Flex Code
10967 status collapsed
10968
10969 \begin_layout Plain Layout
10970
10971 \emph on
10972 single
10973 \emph default
10974 , onehalf, double, other
10975 \end_layout
10976
10977 \end_inset
10978
10979  
10980 \emph on
10981
10982 \emph default
10983 ] これはレイアウト中の既定の行間をどうすべきか定義するものです。引数の
10984 \begin_inset Flex Code
10985 status collapsed
10986
10987 \begin_layout Plain Layout
10988 single
10989 \end_layout
10990
10991 \end_inset
10992
10993
10994 \begin_inset Flex Code
10995 status collapsed
10996
10997 \begin_layout Plain Layout
10998 onehalf
10999 \end_layout
11000
11001 \end_inset
11002
11003
11004 \begin_inset Flex Code
11005 status collapsed
11006
11007 \begin_layout Plain Layout
11008 double
11009 \end_layout
11010
11011 \end_inset
11012
11013 は、それぞれ乗数1・1.25・1.667に対応します。引数
11014 \begin_inset Flex Code
11015 status collapsed
11016
11017 \begin_layout Plain Layout
11018 other
11019 \end_layout
11020
11021 \end_inset
11022
11023 を指定した場合には、実際の乗数値も引数として指定しなくてはなりません。他のパラメータと違って
11024 \begin_inset Flex Code
11025 status collapsed
11026
11027 \begin_layout Plain Layout
11028 Spacing
11029 \end_layout
11030
11031 \end_inset
11032
11033 は、
11034 \begin_inset Flex Code
11035 status collapsed
11036
11037 \begin_layout Plain Layout
11038 setspace.sty
11039 \end_layout
11040
11041 \end_inset
11042
11043 パッケージを使用した、限定的なLaTeXコードを生成することを意味することにご注意ください。
11044 \end_layout
11045
11046 \begin_layout Description
11047 \begin_inset Flex Code
11048 status collapsed
11049
11050 \begin_layout Plain Layout
11051 Spellcheck
11052 \end_layout
11053
11054 \end_inset
11055
11056  [
11057 \begin_inset Flex Code
11058 status collapsed
11059
11060 \begin_layout Plain Layout
11061 0
11062 \end_layout
11063
11064 \end_inset
11065
11066 ,
11067 \begin_inset Flex Code
11068 status collapsed
11069
11070 \begin_layout Plain Layout
11071 1
11072 \end_layout
11073
11074 \end_inset
11075
11076 ] この様式の段落をスペルチェックするか否か。既定値は真です。
11077 \end_layout
11078
11079 \begin_layout Description
11080 \begin_inset Flex Code
11081 status collapsed
11082
11083 \begin_layout Plain Layout
11084 TextFont
11085 \end_layout
11086
11087 \end_inset
11088
11089  本文に使うフォント。第
11090 \begin_inset CommandInset ref
11091 LatexCommand ref
11092 reference "sub:フォント指定"
11093
11094 \end_inset
11095
11096 節参照。
11097 \end_layout
11098
11099 \begin_layout Description
11100 \begin_inset Flex Code
11101 status collapsed
11102
11103 \begin_layout Plain Layout
11104 TocLevel
11105 \end_layout
11106
11107 \end_inset
11108
11109  [
11110 \begin_inset Flex Code
11111 status collapsed
11112
11113 \begin_layout Plain Layout
11114 整数型
11115 \end_layout
11116
11117 \end_inset
11118
11119 ] 目次中でのこの様式の階層。これは、節見出しの自動連番に使用されます。
11120 \end_layout
11121
11122 \begin_layout Description
11123 \begin_inset Flex Code
11124 status collapsed
11125
11126 \begin_layout Plain Layout
11127 TopSep
11128 \end_layout
11129
11130 \end_inset
11131
11132  [
11133 \begin_inset Flex Code
11134 status collapsed
11135
11136 \begin_layout Plain Layout
11137 浮動小数点型=0
11138 \end_layout
11139
11140 \end_inset
11141
11142 ] このレイアウトを持つ一連の段落群の最初の段落と、その前の段落の間の垂直余白。前の段落が別のレイアウトを持っていれば、余白は単純に追加されるのではなく、それら
11143 の最大値がとられます。
11144 \end_layout
11145
11146 \begin_layout Subsection
11147 \begin_inset CommandInset label
11148 LatexCommand label
11149 name "sub:段落様式の国際化"
11150
11151 \end_inset
11152
11153 段落様式の国際化
11154 \end_layout
11155
11156 \begin_layout Standard
11157 LyXは、長きにわたってレイアウト情報の国際化をサポートしてきましたが、第2.0版までは、これは操作画面にのみ適用されるものであって、たとえばPDF出力には適用さ
11158 れませんでした。たとえば、フランスの著者が、「Theorem 1」の代わりに「
11159 \lang french
11160 Théorème
11161 \lang japanese
11162  1」としたければ、醜いハックに頼るしかありませんでした。Georg Baumのおかげで、これは解消されました。
11163 \end_layout
11164
11165 \begin_layout Standard
11166 もし
11167 \begin_inset Flex MenuItem
11168 status collapsed
11169
11170 \begin_layout Plain Layout
11171 Style
11172 \end_layout
11173
11174 \end_inset
11175
11176 が、組版文書に出力される文字列を定義するのであれば、非英語文書や複数言語文書をサポートするために、
11177 \begin_inset Flex MenuItem
11178 status collapsed
11179
11180 \begin_layout Plain Layout
11181 LangPreamble
11182 \end_layout
11183
11184 \end_inset
11185
11186
11187 \begin_inset Flex MenuItem
11188 status collapsed
11189
11190 \begin_layout Plain Layout
11191 BabelPreamble
11192 \end_layout
11193
11194 \end_inset
11195
11196 を使用することができます。以下の抜粋(
11197 \begin_inset Flex MenuItem
11198 status collapsed
11199
11200 \begin_layout Plain Layout
11201 theorems-ams.inc
11202 \end_layout
11203
11204 \end_inset
11205
11206 より)は、これがどう動作するかを示すものです。
11207 \end_layout
11208
11209 \begin_layout LyX-Code
11210 Preamble
11211 \end_layout
11212
11213 \begin_deeper
11214 \begin_layout LyX-Code
11215   
11216 \backslash
11217 theoremstyle{remark}
11218 \end_layout
11219
11220 \begin_layout LyX-Code
11221   
11222 \backslash
11223 newtheorem{claim}[thm]{
11224 \backslash
11225 protect
11226 \backslash
11227 claimname}
11228 \end_layout
11229
11230 \begin_layout LyX-Code
11231 EndPreamble
11232 \end_layout
11233
11234 \begin_layout LyX-Code
11235 LangPreamble
11236 \end_layout
11237
11238 \begin_layout LyX-Code
11239   
11240 \backslash
11241 providecommand{
11242 \backslash
11243 claimname}{_(Claim)}
11244 \end_layout
11245
11246 \begin_layout LyX-Code
11247 EndLangPreamble
11248 \end_layout
11249
11250 \begin_layout LyX-Code
11251 BabelPreamble
11252 \end_layout
11253
11254 \begin_layout LyX-Code
11255     
11256 \backslash
11257 addto
11258 \backslash
11259 captions$$lang{
11260 \backslash
11261 renewcommand{
11262 \backslash
11263 claimname}{_(Claim)}}
11264 \end_layout
11265
11266 \begin_layout LyX-Code
11267 EndBabelPreamble
11268 \end_layout
11269
11270 \end_deeper
11271 \begin_layout Standard
11272 原則として、
11273 \begin_inset Flex MenuItem
11274 status collapsed
11275
11276 \begin_layout Plain Layout
11277 LangPreamble
11278 \end_layout
11279
11280 \end_inset
11281
11282
11283 \begin_inset Flex MenuItem
11284 status collapsed
11285
11286 \begin_layout Plain Layout
11287 BabelPreamble
11288 \end_layout
11289
11290 \end_inset
11291
11292 タグ内には、有効なLaTeXコードはすべて用いることができますが、実際においては、ここで典型的に示したような形になるでしょう。組版文字列が正しく翻訳されるための
11293 鍵となるのは、LaTeXコマンド
11294 \begin_inset Flex Code
11295 status collapsed
11296
11297 \begin_layout Plain Layout
11298
11299 \backslash
11300 claimname
11301 \end_layout
11302
11303 \end_inset
11304
11305 とその
11306 \begin_inset Flex Code
11307 status collapsed
11308
11309 \begin_layout Plain Layout
11310
11311 \backslash
11312 newtheorem
11313 \end_layout
11314
11315 \end_inset
11316
11317 中での用い方です。
11318 \end_layout
11319
11320 \begin_layout Standard
11321 \begin_inset Flex Code
11322 status collapsed
11323
11324 \begin_layout Plain Layout
11325 LangPreamble
11326 \end_layout
11327
11328 \end_inset
11329
11330 タグは、文書全体の言語に基づいた国際化を提供します。タグの内容は、
11331 \begin_inset Flex Code
11332 status collapsed
11333
11334 \begin_layout Plain Layout
11335 Preamble
11336 \end_layout
11337
11338 \end_inset
11339
11340 タグと同様、プリアンブルに置かれるのですが、これを特別なものにしているのは、「関数」
11341 \begin_inset Flex Code
11342 status collapsed
11343
11344 \begin_layout Plain Layout
11345 _()
11346 \end_layout
11347
11348 \end_inset
11349
11350 が使用されていることです。これは、LyXがLaTeX出力を生成する際、その引数を文書言語に翻訳したもので置き換えられます。
11351 \end_layout
11352
11353 \begin_layout Standard
11354 \begin_inset Flex Code
11355 status collapsed
11356
11357 \begin_layout Plain Layout
11358 BabelPreamble
11359 \end_layout
11360
11361 \end_inset
11362
11363 タグは、複数言語文書をサポートし、
11364 \begin_inset Flex Code
11365 status collapsed
11366
11367 \begin_layout Plain Layout
11368 babel
11369 \end_layout
11370
11371 \end_inset
11372
11373 パッケージへのインタフェースを提供することを意図しているので、もう少し複雑です。その内容は、文書に現れる言語それぞれについて一度、プリアンブルに追加されます。こ
11374 の場合には、
11375 \begin_inset Flex Code
11376 status collapsed
11377
11378 \begin_layout Plain Layout
11379 _()
11380 \end_layout
11381
11382 \end_inset
11383
11384 の引数は、その当該言語への翻訳で置き換えられ、
11385 \begin_inset Flex Code
11386 status collapsed
11387
11388 \begin_layout Plain Layout
11389 $$lang
11390 \end_layout
11391
11392 \end_inset
11393
11394 は言語名(babelパッケージで使用されるもの)で置き換えられます。
11395 \end_layout
11396
11397 \begin_layout Standard
11398 したがって、フランス語のセクションを持つドイツ語文書では、以下のような内容がプリアンブルに追加されます
11399 \end_layout
11400
11401 \begin_layout LyX-Code
11402
11403 \backslash
11404 addto
11405 \backslash
11406 captionsfrench{
11407 \backslash
11408 renewcommand{
11409 \backslash
11410 claimname}{Affirmation}}   
11411 \backslash
11412 addto
11413 \backslash
11414 captionsngerman{
11415 \backslash
11416 renewcommand{
11417 \backslash
11418 claimname}{Behauptung}}   
11419 \backslash
11420 providecommand{
11421 \backslash
11422 claimname}{Behauptung}
11423 \end_layout
11424
11425 \begin_layout Standard
11426 それから、LaTeXと
11427 \begin_inset Flex Code
11428 status collapsed
11429
11430 \begin_layout Plain Layout
11431 babel
11432 \end_layout
11433
11434 \end_inset
11435
11436 は協力して、出力に正しい文字列を生成します。
11437 \end_layout
11438
11439 \begin_layout Standard
11440 ここで注意しなくてはならない重要な点は、翻訳は、操作画面の国際化に使われるのと同じ機構を通じて、LyX自身によって提供されるということです。つまり、ユーザー作成
11441 のレイアウトファイルに入力された文字列は、LyXの国際化ルーチンでは取り扱われないので、
11442 \begin_inset Flex MenuItem
11443 status collapsed
11444
11445 \begin_layout Plain Layout
11446 LangPreamble
11447 \end_layout
11448
11449 \end_inset
11450
11451
11452 \begin_inset Flex MenuItem
11453 status collapsed
11454
11455 \begin_layout Plain Layout
11456 BabelPreamble
11457 \end_layout
11458
11459 \end_inset
11460
11461 は、事実上、LyXとともに提供されるレイアウトファイルでのみ、使うことができるということを意味します。とはいえ、こういうことでありますので、将来的にLyXに同梱
11462 させようという意図を以て作成されたレイアウトは、適切なところではすべて、これらのタグを使用するべきです。
11463 \end_layout
11464
11465 \begin_layout Subsection
11466 フロート
11467 \begin_inset CommandInset label
11468 LatexCommand label
11469 name "sub:フロート"
11470
11471 \end_inset
11472
11473
11474 \end_layout
11475
11476 \begin_layout Standard
11477 LyX第1.3.0版以来、テキストクラス自体の中でフロート(
11478 \begin_inset Flex MenuItem
11479 status collapsed
11480
11481 \begin_layout Plain Layout
11482 figure
11483 \end_layout
11484
11485 \end_inset
11486
11487
11488 \begin_inset Flex MenuItem
11489 status collapsed
11490
11491 \begin_layout Plain Layout
11492 table
11493 \end_layout
11494
11495 \end_inset
11496
11497 ・\SpecialChar \ldots{}
11498 )を定義することが可能となり、かつ必要となりました。標準的なフロートは
11499 \begin_inset Flex Code
11500 status collapsed
11501
11502 \begin_layout Plain Layout
11503 stdfloats.inc
11504 \end_layout
11505
11506 \end_inset
11507
11508 ファイルに含まれているので、作業中のレイアウトファイルに
11509 \end_layout
11510
11511 \begin_layout LyX-Code
11512 Input stdfloats.inc
11513 \end_layout
11514
11515 \begin_layout Standard
11516 と加えるだけで済むことも多いでしょう。LyXに同梱されているAGUクラスのように、それ以外のフロート型を提供するテキストクラスを実装するには、以下の情報が役立つ
11517 でありましょう。
11518 \end_layout
11519
11520 \begin_layout Description
11521 \begin_inset Flex Code
11522 status collapsed
11523
11524 \begin_layout Plain Layout
11525 Extension
11526 \end_layout
11527
11528 \end_inset
11529
11530  [
11531 \begin_inset Flex Code
11532 status collapsed
11533
11534 \begin_layout Plain Layout
11535 文字列
11536 \end_layout
11537
11538 \end_inset
11539
11540 =
11541 \begin_inset Quotes erd
11542 \end_inset
11543
11544
11545 \begin_inset Quotes erd
11546 \end_inset
11547
11548 ] 図などのリストを含む外部ファイルのファイル拡張子名。LaTeXがキャプションを書き込むファイルです。
11549 \end_layout
11550
11551 \begin_layout Description
11552 \begin_inset Flex Code
11553 status collapsed
11554
11555 \begin_layout Plain Layout
11556 GuiName
11557 \end_layout
11558
11559 \end_inset
11560
11561  [
11562 \begin_inset Flex Code
11563 status collapsed
11564
11565 \begin_layout Plain Layout
11566 文字列
11567 \end_layout
11568
11569 \end_inset
11570
11571 =
11572 \begin_inset Quotes erd
11573 \end_inset
11574
11575
11576 \begin_inset Quotes erd
11577 \end_inset
11578
11579 ] メニューとキャプションに使用される文字列。babelが使用される場合には、これは現在の言語に翻訳されます。
11580 \end_layout
11581
11582 \begin_layout Description
11583 \begin_inset Flex Code
11584 status collapsed
11585
11586 \begin_layout Plain Layout
11587 HTML*
11588 \end_layout
11589
11590 \end_inset
11591
11592  これらは、XHTML出力で使用されます。第
11593 \begin_inset CommandInset ref
11594 LatexCommand ref
11595 reference "sec:XHTML出力のタグ"
11596
11597 \end_inset
11598
11599 節をご覧ください。
11600 \end_layout
11601
11602 \begin_layout Description
11603 \begin_inset Flex Code
11604 status collapsed
11605
11606 \begin_layout Plain Layout
11607 ListCommand
11608 \end_layout
11609
11610 \end_inset
11611
11612  [
11613 \begin_inset Flex Code
11614 status collapsed
11615
11616 \begin_layout Plain Layout
11617 文字列
11618 \end_layout
11619
11620 \end_inset
11621
11622 =
11623 \begin_inset Quotes erd
11624 \end_inset
11625
11626
11627 \begin_inset Quotes erd
11628 \end_inset
11629
11630 ] この型のフロートの一覧を生成するのに使用するコマンド。頭部の「
11631 \backslash
11632 」は書きません。
11633 \begin_inset Flex Code
11634 status collapsed
11635
11636 \begin_layout Plain Layout
11637 NeedsFloatPkg
11638 \end_layout
11639
11640 \end_inset
11641
11642 が偽の時には、このコマンドを生成する標準的な方法はないので、これは
11643 \emph on
11644 必ず
11645 \emph default
11646 指定しなくてはなりません。
11647 \begin_inset Flex Code
11648 status collapsed
11649
11650 \begin_layout Plain Layout
11651 NeedsFloatPkg
11652 \end_layout
11653
11654 \end_inset
11655
11656 が真の時は、標準的な方法が存在するので、これは無視されます。
11657 \end_layout
11658
11659 \begin_layout Description
11660 \begin_inset Flex Code
11661 status collapsed
11662
11663 \begin_layout Plain Layout
11664 ListName
11665 \end_layout
11666
11667 \end_inset
11668
11669  [
11670 \begin_inset Flex Code
11671 status collapsed
11672
11673 \begin_layout Plain Layout
11674 文字列
11675 \end_layout
11676
11677 \end_inset
11678
11679 =
11680 \begin_inset Quotes erd
11681 \end_inset
11682
11683
11684 \begin_inset Quotes erd
11685 \end_inset
11686
11687 ] この種類のフロート一覧(図一覧・表一覧など)に使用される見出し。LyX中では、これは画面上のラベルとして使用されます。また、見出しとして使用するために、La
11688 TeXに渡され、XHTML出力でも見出しとして使用されます。これは、文書言語に翻訳されます。
11689 \end_layout
11690
11691 \begin_layout Description
11692 \begin_inset Flex Code
11693 status collapsed
11694
11695 \begin_layout Plain Layout
11696 NeedsFloatPkg
11697 \end_layout
11698
11699 \end_inset
11700
11701  [
11702 \begin_inset Flex Code
11703 status collapsed
11704
11705 \begin_layout Plain Layout
11706 0
11707 \end_layout
11708
11709 \end_inset
11710
11711 ,
11712 \begin_inset Flex Code
11713 status collapsed
11714
11715 \begin_layout Plain Layout
11716
11717 \emph on
11718 1
11719 \end_layout
11720
11721 \end_inset
11722
11723 ] フロートが文書クラス中に既に定義されているか、あるいは代わりに
11724 \begin_inset Flex Code
11725 status collapsed
11726
11727 \begin_layout Plain Layout
11728 float.sty
11729 \end_layout
11730
11731 \end_inset
11732
11733 を読み込んで、それが提供しているものを使用する必要があるかを示します。既定値は
11734 \begin_inset Flex Code
11735 status collapsed
11736
11737 \begin_layout Plain Layout
11738 1
11739 \end_layout
11740
11741 \end_inset
11742
11743 であり、
11744 \begin_inset Flex Code
11745 status collapsed
11746
11747 \begin_layout Plain Layout
11748 float.sty
11749 \end_layout
11750
11751 \end_inset
11752
11753 を使用します。LaTeX文書クラスでフロートが既に定義されているときには、
11754 \begin_inset Flex Code
11755 status collapsed
11756
11757 \begin_layout Plain Layout
11758 0
11759 \end_layout
11760
11761 \end_inset
11762
11763 に設定しなくてはなりません。
11764 \end_layout
11765
11766 \begin_layout Description
11767 \begin_inset Flex Code
11768 status collapsed
11769
11770 \begin_layout Plain Layout
11771 NumberWithin
11772 \end_layout
11773
11774 \end_inset
11775
11776  [
11777 \begin_inset Flex Code
11778 status collapsed
11779
11780 \begin_layout Plain Layout
11781 文字列
11782 \end_layout
11783
11784 \end_inset
11785
11786 =
11787 \begin_inset Quotes erd
11788 \end_inset
11789
11790
11791 \begin_inset Quotes erd
11792 \end_inset
11793
11794 ] この(非必須の)引数は、このクラスのフロートが文書中のある節単位ごとに番号を振り直されるべきかどうかを規定します。たとえば、引数に
11795 \begin_inset Flex Code
11796 status collapsed
11797
11798 \begin_layout Plain Layout
11799 chapter
11800 \end_layout
11801
11802 \end_inset
11803
11804 と指定されていれば、フロートは章ごとに番号が振り直されます。
11805 \end_layout
11806
11807 \begin_layout Description
11808 \begin_inset Flex Code
11809 status collapsed
11810
11811 \begin_layout Plain Layout
11812 Placement
11813 \end_layout
11814
11815 \end_inset
11816
11817  [
11818 \begin_inset Flex Code
11819 status collapsed
11820
11821 \begin_layout Plain Layout
11822 文字列
11823 \end_layout
11824
11825 \end_inset
11826
11827 =
11828 \begin_inset Quotes erd
11829 \end_inset
11830
11831
11832 \begin_inset Quotes erd
11833 \end_inset
11834
11835 ] このクラスのフロートの既定の配置法。文字列は、標準的なLaTeX表記に従い、
11836 \begin_inset Flex Code
11837 status collapsed
11838
11839 \begin_layout Plain Layout
11840 t
11841 \end_layout
11842
11843 \end_inset
11844
11845 ならば上部(top)、
11846 \begin_inset Flex Code
11847 status collapsed
11848
11849 \begin_layout Plain Layout
11850 b
11851 \end_layout
11852
11853 \end_inset
11854
11855 ならば下部(bottom)、
11856 \begin_inset Flex Code
11857 status collapsed
11858
11859 \begin_layout Plain Layout
11860 p
11861 \end_layout
11862
11863 \end_inset
11864
11865 ならばページ(page)、
11866 \begin_inset Flex Code
11867 status collapsed
11868
11869 \begin_layout Plain Layout
11870 h
11871 \end_layout
11872
11873 \end_inset
11874
11875 ならばここ(here)を表します
11876 \begin_inset Foot
11877 status collapsed
11878
11879 \begin_layout Plain Layout
11880 LaTeX同様、文字列中でのこれらの文字の順序は関係ありません。
11881 \end_layout
11882
11883 \end_inset
11884
11885 。これらの他に新しい型
11886 \begin_inset Flex Code
11887 status collapsed
11888
11889 \begin_layout Plain Layout
11890 H
11891 \end_layout
11892
11893 \end_inset
11894
11895 があり、これはフロートを「ここ」に置いていいけれども他の場所はだめ、というものなので、本当はフロートにあるものではありません。しかし、
11896 \begin_inset Flex Code
11897 status collapsed
11898
11899 \begin_layout Plain Layout
11900 H
11901 \end_layout
11902
11903 \end_inset
11904
11905 指定子は特別なものであり、その細かい実装上の理由で、組み込み以外のフロート型では使用することができません。これが何を意味するかおわかりにならない場合には、代わり
11906 に「
11907 \begin_inset Flex Code
11908 status collapsed
11909
11910 \begin_layout Plain Layout
11911 tbp
11912 \end_layout
11913
11914 \end_inset
11915
11916 」を指定してください。
11917 \end_layout
11918
11919 \begin_layout Description
11920 \begin_inset Flex Code
11921 status collapsed
11922
11923 \begin_layout Plain Layout
11924 RefPrefix
11925 \end_layout
11926
11927 \end_inset
11928
11929  [
11930 \begin_inset Flex Code
11931 status collapsed
11932
11933 \begin_layout Plain Layout
11934 文字列
11935 \end_layout
11936
11937 \end_inset
11938
11939 ] この型のフロートを参照する際、生成されるラベルに使用する前置句。これによって、整形参照を使用することができるようになります。コピーした様式が設定した
11940 \begin_inset Flex Code
11941 status collapsed
11942
11943 \begin_layout Plain Layout
11944 RefPrefix
11945 \end_layout
11946
11947 \end_inset
11948
11949 は、特別な文字列「OFF」(すべて大文字)を使えば、いつでも削除することができます。
11950 \end_layout
11951
11952 \begin_layout Description
11953 \begin_inset Flex Code
11954 status collapsed
11955
11956 \begin_layout Plain Layout
11957 Style
11958 \end_layout
11959
11960 \end_inset
11961
11962  [
11963 \begin_inset Flex Code
11964 status collapsed
11965
11966 \begin_layout Plain Layout
11967 文字列
11968 \end_layout
11969
11970 \end_inset
11971
11972 =
11973 \begin_inset Quotes erd
11974 \end_inset
11975
11976
11977 \begin_inset Quotes erd
11978 \end_inset
11979
11980
11981 \begin_inset Flex Code
11982 status collapsed
11983
11984 \begin_layout Plain Layout
11985
11986 \backslash
11987 newfloat
11988 \end_layout
11989
11990 \end_inset
11991
11992 を使用してフロートを定義する際に使用される様式。
11993 \end_layout
11994
11995 \begin_layout Description
11996 \begin_inset Flex Code
11997 status collapsed
11998
11999 \begin_layout Plain Layout
12000 Type
12001 \end_layout
12002
12003 \end_inset
12004
12005  [
12006 \begin_inset Flex Code
12007 status collapsed
12008
12009 \begin_layout Plain Layout
12010 文字列
12011 \end_layout
12012
12013 \end_inset
12014
12015 =
12016 \begin_inset Quotes erd
12017 \end_inset
12018
12019
12020 \begin_inset Quotes erd
12021 \end_inset
12022
12023 ] プログラムやアルゴリズムのような、フロートの新しいクラス「型」。適切な
12024 \begin_inset Flex Code
12025 status collapsed
12026
12027 \begin_layout Plain Layout
12028
12029 \backslash
12030 newfloat
12031 \end_layout
12032
12033 \end_inset
12034
12035 の後で、
12036 \begin_inset Flex Code
12037 status collapsed
12038
12039 \begin_layout Plain Layout
12040
12041 \backslash
12042 begin{program}
12043 \end_layout
12044
12045 \end_inset
12046
12047
12048 \begin_inset Flex Code
12049 status collapsed
12050
12051 \begin_layout Plain Layout
12052
12053 \backslash
12054 end{algorithm*}
12055 \end_layout
12056
12057 \end_inset
12058
12059 といったコマンドが利用できます。
12060 \end_layout
12061
12062 \begin_layout Standard
12063 \begin_inset Flex Code
12064 status collapsed
12065
12066 \begin_layout Plain Layout
12067
12068 \emph on
12069 type
12070 \end_layout
12071
12072 \end_inset
12073
12074 型のフロートを定義すると、自動的に
12075 \emph on
12076 対応する
12077 \emph default
12078
12079 \begin_inset Flex Code
12080 status collapsed
12081
12082 \begin_layout Plain Layout
12083
12084 \emph on
12085 type
12086 \end_layout
12087
12088 \end_inset
12089
12090 名カウンタが定義されます。
12091 \end_layout
12092
12093 \begin_layout Subsection
12094 任意設定差込枠と差込枠レイアウト
12095 \begin_inset CommandInset label
12096 LatexCommand label
12097 name "sub:任意設定差込枠"
12098
12099 \end_inset
12100
12101
12102 \end_layout
12103
12104 \begin_layout Standard
12105 LyXは第1.4.0版から文字様式をサポートしています。第1.6.0版以降、これは任意設定差込枠と呼ばれています。
12106 \end_layout
12107
12108 \begin_layout Standard
12109 任意設定差込枠には次の3種類があります。
12110 \end_layout
12111
12112 \begin_layout Itemize
12113 文字様式(
12114 \begin_inset Flex Code
12115 status collapsed
12116
12117 \begin_layout Plain Layout
12118 CharStyle
12119 \end_layout
12120
12121 \end_inset
12122
12123 )。これは、
12124 \begin_inset Flex Code
12125 status collapsed
12126
12127 \begin_layout Plain Layout
12128
12129 \backslash
12130 noun
12131 \end_layout
12132
12133 \end_inset
12134
12135
12136 \begin_inset Flex Code
12137 status collapsed
12138
12139 \begin_layout Plain Layout
12140
12141 \backslash
12142 code
12143 \end_layout
12144
12145 \end_inset
12146
12147 などのLaTeXコマンドに対応した意味論的マークアップを定義するものです。
12148 \end_layout
12149
12150 \begin_layout Itemize
12151 ユーザ設定(
12152 \begin_inset Flex Code
12153 status collapsed
12154
12155 \begin_layout Plain Layout
12156 Custom
12157 \end_layout
12158
12159 \end_inset
12160
12161 )。これは、TeXコードや脚注などに似たユーザ設定の折りたたみ式差込枠を定義するのに使用することができます。わかりやすい例はendnote差込枠で、これは
12162 \begin_inset Flex Code
12163 status collapsed
12164
12165 \begin_layout Plain Layout
12166 endnote
12167 \end_layout
12168
12169 \end_inset
12170
12171 モジュール中で定義されています。
12172 \end_layout
12173
12174 \begin_layout Itemize
12175 XML要素(
12176 \begin_inset Flex Code
12177 status collapsed
12178
12179 \begin_layout Plain Layout
12180 Element
12181 \end_layout
12182
12183 \end_inset
12184
12185 )。DocBookクラスで使用するものです。
12186 \end_layout
12187
12188 \begin_layout Standard
12189 任意設定差込枠は、以下で説明する
12190 \begin_inset Flex Code
12191 status collapsed
12192
12193 \begin_layout Plain Layout
12194 InsetLayout
12195 \end_layout
12196
12197 \end_inset
12198
12199 タグを使用して定義されます。
12200 \end_layout
12201
12202 \begin_layout Standard
12203 \begin_inset Flex Code
12204 status collapsed
12205
12206 \begin_layout Plain Layout
12207 InsetLayout
12208 \end_layout
12209
12210 \end_inset
12211
12212 タグは、もう一つ別の機能も提供します。これを使えば、いろいろな種類の差込枠全体のレイアウトを設定するのに使用することができるのです。現在のところ、
12213 \begin_inset Flex Code
12214 status collapsed
12215
12216 \begin_layout Plain Layout
12217 InsetLayout
12218 \end_layout
12219
12220 \end_inset
12221
12222 は任意設定差込枠を定義することの他に、脚注・傍注・注釈差込枠・TeXコード(ERT)差込枠・派生枝・リスト・索引・ボックス・表・アルゴリズム・URL・オプション
12223 引数のレイアウトパラメータを設定するのに使用することができます。
12224 \end_layout
12225
12226 \begin_layout Standard
12227 \begin_inset Flex Code
12228 status collapsed
12229
12230 \begin_layout Plain Layout
12231 InsetLayout
12232 \end_layout
12233
12234 \end_inset
12235
12236 定義は以下の形の行では始まらなくてはなりません。
12237 \end_layout
12238
12239 \begin_layout LyX-Code
12240 InsetLayout <型>
12241 \end_layout
12242
12243 \begin_layout Standard
12244 ここで
12245 \begin_inset Flex Code
12246 status collapsed
12247
12248 \begin_layout Plain Layout
12249 <型>
12250 \end_layout
12251
12252 \end_inset
12253
12254 は、レイアウトを定義しようとしている差込枠を指し、以下の2つの場合がありえます。
12255 \end_layout
12256
12257 \begin_layout Enumerate
12258 既存の差込枠のレイアウトを変更する場合。この場合、
12259 \begin_inset Flex Code
12260 status collapsed
12261
12262 \begin_layout Plain Layout
12263 <型>
12264 \end_layout
12265
12266 \end_inset
12267
12268 は以下のいずれかになります:
12269 \begin_inset Flex Code
12270 status collapsed
12271
12272 \begin_layout Plain Layout
12273 Algorithm
12274 \end_layout
12275
12276 \end_inset
12277
12278
12279 \begin_inset Flex Code
12280 status collapsed
12281
12282 \begin_layout Plain Layout
12283 Branch
12284 \end_layout
12285
12286 \end_inset
12287
12288
12289 \begin_inset Flex Code
12290 status collapsed
12291
12292 \begin_layout Plain Layout
12293 Box
12294 \end_layout
12295
12296 \end_inset
12297
12298
12299 \begin_inset Flex Code
12300 status collapsed
12301
12302 \begin_layout Plain Layout
12303 Box:shaded
12304 \end_layout
12305
12306 \end_inset
12307
12308
12309 \begin_inset Flex Code
12310 status collapsed
12311
12312 \begin_layout Plain Layout
12313 ERT
12314 \end_layout
12315
12316 \end_inset
12317
12318
12319 \begin_inset Flex Code
12320 status collapsed
12321
12322 \begin_layout Plain Layout
12323 Figure
12324 \end_layout
12325
12326 \end_inset
12327
12328
12329 \begin_inset Flex Code
12330 status collapsed
12331
12332 \begin_layout Plain Layout
12333 Foot
12334 \end_layout
12335
12336 \end_inset
12337
12338
12339 \begin_inset Flex Code
12340 status collapsed
12341
12342 \begin_layout Plain Layout
12343 Index
12344 \end_layout
12345
12346 \end_inset
12347
12348
12349 \begin_inset Flex Code
12350 status collapsed
12351
12352 \begin_layout Plain Layout
12353 Info
12354 \end_layout
12355
12356 \end_inset
12357
12358
12359 \begin_inset Flex Code
12360 status collapsed
12361
12362 \begin_layout Plain Layout
12363 Info:menu
12364 \end_layout
12365
12366 \end_inset
12367
12368
12369 \begin_inset Flex Code
12370 status collapsed
12371
12372 \begin_layout Plain Layout
12373 Info:shortcut
12374 \end_layout
12375
12376 \end_inset
12377
12378
12379 \begin_inset Flex Code
12380 status collapsed
12381
12382 \begin_layout Plain Layout
12383 Info:shortcuts
12384 \end_layout
12385
12386 \end_inset
12387
12388
12389 \begin_inset Flex Code
12390 status collapsed
12391
12392 \begin_layout Plain Layout
12393 Listings
12394 \end_layout
12395
12396 \end_inset
12397
12398
12399 \begin_inset Flex Code
12400 status collapsed
12401
12402 \begin_layout Plain Layout
12403 Marginal
12404 \end_layout
12405
12406 \end_inset
12407
12408
12409 \begin_inset Flex Code
12410 status collapsed
12411
12412 \begin_layout Plain Layout
12413 Note:Comment
12414 \end_layout
12415
12416 \end_inset
12417
12418
12419 \begin_inset Flex Code
12420 status collapsed
12421
12422 \begin_layout Plain Layout
12423 Note:Note
12424 \end_layout
12425
12426 \end_inset
12427
12428
12429 \begin_inset Flex Code
12430 status collapsed
12431
12432 \begin_layout Plain Layout
12433 Note:GreyedOut
12434 \end_layout
12435
12436 \end_inset
12437
12438
12439 \begin_inset Flex Code
12440 status collapsed
12441
12442 \begin_layout Plain Layout
12443 OptArg
12444 \end_layout
12445
12446 \end_inset
12447
12448
12449 \begin_inset Flex Code
12450 status collapsed
12451
12452 \begin_layout Plain Layout
12453 Table
12454 \end_layout
12455
12456 \end_inset
12457
12458
12459 \begin_inset Flex Code
12460 status collapsed
12461
12462 \begin_layout Plain Layout
12463 URL
12464 \end_layout
12465
12466 \end_inset
12467
12468
12469 \end_layout
12470
12471 \begin_layout Enumerate
12472 任意設定差込枠のレイアウトを定義する場合。この場合には、
12473 \begin_inset Flex Code
12474 status collapsed
12475
12476 \begin_layout Plain Layout
12477 <型>
12478 \end_layout
12479
12480 \end_inset
12481
12482 は既存の差込枠で使用されていないもので有効な識別子であれば、何でも指定できます。任意設定差込枠の定義には、
12483 \begin_inset Flex Code
12484 status collapsed
12485
12486 \begin_layout Plain Layout
12487 LyXType
12488 \end_layout
12489
12490 \end_inset
12491
12492 項目も
12493 \emph on
12494 同時に
12495 \emph default
12496 含まれていて、これがどの型の差込枠なのかが宣言されている必要があります。
12497 \end_layout
12498
12499 \begin_layout Standard
12500 \begin_inset Flex Code
12501 status collapsed
12502
12503 \begin_layout Plain Layout
12504 InsetLayout
12505 \end_layout
12506
12507 \end_inset
12508
12509 定義には以下の項目を入れることができます。
12510 \end_layout
12511
12512 \begin_layout Description
12513 \begin_inset Flex Code
12514 status collapsed
12515
12516 \begin_layout Plain Layout
12517 BgColor
12518 \end_layout
12519
12520 \end_inset
12521
12522  差込枠の背景色。有効な色彩は
12523 \begin_inset Flex Code
12524 status collapsed
12525
12526 \begin_layout Plain Layout
12527 src/ColorCode.h
12528 \end_layout
12529
12530 \end_inset
12531
12532 で定義されています。
12533 \end_layout
12534
12535 \begin_layout Description
12536 \begin_inset Flex Code
12537 status collapsed
12538
12539 \begin_layout Plain Layout
12540 ContentAsLabel
12541 \end_layout
12542
12543 \end_inset
12544
12545  [
12546 \begin_inset Flex Code
12547 status collapsed
12548
12549 \begin_layout Plain Layout
12550
12551 \emph on
12552 0
12553 \end_layout
12554
12555 \end_inset
12556
12557 ,
12558 \begin_inset Flex Code
12559 status collapsed
12560
12561 \begin_layout Plain Layout
12562 1
12563 \end_layout
12564
12565 \end_inset
12566
12567 ] 差込枠を閉じた際、差込枠の内容をラベルとして使用するか否か。既定値は偽です。
12568 \end_layout
12569
12570 \begin_layout Description
12571 \begin_inset Flex Code
12572 status collapsed
12573
12574 \begin_layout Plain Layout
12575 CopyStyle
12576 \end_layout
12577
12578 \end_inset
12579
12580  [
12581 \begin_inset Flex Code
12582 status collapsed
12583
12584 \begin_layout Plain Layout
12585 文字列
12586 \end_layout
12587
12588 \end_inset
12589
12590 ] 既存の様式から、すべての機能を現在の様式にコピーします。
12591 \end_layout
12592
12593 \begin_layout Description
12594 \begin_inset Flex Code
12595 status collapsed
12596
12597 \begin_layout Plain Layout
12598 CustomPars
12599 \end_layout
12600
12601 \end_inset
12602
12603  [
12604 \begin_inset Flex Code
12605 status collapsed
12606
12607 \begin_layout Plain Layout
12608
12609 \emph on
12610 0
12611 \end_layout
12612
12613 \end_inset
12614
12615 ,
12616 \begin_inset Flex Code
12617 status collapsed
12618
12619 \begin_layout Plain Layout
12620 1
12621 \end_layout
12622
12623 \end_inset
12624
12625 ] 段落を設定するのに、段落設定ダイアログをユーザが使えるかどうかを指定します。
12626 \end_layout
12627
12628 \begin_layout Description
12629 \begin_inset Flex Code
12630 status collapsed
12631
12632 \begin_layout Plain Layout
12633 Decoration
12634 \end_layout
12635
12636 \end_inset
12637
12638  差込枠の枠とボタンをレンダリングするのに使用する様式を指定するもので、
12639 \begin_inset Flex Code
12640 status collapsed
12641
12642 \begin_layout Plain Layout
12643 Classic
12644 \end_layout
12645
12646 \end_inset
12647
12648
12649 \begin_inset Flex Code
12650 status collapsed
12651
12652 \begin_layout Plain Layout
12653 Minimalistic
12654 \end_layout
12655
12656 \end_inset
12657
12658
12659 \begin_inset Flex Code
12660 status collapsed
12661
12662 \begin_layout Plain Layout
12663 Conglomerate
12664 \end_layout
12665
12666 \end_inset
12667
12668 のいずれかを指定することができます。脚注は通常
12669 \begin_inset Flex Code
12670 status collapsed
12671
12672 \begin_layout Plain Layout
12673 Classic
12674 \end_layout
12675
12676 \end_inset
12677
12678 を使用し、TeXコード差込枠は通常
12679 \begin_inset Flex Code
12680 status collapsed
12681
12682 \begin_layout Plain Layout
12683 Minimalistic
12684 \end_layout
12685
12686 \end_inset
12687
12688 、文字様式は
12689 \begin_inset Flex Code
12690 status collapsed
12691
12692 \begin_layout Plain Layout
12693 Conglomerate
12694 \end_layout
12695
12696 \end_inset
12697
12698 を使用します。
12699 \end_layout
12700
12701 \begin_layout Description
12702 \begin_inset Flex Code
12703 status collapsed
12704
12705 \begin_layout Plain Layout
12706 End
12707 \end_layout
12708
12709 \end_inset
12710
12711  InsetLayout宣言を閉じるのに必要です。
12712 \end_layout
12713
12714 \begin_layout Description
12715 \begin_inset Flex Code
12716 status collapsed
12717
12718 \begin_layout Plain Layout
12719 Font
12720 \end_layout
12721
12722 \end_inset
12723
12724  本文本体とラベル
12725 \emph on
12726 両方に
12727 \emph default
12728 使用されるフォントです。第
12729 \begin_inset CommandInset ref
12730 LatexCommand ref
12731 reference "sub:フォント指定"
12732
12733 \end_inset
12734
12735 節を参照。このフォントを定義すると自動的に
12736 \begin_inset Flex Code
12737 status collapsed
12738
12739 \begin_layout Plain Layout
12740 LabelFont
12741 \end_layout
12742
12743 \end_inset
12744
12745 も同じ値に定義されるので、これらを別々の値にしたいときは、これを先に定義してから後に
12746 \begin_inset Flex Code
12747 status collapsed
12748
12749 \begin_layout Plain Layout
12750 LabelFont
12751 \end_layout
12752
12753 \end_inset
12754
12755 を定義しなくてはならないことに注意してください。
12756 \end_layout
12757
12758 \begin_layout Description
12759 \begin_inset Flex Code
12760 status collapsed
12761
12762 \begin_layout Plain Layout
12763 ForceLTR
12764 \end_layout
12765
12766 \end_inset
12767
12768  たとえばTeXコードやURLで「latex」言語が「左から右」(ラテン式)出力になるように強制します。うまく機能しません。
12769 \end_layout
12770
12771 \begin_layout Description
12772 \begin_inset Flex Code
12773 status collapsed
12774
12775 \begin_layout Plain Layout
12776 ForcePlain
12777 \end_layout
12778
12779 \end_inset
12780
12781  [
12782 \begin_inset Flex Code
12783 status collapsed
12784
12785 \begin_layout Plain Layout
12786
12787 \emph on
12788 0
12789 \end_layout
12790
12791 \end_inset
12792
12793 ,
12794 \begin_inset Flex Code
12795 status collapsed
12796
12797 \begin_layout Plain Layout
12798 1
12799 \end_layout
12800
12801 \end_inset
12802
12803 ] PlainLayoutを使用するべきなのか、それともユーザが差込枠で使用されている段落様式を変更できるのかを指定します。既定値は偽です。
12804 \end_layout
12805
12806 \begin_layout Description
12807 \begin_inset Flex Code
12808 status collapsed
12809
12810 \begin_layout Plain Layout
12811 FreeSpacing
12812 \end_layout
12813
12814 \end_inset
12815
12816  [
12817 \emph on
12818
12819 \begin_inset Flex Code
12820 status collapsed
12821
12822 \begin_layout Plain Layout
12823 0
12824 \end_layout
12825
12826 \end_inset
12827
12828
12829 \emph default
12830
12831 \begin_inset Flex Code
12832 status collapsed
12833
12834 \begin_layout Plain Layout
12835 1
12836 \end_layout
12837
12838 \end_inset
12839
12840 ] LyXは、空白をそれ自体文字や記号ではなく、2つの単語の間の分割子として捉えているため、単語間に2つ以上の空白を入れることは、通常許可していません。これ自体
12841 はとても素晴らしいことですが、たとえばプログラムコードや生のLaTeXコードを入力しようとするときなどに、煩わしくなることがあります。このことから、
12842 \begin_inset Flex Code
12843 status collapsed
12844
12845 \begin_layout Plain Layout
12846 FreeSpacing
12847 \end_layout
12848
12849 \end_inset
12850
12851 を有効にすることが認められています。LyXは、LaTeXモード以外では2つめ以降の空白には、保護された空白を使用することに注意してください。。
12852 \end_layout
12853
12854 \begin_layout Description
12855 \begin_inset Flex Code
12856 status collapsed
12857
12858 \begin_layout Plain Layout
12859 HTML*
12860 \end_layout
12861
12862 \end_inset
12863
12864  これらは、XHTML出力で使用されます。第
12865 \begin_inset CommandInset ref
12866 LatexCommand ref
12867 reference "sec:XHTML出力のタグ"
12868
12869 \end_inset
12870
12871 節をご覧ください。
12872 \end_layout
12873
12874 \begin_layout Description
12875 \begin_inset Flex Code
12876 status collapsed
12877
12878 \begin_layout Plain Layout
12879 InToc
12880 \end_layout
12881
12882 \end_inset
12883
12884  [
12885 \begin_inset Flex Code
12886 status collapsed
12887
12888 \begin_layout Plain Layout
12889
12890 \emph on
12891 0
12892 \end_layout
12893
12894 \end_inset
12895
12896 ,
12897 \begin_inset Flex Code
12898 status collapsed
12899
12900 \begin_layout Plain Layout
12901 1
12902 \end_layout
12903
12904 \end_inset
12905
12906 ] 「文書構造」ペイン用に出力される文字列に、この差込枠の内容を含めるかどうか。たとえば、節見出しの脚注の内容が、文書構造の目次に表示されることは望まないでしょ
12907 うが、通常、文字様式の内容は表示されることを望むでしょう。既定値は偽、すなわち含めません。
12908 \end_layout
12909
12910 \begin_layout Description
12911 \begin_inset Flex Code
12912 status collapsed
12913
12914 \begin_layout Plain Layout
12915 KeepEmpty
12916 \end_layout
12917
12918 \end_inset
12919
12920  [
12921 \emph on
12922
12923 \begin_inset Flex Code
12924 status collapsed
12925
12926 \begin_layout Plain Layout
12927 0
12928 \end_layout
12929
12930 \end_inset
12931
12932
12933 \emph default
12934
12935 \begin_inset Flex Code
12936 status collapsed
12937
12938 \begin_layout Plain Layout
12939 1
12940 \end_layout
12941
12942 \end_inset
12943
12944 ] 段落を空のままにすると、LaTeX出力が空になってしまうので、通常、LyXは段落を空にすることを許可しません。しかしながら、これを無効にすることが望ましい場
12945 合が存在します。たとえば、書簡のひな型では、必須フィールドを人々が忘れないように、空のフィールドのまま提供する手もあります。特別なクラスにおいては、レイアウトを
12946 実際には文章を含まないある種の改行として使用することもあります。
12947 \end_layout
12948
12949 \begin_layout Description
12950 \begin_inset Flex Code
12951 status collapsed
12952
12953 \begin_layout Plain Layout
12954 LabelFont
12955 \end_layout
12956
12957 \end_inset
12958
12959  ラベルに使用されるフォント。第
12960 \begin_inset CommandInset ref
12961 LatexCommand ref
12962 reference "sub:フォント指定"
12963
12964 \end_inset
12965
12966 節を参照。非効率を回避するため、この定義は
12967 \begin_inset Flex Code
12968 status collapsed
12969
12970 \begin_layout Plain Layout
12971 Font
12972 \end_layout
12973
12974 \end_inset
12975
12976 の前には決して現れてはなりません。
12977 \end_layout
12978
12979 \begin_layout Description
12980 \begin_inset Flex Code
12981 status collapsed
12982
12983 \begin_layout Plain Layout
12984 LabelString
12985 \end_layout
12986
12987 \end_inset
12988
12989  ボタンなどに差込枠のラベルとして表示されるもの。差込枠型によっては(TeXコードや派生枝)、ラベルが動的に変更されます。
12990 \end_layout
12991
12992 \begin_layout Description
12993 \begin_inset Flex Code
12994 status collapsed
12995
12996 \begin_layout Plain Layout
12997 LatexName
12998 \end_layout
12999
13000 \end_inset
13001
13002  対応するLaTeX関連物の名称。環境名ないしはコマンド名。
13003 \end_layout
13004
13005 \begin_layout Description
13006 \begin_inset Flex Code
13007 status collapsed
13008
13009 \begin_layout Plain Layout
13010 LatexParam
13011 \end_layout
13012
13013 \end_inset
13014
13015  対応する
13016 \begin_inset Flex Code
13017 status collapsed
13018
13019 \begin_layout Plain Layout
13020 LatexName
13021 \end_layout
13022
13023 \end_inset
13024
13025 関連物の非必須パラメータ。
13026 \begin_inset Flex Code
13027 status collapsed
13028
13029 \begin_layout Plain Layout
13030 []
13031 \end_layout
13032
13033 \end_inset
13034
13035 のような括弧対を含む。このパラメータはLyX内部から変更することはできません。
13036 \end_layout
13037
13038 \begin_layout Description
13039 \begin_inset Flex Code
13040 status collapsed
13041
13042 \begin_layout Plain Layout
13043 LatexType
13044 \end_layout
13045
13046 \end_inset
13047
13048  [
13049 \begin_inset Flex Code
13050 status collapsed
13051
13052 \begin_layout Plain Layout
13053
13054 \emph on
13055 Paragraph
13056 \emph default
13057 , Command, Environment, Item_Environment,
13058 \end_layout
13059
13060 \end_inset
13061
13062  
13063 \begin_inset Flex Code
13064 status collapsed
13065
13066 \begin_layout Plain Layout
13067 List_Environmen, Bib_Environment
13068 \end_layout
13069
13070 \end_inset
13071
13072 ] レイアウトがどのようにLaTeXに変換されるべきかを示します
13073 \begin_inset Foot
13074 status collapsed
13075
13076 \begin_layout Plain Layout
13077 これらのルールはSGMLクラスにも適用されるので、
13078 \begin_inset Flex Code
13079 status collapsed
13080
13081 \begin_layout Plain Layout
13082 LatexType
13083 \end_layout
13084
13085 \end_inset
13086
13087 の名称は、少しミスリーディングかもしれません。特定の例については、SGMLクラスファイルを見てください。
13088 \end_layout
13089
13090 \end_inset
13091
13092
13093 \end_layout
13094
13095 \begin_deeper
13096 \begin_layout Itemize
13097 \begin_inset Flex Code
13098 status collapsed
13099
13100 \begin_layout Plain Layout
13101 Paragraph
13102 \end_layout
13103
13104 \end_inset
13105
13106 は、何も特別なことは意味しません。
13107 \end_layout
13108
13109 \begin_layout Itemize
13110 \begin_inset Flex Code
13111 status collapsed
13112
13113 \begin_layout Plain Layout
13114 Command
13115 \end_layout
13116
13117 \end_inset
13118
13119 は、
13120 \begin_inset Flex Code
13121 status collapsed
13122
13123 \begin_layout Plain Layout
13124
13125 \backslash
13126
13127 \emph on
13128 LatexName
13129 \emph default
13130 {\SpecialChar \ldots{}
13131 }
13132 \end_layout
13133
13134 \end_inset
13135
13136 を意味します。
13137 \end_layout
13138
13139 \begin_layout Itemize
13140 \begin_inset Flex Code
13141 status collapsed
13142
13143 \begin_layout Plain Layout
13144 Environment
13145 \end_layout
13146
13147 \end_inset
13148
13149 は、
13150 \begin_inset Flex Code
13151 status collapsed
13152
13153 \begin_layout Plain Layout
13154
13155 \backslash
13156 begin{
13157 \emph on
13158 LatexName
13159 \emph default
13160 }\SpecialChar \ldots{}
13161
13162 \backslash
13163 end{
13164 \emph on
13165 LatexName
13166 \emph default
13167 }
13168 \end_layout
13169
13170 \end_inset
13171
13172 を意味します。
13173 \end_layout
13174
13175 \begin_layout Itemize
13176 \begin_inset Flex Code
13177 status collapsed
13178
13179 \begin_layout Plain Layout
13180 Item_Environment
13181 \end_layout
13182
13183 \end_inset
13184
13185
13186 \begin_inset Flex Code
13187 status collapsed
13188
13189 \begin_layout Plain Layout
13190 Environment
13191 \end_layout
13192
13193 \end_inset
13194
13195 と同じですが、
13196 \begin_inset Flex Code
13197 status collapsed
13198
13199 \begin_layout Plain Layout
13200
13201 \backslash
13202 item
13203 \end_layout
13204
13205 \end_inset
13206
13207 がこの環境のすべての段落に付けられるところだけが異なっています。
13208 \end_layout
13209
13210 \begin_layout Itemize
13211 \begin_inset Flex Code
13212 status collapsed
13213
13214 \begin_layout Plain Layout
13215 List_Environment
13216 \end_layout
13217
13218 \end_inset
13219
13220
13221 \begin_inset Flex Code
13222 status collapsed
13223
13224 \begin_layout Plain Layout
13225 Item_Environment
13226 \end_layout
13227
13228 \end_inset
13229
13230 と同じですが、
13231 \begin_inset Flex Code
13232 status collapsed
13233
13234 \begin_layout Plain Layout
13235 LabelWidthString
13236 \end_layout
13237
13238 \end_inset
13239
13240 が環境の引数として渡されるところだけが異なっています。
13241 \begin_inset Flex Code
13242 status collapsed
13243
13244 \begin_layout Plain Layout
13245 LabelWidthString
13246 \end_layout
13247
13248 \end_inset
13249
13250 は、
13251 \begin_inset Flex MenuItem
13252 status collapsed
13253
13254 \begin_layout Plain Layout
13255 編集\SpecialChar \menuseparator
13256 段落設定
13257 \end_layout
13258
13259 \end_inset
13260
13261 ダイアログで定義することができます。
13262 \end_layout
13263
13264 \begin_layout Standard
13265 上記最後のいくつかをまとめると、LaTeX出力は、LaTeX型に依存して
13266 \end_layout
13267
13268 \begin_layout LyX-Code
13269
13270 \backslash
13271 latexname[latexparam]{\SpecialChar \ldots{}
13272 }
13273 \end_layout
13274
13275 \begin_layout Standard
13276 のようになるか、
13277 \end_layout
13278
13279 \begin_layout LyX-Code
13280
13281 \backslash
13282 begin{latexname}[latexparam] \SpecialChar \ldots{}
13283  
13284 \backslash
13285 end{latexname}.
13286 \end_layout
13287
13288 \begin_layout Standard
13289 となります。
13290 \end_layout
13291
13292 \end_deeper
13293 \begin_layout Description
13294 \begin_inset Flex Code
13295 status collapsed
13296
13297 \begin_layout Plain Layout
13298 LyxType
13299 \end_layout
13300
13301 \end_inset
13302
13303  
13304 \begin_inset Flex Code
13305 status collapsed
13306
13307 \begin_layout Plain Layout
13308 charstyle
13309 \end_layout
13310
13311 \end_inset
13312
13313
13314 \begin_inset Flex Code
13315 status collapsed
13316
13317 \begin_layout Plain Layout
13318 custom
13319 \end_layout
13320
13321 \end_inset
13322
13323
13324 \begin_inset Flex Code
13325 status collapsed
13326
13327 \begin_layout Plain Layout
13328 element
13329 \end_layout
13330
13331 \end_inset
13332
13333
13334 \begin_inset Flex Code
13335 status collapsed
13336
13337 \begin_layout Plain Layout
13338 end
13339 \end_layout
13340
13341 \end_inset
13342
13343 (charstyleの定義の終わりなどを示すダミー定義)の各値を取ることができます。この項目は、任意設定差込枠に必須であり、かつ任意設定差込枠でしか意味を持ちま
13344 せん。この項目は、就中、差込枠がどのメニューに表示されるかを決定します。
13345 \begin_inset Flex Code
13346 status collapsed
13347
13348 \begin_layout Plain Layout
13349 LyxType
13350 \end_layout
13351
13352 \end_inset
13353
13354
13355 \begin_inset Flex Code
13356 status collapsed
13357
13358 \begin_layout Plain Layout
13359 charstyle
13360 \end_layout
13361
13362 \end_inset
13363
13364 に設定すると、
13365 \begin_inset Flex Code
13366 status collapsed
13367
13368 \begin_layout Plain Layout
13369 MultiPar
13370 \end_layout
13371
13372 \end_inset
13373
13374 が偽に設定されます。文字様式差込枠で
13375 \begin_inset Flex Code
13376 status collapsed
13377
13378 \begin_layout Plain Layout
13379 MultiPar
13380 \end_layout
13381
13382 \end_inset
13383
13384 を真にしたい時には、
13385 \begin_inset Flex Code
13386 status collapsed
13387
13388 \begin_layout Plain Layout
13389 LyxType
13390 \end_layout
13391
13392 \end_inset
13393
13394 を設定した
13395 \emph on
13396 後に
13397 \emph default
13398 設定すれば、真に設定することができます。
13399 \end_layout
13400
13401 \begin_layout Description
13402 \begin_inset Flex Code
13403 status collapsed
13404
13405 \begin_layout Plain Layout
13406 MultiPar
13407 \end_layout
13408
13409 \end_inset
13410
13411  [
13412 \begin_inset Flex Code
13413 status collapsed
13414
13415 \begin_layout Plain Layout
13416
13417 \emph on
13418 0
13419 \end_layout
13420
13421 \end_inset
13422
13423 ,
13424 \begin_inset Flex Code
13425 status collapsed
13426
13427 \begin_layout Plain Layout
13428 1
13429 \end_layout
13430
13431 \end_inset
13432
13433 ] この差込枠中に複数の段落を入れることができるかどうか。これは同時に、
13434 \begin_inset Flex Code
13435 status collapsed
13436
13437 \begin_layout Plain Layout
13438 CustomPars
13439 \end_layout
13440
13441 \end_inset
13442
13443 を同じ値に設定し、
13444 \begin_inset Flex Code
13445 status collapsed
13446
13447 \begin_layout Plain Layout
13448 ForcePlain
13449 \end_layout
13450
13451 \end_inset
13452
13453 を逆の値に設定します。これらは、
13454 \begin_inset Flex Code
13455 status collapsed
13456
13457 \begin_layout Plain Layout
13458 MultiPar
13459 \end_layout
13460
13461 \end_inset
13462
13463
13464 \emph on
13465 後に
13466 \emph default
13467 指定されれば、他の値に指定し直すことができます。既定値は真です。
13468 \end_layout
13469
13470 \begin_layout Description
13471 \begin_inset Flex Code
13472 status collapsed
13473
13474 \begin_layout Plain Layout
13475 NeedProtect
13476 \end_layout
13477
13478 \end_inset
13479
13480  [
13481 \begin_inset Flex Code
13482 status collapsed
13483
13484 \begin_layout Plain Layout
13485
13486 \emph on
13487 0
13488 \end_layout
13489
13490 \end_inset
13491
13492 ,
13493 \begin_inset Flex Code
13494 status collapsed
13495
13496 \begin_layout Plain Layout
13497 1
13498 \end_layout
13499
13500 \end_inset
13501
13502 ] 本レイアウト中で脆弱なコマンドを
13503 \begin_inset Flex Code
13504 status collapsed
13505
13506 \begin_layout Plain Layout
13507
13508 \backslash
13509 protect
13510 \end_layout
13511
13512 \end_inset
13513
13514 するか否か(註:当該コマンド自身をprotectするかどうかでは
13515 \emph on
13516 ありません
13517 \emph default
13518 )。既定値は偽です。
13519 \end_layout
13520
13521 \begin_layout Description
13522 \begin_inset Flex Code
13523 status collapsed
13524
13525 \begin_layout Plain Layout
13526 ParbreakIsNewline
13527 \end_layout
13528
13529 \end_inset
13530
13531  [
13532 \begin_inset Flex Code
13533 status collapsed
13534
13535 \begin_layout Plain Layout
13536
13537 \emph on
13538 0
13539 \end_layout
13540
13541 \end_inset
13542
13543
13544 \begin_inset Flex Code
13545 status collapsed
13546
13547 \begin_layout Plain Layout
13548 1
13549 \end_layout
13550
13551 \end_inset
13552
13553 ] LaTeX出力中で、段落を空行ではなく、改行で区切るよう指定します。
13554 \begin_inset Flex Code
13555 status collapsed
13556
13557 \begin_layout Plain Layout
13558 PassThru 1
13559 \end_layout
13560
13561 \end_inset
13562
13563 と併用すれば、(TeXコードを使用したときのように)テキストエディタをエミュレートすることができます。
13564 \end_layout
13565
13566 \begin_layout Description
13567 \begin_inset Flex Code
13568 status collapsed
13569
13570 \begin_layout Plain Layout
13571 PassThru
13572 \end_layout
13573
13574 \end_inset
13575
13576  [
13577 \emph on
13578
13579 \begin_inset Flex Code
13580 status collapsed
13581
13582 \begin_layout Plain Layout
13583 0
13584 \end_layout
13585
13586 \end_inset
13587
13588
13589 \emph default
13590
13591 \begin_inset Flex Code
13592 status collapsed
13593
13594 \begin_layout Plain Layout
13595 1
13596 \end_layout
13597
13598 \end_inset
13599
13600 ] この段落の内容が、LaTeXが必要とするような特別な変換を行わずに、生の形で出力されるべきかどうか。
13601 \end_layout
13602
13603 \begin_layout Description
13604 \begin_inset Flex Code
13605 status collapsed
13606
13607 \begin_layout Plain Layout
13608 Preamble
13609 \end_layout
13610
13611 \end_inset
13612
13613  この様式が使用されたときに、LaTeXプリアンブルに付け加えるべき情報。この特定の様式が要求するマクロを定義したり、パッケージを読み込んだりと言ったことに使用
13614 します。「
13615 \begin_inset Flex Code
13616 status collapsed
13617
13618 \begin_layout Plain Layout
13619 EndPreamble
13620 \end_layout
13621
13622 \end_inset
13623
13624 」で閉じる必要があります。
13625 \end_layout
13626
13627 \begin_layout Description
13628 \begin_inset Flex Code
13629 status collapsed
13630
13631 \begin_layout Plain Layout
13632 RefPrefix
13633 \end_layout
13634
13635 \end_inset
13636
13637  [
13638 \begin_inset Flex Code
13639 status collapsed
13640
13641 \begin_layout Plain Layout
13642 文字列
13643 \end_layout
13644
13645 \end_inset
13646
13647 ] この型の差込枠を参照する際、生成されるラベルに使用する前置句。これによって、整形参照を使用することができるようになります。
13648 \end_layout
13649
13650 \begin_layout Description
13651 \begin_inset Flex Code
13652 status collapsed
13653
13654 \begin_layout Plain Layout
13655 Requires
13656 \end_layout
13657
13658 \end_inset
13659
13660  [
13661 \begin_inset Flex Code
13662 status collapsed
13663
13664 \begin_layout Plain Layout
13665 文字列
13666 \end_layout
13667
13668 \end_inset
13669
13670 ] このレイアウトが
13671 \begin_inset Flex Code
13672 status collapsed
13673
13674 \begin_layout Plain Layout
13675 文字列
13676 \end_layout
13677
13678 \end_inset
13679
13680 で表される機能を必要するか否か。「機能」に関する情報は、上記
13681 \begin_inset Flex Code
13682 status collapsed
13683
13684 \begin_layout Plain Layout
13685 Provides
13686 \end_layout
13687
13688 \end_inset
13689
13690 の説明(
13691 \begin_inset CommandInset ref
13692 LatexCommand pageref
13693 reference "des:FreeSpacing"
13694
13695 \end_inset
13696
13697 ページ)をご参照ください。
13698 \end_layout
13699
13700 \begin_layout Description
13701 \begin_inset Flex Code
13702 status collapsed
13703
13704 \begin_layout Plain Layout
13705 ResetFont
13706 \end_layout
13707
13708 \end_inset
13709
13710  [
13711 \begin_inset Flex Code
13712 status collapsed
13713
13714 \begin_layout Plain Layout
13715 0
13716 \end_layout
13717
13718 \end_inset
13719
13720
13721 \begin_inset Flex Code
13722 status collapsed
13723
13724 \begin_layout Plain Layout
13725
13726 \emph on
13727 1
13728 \end_layout
13729
13730 \end_inset
13731
13732 ] この差込枠が周囲の環境と同じフォントを用いるか、独自のフォントを用いるか。既定値は真、すなわち独自のフォントを用います。
13733 \end_layout
13734
13735 \begin_layout Description
13736 \begin_inset Flex Code
13737 status collapsed
13738
13739 \begin_layout Plain Layout
13740 Spellcheck
13741 \end_layout
13742
13743 \end_inset
13744
13745  [
13746 \begin_inset Flex Code
13747 status collapsed
13748
13749 \begin_layout Plain Layout
13750 0
13751 \end_layout
13752
13753 \end_inset
13754
13755 ,
13756 \begin_inset Flex Code
13757 status collapsed
13758
13759 \begin_layout Plain Layout
13760
13761 \emph on
13762 1
13763 \end_layout
13764
13765 \end_inset
13766
13767 ] この差込枠の内容をスペルチェックするか否か。既定値は真です。
13768 \end_layout
13769
13770 \begin_layout Subsection
13771 カウンタ
13772 \begin_inset CommandInset label
13773 LatexCommand label
13774 name "sub:カウンタ"
13775
13776 \end_inset
13777
13778
13779 \end_layout
13780
13781 \begin_layout Standard
13782 LyX第1.3.0版以来、テキストクラス自体の中でカウンタ(
13783 \begin_inset Flex MenuItem
13784 status collapsed
13785
13786 \begin_layout Plain Layout
13787 chapter
13788 \end_layout
13789
13790 \end_inset
13791
13792
13793 \begin_inset Flex MenuItem
13794 status collapsed
13795
13796 \begin_layout Plain Layout
13797 figure
13798 \end_layout
13799
13800 \end_inset
13801
13802 ・\SpecialChar \ldots{}
13803 )を定義することが可能となり、かつ必要となりました。標準的なフロートは
13804 \begin_inset Flex Code
13805 status collapsed
13806
13807 \begin_layout Plain Layout
13808 stdcounters.inc
13809 \end_layout
13810
13811 \end_inset
13812
13813 ファイルに含まれているので、作業中のレイアウトファイルに
13814 \end_layout
13815
13816 \begin_layout LyX-Code
13817 Input stdcounters.inc
13818 \end_layout
13819
13820 \begin_layout Standard
13821 と加えるだけで済むことも多いでしょう。しかし自製カウンタを定義したければ、そうすることもできます。カウンタ宣言は、
13822 \end_layout
13823
13824 \begin_layout LyX-Code
13825 Counter 名称
13826 \end_layout
13827
13828 \begin_layout Standard
13829 で始まらなくてはなりません。ここで「
13830 \begin_inset Flex Code
13831 status collapsed
13832
13833 \begin_layout Plain Layout
13834 名称
13835 \end_layout
13836
13837 \end_inset
13838
13839 」はカウンタ名で置き換えます。また、宣言は「
13840 \begin_inset Flex Code
13841 status collapsed
13842
13843 \begin_layout Plain Layout
13844 End
13845 \end_layout
13846
13847 \end_inset
13848
13849 」で終わらなくてはなりません。以下のパラメータを使用することができます。
13850 \end_layout
13851
13852 \begin_layout Description
13853 \begin_inset Flex Code
13854 status collapsed
13855
13856 \begin_layout Plain Layout
13857 LabelString [文字列=""]
13858 \end_layout
13859
13860 \end_inset
13861
13862  定義されていると、ここで指定した文字列がカウンタの表示の仕方を定義します。この値を指定すると、
13863 \begin_inset Flex Code
13864 status collapsed
13865
13866 \begin_layout Plain Layout
13867 LabelStringAppendix
13868 \end_layout
13869
13870 \end_inset
13871
13872 も同じ値に設定されます。文字列中では、以下の構成要素を使用することができます。
13873 \end_layout
13874
13875 \begin_deeper
13876 \begin_layout Itemize
13877 \begin_inset Flex Code
13878 status collapsed
13879
13880 \begin_layout Plain Layout
13881
13882 \backslash
13883 thecounter
13884 \end_layout
13885
13886 \end_inset
13887
13888 は、カウンタ
13889 \begin_inset Flex Code
13890 status collapsed
13891
13892 \begin_layout Plain Layout
13893 counter
13894 \end_layout
13895
13896 \end_inset
13897
13898
13899 \begin_inset Flex Code
13900 status collapsed
13901
13902 \begin_layout Plain Layout
13903 LabelString
13904 \end_layout
13905
13906 \end_inset
13907
13908 (または
13909 \begin_inset Newline linebreak
13910 \end_inset
13911
13912
13913 \begin_inset Flex Code
13914 status collapsed
13915
13916 \begin_layout Plain Layout
13917 LabelStringAppendix
13918 \end_layout
13919
13920 \end_inset
13921
13922 )を展開したもので置き換えられます。 
13923 \end_layout
13924
13925 \begin_layout Itemize
13926 カウンタ値は、LaTeX型マクロ
13927 \begin_inset Flex Code
13928 status collapsed
13929
13930 \begin_layout Plain Layout
13931
13932 \backslash
13933
13934 \emph on
13935 numbertype
13936 \emph default
13937 {
13938 \emph on
13939 カウンタ
13940 \emph default
13941 }
13942 \end_layout
13943
13944 \end_inset
13945
13946 を用いて表現することができます。ここで
13947 \begin_inset Flex Code
13948 status collapsed
13949
13950 \begin_layout Plain Layout
13951
13952 \emph on
13953 numbertype
13954 \end_layout
13955
13956 \end_inset
13957
13958 は以下のいずれかです
13959 \begin_inset Foot
13960 status collapsed
13961
13962 \begin_layout Plain Layout
13963 実は、事態はもう少し複雑です。以下に説明されているもの以外の
13964 \emph on
13965 numbertype
13966 \emph default
13967 は何であれ、アラビア数字を生成します。これが将来変更されたとしても不思議ではないでしょう。
13968 \end_layout
13969
13970 \end_inset
13971
13972
13973 \begin_inset Flex Code
13974 status collapsed
13975
13976 \begin_layout Plain Layout
13977 arabic
13978 \end_layout
13979
13980 \end_inset
13981
13982 :1, 2, 3,\SpecialChar \ldots{}
13983
13984 \begin_inset Flex Code
13985 status collapsed
13986
13987 \begin_layout Plain Layout
13988 alph
13989 \end_layout
13990
13991 \end_inset
13992
13993 :a, b, c, \SpecialChar \ldots{}
13994 (小文字);
13995 \begin_inset Flex Code
13996 status collapsed
13997
13998 \begin_layout Plain Layout
13999 Alph
14000 \end_layout
14001
14002 \end_inset
14003
14004 :A, B, C, \SpecialChar \ldots{}
14005 (大文字);
14006 \begin_inset Flex Code
14007 status collapsed
14008
14009 \begin_layout Plain Layout
14010 roman
14011 \end_layout
14012
14013 \end_inset
14014
14015 :i, ii, iii, \SpecialChar \ldots{}
14016 (小文字ローマ数字);
14017 \begin_inset Flex Code
14018 status collapsed
14019
14020 \begin_layout Plain Layout
14021 Roman
14022 \end_layout
14023
14024 \end_inset
14025
14026 :I, II, III\SpecialChar \ldots{}
14027 (大文字ローマ数字);
14028 \begin_inset Flex Code
14029 status collapsed
14030
14031 \begin_layout Plain Layout
14032 hebrew
14033 \end_layout
14034
14035 \end_inset
14036
14037 (ヘブライ語数字)。
14038 \end_layout
14039
14040 \end_deeper
14041 \begin_layout Standard
14042 LabelStringが定義されていないときは、既定値は以下のように組み立てられます。このカウンタに親カウンタ
14043 \begin_inset Flex Code
14044 status collapsed
14045
14046 \begin_layout Plain Layout
14047 master
14048 \end_layout
14049
14050 \end_inset
14051
14052
14053 \begin_inset Flex Code
14054 status collapsed
14055
14056 \begin_layout Plain Layout
14057 Within
14058 \end_layout
14059
14060 \end_inset
14061
14062 で定義)があるときには、文字列
14063 \begin_inset Newline linebreak
14064 \end_inset
14065
14066
14067 \begin_inset Flex Code
14068 status collapsed
14069
14070 \begin_layout Plain Layout
14071
14072 \backslash
14073 themaster.
14074 \backslash
14075 arabic{カウンタ}
14076 \end_layout
14077
14078 \end_inset
14079
14080 が使用されます。それ以外の場合は、
14081 \begin_inset Flex Code
14082 status collapsed
14083
14084 \begin_layout Plain Layout
14085
14086 \backslash
14087 arabic{カウンタ}
14088 \end_layout
14089
14090 \end_inset
14091
14092 が使用されます。
14093 \end_layout
14094
14095 \begin_layout Description
14096 \begin_inset Flex Code
14097 status collapsed
14098
14099 \begin_layout Plain Layout
14100 LabelStringAppendix
14101 \end_layout
14102
14103 \end_inset
14104
14105  [
14106 \begin_inset Flex Code
14107 status collapsed
14108
14109 \begin_layout Plain Layout
14110 文字列
14111 \end_layout
14112
14113 \end_inset
14114
14115 =""] 
14116 \begin_inset Flex Code
14117 status collapsed
14118
14119 \begin_layout Plain Layout
14120 LabelString
14121 \end_layout
14122
14123 \end_inset
14124
14125 と同様ですが、付録で使用するためのものです。
14126 \end_layout
14127
14128 \begin_layout Description
14129 \begin_inset Flex Code
14130 status collapsed
14131
14132 \begin_layout Plain Layout
14133 PrettyFormat
14134 \end_layout
14135
14136 \end_inset
14137
14138  [
14139 \begin_inset Flex Code
14140 status collapsed
14141
14142 \begin_layout Plain Layout
14143 文字列
14144 \end_layout
14145
14146 \end_inset
14147
14148 =
14149 \begin_inset Quotes erd
14150 \end_inset
14151
14152
14153 \begin_inset Quotes erd
14154 \end_inset
14155
14156 ] このカウンタの整形参照で使用する書式。たとえば、節番号への参照を「Section 2.4」のように表示させたい場合には、文字列に「##」を含めます。これは、カ
14157 ウンタ番号で置換されます。したがって、節の場合には「Section ##」のようにします。
14158 \end_layout
14159
14160 \begin_layout Description
14161 \begin_inset Flex Code
14162 status collapsed
14163
14164 \begin_layout Plain Layout
14165 Within
14166 \end_layout
14167
14168 \end_inset
14169
14170  [
14171 \begin_inset Flex Code
14172 status collapsed
14173
14174 \begin_layout Plain Layout
14175 文字列
14176 \end_layout
14177
14178 \end_inset
14179
14180 =
14181 \begin_inset Quotes erd
14182 \end_inset
14183
14184
14185 \begin_inset Quotes erd
14186 \end_inset
14187
14188 ] これを別のカウンタ名に設定すると、現在のカウンタは、別のカウンタが増加する毎にリセットされます。たとえば、
14189 \begin_inset Flex Code
14190 status collapsed
14191
14192 \begin_layout Plain Layout
14193 subsection
14194 \end_layout
14195
14196 \end_inset
14197
14198
14199 \begin_inset Flex Code
14200 status collapsed
14201
14202 \begin_layout Plain Layout
14203 section
14204 \end_layout
14205
14206 \end_inset
14207
14208 毎に番号がリセットされます。
14209 \end_layout
14210
14211 \begin_layout Subsection
14212 フォント指定
14213 \begin_inset CommandInset label
14214 LatexCommand label
14215 name "sub:フォント指定"
14216
14217 \end_inset
14218
14219
14220 \end_layout
14221
14222 \begin_layout Standard
14223 フォント指定は、以下のような形を取ります。
14224 \end_layout
14225
14226 \begin_layout LyX-Code
14227 Font 
14228 \family roman
14229 \emph on
14230 または
14231 \family default
14232 \emph default
14233  LabelFont
14234 \end_layout
14235
14236 \begin_layout LyX-Code
14237  ...
14238 \end_layout
14239
14240 \begin_layout LyX-Code
14241 EndFont
14242 \end_layout
14243
14244 \begin_layout Standard
14245 以下のコマンドを使用することができます。
14246 \end_layout
14247
14248 \begin_layout Description
14249 \begin_inset Flex Code
14250 status collapsed
14251
14252 \begin_layout Plain Layout
14253 Color
14254 \end_layout
14255
14256 \end_inset
14257
14258  [
14259 \begin_inset Flex Code
14260 status collapsed
14261
14262 \begin_layout Plain Layout
14263
14264 \emph on
14265 none
14266 \end_layout
14267
14268 \end_inset
14269
14270
14271 \begin_inset Flex Code
14272 status collapsed
14273
14274 \begin_layout Plain Layout
14275 black
14276 \end_layout
14277
14278 \end_inset
14279
14280
14281 \begin_inset Flex Code
14282 status collapsed
14283
14284 \begin_layout Plain Layout
14285 white
14286 \end_layout
14287
14288 \end_inset
14289
14290
14291 \begin_inset Flex Code
14292 status collapsed
14293
14294 \begin_layout Plain Layout
14295 red
14296 \end_layout
14297
14298 \end_inset
14299
14300
14301 \begin_inset Flex Code
14302 status collapsed
14303
14304 \begin_layout Plain Layout
14305 green
14306 \end_layout
14307
14308 \end_inset
14309
14310
14311 \begin_inset Flex Code
14312 status collapsed
14313
14314 \begin_layout Plain Layout
14315 blue
14316 \end_layout
14317
14318 \end_inset
14319
14320
14321 \begin_inset Flex Code
14322 status collapsed
14323
14324 \begin_layout Plain Layout
14325 cyan
14326 \end_layout
14327
14328 \end_inset
14329
14330
14331 \begin_inset Flex Code
14332 status collapsed
14333
14334 \begin_layout Plain Layout
14335 magenta
14336 \end_layout
14337
14338 \end_inset
14339
14340
14341 \begin_inset Flex Code
14342 status collapsed
14343
14344 \begin_layout Plain Layout
14345 yellow
14346 \end_layout
14347
14348 \end_inset
14349
14350 ]
14351 \end_layout
14352
14353 \begin_layout Description
14354 \begin_inset Flex Code
14355 status collapsed
14356
14357 \begin_layout Plain Layout
14358 Family
14359 \end_layout
14360
14361 \end_inset
14362
14363  [
14364 \emph on
14365
14366 \begin_inset Flex Code
14367 status collapsed
14368
14369 \begin_layout Plain Layout
14370 Roman
14371 \end_layout
14372
14373 \end_inset
14374
14375
14376 \emph default
14377
14378 \begin_inset Flex Code
14379 status collapsed
14380
14381 \begin_layout Plain Layout
14382 Sans
14383 \end_layout
14384
14385 \end_inset
14386
14387
14388 \begin_inset Flex Code
14389 status collapsed
14390
14391 \begin_layout Plain Layout
14392 Typewriter
14393 \end_layout
14394
14395 \end_inset
14396
14397
14398 \end_layout
14399
14400 \begin_layout Description
14401 \begin_inset Flex Code
14402 status collapsed
14403
14404 \begin_layout Plain Layout
14405 Misc
14406 \end_layout
14407
14408 \end_inset
14409
14410  [
14411 \begin_inset Flex Code
14412 status collapsed
14413
14414 \begin_layout Plain Layout
14415 文字列
14416 \end_layout
14417
14418 \end_inset
14419
14420 ] 有効な引数は、
14421 \begin_inset Flex Code
14422 status collapsed
14423
14424 \begin_layout Plain Layout
14425 emph
14426 \end_layout
14427
14428 \end_inset
14429
14430
14431 \begin_inset Flex Code
14432 status collapsed
14433
14434 \begin_layout Plain Layout
14435 noun
14436 \end_layout
14437
14438 \end_inset
14439
14440
14441 \begin_inset Flex Code
14442 status collapsed
14443
14444 \begin_layout Plain Layout
14445 strikeout
14446 \end_layout
14447
14448 \end_inset
14449
14450
14451 \begin_inset Flex Code
14452 status collapsed
14453
14454 \begin_layout Plain Layout
14455 underbar
14456 \end_layout
14457
14458 \end_inset
14459
14460
14461 \begin_inset Flex Code
14462 status collapsed
14463
14464 \begin_layout Plain Layout
14465 uuline
14466 \end_layout
14467
14468 \end_inset
14469
14470
14471 \begin_inset Flex Code
14472 status collapsed
14473
14474 \begin_layout Plain Layout
14475 uwave
14476 \end_layout
14477
14478 \end_inset
14479
14480
14481 \begin_inset Flex Code
14482 status collapsed
14483
14484 \begin_layout Plain Layout
14485 no_emph
14486 \end_layout
14487
14488 \end_inset
14489
14490
14491 \begin_inset Flex Code
14492 status collapsed
14493
14494 \begin_layout Plain Layout
14495 no_noun
14496 \end_layout
14497
14498 \end_inset
14499
14500
14501 \begin_inset Flex Code
14502 status collapsed
14503
14504 \begin_layout Plain Layout
14505 no_strikeout
14506 \end_layout
14507
14508 \end_inset
14509
14510
14511 \begin_inset Flex Code
14512 status collapsed
14513
14514 \begin_layout Plain Layout
14515 no_bar
14516 \end_layout
14517
14518 \end_inset
14519
14520
14521 \begin_inset Flex Code
14522 status collapsed
14523
14524 \begin_layout Plain Layout
14525 no_uuline
14526 \end_layout
14527
14528 \end_inset
14529
14530
14531 \begin_inset Flex Code
14532 status collapsed
14533
14534 \begin_layout Plain Layout
14535 no_uwave
14536 \end_layout
14537
14538 \end_inset
14539
14540 です。それぞれ、対応する属性を有効にしたり無効にしたりします。
14541 \begin_inset Newline newline
14542 \end_inset
14543
14544 たとえば、
14545 \begin_inset Flex Code
14546 status collapsed
14547
14548 \begin_layout Plain Layout
14549 emph
14550 \end_layout
14551
14552 \end_inset
14553
14554 は強調を有効にし、
14555 \begin_inset Flex Code
14556 status collapsed
14557
14558 \begin_layout Plain Layout
14559 no_emph
14560 \end_layout
14561
14562 \end_inset
14563
14564 はそれを無効にします。もし後者がわかりにくければ、現在のコンテクストのフォント設定は、一般的に周囲のコンテクストから継承していることを思い出してください。ですか
14565
14566 \begin_inset Flex Code
14567 status collapsed
14568
14569 \begin_layout Plain Layout
14570 no_emph
14571 \end_layout
14572
14573 \end_inset
14574
14575 は、たとえば定理環境で、何をせずとも有効となっている強調を無効にするのです。
14576 \end_layout
14577
14578 \begin_layout Description
14579 \begin_inset Flex Code
14580 status collapsed
14581
14582 \begin_layout Plain Layout
14583 Series
14584 \end_layout
14585
14586 \end_inset
14587
14588  [
14589 \emph on
14590
14591 \begin_inset Flex Code
14592 status collapsed
14593
14594 \begin_layout Plain Layout
14595 Medium
14596 \end_layout
14597
14598 \end_inset
14599
14600
14601 \emph default
14602
14603 \begin_inset Flex Code
14604 status collapsed
14605
14606 \begin_layout Plain Layout
14607 Bold
14608 \end_layout
14609
14610 \end_inset
14611
14612
14613 \end_layout
14614
14615 \begin_layout Description
14616 \begin_inset Flex Code
14617 status collapsed
14618
14619 \begin_layout Plain Layout
14620 Shape
14621 \end_layout
14622
14623 \end_inset
14624
14625  [
14626 \emph on
14627
14628 \begin_inset Flex Code
14629 status collapsed
14630
14631 \begin_layout Plain Layout
14632 Up
14633 \end_layout
14634
14635 \end_inset
14636
14637
14638 \emph default
14639
14640 \begin_inset Flex Code
14641 status collapsed
14642
14643 \begin_layout Plain Layout
14644 Italic
14645 \end_layout
14646
14647 \end_inset
14648
14649
14650 \begin_inset Flex Code
14651 status collapsed
14652
14653 \begin_layout Plain Layout
14654 SmallCaps
14655 \end_layout
14656
14657 \end_inset
14658
14659
14660 \begin_inset Flex Code
14661 status collapsed
14662
14663 \begin_layout Plain Layout
14664 Slanted
14665 \end_layout
14666
14667 \end_inset
14668
14669
14670 \end_layout
14671
14672 \begin_layout Description
14673 \begin_inset Flex Code
14674 status collapsed
14675
14676 \begin_layout Plain Layout
14677 Size
14678 \end_layout
14679
14680 \end_inset
14681
14682  [
14683 \begin_inset Flex Code
14684 status collapsed
14685
14686 \begin_layout Plain Layout
14687 tiny
14688 \end_layout
14689
14690 \end_inset
14691
14692
14693 \begin_inset Flex Code
14694 status collapsed
14695
14696 \begin_layout Plain Layout
14697 small
14698 \end_layout
14699
14700 \end_inset
14701
14702
14703 \begin_inset Flex Code
14704 status collapsed
14705
14706 \begin_layout Plain Layout
14707
14708 \emph on
14709 normal
14710 \end_layout
14711
14712 \end_inset
14713
14714
14715 \begin_inset Flex Code
14716 status collapsed
14717
14718 \begin_layout Plain Layout
14719 large
14720 \end_layout
14721
14722 \end_inset
14723
14724
14725 \begin_inset Flex Code
14726 status collapsed
14727
14728 \begin_layout Plain Layout
14729 larger
14730 \end_layout
14731
14732 \end_inset
14733
14734
14735 \begin_inset Flex Code
14736 status collapsed
14737
14738 \begin_layout Plain Layout
14739 largest
14740 \end_layout
14741
14742 \end_inset
14743
14744
14745 \begin_inset Flex Code
14746 status collapsed
14747
14748 \begin_layout Plain Layout
14749 huge
14750 \end_layout
14751
14752 \end_inset
14753
14754
14755 \begin_inset Flex Code
14756 status collapsed
14757
14758 \begin_layout Plain Layout
14759 giant
14760 \end_layout
14761
14762 \end_inset
14763
14764 ]
14765 \end_layout
14766
14767 \begin_layout Subsection
14768 \begin_inset CommandInset label
14769 LatexCommand label
14770 name "sub:引用書式指定"
14771
14772 \end_inset
14773
14774 引用書式指定
14775 \end_layout
14776
14777 \begin_layout Standard
14778 (引用ダイアログやツールチップなどの)LyX内部やXHTML出力において、書誌情報をどのように表示するべきかの叙述には、
14779 \begin_inset Flex Code
14780 status collapsed
14781
14782 \begin_layout Plain Layout
14783 CiteFormat
14784 \end_layout
14785
14786 \end_inset
14787
14788 ブロックが使用されています。このブロックは、以下のような形をしています。
14789 \end_layout
14790
14791 \begin_layout LyX-Code
14792 CiteFormat
14793 \end_layout
14794
14795 \begin_layout LyX-Code
14796  article ...
14797 \end_layout
14798
14799 \begin_layout LyX-Code
14800  book ...
14801 \end_layout
14802
14803 \begin_layout LyX-Code
14804 End
14805 \end_layout
14806
14807 \begin_layout Standard
14808 上記の各行は、それぞれarticleやbookに関連付けられた書誌情報をどのように表示するべきかを定義するものですが、このような定義は、BibTeXファイル中に
14809 存在しうる「項目型」すべてについて与えることができます。特定の定義が与えられなければ、LyXは、ソースコード中に定義されている既定書式を使用します。LyXは、い
14810 くつかの書式を
14811 \begin_inset Flex Code
14812 status collapsed
14813
14814 \begin_layout Plain Layout
14815 stdciteformats.inc
14816 \end_layout
14817
14818 \end_inset
14819
14820 ファイルで事前定義しており、これはほとんどのLyX文書クラスにインクルードされています。
14821 \end_layout
14822
14823 \begin_layout Standard
14824 この定義は、BibTeXキーをその値で置換できる機能を持った、簡単な言語を使用しています。キーは、
14825 \begin_inset Flex Code
14826 status collapsed
14827
14828 \begin_layout Plain Layout
14829 %author%
14830 \end_layout
14831
14832 \end_inset
14833
14834 のように
14835 \begin_inset Flex Code
14836 status collapsed
14837
14838 \begin_layout Plain Layout
14839 %
14840 \end_layout
14841
14842 \end_inset
14843
14844 記号でくくらなくてはなりません。したがって、簡単な定義は以下のようになります。
14845 \end_layout
14846
14847 \begin_layout LyX-Code
14848 misc %author%, 
14849 \begin_inset Quotes eld
14850 \end_inset
14851
14852 %title%
14853 \begin_inset Quotes erd
14854 \end_inset
14855
14856
14857 \end_layout
14858
14859 \begin_layout Standard
14860 これは、「著者名・コンマ・引用に囲まれたタイトル・終止符」を出力します。
14861 \end_layout
14862
14863 \begin_layout Standard
14864 もちろん、キーが存在するときのみ、キーを出力したい時があるはずです。このようなときには
14865 \begin_inset Flex Code
14866 status collapsed
14867
14868 \begin_layout Plain Layout
14869 {%volume%[[vol.
14870 \begin_inset space ~
14871 \end_inset
14872
14873 %volume%]]}
14874 \end_layout
14875
14876 \end_inset
14877
14878 のように、条件付きの構成を使用することができます。これは、
14879 \begin_inset Flex Code
14880 status collapsed
14881
14882 \begin_layout Plain Layout
14883 volume
14884 \end_layout
14885
14886 \end_inset
14887
14888 が存在するならば,「vol.
14889 \begin_inset space ~
14890 \end_inset
14891
14892 」とvolumeキーを出力するという意味です。また、
14893 \begin_inset Flex Code
14894 status collapsed
14895
14896 \begin_layout Plain Layout
14897 {%author%[[%author%]][[%editor%, ed.]]}
14898 \end_layout
14899
14900 \end_inset
14901
14902 のように、条件の中にelse節を含めることも可能です。ここでは、もし
14903 \begin_inset Flex Code
14904 status collapsed
14905
14906 \begin_layout Plain Layout
14907 author
14908 \end_layout
14909
14910 \end_inset
14911
14912 キーが存在するならば出力され、そうでなければeditorキーと「,
14913 \begin_inset space ~
14914 \end_inset
14915
14916 ed.」が出力されます。ここでもキーは、
14917 \begin_inset Flex Code
14918 status collapsed
14919
14920 \begin_layout Plain Layout
14921 %
14922 \end_layout
14923
14924 \end_inset
14925
14926 記号でくくられていることに注意してください。条件全体は、波括弧で囲まれています。if節およびelse節は、「
14927 \begin_inset Flex Code
14928 status collapsed
14929
14930 \begin_layout Plain Layout
14931 [[
14932 \end_layout
14933
14934 \end_inset
14935
14936 」と「
14937 \begin_inset Flex Code
14938 status collapsed
14939
14940 \begin_layout Plain Layout
14941 ]]
14942 \end_layout
14943
14944 \end_inset
14945
14946 」の二重角括弧で囲まれています。これらすべてのあいだには,空白は入ってはなりません。
14947 \end_layout
14948
14949 \begin_layout Standard
14950 もう一つ、定義中で使用することのできる文法として、
14951 \begin_inset Flex Code
14952 status collapsed
14953
14954 \begin_layout Plain Layout
14955 {!<i>!}
14956 \end_layout
14957
14958 \end_inset
14959
14960 という形をしたものがあります。これは、「リッチテキスト」を生成するときに使われる整形情報を定義するものです。当然のことながら、平文を書き出すときには、HTMLタ
14961 グを出力させたくはありませんから、HTMLタグは「
14962 \begin_inset Flex Code
14963 status collapsed
14964
14965 \begin_layout Plain Layout
14966 {!
14967 \end_layout
14968
14969 \end_inset
14970
14971 」と「
14972 \begin_inset Flex Code
14973 status collapsed
14974
14975 \begin_layout Plain Layout
14976 !}
14977 \end_layout
14978
14979 \end_inset
14980
14981 」でくるんでやらなくてはならないのです。
14982 \end_layout
14983
14984 \begin_layout Standard
14985 \begin_inset Flex Code
14986 status collapsed
14987
14988 \begin_layout Plain Layout
14989 CiteFormat
14990 \end_layout
14991
14992 \end_inset
14993
14994 ブロックでは、他に2つの特殊な定義が可能です。一つめの例としては、
14995 \end_layout
14996
14997 \begin_layout LyX-Code
14998 !quotetitle 
14999 \begin_inset Quotes eld
15000 \end_inset
15001
15002 %title%
15003 \begin_inset Quotes erd
15004 \end_inset
15005
15006
15007 \end_layout
15008
15009 \begin_layout Standard
15010 といった例が挙げられます。これは、短縮形ないしはマクロであり、
15011 \begin_inset Flex Code
15012 status collapsed
15013
15014 \begin_layout Plain Layout
15015 %!quotetitle%
15016 \end_layout
15017
15018 \end_inset
15019
15020 のように、これがキーであるかのように扱って使用することができます。LyXは、
15021 \begin_inset Flex Code
15022 status collapsed
15023
15024 \begin_layout Plain Layout
15025 %!quotetitle%
15026 \end_layout
15027
15028 \end_inset
15029
15030 を、そこで定義されているものを扱う場合と同じように取り扱います。ですから、明白な警告を敢えてさせて頂くと、
15031 \end_layout
15032
15033 \begin_layout LyX-Code
15034 !funfun %funfun%
15035 \end_layout
15036
15037 \begin_layout Standard
15038 のようなことはしないでください。LyXは、無限ループに陥るようなことはありませんが、諦めるまでに長いループに入るかもしれません。
15039 \end_layout
15040
15041 \begin_layout Standard
15042 特殊な定義の二つめは、
15043 \end_layout
15044
15045 \begin_layout LyX-Code
15046 _pptext pp.
15047 \end_layout
15048
15049 \begin_layout Standard
15050 のようなものです。これは、文字列の翻訳可能な部分を定義するもので、書誌情報中の関連部分が翻訳されるようにすることができます。
15051 \begin_inset Flex Code
15052 status collapsed
15053
15054 \begin_layout Plain Layout
15055 %_pptext%
15056 \end_layout
15057
15058 \end_inset
15059
15060 のように、これをキーとして扱って、定義の中に入れることもできます。これらのうちいくつかは、
15061 \begin_inset Flex Code
15062 status collapsed
15063
15064 \begin_layout Plain Layout
15065 stdciteformats.inc
15066 \end_layout
15067
15068 \end_inset
15069
15070 中に事前定義されています。これは、上記で述べたような意味でのマクロではないことに注意してください。
15071 \end_layout
15072
15073 \begin_layout Standard
15074 以下は、これらの機能を全て使った例です。
15075 \end_layout
15076
15077 \begin_layout LyX-Code
15078 !authoredit {%author%[[%author%, ]][[{%editor%[[%editor%, %_edtext%, ]]}]]}
15079 \end_layout
15080
15081 \begin_layout Standard
15082 これは、
15083 \begin_inset Flex Code
15084 status collapsed
15085
15086 \begin_layout Plain Layout
15087 author
15088 \end_layout
15089
15090 \end_inset
15091
15092 キーが定義されているならば、著者とコンマを出力し、
15093 \begin_inset Flex Code
15094 status collapsed
15095
15096 \begin_layout Plain Layout
15097 author
15098 \end_layout
15099
15100 \end_inset
15101
15102 キーが定義されておらず、
15103 \begin_inset Flex Code
15104 status collapsed
15105
15106 \begin_layout Plain Layout
15107 editor
15108 \end_layout
15109
15110 \end_inset
15111
15112 キーが定義されているならば、編集者名の後に
15113 \begin_inset Flex Code
15114 status collapsed
15115
15116 \begin_layout Plain Layout
15117 _edtext
15118 \end_layout
15119
15120 \end_inset
15121
15122 ないしはその翻訳(既定では「ed.」)を出力します。これは実は
15123 \begin_inset Flex Code
15124 status collapsed
15125
15126 \begin_layout Plain Layout
15127 stdciteformats.inc
15128 \end_layout
15129
15130 \end_inset
15131
15132 の中で定義されていますので、このファイルをまず読みこめば、ご自身の定義ないしは再定義の中で使用することができます。
15133 \end_layout
15134
15135 \begin_layout Section
15136 \begin_inset CommandInset label
15137 LatexCommand label
15138 name "sec:XHTML出力のタグ"
15139
15140 \end_inset
15141
15142 XHTML出力のタグ
15143 \end_layout
15144
15145 \begin_layout Standard
15146 LaTeXやDocBookと同様、LyXのXHTML出力の書式も、レイアウト情報によって制御することができます。一般的に、LyXは適切な既定値を提供し、前述した
15147 ように、他のレイアウトタグに基づいて、既定のCSSスタイルの構成まで行ないます。たとえば、章見出しを適切に整形するためのCSSを書き出すために、LyXは、章様式
15148
15149 \begin_inset Flex Code
15150 status collapsed
15151
15152 \begin_layout Plain Layout
15153 Font
15154 \end_layout
15155
15156 \end_inset
15157
15158 宣言で提供されている情報を利用しようと試みます。
15159 \end_layout
15160
15161 \begin_layout Standard
15162 したがって、多くの場合、使いたい環境や任意設定差込枠などのために満足のいくXHTML出力を得るために、まったく何もしなくてよいことになるでしょう。しかしながら、
15163 これが必要になる場合もあるので、LyXは、生成されるXHTMLやCSSをカスタマイズするために使用できるレイアウトタグを、たくさん提供しています。
15164 \end_layout
15165
15166 \begin_layout Standard
15167 様式宣言や差込枠宣言の外で使用することができるタグに、
15168 \begin_inset Flex Code
15169 status collapsed
15170
15171 \begin_layout Plain Layout
15172 HTMLPreamble
15173 \end_layout
15174
15175 \end_inset
15176
15177
15178 \begin_inset Flex Code
15179 status collapsed
15180
15181 \begin_layout Plain Layout
15182 AddToHTMLPreamble
15183 \end_layout
15184
15185 \end_inset
15186
15187 の2つがあることに注意してください。これらの詳細については、第
15188 \begin_inset CommandInset ref
15189 LatexCommand ref
15190 reference "sub:汎用テキストクラスパラメータ"
15191
15192 \end_inset
15193
15194 節をご覧ください。
15195 \end_layout
15196
15197 \begin_layout Subsection
15198 \begin_inset CommandInset label
15199 LatexCommand label
15200 name "sub:段落様式-XHTML"
15201
15202 \end_inset
15203
15204 段落様式
15205 \end_layout
15206
15207 \begin_layout Standard
15208 LyXが段落のために出力するXHTMLの種類は、通常の段落を取り扱っているのか、コマンドを取り扱っているのか、あるいは環境を取り扱っているのかに依存し、これは対
15209 応する
15210 \begin_inset Flex Code
15211 status collapsed
15212
15213 \begin_layout Plain Layout
15214 LaTeXType
15215 \end_layout
15216
15217 \end_inset
15218
15219 タグの内容によって決定されます。
15220 \end_layout
15221
15222 \begin_layout Standard
15223 コマンドや通常の段落の場合には、XHTML出力は以下の形になります。
15224 \end_layout
15225
15226 \begin_layout LyX-Code
15227 <tag attr=
15228 \begin_inset Quotes erd
15229 \end_inset
15230
15231 value
15232 \begin_inset Quotes erd
15233 \end_inset
15234
15235 >
15236 \end_layout
15237
15238 \begin_layout LyX-Code
15239 <labeltag attr=
15240 \begin_inset Quotes erd
15241 \end_inset
15242
15243 value
15244 \begin_inset Quotes erd
15245 \end_inset
15246
15247 >ラベル</labeltag>
15248 \end_layout
15249
15250 \begin_layout LyX-Code
15251 段落の内容
15252 \end_layout
15253
15254 \begin_layout LyX-Code
15255 </tag>
15256 \end_layout
15257
15258 \begin_layout Standard
15259 もちろん、段落にラベルがなければ、ラベルタグは省略することができます。
15260 \end_layout
15261
15262 \begin_layout Standard
15263 環境のうち、リストの変種でないものに関しては、XHTMLは以下の形を取ります。
15264 \end_layout
15265
15266 \begin_layout LyX-Code
15267 <tag attr=
15268 \begin_inset Quotes erd
15269 \end_inset
15270
15271 value
15272 \begin_inset Quotes erd
15273 \end_inset
15274
15275 >
15276 \end_layout
15277
15278 \begin_layout LyX-Code
15279 <itemtag attr=
15280 \begin_inset Quotes erd
15281 \end_inset
15282
15283 value
15284 \begin_inset Quotes erd
15285 \end_inset
15286
15287 ><labeltag attr=
15288 \begin_inset Quotes erd
15289 \end_inset
15290
15291 value
15292 \begin_inset Quotes erd
15293 \end_inset
15294
15295 >環境ラベル</labeltag>最初の段落。
15296 \end_layout
15297
15298 \begin_layout LyX-Code
15299 </itemtag>
15300 \end_layout
15301
15302 \begin_layout LyX-Code
15303 <itemtag>二つめの段落。</itemtag>
15304 \end_layout
15305
15306 \begin_layout LyX-Code
15307 </tag>
15308 \end_layout
15309
15310 \begin_layout Standard
15311 ラベルは、たとえば定理の場合にそうであるように、最初の段落にだけ出力されることに注意してください。
15312 \end_layout
15313
15314 \begin_layout Standard
15315 リストに関しては、次のような形になります。
15316 \end_layout
15317
15318 \begin_layout LyX-Code
15319 <tag attr=
15320 \begin_inset Quotes erd
15321 \end_inset
15322
15323 value
15324 \begin_inset Quotes erd
15325 \end_inset
15326
15327 >
15328 \end_layout
15329
15330 \begin_layout LyX-Code
15331 <itemtag attr=
15332 \begin_inset Quotes erd
15333 \end_inset
15334
15335 value
15336 \begin_inset Quotes erd
15337 \end_inset
15338
15339 ><labeltag attr=
15340 \begin_inset Quotes erd
15341 \end_inset
15342
15343 value
15344 \begin_inset Quotes erd
15345 \end_inset
15346
15347 >リストのラベル</labeltag>最初の項目。</itemtag>
15348 \end_layout
15349
15350 \begin_layout LyX-Code
15351 <itemtag attr=
15352 \begin_inset Quotes erd
15353 \end_inset
15354
15355 value
15356 \begin_inset Quotes erd
15357 \end_inset
15358
15359 ><labeltag attr=
15360 \begin_inset Quotes erd
15361 \end_inset
15362
15363 value
15364 \begin_inset Quotes erd
15365 \end_inset
15366
15367 >リストのラベル</labeltag>二つめの項目。</itemtag>
15368 \end_layout
15369
15370 \begin_layout LyX-Code
15371 </tag>
15372 \end_layout
15373
15374 \begin_layout LyX-Code
15375
15376 \end_layout
15377
15378 \begin_layout LyX-Code
15379 <tag attr=
15380 \begin_inset Quotes erd
15381 \end_inset
15382
15383 value
15384 \begin_inset Quotes erd
15385 \end_inset
15386
15387 >
15388 \end_layout
15389
15390 \begin_layout LyX-Code
15391 <labeltag attr=
15392 \begin_inset Quotes erd
15393 \end_inset
15394
15395 value
15396 \begin_inset Quotes erd
15397 \end_inset
15398
15399 >リストのラベル</labeltag><itemtag attr=
15400 \begin_inset Quotes erd
15401 \end_inset
15402
15403 value
15404 \begin_inset Quotes erd
15405 \end_inset
15406
15407 >最初の項目。</itemtag>
15408 \end_layout
15409
15410 \begin_layout LyX-Code
15411 <labeltag attr=
15412 \begin_inset Quotes erd
15413 \end_inset
15414
15415 value
15416 \begin_inset Quotes erd
15417 \end_inset
15418
15419 >リストのラベル</labeltag><itemtag attr=
15420 \begin_inset Quotes erd
15421 \end_inset
15422
15423 value
15424 \begin_inset Quotes erd
15425 \end_inset
15426
15427 >二つめの項目</itemtag>
15428 \end_layout
15429
15430 \begin_layout LyX-Code
15431 </tag>
15432 \end_layout
15433
15434 \begin_layout Standard
15435 ここで
15436 \begin_inset Flex Code
15437 status collapsed
15438
15439 \begin_layout Plain Layout
15440 labeltag
15441 \end_layout
15442
15443 \end_inset
15444
15445
15446 \begin_inset Flex Code
15447 status collapsed
15448
15449 \begin_layout Plain Layout
15450 itemtag
15451 \end_layout
15452
15453 \end_inset
15454
15455 の順序が違っていることに注意してください。どちらの順序になるかは、
15456 \begin_inset Flex Code
15457 status collapsed
15458
15459 \begin_layout Plain Layout
15460 HTMLLabelFirst
15461 \end_layout
15462
15463 \end_inset
15464
15465 の設定に依存します。もし
15466 \begin_inset Flex Code
15467 status collapsed
15468
15469 \begin_layout Plain Layout
15470 HTMLLabelFirst
15471 \end_layout
15472
15473 \end_inset
15474
15475 が偽であれば(既定値)、最初のケースのようになり、これが真であれば、二番めのケースのように、labelがitemの外側に来るようになります。
15476 \end_layout
15477
15478 \begin_layout Standard
15479 各段落の特定のタグ出力や属性出力は、以下に述べるようなレイアウトタグを使って制御することができます。しかしながら、前述のように、多くの場合、LyXは適切な既定値
15480 を生成するので、たいしたことをしなくても、望ましいXHTML出力を得ることができるということになるはずです。ここで利用出来るタグは、自分の好みにあわせて微調整す
15481 る目的でここにあるものと考えてください。
15482 \end_layout
15483
15484 \begin_layout Description
15485 \begin_inset Flex Code
15486 status collapsed
15487
15488 \begin_layout Plain Layout
15489 HTMLAttr
15490 \end_layout
15491
15492 \end_inset
15493
15494  [
15495 \begin_inset Flex Code
15496 status collapsed
15497
15498 \begin_layout Plain Layout
15499 文字列
15500 \end_layout
15501
15502 \end_inset
15503
15504 ] 主幹タグと共に出力される属性情報を指定します。たとえば、「
15505 \begin_inset Flex Code
15506 status collapsed
15507
15508 \begin_layout Plain Layout
15509 class=`mydiv'
15510 \end_layout
15511
15512 \end_inset
15513
15514 」のようなものです。既定においては、LyXは「
15515 \begin_inset Flex Code
15516 status collapsed
15517
15518 \begin_layout Plain Layout
15519 class=`レイアウト名'
15520 \end_layout
15521
15522 \end_inset
15523
15524 」と出力します。ここで
15525 \begin_inset Flex Code
15526 status collapsed
15527
15528 \begin_layout Plain Layout
15529 レイアウト名
15530 \end_layout
15531
15532 \end_inset
15533
15534 は、レイアウトのLyX名であり、chapterのように小文字で記述します。
15535 \end_layout
15536
15537 \begin_layout Description
15538 \begin_inset Flex Code
15539 status collapsed
15540
15541 \begin_layout Plain Layout
15542 HTMLForceCSS
15543 \end_layout
15544
15545 \end_inset
15546
15547  [
15548 \begin_inset Flex Code
15549 status collapsed
15550
15551 \begin_layout Plain Layout
15552
15553 \emph on
15554 0
15555 \emph default
15556 ,1
15557 \end_layout
15558
15559 \end_inset
15560
15561 ] 
15562 \begin_inset Flex Code
15563 status collapsed
15564
15565 \begin_layout Plain Layout
15566 HTMLStyle
15567 \end_layout
15568
15569 \end_inset
15570
15571 で追加情報が明示的に与えられているときでも、LyXがこのレイアウト用に生成する既定CSS情報を出力するか否か。これを
15572 \begin_inset Flex Code
15573 status collapsed
15574
15575 \begin_layout Plain Layout
15576 1
15577 \end_layout
15578
15579 \end_inset
15580
15581 にすると、生成されたCSSを完全に上書きする代わりに、変更したり追加したりすることができます。既定値は
15582 \begin_inset Flex Code
15583 status collapsed
15584
15585 \begin_layout Plain Layout
15586 0
15587 \end_layout
15588
15589 \end_inset
15590
15591 です。
15592 \end_layout
15593
15594 \begin_layout Description
15595 \begin_inset Flex Code
15596 status collapsed
15597
15598 \begin_layout Plain Layout
15599 HTMLItem
15600 \end_layout
15601
15602 \end_inset
15603
15604  [
15605 \begin_inset Flex Code
15606 status collapsed
15607
15608 \begin_layout Plain Layout
15609 文字列
15610 \end_layout
15611
15612 \end_inset
15613
15614 ] 環境の段落に使用されるタグ。上記各例の
15615 \begin_inset Flex Code
15616 status collapsed
15617
15618 \begin_layout Plain Layout
15619 itemtag
15620 \end_layout
15621
15622 \end_inset
15623
15624 を置き換えます。既定値は
15625 \begin_inset Flex Code
15626 status collapsed
15627
15628 \begin_layout Plain Layout
15629 div
15630 \end_layout
15631
15632 \end_inset
15633
15634 です。
15635 \end_layout
15636
15637 \begin_layout Description
15638 \begin_inset Flex Code
15639 status collapsed
15640
15641 \begin_layout Plain Layout
15642 HTMLItemAttr
15643 \end_layout
15644
15645 \end_inset
15646
15647  [
15648 \begin_inset Flex Code
15649 status collapsed
15650
15651 \begin_layout Plain Layout
15652 文字列
15653 \end_layout
15654
15655 \end_inset
15656
15657 ] itemタグの属性。既定値は
15658 \begin_inset Flex Code
15659 status collapsed
15660
15661 \begin_layout Plain Layout
15662 class=`レイアウト名_item'
15663 \end_layout
15664
15665 \end_inset
15666
15667 です。
15668 \end_layout
15669
15670 \begin_layout Description
15671 \begin_inset Flex Code
15672 status collapsed
15673
15674 \begin_layout Plain Layout
15675 HTMLLabel
15676 \end_layout
15677
15678 \end_inset
15679
15680  [
15681 \begin_inset Flex Code
15682 status collapsed
15683
15684 \begin_layout Plain Layout
15685 文字列
15686 \end_layout
15687
15688 \end_inset
15689
15690 ] 段落と項目ラベルに使用されるタグ。上記各例の
15691 \begin_inset Flex Code
15692 status collapsed
15693
15694 \begin_layout Plain Layout
15695 labeltag
15696 \end_layout
15697
15698 \end_inset
15699
15700 を置き換えます。既定値は
15701 \begin_inset Flex Code
15702 status collapsed
15703
15704 \begin_layout Plain Layout
15705 span
15706 \end_layout
15707
15708 \end_inset
15709
15710 です。
15711 \end_layout
15712
15713 \begin_layout Description
15714 \begin_inset Flex Code
15715 status collapsed
15716
15717 \begin_layout Plain Layout
15718 HTMLLabelAttr
15719 \end_layout
15720
15721 \end_inset
15722
15723  [
15724 \begin_inset Flex Code
15725 status collapsed
15726
15727 \begin_layout Plain Layout
15728 文字列
15729 \end_layout
15730
15731 \end_inset
15732
15733 ] labelタグの属性。既定値は
15734 \begin_inset Flex Code
15735 status collapsed
15736
15737 \begin_layout Plain Layout
15738 class=`レイアウト名_label'
15739 \end_layout
15740
15741 \end_inset
15742
15743 です。
15744 \end_layout
15745
15746 \begin_layout Description
15747 \begin_inset Flex Code
15748 status collapsed
15749
15750 \begin_layout Plain Layout
15751 HTMLLabelFirst
15752 \end_layout
15753
15754 \end_inset
15755
15756  [
15757 \begin_inset Flex Code
15758 status collapsed
15759
15760 \begin_layout Plain Layout
15761
15762 \emph on
15763 0
15764 \emph default
15765 ,1
15766 \end_layout
15767
15768 \end_inset
15769
15770 ] このタグは、リスト関係環境でのみ意味を持ち、labelタグが、itemタグの前に出力されるか、中に出力されるかを制御します。これは、たとえば、descrip
15771 tion環境の中で、
15772 \begin_inset Flex Code
15773 status collapsed
15774
15775 \begin_layout Plain Layout
15776 `<dt>\SpecialChar \ldots{}
15777 </dt><dd>\SpecialChar \ldots{}
15778 </dd>
15779 \end_layout
15780
15781 \end_inset
15782
15783 という形を得るために使用されます。既定値は
15784 \begin_inset Flex Code
15785 status collapsed
15786
15787 \begin_layout Plain Layout
15788 0
15789 \end_layout
15790
15791 \end_inset
15792
15793 で、labelタグはitemタグの中に出力されます。
15794 \end_layout
15795
15796 \begin_layout Description
15797 \begin_inset Flex Code
15798 status collapsed
15799
15800 \begin_layout Plain Layout
15801 HTMLPreamble
15802 \end_layout
15803
15804 \end_inset
15805
15806  この様式が使用されたときに、
15807 \begin_inset Flex Code
15808 status collapsed
15809
15810 \begin_layout Plain Layout
15811 <head>
15812 \end_layout
15813
15814 \end_inset
15815
15816 セクションに出力される情報。これは、たとえば、
15817 \begin_inset Flex Code
15818 status collapsed
15819
15820 \begin_layout Plain Layout
15821 onclick
15822 \end_layout
15823
15824 \end_inset
15825
15826 ハンドラを定義するために
15827 \begin_inset Flex Code
15828 status collapsed
15829
15830 \begin_layout Plain Layout
15831 <script>
15832 \end_layout
15833
15834 \end_inset
15835
15836 ブロックをインクルードするのに使用することができます。
15837 \end_layout
15838
15839 \begin_layout Description
15840 \begin_inset Flex Code
15841 status collapsed
15842
15843 \begin_layout Plain Layout
15844 HTMLStyle
15845 \end_layout
15846
15847 \end_inset
15848
15849   この様式が使用されたときに、インクルードするCSSスタイル情報。これは、レイアウトが生成する
15850 \begin_inset Flex Code
15851 status collapsed
15852
15853 \begin_layout Plain Layout
15854 <style>
15855 \end_layout
15856
15857 \end_inset
15858
15859 ブロックで自動的に包まれますので、CSS自体をインクルードするだけで大丈夫です。
15860 \end_layout
15861
15862 \begin_layout Description
15863 \begin_inset Flex Code
15864 status collapsed
15865
15866 \begin_layout Plain Layout
15867 HTMLTag
15868 \end_layout
15869
15870 \end_inset
15871
15872  [
15873 \begin_inset Flex Code
15874 status collapsed
15875
15876 \begin_layout Plain Layout
15877 文字列
15878 \end_layout
15879
15880 \end_inset
15881
15882 ] 主幹ラベルに使用されるタグ。上記各例の
15883 \begin_inset Flex Code
15884 status collapsed
15885
15886 \begin_layout Plain Layout
15887 tag
15888 \end_layout
15889
15890 \end_inset
15891
15892 を置き換えます。既定値は
15893 \begin_inset Flex Code
15894 status collapsed
15895
15896 \begin_layout Plain Layout
15897 div
15898 \end_layout
15899
15900 \end_inset
15901
15902 です。
15903 \end_layout
15904
15905 \begin_layout Description
15906 \begin_inset Flex Code
15907 status collapsed
15908
15909 \begin_layout Plain Layout
15910 HTMLTitle
15911 \end_layout
15912
15913 \end_inset
15914
15915  [
15916 \begin_inset Flex Code
15917 status collapsed
15918
15919 \begin_layout Plain Layout
15920
15921 \emph on
15922 0
15923 \emph default
15924 ,1
15925 \end_layout
15926
15927 \end_inset
15928
15929 ] この様式が、XHTMLファイルの
15930 \begin_inset Flex Code
15931 status collapsed
15932
15933 \begin_layout Plain Layout
15934 <title>
15935 \end_layout
15936
15937 \end_inset
15938
15939 タグを生成するのに使用する様式であるという印をつけます。既定値は偽です。
15940 \begin_inset Flex Code
15941 status collapsed
15942
15943 \begin_layout Plain Layout
15944 stdtitle.inc
15945 \end_layout
15946
15947 \end_inset
15948
15949 ファイルでは、
15950 \begin_inset Flex Code
15951 status collapsed
15952
15953 \begin_layout Plain Layout
15954 title
15955 \end_layout
15956
15957 \end_inset
15958
15959 環境のこの項目を真に設定しています。
15960 \end_layout
15961
15962 \begin_layout Subsection
15963 差込枠レイアウトXHTML
15964 \end_layout
15965
15966 \begin_layout Standard
15967 差込枠のXHTML出力も、レイアウトファイル内の情報によって制御することができます
15968 \begin_inset Foot
15969 status collapsed
15970
15971 \begin_layout Plain Layout
15972 現在のところ、これは「テキスト」差込枠(中に書き込みができる差込枠)にのみ有効で、「コマンド」差込枠(ダイアログボックスに関連付けられた差込枠)には適用されませ
15973 ん。
15974 \end_layout
15975
15976 \end_inset
15977
15978 。ここでも、LyXは適切な既定値を提供しようと試み、既定のCSS様式を構成します。しかし、すべてカスタマイズ可能です。
15979 \end_layout
15980
15981 \begin_layout Standard
15982 LyXが差込枠用に出力するXHTMLは、以下の形を取ります。
15983 \end_layout
15984
15985 \begin_layout LyX-Code
15986 <tag attr=
15987 \begin_inset Quotes erd
15988 \end_inset
15989
15990 value
15991 \begin_inset Quotes erd
15992 \end_inset
15993
15994 >
15995 \end_layout
15996
15997 \begin_layout LyX-Code
15998 <labeltag>ラベル</labeltag>
15999 \end_layout
16000
16001 \begin_layout LyX-Code
16002 <innertag attr=
16003 \begin_inset Quotes erd
16004 \end_inset
16005
16006 value
16007 \begin_inset Quotes erd
16008 \end_inset
16009
16010 >差込枠の内容。</innertag>
16011 \end_layout
16012
16013 \begin_layout LyX-Code
16014 </tag>
16015 \end_layout
16016
16017 \begin_layout Standard
16018 差込枠が多段落を許可している---つまり
16019 \begin_inset Flex Code
16020 status collapsed
16021
16022 \begin_layout Plain Layout
16023 MultiPar
16024 \end_layout
16025
16026 \end_inset
16027
16028 が真---ならば、差込枠の内容は、それ自身段落として出力され、それらの段落に用いられる様式(標準、引用など)を用いて整形されます。もちろん、段落にラベルがなけれ
16029 ば、labelタグは省略され、ラベルがあれば、現在のところ、つねに
16030 \begin_inset Flex Code
16031 status collapsed
16032
16033 \begin_layout Plain Layout
16034 span
16035 \end_layout
16036
16037 \end_inset
16038
16039 が用いられます。innerタグは非必須であり、既定では出力されません。各差込枠用に出力される特定のタグや属性は、以下のレイアウトタグによって制御することができま
16040 す。
16041 \end_layout
16042
16043 \begin_layout Description
16044 \begin_inset Flex Code
16045 status collapsed
16046
16047 \begin_layout Plain Layout
16048 HTMLAttr
16049 \end_layout
16050
16051 \end_inset
16052
16053  [
16054 \begin_inset Flex Code
16055 status collapsed
16056
16057 \begin_layout Plain Layout
16058 文字列
16059 \end_layout
16060
16061 \end_inset
16062
16063 ] 主幹タグと共に出力される属性情報を指定します。たとえば、「
16064 \begin_inset Flex Code
16065 status collapsed
16066
16067 \begin_layout Plain Layout
16068 class=`mydiv'
16069 \end_layout
16070
16071 \end_inset
16072
16073 」のようなものです。既定においては、LyXは「
16074 \begin_inset Flex Code
16075 status collapsed
16076
16077 \begin_layout Plain Layout
16078 class=`レイアウト名'
16079 \end_layout
16080
16081 \end_inset
16082
16083 」と出力します。ここで
16084 \begin_inset Flex Code
16085 status collapsed
16086
16087 \begin_layout Plain Layout
16088 レイアウト名
16089 \end_layout
16090
16091 \end_inset
16092
16093 は、レイアウトのLyX名であり、chapterのように小文字で記述します。
16094 \end_layout
16095
16096 \begin_layout Description
16097 \begin_inset Flex Code
16098 status collapsed
16099
16100 \begin_layout Plain Layout
16101 HTMLForceCSS
16102 \end_layout
16103
16104 \end_inset
16105
16106  [
16107 \begin_inset Flex Code
16108 status collapsed
16109
16110 \begin_layout Plain Layout
16111
16112 \emph on
16113 0
16114 \emph default
16115 ,1
16116 \end_layout
16117
16118 \end_inset
16119
16120 ] 
16121 \begin_inset Flex Code
16122 status collapsed
16123
16124 \begin_layout Plain Layout
16125 HTMLStyle
16126 \end_layout
16127
16128 \end_inset
16129
16130 で追加情報が明示的に与えられているときでも、LyXがこのレイアウト用に生成する既定CSS情報を出力するか否か。これを
16131 \begin_inset Flex Code
16132 status collapsed
16133
16134 \begin_layout Plain Layout
16135 1
16136 \end_layout
16137
16138 \end_inset
16139
16140 にすると、生成されたCSSを完全に上書きする代わりに、変更したり追加したりすることができます。既定値は
16141 \begin_inset Flex Code
16142 status collapsed
16143
16144 \begin_layout Plain Layout
16145 0
16146 \end_layout
16147
16148 \end_inset
16149
16150 です。
16151 \end_layout
16152
16153 \begin_layout Description
16154 \begin_inset Flex Code
16155 status collapsed
16156
16157 \begin_layout Plain Layout
16158 HTMLInnerAttr
16159 \end_layout
16160
16161 \end_inset
16162
16163  [
16164 \begin_inset Flex Code
16165 status collapsed
16166
16167 \begin_layout Plain Layout
16168 文字列
16169 \end_layout
16170
16171 \end_inset
16172
16173 ] innerタグの属性。既定値は
16174 \begin_inset Flex Code
16175 status collapsed
16176
16177 \begin_layout Plain Layout
16178 class=`差込枠名_inner'
16179 \end_layout
16180
16181 \end_inset
16182
16183 です。
16184 \end_layout
16185
16186 \begin_layout Description
16187 \begin_inset Flex Code
16188 status collapsed
16189
16190 \begin_layout Plain Layout
16191 HTMLInnerTag
16192 \end_layout
16193
16194 \end_inset
16195
16196  [
16197 \begin_inset Flex Code
16198 status collapsed
16199
16200 \begin_layout Plain Layout
16201 文字列
16202 \end_layout
16203
16204 \end_inset
16205
16206 ] innerタグです。上記各例の
16207 \begin_inset Flex Code
16208 status collapsed
16209
16210 \begin_layout Plain Layout
16211 innertag
16212 \end_layout
16213
16214 \end_inset
16215
16216 を置き換えます。既定値はなしです。
16217 \end_layout
16218
16219 \begin_layout Description
16220 \begin_inset Flex Code
16221 status collapsed
16222
16223 \begin_layout Plain Layout
16224 HTMLIsBlock
16225 \end_layout
16226
16227 \end_inset
16228
16229  [
16230 \begin_inset Flex Code
16231 status collapsed
16232
16233 \begin_layout Plain Layout
16234 0,
16235 \emph on
16236 1
16237 \end_layout
16238
16239 \end_inset
16240
16241 ] この差込枠が(脚注のように)独立した文字列ブロックを表すのか、それとも、(派生枝のように)周囲の文字列の中に取り込まれる素材を表すのか。既定値は1です。
16242 \end_layout
16243
16244 \begin_layout Description
16245 \begin_inset Flex Code
16246 status collapsed
16247
16248 \begin_layout Plain Layout
16249 HTMLLabel
16250 \end_layout
16251
16252 \end_inset
16253
16254  [
16255 \begin_inset Flex Code
16256 status collapsed
16257
16258 \begin_layout Plain Layout
16259 文字列
16260 \end_layout
16261
16262 \end_inset
16263
16264 ] 場合によっては、カウンタへの参照を含む、この差込枠のラベル。たとえば、脚注用には
16265 \begin_inset Flex Code
16266 status collapsed
16267
16268 \begin_layout Plain Layout
16269
16270 \backslash
16271 arabic{footnote}
16272 \end_layout
16273
16274 \end_inset
16275
16276 など。これは非必須であり、既定値はありません。
16277 \end_layout
16278
16279 \begin_layout Description
16280 \begin_inset Flex Code
16281 status collapsed
16282
16283 \begin_layout Plain Layout
16284 HTMLPreamble
16285 \end_layout
16286
16287 \end_inset
16288
16289  この様式が使用されたときに、
16290 \begin_inset Flex Code
16291 status collapsed
16292
16293 \begin_layout Plain Layout
16294 <head>
16295 \end_layout
16296
16297 \end_inset
16298
16299 セクションに出力される情報。これは、たとえば、
16300 \begin_inset Flex Code
16301 status collapsed
16302
16303 \begin_layout Plain Layout
16304 onclick
16305 \end_layout
16306
16307 \end_inset
16308
16309 ハンドラを定義するために
16310 \begin_inset Flex Code
16311 status collapsed
16312
16313 \begin_layout Plain Layout
16314 <script>
16315 \end_layout
16316
16317 \end_inset
16318
16319 ブロックをインクルードするのに使用することができます。
16320 \end_layout
16321
16322 \begin_layout Description
16323 \begin_inset Flex Code
16324 status collapsed
16325
16326 \begin_layout Plain Layout
16327 HTMLStyle
16328 \end_layout
16329
16330 \end_inset
16331
16332   この様式が使用されたときに、インクルードするCSSスタイル情報。これは、レイアウトが生成する
16333 \begin_inset Flex Code
16334 status collapsed
16335
16336 \begin_layout Plain Layout
16337 <style>
16338 \end_layout
16339
16340 \end_inset
16341
16342 ブロックで自動的に包まれますので、CSS自体をインクルードするだけで大丈夫です。
16343 \end_layout
16344
16345 \begin_layout Description
16346 \begin_inset Flex Code
16347 status collapsed
16348
16349 \begin_layout Plain Layout
16350 HTMLTag
16351 \end_layout
16352
16353 \end_inset
16354
16355  [
16356 \begin_inset Flex Code
16357 status collapsed
16358
16359 \begin_layout Plain Layout
16360 文字列
16361 \end_layout
16362
16363 \end_inset
16364
16365 ] 主幹ラベルに使用されるタグ。上記各例の
16366 \begin_inset Flex Code
16367 status collapsed
16368
16369 \begin_layout Plain Layout
16370 tag
16371 \end_layout
16372
16373 \end_inset
16374
16375 を置き換えます。既定値は
16376 \begin_inset Flex Code
16377 status collapsed
16378
16379 \begin_layout Plain Layout
16380 MultiPar
16381 \end_layout
16382
16383 \end_inset
16384
16385 の設定に依存し、
16386 \begin_inset Flex Code
16387 status collapsed
16388
16389 \begin_layout Plain Layout
16390 MultiPar
16391 \end_layout
16392
16393 \end_inset
16394
16395 が真ならば
16396 \begin_inset Flex Code
16397 status collapsed
16398
16399 \begin_layout Plain Layout
16400 div
16401 \end_layout
16402
16403 \end_inset
16404
16405 、偽ならば
16406 \begin_inset Flex Code
16407 status collapsed
16408
16409 \begin_layout Plain Layout
16410 span
16411 \end_layout
16412
16413 \end_inset
16414
16415 です。
16416 \end_layout
16417
16418 \begin_layout Subsection
16419 フロートXHTML
16420 \end_layout
16421
16422 \begin_layout Standard
16423 フロートのXHTML出力も、レイアウトファイル内の情報によって制御することができます。出力は、以下の形を取ります。
16424 \end_layout
16425
16426 \begin_layout LyX-Code
16427 <tag attr=
16428 \begin_inset Quotes erd
16429 \end_inset
16430
16431 value
16432 \begin_inset Quotes erd
16433 \end_inset
16434
16435 >
16436 \end_layout
16437
16438 \begin_layout LyX-Code
16439 フロートの内容。
16440 \end_layout
16441
16442 \begin_layout LyX-Code
16443 </tag>
16444 \end_layout
16445
16446 \begin_layout Standard
16447 キャプションは、存在している場合には、独立した差込枠となり、そのような形で出力されます。その外観は、キャプション差込枠のInsetLayoutで制御することがで
16448 きます。
16449 \end_layout
16450
16451 \begin_layout Description
16452 \begin_inset Flex Code
16453 status collapsed
16454
16455 \begin_layout Plain Layout
16456 HTMLAttr
16457 \end_layout
16458
16459 \end_inset
16460
16461  [
16462 \begin_inset Flex Code
16463 status collapsed
16464
16465 \begin_layout Plain Layout
16466 文字列
16467 \end_layout
16468
16469 \end_inset
16470
16471 ] 主幹タグと共に出力される属性情報を指定します。たとえば、「
16472 \begin_inset Flex Code
16473 status collapsed
16474
16475 \begin_layout Plain Layout
16476 class=`myfloat' onclick=`\SpecialChar \ldots{}
16477 '
16478 \end_layout
16479
16480 \end_inset
16481
16482 」のようなものです。既定においては、LyXは「
16483 \begin_inset Flex Code
16484 status collapsed
16485
16486 \begin_layout Plain Layout
16487 class=`float float-フロート型'
16488 \end_layout
16489
16490 \end_inset
16491
16492 」と出力します。ここで
16493 \begin_inset Flex Code
16494 status collapsed
16495
16496 \begin_layout Plain Layout
16497 フロート型
16498 \end_layout
16499
16500 \end_inset
16501
16502 は、フロート宣言で定義された(
16503 \begin_inset CommandInset ref
16504 LatexCommand ref
16505 reference "sub:フロート"
16506
16507 \end_inset
16508
16509 参照)、この型のフロートのLyX名です。ただし、小文字に変換され、アルファベットや数字でない文字はアンダースコアに変換されます。例:float-table。
16510 \end_layout
16511
16512 \begin_layout Description
16513 \begin_inset Flex Code
16514 status collapsed
16515
16516 \begin_layout Plain Layout
16517 HTMLStyle
16518 \end_layout
16519
16520 \end_inset
16521
16522   このフロートが使用されたときに、インクルードするCSSスタイル情報。これは、レイアウトが生成する
16523 \begin_inset Flex Code
16524 status collapsed
16525
16526 \begin_layout Plain Layout
16527 <style>
16528 \end_layout
16529
16530 \end_inset
16531
16532 ブロックで自動的に包まれますので、CSS自体をインクルードするだけで大丈夫です。
16533 \end_layout
16534
16535 \begin_layout Description
16536 \begin_inset Flex Code
16537 status collapsed
16538
16539 \begin_layout Plain Layout
16540 HTMLTag
16541 \end_layout
16542
16543 \end_inset
16544
16545  [
16546 \begin_inset Flex Code
16547 status collapsed
16548
16549 \begin_layout Plain Layout
16550 文字列
16551 \end_layout
16552
16553 \end_inset
16554
16555 ] このフロートに使用されるタグ。上記各例の
16556 \begin_inset Flex Code
16557 status collapsed
16558
16559 \begin_layout Plain Layout
16560 tag
16561 \end_layout
16562
16563 \end_inset
16564
16565 を置き換えます。既定値は
16566 \begin_inset Flex Code
16567 status collapsed
16568
16569 \begin_layout Plain Layout
16570 div
16571 \end_layout
16572
16573 \end_inset
16574
16575 であり、ほとんどの場合変更する必要はありません。
16576 \end_layout
16577
16578 \begin_layout Subsection
16579 書誌情報の整形
16580 \end_layout
16581
16582 \begin_layout Standard
16583 書誌情報は、
16584 \begin_inset Flex Code
16585 status collapsed
16586
16587 \begin_layout Plain Layout
16588 CiteFormat
16589 \end_layout
16590
16591 \end_inset
16592
16593 ブロックを使用して整形することができます。詳細については、第
16594 \begin_inset CommandInset ref
16595 LatexCommand ref
16596 reference "sub:引用書式指定"
16597
16598 \end_inset
16599
16600 節を参照してください。
16601 \end_layout
16602
16603 \begin_layout Subsection
16604 LyXが生成したCSS
16605 \end_layout
16606
16607 \begin_layout Standard
16608 LyXは、提供されている他のレイアウト情報に基づいて、差込枠と段落様式の両方の既定CSS様式ルールを生成ということすることを、これまでに何度か触れました。この節
16609 では、LyXがどのレイアウト情報を、どのように使うのか、ひとこと述べておきたいと思います。
16610 \end_layout
16611
16612 \begin_layout Standard
16613 LyXは、現在のところ、
16614 \begin_inset Flex Code
16615 status collapsed
16616
16617 \begin_layout Plain Layout
16618 Font
16619 \end_layout
16620
16621 \end_inset
16622
16623 宣言で指定されている
16624 \begin_inset Flex Code
16625 status collapsed
16626
16627 \begin_layout Plain Layout
16628 Family
16629 \end_layout
16630
16631 \end_inset
16632
16633
16634 \begin_inset Flex Code
16635 status collapsed
16636
16637 \begin_layout Plain Layout
16638 Series
16639 \end_layout
16640
16641 \end_inset
16642
16643
16644 \begin_inset Flex Code
16645 status collapsed
16646
16647 \begin_layout Plain Layout
16648 Shape
16649 \end_layout
16650
16651 \end_inset
16652
16653
16654 \begin_inset Flex Code
16655 status collapsed
16656
16657 \begin_layout Plain Layout
16658 Size
16659 \end_layout
16660
16661 \end_inset
16662
16663 を利用して、フォント情報についてのみCSSを自動生成します(第
16664 \begin_inset CommandInset ref
16665 LatexCommand ref
16666 reference "sub:フォント指定"
16667
16668 \end_inset
16669
16670 節を参照)。この変換は、きわめて分かりやすく自明です。たとえば、「
16671 \begin_inset Flex Code
16672 status collapsed
16673
16674 \begin_layout Plain Layout
16675 Family Sans
16676 \end_layout
16677
16678 \end_inset
16679
16680 」は「
16681 \begin_inset Flex Code
16682 status collapsed
16683
16684 \begin_layout Plain Layout
16685 font-family: sans-serif
16686 \end_layout
16687
16688 \end_inset
16689
16690 」になります。LyXの寸法とCSSの寸法のあいだの対応は、少し複雑ですが、それでも直感的に分かります。詳細については、
16691 \begin_inset Flex URL
16692 status collapsed
16693
16694 \begin_layout Plain Layout
16695
16696 src/FontInfo.cpp
16697 \end_layout
16698
16699 \end_inset
16700
16701
16702 \begin_inset Flex Code
16703 status collapsed
16704
16705 \begin_layout Plain Layout
16706 getSizeCSS()
16707 \end_layout
16708
16709 \end_inset
16710
16711 関数をご覧ください。
16712 \end_layout
16713
16714 \begin_layout Chapter
16715 外部素材を取り込む
16716 \end_layout
16717
16718 \begin_layout Standard
16719 \begin_inset Box Shadowbox
16720 position "t"
16721 hor_pos "c"
16722 has_inner_box 1
16723 inner_pos "t"
16724 use_parbox 0
16725 use_makebox 0
16726 width "100col%"
16727 special "none"
16728 height "1in"
16729 height_special "totalheight"
16730 status open
16731
16732 \begin_layout Plain Layout
16733 【警告】本説明書のこの部分は、しばらく更新されていません。もちろんまだ正確であることを期待していますが、保証の限りではありません。
16734 \end_layout
16735
16736 \end_inset
16737
16738
16739 \end_layout
16740
16741 \begin_layout Standard
16742 LyX外部のソースから素材を使用する方法は、取扱説明書
16743 \emph on
16744 埋込オブジェクト篇
16745 \emph default
16746 で詳細にカバーされています。本章は、新種の素材を取り込む際に、舞台裏で何をする必要があるかをカバーします。
16747 \end_layout
16748
16749 \begin_layout Section
16750 どのように機能するのか
16751 \end_layout
16752
16753 \begin_layout Standard
16754 外部素材の機能は、ひな型の概念に基づいています。ひな型は、LyXがある型の素材とどのように橋渡しをするべきかを指定するものです。同梱物として、LyXは、Xfig
16755 の図や、様々なラスター形式画像、チェス棋譜、LilyPond楽譜用のひな型を事前に定義されたものとして含んでいます。実際に何が入っているかは、
16756 \begin_inset Flex MenuItem
16757 status collapsed
16758
16759 \begin_layout Plain Layout
16760 挿入\SpecialChar \menuseparator
16761 ファイル\SpecialChar \menuseparator
16762 外部素材
16763 \end_layout
16764
16765 \end_inset
16766
16767 メニューで見ることができます。さらに、特定の型の素材をサポートするのに、自分自身のひな型を作成することも可能です。後でどのようなことをすればいいか詳細に説明しま
16768 すが、できればあなたが作ったすべてのひな型を投稿して、我々がLyXの後の版に取り込むことができるようにしてくださることを希望します。
16769 \end_layout
16770
16771 \begin_layout Standard
16772 外部素材の機能におけるもう一つの基本的な発想は、最終素材の元となるオリジナルファイルと、書き出された文書や印刷された文書に取り込むための生成ファイルとを区別して
16773 いることです。たとえば、
16774 \begin_inset Flex Code
16775 status collapsed
16776
16777 \begin_layout Plain Layout
16778 Xfig
16779 \end_layout
16780
16781 \end_inset
16782
16783 で作成した図の場合を考えてみましょう。Xfigアプリケーション自体は、
16784 \begin_inset Flex Code
16785 status collapsed
16786
16787 \begin_layout Plain Layout
16788 .fig
16789 \end_layout
16790
16791 \end_inset
16792
16793 拡張子を持つオリジナルファイルを操作します。Xfigで図を作成したり変更したりして、作業が終われば
16794 \begin_inset Flex Code
16795 status collapsed
16796
16797 \begin_layout Plain Layout
16798 fig
16799 \end_layout
16800
16801 \end_inset
16802
16803 ファイルに保存します。この図をお使いの文書に取り込みたいときには、LaTeXファイルにそのままインクルードできるように、
16804 \begin_inset Flex Code
16805 status collapsed
16806
16807 \begin_layout Plain Layout
16808 transfig
16809 \end_layout
16810
16811 \end_inset
16812
16813 を呼び出してPostScriptファイルを生成します。この場合には、
16814 \begin_inset Flex Code
16815 status collapsed
16816
16817 \begin_layout Plain Layout
16818 .fig
16819 \end_layout
16820
16821 \end_inset
16822
16823 ファイルがオリジナルファイルであり、PostScriptファイルが生成ファイルになります。
16824 \end_layout
16825
16826 \begin_layout Standard
16827 この区別は、文書を執筆している最中に、素材を更新することができるようにするために重要です。さらに、これによって、複数の書き出し書式をサポートするために必要な柔軟
16828 性が提供されます。たとえば、平文テキストファイルの場合には、図を生のPostScriptファイルとして取り込むのは、とても褒められた発想とはいえません。むしろ、
16829 その図への参照だけを含めるか、最終出力が実際の画像に近いものとなるように画像からASCIIへの変換子を呼び出したいと考えることでしょう。LyXの外部素材マネジメ
16830 ントは、LyXがサポートする各書き出し書式別に仕分けしているので、ユーザがこれを行うことが可能となっています。
16831 \end_layout
16832
16833 \begin_layout Standard
16834 LyXの外部素材マネジメントは、書き出し書式によって異なる生成物をサポートすることの他に、編集・閲覧アプリケーションを緊密に統合することもサポートします。Xfi
16835 gの図の場合には、LyXの外部素材ダイアログからシングルクリックでオリジナルファイルをXfigで開くことができ、ダブルクリックすることで生成されたPostScr
16836 iptファイルをGhostviewで閲覧することができます。もうコマンドラインをもてあそんだり、オリジナルファイルや生成ファイルがどこにあるか探したり変更を加え
16837 るためにファイルブラウザをいじくり回す必要はないのです。このようにして、文書を執筆する際に必要となる多くのアプリケーションを最大限に利用し、最終的により生産性を
16838 上げることができるようになるのです。
16839 \end_layout
16840
16841 \begin_layout Section
16842 外用ひな型設定ファイル
16843 \end_layout
16844
16845 \begin_layout Standard
16846 LyXに自製の外用ひな型を付け加えるのは、比較的簡単です。しかしながら、これを不用心に行ってしまうと、たいていの場合、簡単に濫用されてしまうようなセキュリティホ
16847 ールを作ってしまいがちであることを心に留めておいてください。したがって、これを実行に移す前に、第
16848 \begin_inset CommandInset ref
16849 LatexCommand ref
16850 reference "sec:セキュリティに関する論点"
16851
16852 \end_inset
16853
16854 節のセキュリティに関する議論を読んでおいてください。
16855 \end_layout
16856
16857 \begin_layout Standard
16858 このことに言及した上で、あなたが作成した面白いひな型は、ぜひ投稿してください。
16859 \end_layout
16860
16861 \begin_layout Standard
16862 外用ひな型は、
16863 \begin_inset Flex Code
16864 status collapsed
16865
16866 \begin_layout Plain Layout
16867 LyXDir/lib/external_templates
16868 \end_layout
16869
16870 \end_inset
16871
16872 ファイルで定義されています。自分用の版を
16873 \begin_inset Flex Code
16874 status collapsed
16875
16876 \begin_layout Plain Layout
16877 UserDir/external_templates
16878 \end_layout
16879
16880 \end_inset
16881
16882 に置くこともできます。
16883 \end_layout
16884
16885 \begin_layout Standard
16886 典型的なひな型は以下のようになります。
16887 \end_layout
16888
16889 \begin_layout LyX-Code
16890 Template XFig
16891 \end_layout
16892
16893 \begin_layout LyX-Code
16894 GuiName "XFig: $$AbsOrRelPathParent$$Basename"
16895 \end_layout
16896
16897 \begin_layout LyX-Code
16898 HelpText
16899 \end_layout
16900
16901 \begin_layout LyX-Code
16902 An XFig figure.
16903 \end_layout
16904
16905 \begin_layout LyX-Code
16906 HelpTextEnd
16907 \end_layout
16908
16909 \begin_layout LyX-Code
16910 InputFormat fig
16911 \end_layout
16912
16913 \begin_layout LyX-Code
16914 FileFilter "*.fig"
16915 \end_layout
16916
16917 \begin_layout LyX-Code
16918 AutomaticProduction true
16919 \end_layout
16920
16921 \begin_layout LyX-Code
16922 Transform Rotate
16923 \end_layout
16924
16925 \begin_layout LyX-Code
16926 Transform Resize
16927 \end_layout
16928
16929 \begin_layout LyX-Code
16930 Format LaT
16931 \begin_inset ERT
16932 status collapsed
16933
16934 \begin_layout Plain Layout
16935
16936 {}
16937 \end_layout
16938
16939 \end_inset
16940
16941 eX
16942 \end_layout
16943
16944 \begin_layout LyX-Code
16945 TransformCommand Rotate RotationLatexCommand
16946 \end_layout
16947
16948 \begin_layout LyX-Code
16949 TransformCommand Resize ResizeLatexCommand
16950 \end_layout
16951
16952 \begin_layout LyX-Code
16953 Product "$$RotateFront$$ResizeFront
16954 \end_layout
16955
16956 \begin_layout LyX-Code
16957          
16958 \backslash
16959
16960 \backslash
16961 input{$$AbsOrRelPathMaster$$Basename.pstex_t}
16962 \end_layout
16963
16964 \begin_layout LyX-Code
16965          $$ResizeBack$$RotateBack"
16966 \end_layout
16967
16968 \begin_layout LyX-Code
16969 UpdateFormat pstex
16970 \end_layout
16971
16972 \begin_layout LyX-Code
16973 UpdateResult "$$AbsPath$$Basename.pstex_t"
16974 \end_layout
16975
16976 \begin_layout LyX-Code
16977 Requirement "graphicx"
16978 \end_layout
16979
16980 \begin_layout LyX-Code
16981 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
16982 \end_layout
16983
16984 \begin_layout LyX-Code
16985 ReferencedFile latex "$$AbsPath$$Basename.eps"
16986 \end_layout
16987
16988 \begin_layout LyX-Code
16989 ReferencedFile dvi "$$AbsPath$$Basename.eps"
16990 \end_layout
16991
16992 \begin_layout LyX-Code
16993 FormatEnd
16994 \end_layout
16995
16996 \begin_layout LyX-Code
16997 Format PDFLaT
16998 \begin_inset ERT
16999 status collapsed
17000
17001 \begin_layout Plain Layout
17002
17003 {}
17004 \end_layout
17005
17006 \end_inset
17007
17008 eX
17009 \end_layout
17010
17011 \begin_layout LyX-Code
17012 TransformCommand Rotate RotationLatexCommand
17013 \end_layout
17014
17015 \begin_layout LyX-Code
17016 TransformCommand Resize ResizeLatexCommand
17017 \end_layout
17018
17019 \begin_layout LyX-Code
17020 Product "$$RotateFront$$ResizeFront
17021 \end_layout
17022
17023 \begin_layout LyX-Code
17024          
17025 \backslash
17026
17027 \backslash
17028 input{$$AbsOrRelPathMaster$$Basename.pdftex_t}
17029 \end_layout
17030
17031 \begin_layout LyX-Code
17032          $$ResizeBack$$RotateBack"
17033 \end_layout
17034
17035 \begin_layout LyX-Code
17036 UpdateFormat pdftex
17037 \end_layout
17038
17039 \begin_layout LyX-Code
17040 UpdateResult "$$AbsPath$$Basename.pdftex_t"
17041 \end_layout
17042
17043 \begin_layout LyX-Code
17044 Requirement "graphicx"
17045 \end_layout
17046
17047 \begin_layout LyX-Code
17048 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pdftex_t"
17049 \end_layout
17050
17051 \begin_layout LyX-Code
17052 ReferencedFile latex "$$AbsPath$$Basename.pdf"
17053 \end_layout
17054
17055 \begin_layout LyX-Code
17056 FormatEnd
17057 \end_layout
17058
17059 \begin_layout LyX-Code
17060 Format Ascii
17061 \end_layout
17062
17063 \begin_layout LyX-Code
17064 Product "$$Contents(
17065 \backslash
17066 "$$AbsPath$$Basename.asc
17067 \backslash
17068 ")"
17069 \end_layout
17070
17071 \begin_layout LyX-Code
17072 UpdateFormat asciixfig
17073 \end_layout
17074
17075 \begin_layout LyX-Code
17076 UpdateResult "$$AbsPath$$Basename.asc"
17077 \end_layout
17078
17079 \begin_layout LyX-Code
17080 FormatEnd
17081 \end_layout
17082
17083 \begin_layout LyX-Code
17084 Format DocBook
17085 \end_layout
17086
17087 \begin_layout LyX-Code
17088 Product "<graphic fileref=
17089 \backslash
17090 "$$AbsOrRelPathMaster$$Basename.eps
17091 \backslash
17092 ">
17093 \end_layout
17094
17095 \begin_layout LyX-Code
17096          </graphic>"
17097 \end_layout
17098
17099 \begin_layout LyX-Code
17100 UpdateFormat eps
17101 \end_layout
17102
17103 \begin_layout LyX-Code
17104 UpdateResult "$$AbsPath$$Basename.eps"
17105 \end_layout
17106
17107 \begin_layout LyX-Code
17108 ReferencedFile docbook "$$AbsPath$$Basename.eps"
17109 \end_layout
17110
17111 \begin_layout LyX-Code
17112 ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"
17113 \end_layout
17114
17115 \begin_layout LyX-Code
17116 FormatEnd
17117 \end_layout
17118
17119 \begin_layout LyX-Code
17120 Product "[XFig: $$FName]"
17121 \end_layout
17122
17123 \begin_layout LyX-Code
17124 FormatEnd
17125 \end_layout
17126
17127 \begin_layout LyX-Code
17128 TemplateEnd
17129 \end_layout
17130
17131 \begin_layout Standard
17132 ご覧の通り、ひな型は
17133 \begin_inset Flex Code
17134 status collapsed
17135
17136 \begin_layout Plain Layout
17137 Template
17138 \end_layout
17139
17140 \end_inset
17141
17142  \SpecialChar \ldots{}
17143  
17144 \begin_inset Flex Code
17145 status collapsed
17146
17147 \begin_layout Plain Layout
17148 TemplateEnd
17149 \end_layout
17150
17151 \end_inset
17152
17153 で閉じられます。ひな型には、一般的な設定を行うヘッダ部と、サポートされている主要な文書ファイル書式の設定を行う
17154 \begin_inset Flex Code
17155 status collapsed
17156
17157 \begin_layout Plain Layout
17158 Format
17159 \end_layout
17160
17161 \end_inset
17162
17163  \SpecialChar \ldots{}
17164  
17165 \begin_inset Flex Code
17166 status collapsed
17167
17168 \begin_layout Plain Layout
17169 FormatEnd
17170 \end_layout
17171
17172 \end_inset
17173
17174 部があります。
17175 \end_layout
17176
17177 \begin_layout Subsection
17178 ひな型のヘッダ
17179 \end_layout
17180
17181 \begin_layout Description
17182 \begin_inset Flex Code
17183 status collapsed
17184
17185 \begin_layout Plain Layout
17186 AutomaticProduction
17187 \begin_inset space ~
17188 \end_inset
17189
17190 true|false
17191 \end_layout
17192
17193 \end_inset
17194
17195  このひな型で扱うファイルをLyXが生成しなくてはならないか否か。このコマンドは、一度だけ必ず現れなくてはなりません。
17196 \end_layout
17197
17198 \begin_layout Description
17199 \begin_inset Flex Code
17200 status collapsed
17201
17202 \begin_layout Plain Layout
17203 FileFilter
17204 \begin_inset space ~
17205 \end_inset
17206
17207 <パターン>
17208 \end_layout
17209
17210 \end_inset
17211
17212  望むファイル群を表示するために、ファイルダイアログで使用するフィルタ用globパターン。2つ以上のファイル拡張子があり得る場合(たとえば、tgifには
17213 \begin_inset Flex Code
17214 status collapsed
17215
17216 \begin_layout Plain Layout
17217 .obj
17218 \end_layout
17219
17220 \end_inset
17221
17222
17223 \begin_inset Flex Code
17224 status collapsed
17225
17226 \begin_layout Plain Layout
17227 .tgo
17228 \end_layout
17229
17230 \end_inset
17231
17232 があります)、「
17233 \begin_inset Flex Code
17234 status collapsed
17235
17236 \begin_layout Plain Layout
17237 *.{obj,tgo}
17238 \end_layout
17239
17240 \end_inset
17241
17242 」の様なパターンを使用してください。このコマンドは、一度だけ必ず現れなくてはなりません。
17243 \end_layout
17244
17245 \begin_layout Description
17246 \begin_inset Flex Code
17247 status collapsed
17248
17249 \begin_layout Plain Layout
17250 GuiName
17251 \begin_inset space ~
17252 \end_inset
17253
17254 <GUI名>
17255 \end_layout
17256
17257 \end_inset
17258
17259  この文字列はボタン上に表示されます。このコマンドは、一度だけ必ず現れなくてはなりません。
17260 \end_layout
17261
17262 \begin_layout Description
17263 \begin_inset Flex Code
17264 status collapsed
17265
17266 \begin_layout Plain Layout
17267 HelpText
17268 \begin_inset space ~
17269 \end_inset
17270
17271 <文章>
17272 \begin_inset space ~
17273 \end_inset
17274
17275 HelpTextEnd
17276 \end_layout
17277
17278 \end_inset
17279
17280  外部素材ダイアログで使用されるヘルプ文。このひな型がユーザに何を提供できるのか、ユーザに説明するのに十分な情報を盛り込んでください。このコマンドは、一度だけ必
17281 ず現れなくてはなりません。
17282 \end_layout
17283
17284 \begin_layout Description
17285 \begin_inset Flex Code
17286 status collapsed
17287
17288 \begin_layout Plain Layout
17289 InputFormat
17290 \begin_inset space ~
17291 \end_inset
17292
17293 <書式>
17294 \end_layout
17295
17296 \end_inset
17297
17298  オリジナルファイルのファイル書式。これは、LyXが知っている書式名でなくてはなりません(第
17299 \begin_inset CommandInset ref
17300 LatexCommand ref
17301 reference "sec:書式"
17302
17303 \end_inset
17304
17305 章参照)。このひな型が、2つ以上の書式のオリジナルファイルを取り扱える場合は、「
17306 \begin_inset Flex Code
17307 status collapsed
17308
17309 \begin_layout Plain Layout
17310 *
17311 \end_layout
17312
17313 \end_inset
17314
17315 」を使用してください。この場合、LyXはファイル書式を推定するために、ファイル自体に詮索を試みます。このコマンドは、一度だけ必ず現れなくてはなりません。
17316 \end_layout
17317
17318 \begin_layout Description
17319 \begin_inset Flex Code
17320 status collapsed
17321
17322 \begin_layout Plain Layout
17323 Template
17324 \begin_inset space ~
17325 \end_inset
17326
17327 <ID>
17328 \end_layout
17329
17330 \end_inset
17331
17332  このひな型の(他と重複しない)名称。代入マクロを含めてはなりません(下記参照)。
17333 \end_layout
17334
17335 \begin_layout Description
17336 \begin_inset Flex Code
17337 status collapsed
17338
17339 \begin_layout Plain Layout
17340 Transform
17341 \begin_inset space ~
17342 \end_inset
17343
17344 Rotate|Resize|Clip|Extra
17345 \end_layout
17346
17347 \end_inset
17348
17349  このコマンドは、このひな型がどのような変換をサポートしているかを指定します。これは全く登場しなくても1回以上現れても構いません。このコマンドは、外部素材ダイア
17350 ログ中の対応するタブを使用可能にします。
17351 \begin_inset Flex Code
17352 status collapsed
17353
17354 \begin_layout Plain Layout
17355 Transform
17356 \end_layout
17357
17358 \end_inset
17359
17360 コマンド一つずつに応じて、
17361 \begin_inset Flex Code
17362 status collapsed
17363
17364 \begin_layout Plain Layout
17365 Format
17366 \end_layout
17367
17368 \end_inset
17369
17370 部に、対応する
17371 \begin_inset Flex Code
17372 status collapsed
17373
17374 \begin_layout Plain Layout
17375 TransformCommand
17376 \end_layout
17377
17378 \end_inset
17379
17380 コマンドか
17381 \begin_inset Flex Code
17382 status collapsed
17383
17384 \begin_layout Plain Layout
17385 TransformOption
17386 \end_layout
17387
17388 \end_inset
17389
17390 コマンドを置かなくてはなりません。これを行わないと、この書式での変換はサポートされません。
17391 \end_layout
17392
17393 \begin_layout Subsection
17394 \begin_inset Flex Code
17395 status collapsed
17396
17397 \begin_layout Plain Layout
17398 Format
17399 \end_layout
17400
17401 \end_inset
17402
17403
17404 \end_layout
17405
17406 \begin_layout Description
17407 \begin_inset Flex Code
17408 status collapsed
17409
17410 \begin_layout Plain Layout
17411 Format
17412 \begin_inset space ~
17413 \end_inset
17414
17415 LaT
17416 \begin_inset ERT
17417 status collapsed
17418
17419 \begin_layout Plain Layout
17420
17421 {}
17422 \end_layout
17423
17424 \end_inset
17425
17426 eX|PDFLaT
17427 \begin_inset ERT
17428 status collapsed
17429
17430 \begin_layout Plain Layout
17431
17432 {}
17433 \end_layout
17434
17435 \end_inset
17436
17437 eX|PlainText|DocBook
17438 \end_layout
17439
17440 \end_inset
17441
17442  この書式定義が定める主要な文書ファイル書式。すべてのひな型が、全文書ファイル書式に対して意味のある表示ができるわけではありません。それでも、全書式に対して
17443 \begin_inset Flex Code
17444 status collapsed
17445
17446 \begin_layout Plain Layout
17447 Format
17448 \end_layout
17449
17450 \end_inset
17451
17452 部を定義してください。表示する方法がないときは、ダミーテキストを使用してください。これによって、書き出した文書内で、少なくとも外部素材への参照を見ることができる
17453 ようになります。
17454 \end_layout
17455
17456 \begin_layout Description
17457 \begin_inset Flex Code
17458 status collapsed
17459
17460 \begin_layout Plain Layout
17461 Option
17462 \begin_inset space ~
17463 \end_inset
17464
17465 <名称>
17466 \begin_inset space ~
17467 \end_inset
17468
17469 <値>
17470 \end_layout
17471
17472 \end_inset
17473
17474  このコマンドは、
17475 \begin_inset Flex Code
17476 status collapsed
17477
17478 \begin_layout Plain Layout
17479 Product
17480 \end_layout
17481
17482 \end_inset
17483
17484 での代入に使うマクロ
17485 \begin_inset Flex Code
17486 status collapsed
17487
17488 \begin_layout Plain Layout
17489 $$<名称>
17490 \end_layout
17491
17492 \end_inset
17493
17494 を新たに定義します。
17495 \begin_inset Flex Code
17496 status collapsed
17497
17498 \begin_layout Plain Layout
17499 <値>
17500 \end_layout
17501
17502 \end_inset
17503
17504 自体にも代入マクロを使うことができます。
17505 \begin_inset Flex Code
17506 status collapsed
17507
17508 \begin_layout Plain Layout
17509 Product
17510 \end_layout
17511
17512 \end_inset
17513
17514
17515 \begin_inset Flex Code
17516 status collapsed
17517
17518 \begin_layout Plain Layout
17519 <値>
17520 \end_layout
17521
17522 \end_inset
17523
17524 を直接使用するよりも優れた点は、
17525 \begin_inset Flex Code
17526 status collapsed
17527
17528 \begin_layout Plain Layout
17529 $$<名称>
17530 \end_layout
17531
17532 \end_inset
17533
17534 に代入された値が、その文書書式で有効な非必須引数となるように健全化されることです。このコマンドは全く登場しなくても1回以上現れても構いません。
17535 \end_layout
17536
17537 \begin_layout Description
17538 \begin_inset Flex Code
17539 status collapsed
17540
17541 \begin_layout Plain Layout
17542 Product
17543 \begin_inset space ~
17544 \end_inset
17545
17546 <文>
17547 \end_layout
17548
17549 \end_inset
17550
17551  書き出された文書に挿入される文。実のところ、これが最も重要なコマンドであり、とても複雑になることがあります。このコマンドは、一度だけ必ず現れなくてはなりません
17552
17553 \end_layout
17554
17555 \begin_layout Description
17556 \begin_inset Flex Code
17557 status collapsed
17558
17559 \begin_layout Plain Layout
17560 Preamble
17561 \begin_inset space ~
17562 \end_inset
17563
17564 <名称>
17565 \end_layout
17566
17567 \end_inset
17568
17569  このコマンドは、LaTeXプリアンブルに入れるプリアンブル片を指定します。これは
17570 \begin_inset Flex Code
17571 status collapsed
17572
17573 \begin_layout Plain Layout
17574 PreambleDef
17575 \end_layout
17576
17577 \end_inset
17578
17579  \SpecialChar \ldots{}
17580  
17581 \begin_inset Flex Code
17582 status collapsed
17583
17584 \begin_layout Plain Layout
17585 PreambleDefEnd
17586 \end_layout
17587
17588 \end_inset
17589
17590 を使用して定義しなくてはなりません。このコマンドは全く登場しなくても1回以上現れても構いません。
17591 \end_layout
17592
17593 \begin_layout Description
17594 \begin_inset Flex Code
17595 status collapsed
17596
17597 \begin_layout Plain Layout
17598 ReferencedFile
17599 \begin_inset space ~
17600 \end_inset
17601
17602 <書式>
17603 \begin_inset space ~
17604 \end_inset
17605
17606 <ファイル名>
17607 \end_layout
17608
17609 \end_inset
17610
17611  このコマンドは、変換過程で生成され、特定の書き出し書式に必要とされるファイルを示します。ファイル名が相対パスである場合には、親文書に対する相対パスとして解釈さ
17612 れます。このコマンドは全く登場しなくても1回以上現れても構いません。
17613 \end_layout
17614
17615 \begin_layout Description
17616 \begin_inset Flex Code
17617 status collapsed
17618
17619 \begin_layout Plain Layout
17620 Requirement
17621 \begin_inset space ~
17622 \end_inset
17623
17624 <package>
17625 \end_layout
17626
17627 \end_inset
17628
17629  必要とされるLaTeXパッケージ名。パッケージは、LaTeXプリアンブル中で
17630 \begin_inset Flex Code
17631 status collapsed
17632
17633 \begin_layout Plain Layout
17634
17635 \backslash
17636 usepackage{}
17637 \end_layout
17638
17639 \end_inset
17640
17641 を使って取り込まれます。このコマンドは全く登場しなくても1回以上現れても構いません。
17642 \end_layout
17643
17644 \begin_layout Description
17645 \begin_inset Flex Code
17646 status collapsed
17647
17648 \begin_layout Plain Layout
17649 TransformCommand
17650 \begin_inset space ~
17651 \end_inset
17652
17653 Rotate
17654 \begin_inset space ~
17655 \end_inset
17656
17657 RotationLatexCommand
17658 \end_layout
17659
17660 \end_inset
17661
17662  このコマンドは、回転用に、組み込みのLaTeXコマンドを使用するように指定します。このコマンドは、1回現れても全く現れなくても構いません。
17663 \end_layout
17664
17665 \begin_layout Description
17666 \begin_inset Flex Code
17667 status collapsed
17668
17669 \begin_layout Plain Layout
17670 TransformCommand
17671 \begin_inset space ~
17672 \end_inset
17673
17674 Resize
17675 \begin_inset space ~
17676 \end_inset
17677
17678 ResizeLatexCommand
17679 \end_layout
17680
17681 \end_inset
17682
17683  このコマンドは、伸縮用に、組み込みのLaTeXコマンドを使用するように指定します。このコマンドは、1回現れても全く現れなくても構いません。
17684 \end_layout
17685
17686 \begin_layout Description
17687 \begin_inset Flex Code
17688 status collapsed
17689
17690 \begin_layout Plain Layout
17691 TransformOption
17692 \begin_inset space ~
17693 \end_inset
17694
17695 Rotate
17696 \begin_inset space ~
17697 \end_inset
17698
17699 RotationLatexOption
17700 \end_layout
17701
17702 \end_inset
17703
17704  このコマンドは、回転が非必須引数を通じて行われるように指定します。このコマンドは、1回現れても全く現れなくても構いません。
17705 \end_layout
17706
17707 \begin_layout Description
17708 \begin_inset Flex Code
17709 status collapsed
17710
17711 \begin_layout Plain Layout
17712 TransformOption
17713 \begin_inset space ~
17714 \end_inset
17715
17716 Resize
17717 \begin_inset space ~
17718 \end_inset
17719
17720 ResizeLatexOption
17721 \end_layout
17722
17723 \end_inset
17724
17725  このコマンドは、伸縮が非必須引数を通じて行われるように指定します。このコマンドは、1回現れても全く現れなくても構いません。
17726 \end_layout
17727
17728 \begin_layout Description
17729 \begin_inset Flex Code
17730 status collapsed
17731
17732 \begin_layout Plain Layout
17733 TransformOption
17734 \begin_inset space ~
17735 \end_inset
17736
17737 Clip
17738 \begin_inset space ~
17739 \end_inset
17740
17741 ClipLatexOption
17742 \end_layout
17743
17744 \end_inset
17745
17746  このコマンドは、切り抜きが非必須引数を通じて行われるように指定します。このコマンドは、1回現れても全く現れなくても構いません。
17747 \end_layout
17748
17749 \begin_layout Description
17750 \begin_inset Flex Code
17751 status collapsed
17752
17753 \begin_layout Plain Layout
17754 TransformOption
17755 \begin_inset space ~
17756 \end_inset
17757
17758 Extra
17759 \begin_inset space ~
17760 \end_inset
17761
17762 ExtraLatexOption
17763 \end_layout
17764
17765 \end_inset
17766
17767  このコマンドは、追加の非必須引数を使用することを指定します。このコマンドは、1回現れても全く現れなくても構いません。
17768 \end_layout
17769
17770 \begin_layout Description
17771 \begin_inset Flex Code
17772 status collapsed
17773
17774 \begin_layout Plain Layout
17775 UpdateFormat
17776 \begin_inset space ~
17777 \end_inset
17778
17779 <書式>
17780 \end_layout
17781
17782 \end_inset
17783
17784  変換されたファイルのファイル書式。これは、LyXが知っている書式名でなくてはなりません(
17785 \begin_inset Flex MenuItem
17786 status collapsed
17787
17788 \begin_layout Plain Layout
17789 ツール\SpecialChar \menuseparator
17790 設定:変換子
17791 \end_layout
17792
17793 \end_inset
17794
17795 ダイアログを参照)。このコマンドは、一度だけ必ず現れなくてはなりません。
17796 \end_layout
17797
17798 \begin_layout Description
17799 \begin_inset Flex Code
17800 status collapsed
17801
17802 \begin_layout Plain Layout
17803 UpdateResult
17804 \begin_inset space ~
17805 \end_inset
17806
17807 <ファイル名>
17808 \end_layout
17809
17810 \end_inset
17811
17812  変換されたファイルのファイル名。ファイル名は絶対パスでなくてはなりません。このコマンドは、一度だけ必ず現れなくてはなりません。
17813 \end_layout
17814
17815 \begin_layout Subsection
17816 プリアンブルの定義
17817 \end_layout
17818
17819 \begin_layout Standard
17820 外用ひな型設定ファイルには、
17821 \begin_inset Flex Code
17822 status collapsed
17823
17824 \begin_layout Plain Layout
17825 PreambleDef
17826 \end_layout
17827
17828 \end_inset
17829
17830  \SpecialChar \ldots{}
17831  
17832 \begin_inset Flex Code
17833 status collapsed
17834
17835 \begin_layout Plain Layout
17836 PreambleDefEnd
17837 \end_layout
17838
17839 \end_inset
17840
17841 で囲んだプリアンブル定義を追加することができます。これらの定義は、ひな型の
17842 \begin_inset Flex Code
17843 status collapsed
17844
17845 \begin_layout Plain Layout
17846 Format
17847 \end_layout
17848
17849 \end_inset
17850
17851 部で使用することができます。
17852 \end_layout
17853
17854 \begin_layout Section
17855 代入機構
17856 \end_layout
17857
17858 \begin_layout Standard
17859 外部素材機構が外部プログラムを呼び出すときには、ひな型設定ファイルで定義されたコマンドにしたがって行われます。これらのコマンドには、実行前に展開されるマクロをい
17860 ろいろ入れることができます。実行は、つねに元の文書があるディレクトリで行われます。
17861 \end_layout
17862
17863 \begin_layout Standard
17864 また、外部素材が表示されるときにはいつでも、その名称は代入機構によって組み立てられ、ひな型定義中の他のほとんどのコマンドも代入をサポートしています。
17865 \end_layout
17866
17867 \begin_layout Standard
17868 使用できるマクロは以下の通りです。
17869 \end_layout
17870
17871 \begin_layout Description
17872 \begin_inset Flex Code
17873 status collapsed
17874
17875 \begin_layout Plain Layout
17876 $$AbsOrRelPathMaster
17877 \end_layout
17878
17879 \end_inset
17880
17881  LyX親文書への絶対ファイルパスないしは相対ファイルパス
17882 \end_layout
17883
17884 \begin_layout Description
17885 \begin_inset Flex Code
17886 status collapsed
17887
17888 \begin_layout Plain Layout
17889 $$AbsOrRelPathParent
17890 \end_layout
17891
17892 \end_inset
17893
17894  LyX文書への絶対ファイルパスないしは相対ファイルパス
17895 \end_layout
17896
17897 \begin_layout Description
17898 \begin_inset Flex Code
17899 status collapsed
17900
17901 \begin_layout Plain Layout
17902 $$AbsPath
17903 \end_layout
17904
17905 \end_inset
17906
17907  絶対ファイルパス
17908 \end_layout
17909
17910 \begin_layout Description
17911 \begin_inset Flex Code
17912 status collapsed
17913
17914 \begin_layout Plain Layout
17915 $$Basename
17916 \end_layout
17917
17918 \end_inset
17919
17920  パスおよび拡張子を除いたファイル名
17921 \end_layout
17922
17923 \begin_layout Description
17924 \begin_inset Flex Code
17925 status collapsed
17926
17927 \begin_layout Plain Layout
17928 $$Contents(
17929 \begin_inset Quotes eld
17930 \end_inset
17931
17932 filename.ext
17933 \begin_inset Quotes erd
17934 \end_inset
17935
17936 )
17937 \end_layout
17938
17939 \end_inset
17940
17941  このマクロは、
17942 \begin_inset Flex Code
17943 status collapsed
17944
17945 \begin_layout Plain Layout
17946 filename.ext
17947 \end_layout
17948
17949 \end_inset
17950
17951 と云う名のファイルの中身を展開します。
17952 \end_layout
17953
17954 \begin_layout Description
17955 \begin_inset Flex Code
17956 status collapsed
17957
17958 \begin_layout Plain Layout
17959 $$Extension
17960 \end_layout
17961
17962 \end_inset
17963
17964  ファイル拡張子(点を含む)
17965 \end_layout
17966
17967 \begin_layout Description
17968 \begin_inset Flex Code
17969 status collapsed
17970
17971 \begin_layout Plain Layout
17972 $$FName
17973 \end_layout
17974
17975 \end_inset
17976
17977  外部素材ダイアログで指定されたファイルのファイル名。これはLyX文書への絶対パスでも良いですし、相対パスでも構いません。
17978 \end_layout
17979
17980 \begin_layout Description
17981 \begin_inset Flex Code
17982 status collapsed
17983
17984 \begin_layout Plain Layout
17985 $$FPath
17986 \end_layout
17987
17988 \end_inset
17989
17990  
17991 \begin_inset Flex Code
17992 status collapsed
17993
17994 \begin_layout Plain Layout
17995 $$FName
17996 \end_layout
17997
17998 \end_inset
17999
18000 のパス部分(LyX文書への絶対パス名か相対パス名)
18001 \end_layout
18002
18003 \begin_layout Description
18004 \begin_inset Flex Code
18005 status collapsed
18006
18007 \begin_layout Plain Layout
18008 $$RelPathMaster
18009 \end_layout
18010
18011 \end_inset
18012
18013  LyX親文書への相対ファイルパス
18014 \end_layout
18015
18016 \begin_layout Description
18017 \begin_inset Flex Code
18018 status collapsed
18019
18020 \begin_layout Plain Layout
18021 $$RelPathParent
18022 \end_layout
18023
18024 \end_inset
18025
18026  LyX文書への相対ファイルパス
18027 \end_layout
18028
18029 \begin_layout Description
18030 \begin_inset Flex Code
18031 status collapsed
18032
18033 \begin_layout Plain Layout
18034 $$Sysdir
18035 \end_layout
18036
18037 \end_inset
18038
18039  このマクロは、システムディレクトリの絶対パスを展開します。これは、典型的には、LyXに同梱されているヘルパースクリプト群を示したりするのに使用されます。
18040 \end_layout
18041
18042 \begin_layout Description
18043 \begin_inset Flex Code
18044 status collapsed
18045
18046 \begin_layout Plain Layout
18047 $$Tempname
18048 \end_layout
18049
18050 \end_inset
18051
18052  元の文書が閉じられたり、挿入されていた外部素材が削除されたりすると自動的に削除される一時ファイルのフルパスとファイル名。
18053 \end_layout
18054
18055 \begin_layout Standard
18056 パスを示すマクロはすべて最後のディレクトリ区切りも含んでいますので、たとえば絶対パスのファイル名を 
18057 \begin_inset Flex Code
18058 status collapsed
18059
18060 \begin_layout Plain Layout
18061 $$AbsPath$$Basename$$Extension
18062 \end_layout
18063
18064 \end_inset
18065
18066 のようにして作ることができます。
18067 \end_layout
18068
18069 \begin_layout Standard
18070 上記マクロは、特記しない限りはすべてのコマンドで代入が行われます。
18071 \begin_inset Flex Code
18072 status collapsed
18073
18074 \begin_layout Plain Layout
18075 Transform
18076 \end_layout
18077
18078 \end_inset
18079
18080 コマンドと
18081 \begin_inset Flex Code
18082 status collapsed
18083
18084 \begin_layout Plain Layout
18085 TransformCommand
18086 \end_layout
18087
18088 \end_inset
18089
18090 コマンドが有効にされている場合、
18091 \begin_inset Flex Code
18092 status collapsed
18093
18094 \begin_layout Plain Layout
18095 Product
18096 \end_layout
18097
18098 \end_inset
18099
18100 コマンドは、これらに加えて以下の代入もサポートします。
18101 \end_layout
18102
18103 \begin_layout Description
18104 \begin_inset Flex Code
18105 status collapsed
18106
18107 \begin_layout Plain Layout
18108 $$ResizeFront
18109 \end_layout
18110
18111 \end_inset
18112
18113  伸縮コマンドの前置部。
18114 \end_layout
18115
18116 \begin_layout Description
18117 \begin_inset Flex Code
18118 status collapsed
18119
18120 \begin_layout Plain Layout
18121 $$ResizeBack
18122 \end_layout
18123
18124 \end_inset
18125
18126  伸縮コマンドの後置部。
18127 \end_layout
18128
18129 \begin_layout Description
18130 \begin_inset Flex Code
18131 status collapsed
18132
18133 \begin_layout Plain Layout
18134 $$RotateFront
18135 \end_layout
18136
18137 \end_inset
18138
18139  回転コマンドの前置部。
18140 \end_layout
18141
18142 \begin_layout Description
18143 \begin_inset Flex Code
18144 status collapsed
18145
18146 \begin_layout Plain Layout
18147 $$RotateBack
18148 \end_layout
18149
18150 \end_inset
18151
18152  回転コマンドの後置部。
18153 \end_layout
18154
18155 \begin_layout Standard
18156 \begin_inset Flex Code
18157 status collapsed
18158
18159 \begin_layout Plain Layout
18160 Option
18161 \end_layout
18162
18163 \end_inset
18164
18165 コマンドの値に入れる文字列では、
18166 \begin_inset Flex Code
18167 status collapsed
18168
18169 \begin_layout Plain Layout
18170 Transform
18171 \end_layout
18172
18173 \end_inset
18174
18175 コマンドと
18176 \begin_inset Flex Code
18177 status collapsed
18178
18179 \begin_layout Plain Layout
18180 TransformOption
18181 \end_layout
18182
18183 \end_inset
18184
18185 コマンドが有効にされていれば、以下の代入もサポートされます。
18186 \end_layout
18187
18188 \begin_layout Description
18189 \begin_inset Flex Code
18190 status collapsed
18191
18192 \begin_layout Plain Layout
18193 $$Clip
18194 \end_layout
18195
18196 \end_inset
18197
18198  切り抜きオプション。
18199 \end_layout
18200
18201 \begin_layout Description
18202 \begin_inset Flex Code
18203 status collapsed
18204
18205 \begin_layout Plain Layout
18206 $$Extra
18207 \end_layout
18208
18209 \end_inset
18210
18211  追加オプション。
18212 \end_layout
18213
18214 \begin_layout Description
18215 \begin_inset Flex Code
18216 status collapsed
18217
18218 \begin_layout Plain Layout
18219 $$Resize
18220 \end_layout
18221
18222 \end_inset
18223
18224  伸縮オプション。
18225 \end_layout
18226
18227 \begin_layout Description
18228 \begin_inset Flex Code
18229 status collapsed
18230
18231 \begin_layout Plain Layout
18232 $$Rotate
18233 \end_layout
18234
18235 \end_inset
18236
18237  回転オプション。
18238 \end_layout
18239
18240 \begin_layout Standard
18241 どうしてこんなに多くのパス関連マクロがあるのか不思議に思われるかもしれません。主に以下の二つの理由があります。
18242 \end_layout
18243
18244 \begin_layout Enumerate
18245 相対ファイル名と絶対ファイル名は、それぞれ相対的あるいは絶対的なままで維持されなくてはなりません。ユーザにはどちらかの形を好む理由があるのかもしれません。たとえ
18246 ば相対名は、いろいろなマシンで作業をする持ち運び用の文書で役立ちます。絶対名は、プログラムによっては必要とされることがあり得ます。
18247 \end_layout
18248
18249 \begin_layout Enumerate
18250 LaTeXは、相対ファイル名に関して、LyXや入れ子にした取り込みファイル中の他のプログラムとは異なった取り扱いを行います。LyXにとって相対ファイル名とは、常
18251 にこのファイル名が書かれている文書に対して相対的なものになります。LaTeXにとっての相対ファイル名は、常に親文書に対するものになります。これら二つの定義は、一
18252 つの文書しかないときには同じですが、部分文書を含む親文書があるときには異なったものとなってきます。つまり、相対ファイル名は、LaTeXに提示されるときに変換され
18253 なくてはならないのです。幸い、正しいマクロを選びさえすれば、これはLyXが自動的に行ってくれます。
18254 \end_layout
18255
18256 \begin_layout Standard
18257 すると、新しく作ったひな型定義では、どのパス関連マクロを使うべきでしょうか。このルールは難しくありません。つまり、
18258 \end_layout
18259
18260 \begin_layout Itemize
18261 絶対パスが必要とされるときには
18262 \begin_inset Flex Code
18263 status collapsed
18264
18265 \begin_layout Plain Layout
18266 $$AbsPath
18267 \end_layout
18268
18269 \end_inset
18270
18271 を使う。
18272 \end_layout
18273
18274 \begin_layout Itemize
18275 代入された文字列が、LaTeXインプットの一種である場合には、
18276 \begin_inset Flex Code
18277 status collapsed
18278
18279 \begin_layout Plain Layout
18280 $$AbsOrRelPathMaster
18281 \end_layout
18282
18283 \end_inset
18284
18285 を使う。
18286 \end_layout
18287
18288 \begin_layout Itemize
18289 それ以外ならば、ユーザの選択を尊重するために
18290 \begin_inset Flex Code
18291 status collapsed
18292
18293 \begin_layout Plain Layout
18294 $$AbsOrRelPathParent
18295 \end_layout
18296
18297 \end_inset
18298
18299 を使う。
18300 \end_layout
18301
18302 \begin_layout Standard
18303 このルールが機能せずに、たとえば相対名が必要となる特殊な場合もありますが、通常、上記でうまく動作します。特殊例の例としては、上述のXFigひな型での
18304 \begin_inset Flex Code
18305 status collapsed
18306
18307 \begin_layout Plain Layout
18308 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
18309 \end_layout
18310
18311 \end_inset
18312
18313 というコマンドがあります。この場合、
18314 \begin_inset Flex Code
18315 status collapsed
18316
18317 \begin_layout Plain Layout
18318 .pstex_t
18319 \end_layout
18320
18321 \end_inset
18322
18323 ファイルの複写子は、ファイル内容を書き換えるのに相対名を必要とするために、絶対名を使用することができないのです。
18324 \end_layout
18325
18326 \begin_layout Section
18327 セキュリティに関する論点
18328 \begin_inset CommandInset label
18329 LatexCommand label
18330 name "sec:セキュリティに関する論点"
18331
18332 \end_inset
18333
18334
18335 \end_layout
18336
18337 \begin_layout Standard
18338 外部素材機能は、多くの外部プログラムとの橋渡しをし、しかもそれを自動的に行うので、そのセキュリティ面での帰結を考慮しなくてはなりません。特に、ユーザは好きなファ
18339 イル名やパラメータ文字列を含めることが許されていて、しかもそれらがコマンドに展開されるので、ユーザが文書を閲覧したり印刷したりしたときに、任意のコマンドを実行す
18340 ることができるような悪意ある文書を作成することが可能となりましょう。これは、我々がぜひとも避けたいことなのです。
18341 \end_layout
18342
18343 \begin_layout Standard
18344 しかしながら、外部プログラムコマンドはひな型設定ファイルでのみ指定されているので、LyXが安全なひな型でのみ適切に設定されているならば、セキュリティ上の問題は発
18345 生しません。これは、外部プログラムが
18346 \begin_inset Flex Code
18347 status collapsed
18348
18349 \begin_layout Plain Layout
18350 system
18351 \end_layout
18352
18353 \end_inset
18354
18355 システムコールではなく、
18356 \begin_inset Flex Code
18357 status collapsed
18358
18359 \begin_layout Plain Layout
18360 execvp
18361 \end_layout
18362
18363 \end_inset
18364
18365 システムコールで呼び出されているため、ファイル名やパラメータ部からシェル経由で任意のコマンドを実行することはできないためです。
18366 \end_layout
18367
18368 \begin_layout Standard
18369 これは、外部素材ひな型でどのようなコマンド文字列を使用することのできるかについて、制限があることを意味します。特に、パイプやリダイレクトはそのまま使用することは
18370 できません。これは、LyXの安全性を維持するためにそうしなくてはならないのです。もしシェル機能の一部を使用したいとすると、これを完全に統御の下においたまま行う安
18371 全なスクリプトを書いた上で、このスクリプトをコマンド文字列から呼び出すようにしなくてはなりません。
18372 \end_layout
18373
18374 \begin_layout Standard
18375 シェルと直接やりとりするひな型を設計することは可能ではありますが、悪意のあるユーザが狡猾なファイル名やパラメータを書くことによって、任意のコマンドを実行できるよ
18376 うになるため、一般的には、統御下に置いた状態で
18377 \begin_inset Flex Code
18378 status collapsed
18379
18380 \begin_layout Plain Layout
18381 execvp
18382 \end_layout
18383
18384 \end_inset
18385
18386 システムコールを使用する安全なスクリプトのみを使用することをお勧めします。確かに、管理された環境下で使用する分には、通常のシェルスクリプトを使用する方に流れる誘
18387 惑はあります。そうした場合には、お使いのシステムに簡単に濫用することのできるセキュリティホールを、
18388 \emph on
18389 間違いなく
18390 \emph default
18391 導入することを理解しておいてください。オープンソースの伝統に従って、私たちは人々に新しいひな型を投稿してくれるよう促していますが、そのような安全でないひな型はL
18392 yXの標準頒布版には取り入れるべきでないとすることには当然の正当性があります。公式の頒布チャンネルから出荷されているLyXには、安全でないひな型は決して入ってい
18393 ません。
18394 \end_layout
18395
18396 \begin_layout Standard
18397 外部素材を含めることで強力な力を手に入れることができますが、この力とともにセキュリティ上の危険を導入してしまわないように気をつける必要があります。無防備なスクリ
18398 プトのたった一行に入り込んだ、ちょっとしたエラーが、巨大なセキュリティ上の問題に扉を開きうるのです。したがって、もしこの問題を完全に理解していないならば、特定の
18399 ひな型が安全であるかどうか疑問がある際には、知識豊富なセキュリティの専門家か、LyX開発チームに相談してみてください。そしてこの相談は、管理されていない環境下で
18400 これを使用する前に、行うようにしてください。
18401 \end_layout
18402
18403 \end_body
18404 \end_document