]> git.lyx.org Git - lyx.git/blob - lib/doc/ja/Customization.lyx
- Customization.lyx: add new possible font types uuline, strikeout and uwave
[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 CommandInset label
8602 LatexCommand label
8603 name "des:CopyStyle"
8604
8605 \end_inset
8606
8607 [
8608 \begin_inset Flex Code
8609 status collapsed
8610
8611 \begin_layout Plain Layout
8612 文字列
8613 \end_layout
8614
8615 \end_inset
8616
8617 ] 既存の様式から、すべての機能を現在の様式にコピーします。
8618 \end_layout
8619
8620 \begin_layout Description
8621 \begin_inset Flex Code
8622 status collapsed
8623
8624 \begin_layout Plain Layout
8625 DependsOn
8626 \end_layout
8627
8628 \end_inset
8629
8630  この
8631 \emph on
8632 前に
8633 \emph default
8634 プリアンブルを出力させる様式名。マクロ定義がお互いに依存関係にある場合に、プリアンブルの断片の順序を確実にするためのものです
8635 \begin_inset Foot
8636 status collapsed
8637
8638 \begin_layout Plain Layout
8639 この機能以外には、プリアンブルの順序を確定する方法はないことに注意してください。LyXの特定のバージョンで観察された順序は、将来のバージョンで警告なしに変わる可
8640 能性があります。
8641 \end_layout
8642
8643 \end_inset
8644
8645
8646 \end_layout
8647
8648 \begin_layout Description
8649 \begin_inset Flex Code
8650 status collapsed
8651
8652 \begin_layout Plain Layout
8653 EndLabeltype
8654 \end_layout
8655
8656 \end_inset
8657
8658  [
8659 \begin_inset Flex Code
8660 status collapsed
8661
8662 \begin_layout Plain Layout
8663
8664 \emph on
8665 No_Label
8666 \emph default
8667 , Box, Filled_Box, Static
8668 \end_layout
8669
8670 \end_inset
8671
8672 ] 段落の最後(あるいは
8673 \begin_inset Flex Code
8674 status collapsed
8675
8676 \begin_layout Plain Layout
8677 LatexType
8678 \end_layout
8679
8680 \end_inset
8681
8682 が、
8683 \begin_inset Flex Code
8684 status collapsed
8685
8686 \begin_layout Plain Layout
8687 Environment
8688 \end_layout
8689
8690 \end_inset
8691
8692
8693 \begin_inset Flex Code
8694 status collapsed
8695
8696 \begin_layout Plain Layout
8697 Item_Environment
8698 \end_layout
8699
8700 \end_inset
8701
8702
8703 \begin_inset Flex Code
8704 status collapsed
8705
8706 \begin_layout Plain Layout
8707 List_Environment
8708 \end_layout
8709
8710 \end_inset
8711
8712 のいずれかの場合は、段落群の最後)に置くラベル。
8713 \begin_inset Flex Code
8714 status collapsed
8715
8716 \begin_layout Plain Layout
8717 No_Label
8718 \end_layout
8719
8720 \end_inset
8721
8722 の場合は「何もない」ことを指し、
8723 \begin_inset Flex Code
8724 status collapsed
8725
8726 \begin_layout Plain Layout
8727 Box
8728 \end_layout
8729
8730 \end_inset
8731
8732 (あるいは
8733 \begin_inset Flex Code
8734 status collapsed
8735
8736 \begin_layout Plain Layout
8737 Filled_Box
8738 \end_layout
8739
8740 \end_inset
8741
8742 )の場合は、証明終了マーカ用の白い箱型(あるいは黒い箱型)を指し、
8743 \begin_inset Flex Code
8744 status collapsed
8745
8746 \begin_layout Plain Layout
8747 Static
8748 \end_layout
8749
8750 \end_inset
8751
8752 は明示したテキスト文字列を指します。
8753 \end_layout
8754
8755 \begin_layout Description
8756 \begin_inset Flex Code
8757 status collapsed
8758
8759 \begin_layout Plain Layout
8760 EndLabelString
8761 \end_layout
8762
8763 \end_inset
8764
8765  [
8766 \begin_inset Flex Code
8767 status collapsed
8768
8769 \begin_layout Plain Layout
8770 文字列=""
8771 \end_layout
8772
8773 \end_inset
8774
8775
8776 \begin_inset Flex Code
8777 status collapsed
8778
8779 \begin_layout Plain Layout
8780 Static
8781 \end_layout
8782
8783 \end_inset
8784
8785
8786 \begin_inset Flex Code
8787 status collapsed
8788
8789 \begin_layout Plain Layout
8790 EndLabelType
8791 \end_layout
8792
8793 \end_inset
8794
8795 のラベルで用いる文字列。
8796 \end_layout
8797
8798 \begin_layout Description
8799 \begin_inset Flex Code
8800 status collapsed
8801
8802 \begin_layout Plain Layout
8803 Fill_Bottom
8804 \end_layout
8805
8806 \end_inset
8807
8808  [
8809 \begin_inset Flex Code
8810 status collapsed
8811
8812 \begin_layout Plain Layout
8813
8814 \emph on
8815 0
8816 \emph default
8817 ,1
8818 \end_layout
8819
8820 \end_inset
8821
8822
8823 \begin_inset Flex Code
8824 status collapsed
8825
8826 \begin_layout Plain Layout
8827 Fill_Top
8828 \end_layout
8829
8830 \end_inset
8831
8832 と同様。
8833 \end_layout
8834
8835 \begin_layout Description
8836 \begin_inset Flex Code
8837 status collapsed
8838
8839 \begin_layout Plain Layout
8840 Fill_Top
8841 \end_layout
8842
8843 \end_inset
8844
8845  [
8846 \begin_inset Flex Code
8847 status collapsed
8848
8849 \begin_layout Plain Layout
8850
8851 \emph on
8852 0
8853 \emph default
8854 ,1
8855 \end_layout
8856
8857 \end_inset
8858
8859 ] このパラメータは、この様式で段落を初期化する際に設定される、
8860 \begin_inset Flex MenuItem
8861 status collapsed
8862
8863 \begin_layout Plain Layout
8864 編集\SpecialChar \menuseparator
8865 段落設定
8866 \end_layout
8867
8868 \end_inset
8869
8870 ダイアログの「上部垂直余白」リストの
8871 \begin_inset Flex MenuItem
8872 status collapsed
8873
8874 \begin_layout Plain Layout
8875 Fill
8876 \end_layout
8877
8878 \end_inset
8879
8880 値を設定します
8881 \begin_inset Foot
8882 status collapsed
8883
8884 \begin_layout Plain Layout
8885
8886 \emph on
8887 Jean-Marcによる註
8888 \emph default
8889 :この設定にどれほど使途があるかは定かでなく、おそらく将来のバージョンで取り除かれます。
8890 \end_layout
8891
8892 \end_inset
8893
8894  。
8895 \end_layout
8896
8897 \begin_layout Description
8898 \begin_inset Flex Code
8899 status collapsed
8900
8901 \begin_layout Plain Layout
8902 Font
8903 \end_layout
8904
8905 \end_inset
8906
8907  本文テキストとラベルの
8908 \emph on
8909 両方で
8910 \emph default
8911 用いられるフォント。第
8912 \begin_inset CommandInset ref
8913 LatexCommand ref
8914 reference "sub:フォント指定"
8915
8916 \end_inset
8917
8918 節を参照。このフォントを定義すると、自動的に
8919 \begin_inset Flex Code
8920 status collapsed
8921
8922 \begin_layout Plain Layout
8923 LabelFont
8924 \end_layout
8925
8926 \end_inset
8927
8928 も同じ値で定義されることに注意してください。したがって、
8929 \begin_inset Flex Code
8930 status collapsed
8931
8932 \begin_layout Plain Layout
8933 LabelFont
8934 \end_layout
8935
8936 \end_inset
8937
8938 も同時に定義したい場合には、これを先に定義してください。
8939 \end_layout
8940
8941 \begin_layout Description
8942 \begin_inset Flex Code
8943 status collapsed
8944
8945 \begin_layout Plain Layout
8946 FreeSpacing
8947 \end_layout
8948
8949 \end_inset
8950
8951  
8952 \begin_inset CommandInset label
8953 LatexCommand label
8954 name "des:FreeSpacing"
8955
8956 \end_inset
8957
8958 [
8959 \emph on
8960
8961 \begin_inset Flex Code
8962 status collapsed
8963
8964 \begin_layout Plain Layout
8965 0
8966 \end_layout
8967
8968 \end_inset
8969
8970
8971 \emph default
8972
8973 \begin_inset Flex Code
8974 status collapsed
8975
8976 \begin_layout Plain Layout
8977 1
8978 \end_layout
8979
8980 \end_inset
8981
8982 ] LyXは、空白をそれ自体文字や記号ではなく、2つの単語の間の分割子として捉えているため、単語間に2つ以上の空白を入れることは、通常許可していません。これ自体
8983 はとても素晴らしいことですが、たとえばプログラムコードや生のLaTeXコードを入力しようとするときなどに、煩わしくなることがあります。このことから、
8984 \begin_inset Flex Code
8985 status collapsed
8986
8987 \begin_layout Plain Layout
8988 FreeSpacing
8989 \end_layout
8990
8991 \end_inset
8992
8993 を有効にすることが認められています。LyXは、LaTeXモード以外では2つめ以降の空白には、保護された空白を使用することに注意してください。
8994 \end_layout
8995
8996 \begin_layout Description
8997 \begin_inset Flex Code
8998 status collapsed
8999
9000 \begin_layout Plain Layout
9001 HTML*
9002 \end_layout
9003
9004 \end_inset
9005
9006  これらのタグは、XHTML出力で使用されます。第
9007 \begin_inset CommandInset ref
9008 LatexCommand ref
9009 reference "sub:段落様式-XHTML"
9010
9011 \end_inset
9012
9013 節をご覧ください。
9014 \end_layout
9015
9016 \begin_layout Description
9017 \begin_inset Flex Code
9018 status collapsed
9019
9020 \begin_layout Plain Layout
9021 InnerTag
9022 \end_layout
9023
9024 \end_inset
9025
9026  [[FIXME]] (XML型書式でのみ使用されます。)
9027 \end_layout
9028
9029 \begin_layout Description
9030 \begin_inset Flex Code
9031 status collapsed
9032
9033 \begin_layout Plain Layout
9034 InTitle
9035 \end_layout
9036
9037 \end_inset
9038
9039  
9040 \begin_inset Flex Code
9041 status collapsed
9042
9043 \begin_layout Plain Layout
9044 [1, 0]
9045 \end_layout
9046
9047 \end_inset
9048
9049  1の場合、このレイアウトをタイトルブロックの一部としてマークします(大域項目の
9050 \begin_inset Flex Code
9051 status collapsed
9052
9053 \begin_layout Plain Layout
9054 TitleLatexType
9055 \end_layout
9056
9057 \end_inset
9058
9059
9060 \begin_inset Flex Code
9061 status collapsed
9062
9063 \begin_layout Plain Layout
9064 TitleLatexName
9065 \end_layout
9066
9067 \end_inset
9068
9069 も参照)。
9070 \end_layout
9071
9072 \begin_layout Description
9073 \begin_inset Flex Code
9074 status collapsed
9075
9076 \begin_layout Plain Layout
9077 ItemSep
9078 \end_layout
9079
9080 \end_inset
9081
9082  [
9083 \begin_inset Flex Code
9084 status collapsed
9085
9086 \begin_layout Plain Layout
9087 浮動小数点型=0
9088 \end_layout
9089
9090 \end_inset
9091
9092 ] これは、同じレイアウトを持つ段落群の間に追加する空白を与えるものです。複数のレイアウトを一つの環境に入れると、それぞれのレイアウトは、その環境の
9093 \begin_inset Flex Code
9094 status collapsed
9095
9096 \begin_layout Plain Layout
9097 Parsep
9098 \end_layout
9099
9100 \end_inset
9101
9102 だけ分離されます。しかし、その環境の項目全体は、さらにこの
9103 \begin_inset Flex Code
9104 status collapsed
9105
9106 \begin_layout Plain Layout
9107 Itemsep
9108 \end_layout
9109
9110 \end_inset
9111
9112 分だけ離されます。これは
9113 \emph on
9114 乗数
9115 \emph default
9116 であることに注意してください。
9117 \end_layout
9118
9119 \begin_layout Description
9120 \begin_inset Flex Code
9121 status collapsed
9122
9123 \begin_layout Plain Layout
9124 ItemTag
9125 \end_layout
9126
9127 \end_inset
9128
9129  [[FIXME]] (XML型書式でのみ使用されます。)
9130 \end_layout
9131
9132 \begin_layout Description
9133 \begin_inset Flex Code
9134 status collapsed
9135
9136 \begin_layout Plain Layout
9137 KeepEmpty
9138 \end_layout
9139
9140 \end_inset
9141
9142  
9143 \begin_inset CommandInset label
9144 LatexCommand label
9145 name "des:KeepEmpty"
9146
9147 \end_inset
9148
9149 [
9150 \emph on
9151
9152 \begin_inset Flex Code
9153 status collapsed
9154
9155 \begin_layout Plain Layout
9156 0
9157 \end_layout
9158
9159 \end_inset
9160
9161
9162 \emph default
9163
9164 \begin_inset Flex Code
9165 status collapsed
9166
9167 \begin_layout Plain Layout
9168 1
9169 \end_layout
9170
9171 \end_inset
9172
9173 ] 段落を空のままにすると、LaTeX出力が空になってしまうので、通常、LyXは段落を空にすることを許可しません。しかしながら、これを無効にすることが望ましい場
9174 合が存在します。たとえば、書簡のひな型では、必須フィールドを人々が忘れないように、空のフィールドのまま提供する手もあります。特別なクラスにおいては、レイアウトを
9175 実際には文章を含まないある種の改行として使用することもあります。
9176 \end_layout
9177
9178 \begin_layout Description
9179 \begin_inset Flex Code
9180 status collapsed
9181
9182 \begin_layout Plain Layout
9183 LabelBottomsep
9184 \end_layout
9185
9186 \end_inset
9187
9188  [
9189 \begin_inset Flex Code
9190 status collapsed
9191
9192 \begin_layout Plain Layout
9193 浮動小数点型=0
9194 \end_layout
9195
9196 \end_inset
9197
9198 ] ラベルと本文テキストとの間の垂直余白。本文テキストの上に来るラベルにのみ使用されます(
9199 \begin_inset Flex Code
9200 status collapsed
9201
9202 \begin_layout Plain Layout
9203 Top_Environment
9204 \end_layout
9205
9206 \end_inset
9207
9208 および
9209 \begin_inset Newline linebreak
9210 \end_inset
9211
9212
9213 \begin_inset Flex Code
9214 status collapsed
9215
9216 \begin_layout Plain Layout
9217 Centered_Top_Environment
9218 \end_layout
9219
9220 \end_inset
9221
9222 )。
9223 \end_layout
9224
9225 \begin_layout Description
9226 \begin_inset Flex Code
9227 status collapsed
9228
9229 \begin_layout Plain Layout
9230 LabelCounter
9231 \end_layout
9232
9233 \end_inset
9234
9235  [
9236 \begin_inset Flex Code
9237 status collapsed
9238
9239 \begin_layout Plain Layout
9240 文字列=""
9241 \end_layout
9242
9243 \end_inset
9244
9245 ]
9246 \begin_inset Newline newline
9247 \end_inset
9248
9249 自動連番に使われるカウンタ名(詳しくは第
9250 \begin_inset CommandInset ref
9251 LatexCommand ref
9252 reference "sub:カウンタ"
9253
9254 \end_inset
9255
9256 節参照)。
9257 \begin_inset Newline newline
9258 \end_inset
9259
9260
9261 \begin_inset Flex Code
9262 status collapsed
9263
9264 \begin_layout Plain Layout
9265 LabelType
9266 \end_layout
9267
9268 \end_inset
9269
9270
9271 \begin_inset Flex Code
9272 status collapsed
9273
9274 \begin_layout Plain Layout
9275 Counter
9276 \end_layout
9277
9278 \end_inset
9279
9280 型のときには、本項目は
9281 \emph on
9282 必須
9283 \emph default
9284 です。この場合には、この様式が出現するたびにカウンタが増えます。
9285 \begin_inset Newline newline
9286 \end_inset
9287
9288 また、
9289 \begin_inset Flex Code
9290 status collapsed
9291
9292 \begin_layout Plain Layout
9293 LabelType
9294 \end_layout
9295
9296 \end_inset
9297
9298
9299 \begin_inset Flex Code
9300 status collapsed
9301
9302 \begin_layout Plain Layout
9303 Enumerate
9304 \end_layout
9305
9306 \end_inset
9307
9308 型のときにも、若干複雑にはなりますが、本項目を使うことができます。たとえば、「
9309 \begin_inset Flex Code
9310 status collapsed
9311
9312 \begin_layout Plain Layout
9313 LabelCounter myenum
9314 \end_layout
9315
9316 \end_inset
9317
9318 」と宣言したものとしましょう。すると、LaTeXにおけるのと同様、実際に使われるカウンタは、
9319 \begin_inset Flex Code
9320 status collapsed
9321
9322 \begin_layout Plain Layout
9323 myenumi
9324 \end_layout
9325
9326 \end_inset
9327
9328
9329 \begin_inset Flex Code
9330 status collapsed
9331
9332 \begin_layout Plain Layout
9333 myenumii
9334 \end_layout
9335
9336 \end_inset
9337
9338
9339 \begin_inset Flex Code
9340 status collapsed
9341
9342 \begin_layout Plain Layout
9343 myenumii
9344 \end_layout
9345
9346 \end_inset
9347
9348
9349 \begin_inset Flex Code
9350 status collapsed
9351
9352 \begin_layout Plain Layout
9353 myenumiv
9354 \end_layout
9355
9356 \end_inset
9357
9358 のようになります。これらのカウンタは、全て別々に宣言されなくてはなりません。
9359 \begin_inset Newline newline
9360 \end_inset
9361
9362 カウンタの詳細については、第
9363 \begin_inset CommandInset ref
9364 LatexCommand ref
9365 reference "sub:カウンタ"
9366
9367 \end_inset
9368
9369 節をご覧ください。
9370 \end_layout
9371
9372 \begin_layout Description
9373 \begin_inset Flex Code
9374 status collapsed
9375
9376 \begin_layout Plain Layout
9377 LabelFont
9378 \end_layout
9379
9380 \end_inset
9381
9382  ラベルに使用されるフォント。第
9383 \begin_inset CommandInset ref
9384 LatexCommand ref
9385 reference "sub:フォント指定"
9386
9387 \end_inset
9388
9389 節を参照。
9390 \end_layout
9391
9392 \begin_layout Description
9393 \begin_inset Flex Code
9394 status collapsed
9395
9396 \begin_layout Plain Layout
9397 LabelIndent
9398 \end_layout
9399
9400 \end_inset
9401
9402  ラベルをどれくらい行頭下げすべきかを示す文字列。
9403 \end_layout
9404
9405 \begin_layout Description
9406 \begin_inset Flex Code
9407 status collapsed
9408
9409 \begin_layout Plain Layout
9410 Labelsep
9411 \end_layout
9412
9413 \end_inset
9414
9415  [
9416 \begin_inset Flex Code
9417 status collapsed
9418
9419 \begin_layout Plain Layout
9420 文字列=""
9421 \end_layout
9422
9423 \end_inset
9424
9425 ] ラベルと本文テキストの間の水平余白。本文テキストの上に来ないラベルにのみ使用されます。
9426 \end_layout
9427
9428 \begin_layout Description
9429 \begin_inset Flex Code
9430 status collapsed
9431
9432 \begin_layout Plain Layout
9433 LabelString
9434 \end_layout
9435
9436 \end_inset
9437
9438  [
9439 \begin_inset Flex Code
9440 status collapsed
9441
9442 \begin_layout Plain Layout
9443 文字列=""
9444 \end_layout
9445
9446 \end_inset
9447
9448
9449 \begin_inset Flex Code
9450 status collapsed
9451
9452 \begin_layout Plain Layout
9453 Static
9454 \end_layout
9455
9456 \end_inset
9457
9458 ラベル型でラベルに使用する文字列。
9459 \begin_inset Flex Code
9460 status collapsed
9461
9462 \begin_layout Plain Layout
9463 LabelCounter
9464 \end_layout
9465
9466 \end_inset
9467
9468 を設定している場合、第
9469 \begin_inset CommandInset ref
9470 LatexCommand ref
9471 reference "sub:カウンタ"
9472
9473 \end_inset
9474
9475 節に述べられている特別な整形コマンドを含めることができます
9476 \begin_inset Foot
9477 status collapsed
9478
9479 \begin_layout Plain Layout
9480 後方互換性のために、
9481 \begin_inset Flex Code
9482 status collapsed
9483
9484 \begin_layout Plain Layout
9485 @
9486 \emph on
9487 style-name
9488 \emph default
9489 @
9490 \end_layout
9491
9492 \end_inset
9493
9494 という文字列は、
9495 \begin_inset Flex Code
9496 status collapsed
9497
9498 \begin_layout Plain Layout
9499
9500 \emph on
9501 style-name
9502 \end_layout
9503
9504 \end_inset
9505
9506 様式の
9507 \begin_inset Flex Code
9508 status collapsed
9509
9510 \begin_layout Plain Layout
9511 LabelString
9512 \end_layout
9513
9514 \end_inset
9515
9516 を展開したものに置換されます。この機能は既に廃されたものとなっているので、第
9517 \begin_inset CommandInset ref
9518 LatexCommand ref
9519 reference "sub:カウンタ"
9520
9521 \end_inset
9522
9523 節の機構に置き換えられなくてはなりません。
9524 \end_layout
9525
9526 \end_inset
9527
9528
9529 \end_layout
9530
9531 \begin_layout Description
9532 \begin_inset Flex Code
9533 status collapsed
9534
9535 \begin_layout Plain Layout
9536 LabelStringAppendix
9537 \end_layout
9538
9539 \end_inset
9540
9541  [
9542 \begin_inset Flex Code
9543 status collapsed
9544
9545 \begin_layout Plain Layout
9546 文字列=""
9547 \end_layout
9548
9549 \end_inset
9550
9551 ] これは付録の中で
9552 \begin_inset Flex Code
9553 status collapsed
9554
9555 \begin_layout Plain Layout
9556 LabelString
9557 \end_layout
9558
9559 \end_inset
9560
9561 の代わりに用いられます。各
9562 \begin_inset Flex Code
9563 status collapsed
9564
9565 \begin_layout Plain Layout
9566 LabelString
9567 \end_layout
9568
9569 \end_inset
9570
9571 ステートメントは、
9572 \begin_inset Flex Code
9573 status collapsed
9574
9575 \begin_layout Plain Layout
9576 LabelStringAppendix
9577 \end_layout
9578
9579 \end_inset
9580
9581 をもリセットすることに注意してください。
9582 \end_layout
9583
9584 \begin_layout Description
9585 \begin_inset Flex Code
9586 status collapsed
9587
9588 \begin_layout Plain Layout
9589 LabelTag
9590 \end_layout
9591
9592 \end_inset
9593
9594  [FIXME] (XML型書式でのみ使用されます。)
9595 \end_layout
9596
9597 \begin_layout Description
9598 \begin_inset Flex Code
9599 status collapsed
9600
9601 \begin_layout Plain Layout
9602 LabelType
9603 \end_layout
9604
9605 \end_inset
9606
9607  [
9608 \begin_inset Flex Code
9609 status collapsed
9610
9611 \begin_layout Plain Layout
9612
9613 \emph on
9614 No_Label
9615 \emph default
9616 , Manual, Static, Top_Environment, Centered_Top_Environment, Counter, Sensitive,
9617  Enumerate, Itemize, Bibliography
9618 \end_layout
9619
9620 \end_inset
9621
9622 ]
9623 \end_layout
9624
9625 \begin_deeper
9626 \begin_layout Itemize
9627 \begin_inset Flex Code
9628 status collapsed
9629
9630 \begin_layout Plain Layout
9631 Manual
9632 \end_layout
9633
9634 \end_inset
9635
9636 は、ラベルが最初の単語(最初の本当の空白まで)であることを示します。ラベルに2単語以上使用したいときは、保護された空白を使用してください。
9637 \end_layout
9638
9639 \begin_layout Itemize
9640 \begin_inset Flex Code
9641 status collapsed
9642
9643 \begin_layout Plain Layout
9644 Static
9645 \end_layout
9646
9647 \end_inset
9648
9649 は、ラベルが
9650 \begin_inset Flex Code
9651 status collapsed
9652
9653 \begin_layout Plain Layout
9654 LabelString
9655 \end_layout
9656
9657 \end_inset
9658
9659 で宣言したものであることを示します。これは「静的」であることに注意してください。
9660 \end_layout
9661
9662 \begin_layout Itemize
9663 \begin_inset Flex Code
9664 status collapsed
9665
9666 \begin_layout Plain Layout
9667 Top_Environment
9668 \end_layout
9669
9670 \end_inset
9671
9672
9673 \begin_inset Flex Code
9674 status collapsed
9675
9676 \begin_layout Plain Layout
9677 Centered_Top_Environment
9678 \end_layout
9679
9680 \end_inset
9681
9682 は、
9683 \begin_inset Flex Code
9684 status collapsed
9685
9686 \begin_layout Plain Layout
9687 Static
9688 \end_layout
9689
9690 \end_inset
9691
9692 の特別な場合です。ラベルは段落の上に印字されるのですが、それは単一の環境の上か、このレイアウトを持つ連続した段落群の上だけに印字されます。たとえば、
9693 \begin_inset Flex MenuItem
9694 status collapsed
9695
9696 \begin_layout Plain Layout
9697 Abstract
9698 \end_layout
9699
9700 \end_inset
9701
9702 レイアウトが使用したりします。
9703 \end_layout
9704
9705 \begin_layout Itemize
9706 \begin_inset Flex Code
9707 status collapsed
9708
9709 \begin_layout Plain Layout
9710 Sensitive
9711 \end_layout
9712
9713 \end_inset
9714
9715 はキャプションラベルの「図」や「表」の特別な場合です。
9716 \begin_inset Flex Code
9717 status collapsed
9718
9719 \begin_layout Plain Layout
9720 Sensitive
9721 \end_layout
9722
9723 \end_inset
9724
9725 は、(ハードコードされた)ラベル文字列がフロートの種類に依存することを示します。これは、フロートに関連付けられたカウンタの値がNであるものとすると、「Float
9726 Type N」にハードコードされています。
9727 \end_layout
9728
9729 \begin_layout Itemize
9730 \begin_inset Flex Code
9731 status collapsed
9732
9733 \begin_layout Plain Layout
9734 Counter
9735 \end_layout
9736
9737 \end_inset
9738
9739 ラベル型は、自動的に連番が付されるラベルを定義します。
9740 \begin_inset Flex Code
9741 status collapsed
9742
9743 \begin_layout Plain Layout
9744 LabelString
9745 \end_layout
9746
9747 \end_inset
9748
9749 は、それが含むカウンタ参照をすべて解決するために展開されます。これは、たとえば
9750 \begin_inset Flex Code
9751 status collapsed
9752
9753 \begin_layout Plain Layout
9754 Section 
9755 \backslash
9756 thechapter.
9757 \backslash
9758 thesection
9759 \end_layout
9760
9761 \end_inset
9762
9763 のようになります。第
9764 \begin_inset CommandInset ref
9765 LatexCommand ref
9766 reference "sub:カウンタ"
9767
9768 \end_inset
9769
9770 節を参照してください。
9771 \end_layout
9772
9773 \begin_layout Itemize
9774 \begin_inset Flex Code
9775 status collapsed
9776
9777 \begin_layout Plain Layout
9778 Enumerate
9779 \end_layout
9780
9781 \end_inset
9782
9783 は、通常の連番ラベルを生成します。現在のところ、これは、第4階層まで順に、アラビア数字・小文字・小文字ローマ数字・大文字を使用するようにハードコードされています
9784
9785 \end_layout
9786
9787 \begin_layout Itemize
9788 \begin_inset Flex Code
9789 status collapsed
9790
9791 \begin_layout Plain Layout
9792 Itemize
9793 \end_layout
9794
9795 \end_inset
9796
9797 は、各階層でさまざまなブリットを生成します。これもハードコードされています。
9798 \end_layout
9799
9800 \begin_layout Itemize
9801 \begin_inset Flex Code
9802 status collapsed
9803
9804 \begin_layout Plain Layout
9805 Bibliography
9806 \end_layout
9807
9808 \end_inset
9809
9810 は、LyXで内部的に使用され、
9811 \begin_inset Flex Code
9812 status collapsed
9813
9814 \begin_layout Plain Layout
9815 LatexType BibEnvironment
9816 \end_layout
9817
9818 \end_inset
9819
9820 とともにのみ使用されます。
9821 \end_layout
9822
9823 \end_deeper
9824 \begin_layout Description
9825 \begin_inset Flex Code
9826 status collapsed
9827
9828 \begin_layout Plain Layout
9829 LangPreamble
9830 \end_layout
9831
9832 \end_inset
9833
9834  これは、この様式で既に出現した
9835 \begin_inset Flex Code
9836 status collapsed
9837
9838 \begin_layout Plain Layout
9839 LangPreamble
9840 \end_layout
9841
9842 \end_inset
9843
9844 宣言をすべて、完全に上書きしますので、注意してください。使用法についての詳細は、第
9845 \begin_inset CommandInset ref
9846 LatexCommand ref
9847 reference "sub:段落様式の国際化"
9848
9849 \end_inset
9850
9851 節をご覧ください。
9852 \end_layout
9853
9854 \begin_layout Description
9855 \begin_inset Flex Code
9856 status collapsed
9857
9858 \begin_layout Plain Layout
9859 LatexName
9860 \end_layout
9861
9862 \end_inset
9863
9864  対応するLaTeXの名称です。環境名かコマンド名を指します。
9865 \end_layout
9866
9867 \begin_layout Description
9868 \begin_inset Flex Code
9869 status collapsed
9870
9871 \begin_layout Plain Layout
9872 LatexParam
9873 \end_layout
9874
9875 \end_inset
9876
9877  対応する
9878 \begin_inset Flex Code
9879 status collapsed
9880
9881 \begin_layout Plain Layout
9882 LatexName
9883 \end_layout
9884
9885 \end_inset
9886
9887 の非必須パラメータです。このパラメータは、LyX内部から変更することはできません。
9888 \end_layout
9889
9890 \begin_layout Description
9891 \begin_inset Flex Code
9892 status collapsed
9893
9894 \begin_layout Plain Layout
9895 LatexType
9896 \end_layout
9897
9898 \end_inset
9899
9900  
9901 \begin_inset CommandInset label
9902 LatexCommand label
9903 name "des:LatexType"
9904
9905 \end_inset
9906
9907 [
9908 \begin_inset Flex Code
9909 status collapsed
9910
9911 \begin_layout Plain Layout
9912
9913 \emph on
9914 Paragraph
9915 \emph default
9916 , Command, Environment, Item_Environment,
9917 \end_layout
9918
9919 \end_inset
9920
9921  
9922 \begin_inset Flex Code
9923 status collapsed
9924
9925 \begin_layout Plain Layout
9926 List_Environmen, Bib_Environment
9927 \end_layout
9928
9929 \end_inset
9930
9931 ] レイアウトがどのようにLaTeXに変換されるべきかを示します
9932 \begin_inset Foot
9933 status collapsed
9934
9935 \begin_layout Plain Layout
9936 これらのルールはSGMLクラスにも適用されるので、
9937 \begin_inset Flex Code
9938 status collapsed
9939
9940 \begin_layout Plain Layout
9941 LatexType
9942 \end_layout
9943
9944 \end_inset
9945
9946 の名称は、少しミスリーディングかもしれません。特定の例については、SGMLクラスファイルを見てください。
9947 \end_layout
9948
9949 \end_inset
9950
9951
9952 \end_layout
9953
9954 \begin_deeper
9955 \begin_layout Itemize
9956 \begin_inset Flex Code
9957 status collapsed
9958
9959 \begin_layout Plain Layout
9960 Paragraph
9961 \end_layout
9962
9963 \end_inset
9964
9965 は、何も特別なことは意味しません。
9966 \end_layout
9967
9968 \begin_layout Itemize
9969 \begin_inset Flex Code
9970 status collapsed
9971
9972 \begin_layout Plain Layout
9973 Command
9974 \end_layout
9975
9976 \end_inset
9977
9978 は、
9979 \begin_inset Flex Code
9980 status collapsed
9981
9982 \begin_layout Plain Layout
9983
9984 \backslash
9985
9986 \emph on
9987 LatexName
9988 \emph default
9989 {\SpecialChar \ldots{}
9990 }
9991 \end_layout
9992
9993 \end_inset
9994
9995 を意味します。
9996 \end_layout
9997
9998 \begin_layout Itemize
9999 \begin_inset Flex Code
10000 status collapsed
10001
10002 \begin_layout Plain Layout
10003 Environment
10004 \end_layout
10005
10006 \end_inset
10007
10008 は、
10009 \begin_inset Flex Code
10010 status collapsed
10011
10012 \begin_layout Plain Layout
10013
10014 \backslash
10015 begin{
10016 \emph on
10017 LatexName
10018 \emph default
10019 }\SpecialChar \ldots{}
10020
10021 \backslash
10022 end{
10023 \emph on
10024 LatexName
10025 \emph default
10026 }
10027 \end_layout
10028
10029 \end_inset
10030
10031 を意味します。
10032 \end_layout
10033
10034 \begin_layout Itemize
10035 \begin_inset Flex Code
10036 status collapsed
10037
10038 \begin_layout Plain Layout
10039 Item_Environment
10040 \end_layout
10041
10042 \end_inset
10043
10044
10045 \begin_inset Flex Code
10046 status collapsed
10047
10048 \begin_layout Plain Layout
10049 Environment
10050 \end_layout
10051
10052 \end_inset
10053
10054 と同じですが、
10055 \begin_inset Flex Code
10056 status collapsed
10057
10058 \begin_layout Plain Layout
10059
10060 \backslash
10061 item
10062 \end_layout
10063
10064 \end_inset
10065
10066 がこの環境のすべての段落に付けられるところだけが異なっています。
10067 \end_layout
10068
10069 \begin_layout Itemize
10070 \begin_inset Flex Code
10071 status collapsed
10072
10073 \begin_layout Plain Layout
10074 List_Environment
10075 \end_layout
10076
10077 \end_inset
10078
10079
10080 \begin_inset Flex Code
10081 status collapsed
10082
10083 \begin_layout Plain Layout
10084 Item_Environment
10085 \end_layout
10086
10087 \end_inset
10088
10089 と同じですが、
10090 \begin_inset Flex Code
10091 status collapsed
10092
10093 \begin_layout Plain Layout
10094 LabelWidthString
10095 \end_layout
10096
10097 \end_inset
10098
10099 が環境の引数として渡されるところだけが異なっています。
10100 \begin_inset Flex Code
10101 status collapsed
10102
10103 \begin_layout Plain Layout
10104 LabelWidthString
10105 \end_layout
10106
10107 \end_inset
10108
10109 は、
10110 \begin_inset Flex MenuItem
10111 status collapsed
10112
10113 \begin_layout Plain Layout
10114 編集\SpecialChar \menuseparator
10115 段落設定
10116 \end_layout
10117
10118 \end_inset
10119
10120 ダイアログで定義することができます。
10121 \end_layout
10122
10123 \begin_layout Standard
10124 上記最後のいくつかをまとめると、LaTeX出力は、LaTeX型に依存して
10125 \end_layout
10126
10127 \begin_layout LyX-Code
10128
10129 \backslash
10130 latexname[latexparam]{\SpecialChar \ldots{}
10131 }
10132 \end_layout
10133
10134 \begin_layout Standard
10135 のようになるか、
10136 \end_layout
10137
10138 \begin_layout LyX-Code
10139
10140 \backslash
10141 begin{latexname}[latexparam] \SpecialChar \ldots{}
10142  
10143 \backslash
10144 end{latexname}.
10145 \end_layout
10146
10147 \begin_layout Standard
10148 となります。
10149 \end_layout
10150
10151 \end_deeper
10152 \begin_layout Description
10153 \begin_inset Flex Code
10154 status collapsed
10155
10156 \begin_layout Plain Layout
10157 LeftMargin
10158 \end_layout
10159
10160 \end_inset
10161
10162  [
10163 \begin_inset Flex Code
10164 status collapsed
10165
10166 \begin_layout Plain Layout
10167 文字列=""
10168 \end_layout
10169
10170 \end_inset
10171
10172 ] レイアウトを環境の中に入れた場合、左余白は単純に加えられるのではなく、因子
10173 \begin_inset Formula $\frac{4}{depth+4}$
10174 \end_inset
10175
10176 をかけて加えられます。このパラメータは、
10177 \begin_inset Flex Code
10178 status collapsed
10179
10180 \begin_layout Plain Layout
10181 Margin
10182 \end_layout
10183
10184 \end_inset
10185
10186
10187 \begin_inset Flex Code
10188 status collapsed
10189
10190 \begin_layout Plain Layout
10191 Manual
10192 \end_layout
10193
10194 \end_inset
10195
10196 あるいは
10197 \begin_inset Flex Code
10198 status collapsed
10199
10200 \begin_layout Plain Layout
10201 Dynamic
10202 \end_layout
10203
10204 \end_inset
10205
10206 に設定されているときにも用いられることに注意してください。その場合には、これは手動設定余白または動的設定余白に加えられることに注意してください。
10207 \begin_inset Newline newline
10208 \end_inset
10209
10210 引数は文字列として渡されます。たとえば「
10211 \begin_inset Flex Code
10212 status collapsed
10213
10214 \begin_layout Plain Layout
10215 MM
10216 \end_layout
10217
10218 \end_inset
10219
10220 」と指定すると、段落を通常フォントの「
10221 \begin_inset Flex Code
10222 status collapsed
10223
10224 \begin_layout Plain Layout
10225 MM
10226 \end_layout
10227
10228 \end_inset
10229
10230 」の幅だけ行頭下げを行います。文字列の前に「
10231 \begin_inset Flex Code
10232 status collapsed
10233
10234 \begin_layout Plain Layout
10235 -
10236 \end_layout
10237
10238 \end_inset
10239
10240 」を付けると、負の幅を与えることができます。この方法が採用されたのは、どの画面フォントでも見かけが同じになるようにするためです。
10241 \end_layout
10242
10243 \begin_layout Description
10244 \begin_inset Flex Code
10245 status collapsed
10246
10247 \begin_layout Plain Layout
10248 Margin
10249 \end_layout
10250
10251 \end_inset
10252
10253  [
10254 \begin_inset Flex Code
10255 status collapsed
10256
10257 \begin_layout Plain Layout
10258
10259 \emph on
10260 Static
10261 \emph default
10262 , Manual, Dynamic, First_Dynamic, Right_Address_Box
10263 \end_layout
10264
10265 \end_inset
10266
10267
10268 \begin_inset Newline newline
10269 \end_inset
10270
10271 このレイアウトの左余白の種類です。
10272 \begin_inset Flex Code
10273 status collapsed
10274
10275 \begin_layout Plain Layout
10276 Static
10277 \end_layout
10278
10279 \end_inset
10280
10281 は固定余白を示します。
10282 \begin_inset Flex Code
10283 status collapsed
10284
10285 \begin_layout Plain Layout
10286 Manual
10287 \end_layout
10288
10289 \end_inset
10290
10291 は、左余白が
10292 \begin_inset Flex MenuItem
10293 status collapsed
10294
10295 \begin_layout Plain Layout
10296 編集\SpecialChar \menuseparator
10297 段落設定
10298 \end_layout
10299
10300 \end_inset
10301
10302 ダイアログで入力した文字列によって決められることを示します。これは、タブを用いずに整った一覧表を組むのに使用されます。
10303 \begin_inset Flex Code
10304 status collapsed
10305
10306 \begin_layout Plain Layout
10307 Dynamic
10308 \end_layout
10309
10310 \end_inset
10311
10312 は、余白がラベルの大きさに依存することを示します。これは、自動連番の見出しに使用されます。「5.4.3.2.1 非常に長い見出し」という見出し行が、「3.2
10313  非常に長い見出し」よりも広い左余白(5.4.3.2.1足す空白と同じ幅)を必要とすることは明らかでしょう(標準的「ワープロ」はこんなことはやってくれませんが)。
10314 \begin_inset Flex Code
10315 status collapsed
10316
10317 \begin_layout Plain Layout
10318 First_Dynamic
10319 \end_layout
10320
10321 \end_inset
10322
10323 は似ていますが、段落の最初の行だけがDynamicでその他の行はStaticです。これは、たとえば、箇条書き(記述)に使用されます。
10324 \begin_inset Flex Code
10325 status collapsed
10326
10327 \begin_layout Plain Layout
10328 Right_Address_Box
10329 \end_layout
10330
10331 \end_inset
10332
10333 は、段落中、最も長い行が右余白に合うように余白を選択します。これは、ページの右端に住所を組版するのに用いられます。
10334 \end_layout
10335
10336 \begin_layout Description
10337 \begin_inset Flex Code
10338 status collapsed
10339
10340 \begin_layout Plain Layout
10341 NeedProtect
10342 \end_layout
10343
10344 \end_inset
10345
10346  [
10347 \begin_inset Flex Code
10348 status collapsed
10349
10350 \begin_layout Plain Layout
10351
10352 \emph on
10353 0
10354 \end_layout
10355
10356 \end_inset
10357
10358 ,
10359 \begin_inset Flex Code
10360 status collapsed
10361
10362 \begin_layout Plain Layout
10363 1
10364 \end_layout
10365
10366 \end_inset
10367
10368 ] このレイアウト中の脆弱なコマンドが
10369 \begin_inset Flex Code
10370 status collapsed
10371
10372 \begin_layout Plain Layout
10373
10374 \backslash
10375 protect
10376 \end_layout
10377
10378 \end_inset
10379
10380 されるべきか否か(註:これはこのコマンド自体が
10381 \begin_inset Flex Code
10382 status collapsed
10383
10384 \begin_layout Plain Layout
10385
10386 \backslash
10387 protect
10388 \end_layout
10389
10390 \end_inset
10391
10392 されるべきかでは
10393 \emph on
10394 ありません
10395 \emph default
10396 )。
10397 \end_layout
10398
10399 \begin_layout Description
10400 \begin_inset Flex Code
10401 status collapsed
10402
10403 \begin_layout Plain Layout
10404 Newline
10405 \end_layout
10406
10407 \end_inset
10408
10409  [
10410 \begin_inset Flex Code
10411 status collapsed
10412
10413 \begin_layout Plain Layout
10414 0
10415 \end_layout
10416
10417 \end_inset
10418
10419
10420 \begin_inset Flex Code
10421 status collapsed
10422
10423 \begin_layout Plain Layout
10424
10425 \emph on
10426 1
10427 \end_layout
10428
10429 \end_inset
10430
10431 ] 新規行をLaTeXの新規行(
10432 \begin_inset Flex Code
10433 status collapsed
10434
10435 \begin_layout Plain Layout
10436
10437 \backslash
10438
10439 \backslash
10440
10441 \end_layout
10442
10443 \end_inset
10444
10445 )に変換するか否か。LyX中でLaTeX編集をやりやすくするために、変換は無効にすることができます。
10446 \end_layout
10447
10448 \begin_layout Description
10449 \begin_inset Flex Code
10450 status collapsed
10451
10452 \begin_layout Plain Layout
10453 NextNoIndent
10454 \end_layout
10455
10456 \end_inset
10457
10458  [
10459 \begin_inset Flex Code
10460 status collapsed
10461
10462 \begin_layout Plain Layout
10463 1
10464 \end_layout
10465
10466 \end_inset
10467
10468
10469 \begin_inset Flex Code
10470 status collapsed
10471
10472 \begin_layout Plain Layout
10473
10474 \emph on
10475 0
10476 \end_layout
10477
10478 \end_inset
10479
10480 ] 次の段落に最初の行の行頭下げを許すか否か。
10481 \begin_inset Flex Code
10482 status collapsed
10483
10484 \begin_layout Plain Layout
10485 1
10486 \end_layout
10487
10488 \end_inset
10489
10490 は許可しないことを意味し、
10491 \begin_inset Flex Code
10492 status collapsed
10493
10494 \begin_layout Plain Layout
10495 0
10496 \end_layout
10497
10498 \end_inset
10499
10500 は望むならば行頭下げできることを意味します。
10501 \end_layout
10502
10503 \begin_layout Description
10504 \begin_inset Flex Code
10505 status collapsed
10506
10507 \begin_layout Plain Layout
10508 ObsoletedBy
10509 \end_layout
10510
10511 \end_inset
10512
10513  このレイアウトが置き換えられたレイアウト名。これは、後方互換性を維持しながら、レイアウトの名称を変更するのに使用されます。
10514 \end_layout
10515
10516 \begin_layout Description
10517 \begin_inset Flex Code
10518 status collapsed
10519
10520 \begin_layout Plain Layout
10521 OptionalArgs
10522 \end_layout
10523
10524 \end_inset
10525
10526  [
10527 \begin_inset Flex Code
10528 status collapsed
10529
10530 \begin_layout Plain Layout
10531 整数型=0
10532 \end_layout
10533
10534 \end_inset
10535
10536 ] このレイアウトに使用することのできる非必須引数の数。節見出しのようなものに有用であり、LaTeXでのみ意味を持ちます。出力時には、非必須引数は、すべての必須
10537 引数の前に来ることに注意してください(以下参照)。つまり、
10538 \end_layout
10539
10540 \begin_deeper
10541 \begin_layout LyX-Code
10542
10543 \backslash
10544 mycmd[非必須引数1]{必須引数1}{段落の内容}
10545 \end_layout
10546
10547 \begin_layout Standard
10548 のようなコマンドは生成できますが、
10549 \end_layout
10550
10551 \begin_layout LyX-Code
10552
10553 \backslash
10554 mycmd[非必須引数1]{必須引数1}[非必須引数2]{段落の内容}
10555 \end_layout
10556
10557 \begin_layout Standard
10558 のようなコマンドは、TeXコード(これを使えば何でもできます)を使用することなしには、生成することができません。
10559 \end_layout
10560
10561 \end_deeper
10562 \begin_layout Description
10563 \begin_inset Flex Code
10564 status collapsed
10565
10566 \begin_layout Plain Layout
10567 ParbreakIsNewline
10568 \end_layout
10569
10570 \end_inset
10571
10572
10573 \begin_inset CommandInset label
10574 LatexCommand label
10575 name "des:ParbreakIsNewline"
10576
10577 \end_inset
10578
10579  [
10580 \begin_inset Flex Code
10581 status collapsed
10582
10583 \begin_layout Plain Layout
10584
10585 \emph on
10586 0
10587 \end_layout
10588
10589 \end_inset
10590
10591
10592 \begin_inset Flex Code
10593 status collapsed
10594
10595 \begin_layout Plain Layout
10596 1
10597 \end_layout
10598
10599 \end_inset
10600
10601 ] LaTeX出力中で、段落を空行ではなく、改行で区切るよう指定します。
10602 \begin_inset Flex Code
10603 status collapsed
10604
10605 \begin_layout Plain Layout
10606 PassThru 1
10607 \end_layout
10608
10609 \end_inset
10610
10611 と併用すれば、(TeXコードを使用したときのように)テキストエディタをエミュレートすることができます。
10612 \end_layout
10613
10614 \begin_layout Description
10615 \begin_inset Flex Code
10616 status collapsed
10617
10618 \begin_layout Plain Layout
10619 ParIndent
10620 \end_layout
10621
10622 \end_inset
10623
10624  [
10625 \begin_inset Flex Code
10626 status collapsed
10627
10628 \begin_layout Plain Layout
10629 文字列=""
10630 \end_layout
10631
10632 \end_inset
10633
10634 ] 段落の最初の行の行頭下げ。レイアウトによっては
10635 \begin_inset Flex Code
10636 status collapsed
10637
10638 \begin_layout Plain Layout
10639 Parindent
10640 \end_layout
10641
10642 \end_inset
10643
10644 は固定されています。例外には標準レイアウトがあり、標準レイアウトの段落の行頭下げは、
10645 \begin_inset Flex Code
10646 status collapsed
10647
10648 \begin_layout Plain Layout
10649 NextNoIndent
10650 \end_layout
10651
10652 \end_inset
10653
10654 で禁止することができるようになっています。また、環境中の標準レイアウト段落は、当該段落の
10655 \begin_inset Flex Code
10656 status collapsed
10657
10658 \begin_layout Plain Layout
10659 Parindent
10660 \end_layout
10661
10662 \end_inset
10663
10664 ではなく、この環境の
10665 \begin_inset Flex Code
10666 status collapsed
10667
10668 \begin_layout Plain Layout
10669 Parindent
10670 \end_layout
10671
10672 \end_inset
10673
10674 を使用します。たとえば、箇条書き(連番)内の標準段落は、行頭下げされません。
10675 \end_layout
10676
10677 \begin_layout Description
10678 \begin_inset Flex Code
10679 status collapsed
10680
10681 \begin_layout Plain Layout
10682 Parsep
10683 \end_layout
10684
10685 \end_inset
10686
10687  [
10688 \begin_inset Flex Code
10689 status collapsed
10690
10691 \begin_layout Plain Layout
10692 浮動小数点型=0
10693 \end_layout
10694
10695 \end_inset
10696
10697 ] このレイアウトの2段落間の垂直余白。
10698 \end_layout
10699
10700 \begin_layout Description
10701 \begin_inset Flex Code
10702 status collapsed
10703
10704 \begin_layout Plain Layout
10705 Parskip
10706 \end_layout
10707
10708 \end_inset
10709
10710  [
10711 \begin_inset Flex Code
10712 status collapsed
10713
10714 \begin_layout Plain Layout
10715 浮動小数点型=0
10716 \end_layout
10717
10718 \end_inset
10719
10720 ] LyXでは、文書を組版するのに、ユーザが「行頭下げ」か「スキップ」を選ぶことができます。「行頭下げ」を選択した際には、この値は完全に無視されます。「スキップ
10721 」を選択した際には、LaTeX型「段落」レイアウトの
10722 \begin_inset Flex Code
10723 status collapsed
10724
10725 \begin_layout Plain Layout
10726 ParIndent
10727 \end_layout
10728
10729 \end_inset
10730
10731 は無視され、すべての段落はこの
10732 \begin_inset Flex Code
10733 status collapsed
10734
10735 \begin_layout Plain Layout
10736 Parskip
10737 \end_layout
10738
10739 \end_inset
10740
10741 引数分だけ引き離されます。垂直余白は、
10742 \begin_inset Flex Code
10743 status collapsed
10744
10745 \begin_layout Plain Layout
10746 DefaultHeight
10747 \end_layout
10748
10749 \end_inset
10750
10751 を標準フォントでの1行の高さとすると、
10752 \begin_inset Flex Code
10753 status collapsed
10754
10755 \begin_layout Plain Layout
10756 Parskipの値
10757 \end_layout
10758
10759 \end_inset
10760
10761
10762 \begin_inset Formula $\times$
10763 \end_inset
10764
10765
10766 \begin_inset Flex Code
10767 status collapsed
10768
10769 \begin_layout Plain Layout
10770 DefaultHeight
10771 \end_layout
10772
10773 \end_inset
10774
10775 によって計算されます。このようにして、画面フォントを変更しても同じように表示されるのです。
10776 \end_layout
10777
10778 \begin_layout Description
10779 \begin_inset Flex Code
10780 status collapsed
10781
10782 \begin_layout Plain Layout
10783 PassThru
10784 \end_layout
10785
10786 \end_inset
10787
10788  
10789 \begin_inset CommandInset label
10790 LatexCommand label
10791 name "des:PathThru"
10792
10793 \end_inset
10794
10795 [
10796 \emph on
10797
10798 \begin_inset Flex Code
10799 status collapsed
10800
10801 \begin_layout Plain Layout
10802 0
10803 \end_layout
10804
10805 \end_inset
10806
10807
10808 \emph default
10809
10810 \begin_inset Flex Code
10811 status collapsed
10812
10813 \begin_layout Plain Layout
10814 1
10815 \end_layout
10816
10817 \end_inset
10818
10819 ] この段落の内容が、LaTeXが必要とするような特別な変換を行わずに、生の形で出力されるべきかどうか。
10820 \end_layout
10821
10822 \begin_layout Description
10823 \begin_inset Flex Code
10824 status collapsed
10825
10826 \begin_layout Plain Layout
10827 Preamble
10828 \end_layout
10829
10830 \end_inset
10831
10832  
10833 \begin_inset CommandInset label
10834 LatexCommand label
10835 name "des:Preamble"
10836
10837 \end_inset
10838
10839 この様式が使用されたときに、LaTeXプリアンブルに付け加えるべき情報。この特定の様式が要求するマクロを定義したり、パッケージを読み込んだりと言ったことに使用し
10840 ます。「
10841 \begin_inset Flex Code
10842 status collapsed
10843
10844 \begin_layout Plain Layout
10845 EndPreamble
10846 \end_layout
10847
10848 \end_inset
10849
10850 」で閉じる必要があります。
10851 \end_layout
10852
10853 \begin_layout Description
10854 \begin_inset Flex Code
10855 status collapsed
10856
10857 \begin_layout Plain Layout
10858 RefPrefix
10859 \end_layout
10860
10861 \end_inset
10862
10863  [
10864 \begin_inset Flex Code
10865 status collapsed
10866
10867 \begin_layout Plain Layout
10868 文字列
10869 \end_layout
10870
10871 \end_inset
10872
10873 ] この型の段落を参照する際、生成されるラベルに使用する前置句。これによって、整形参照を使用することができるようになります。
10874 \end_layout
10875
10876 \begin_layout Description
10877 \begin_inset Flex Code
10878 status collapsed
10879
10880 \begin_layout Plain Layout
10881 RequiredArgs
10882 \end_layout
10883
10884 \end_inset
10885
10886  [
10887 \begin_inset Flex Code
10888 status collapsed
10889
10890 \begin_layout Plain Layout
10891 整数型=0
10892 \end_layout
10893
10894 \end_inset
10895
10896 ] このレイアウトに対応するLaTeXコマンドやLaTeX環境が予期している、必須引数の数。コマンドの場合には、段落の内容自体に関連付けられている引数
10897 \emph on
10898 以外に
10899 \emph default
10900 、必要な引数の数のことです。これらの引数は、実際には渡されなくても構いません。必要な場合は、LyXが空の引数を生成します。非必須引数は、必須引数の前に出力される
10901 ことに注意してください。詳細については、上記
10902 \begin_inset Flex Code
10903 status collapsed
10904
10905 \begin_layout Plain Layout
10906 OptionalArgs
10907 \end_layout
10908
10909 \end_inset
10910
10911 タグにおける議論をご覧ください。
10912 \end_layout
10913
10914 \begin_layout Description
10915 \begin_inset Flex Code
10916 status collapsed
10917
10918 \begin_layout Plain Layout
10919 Requires
10920 \end_layout
10921
10922 \end_inset
10923
10924  [
10925 \begin_inset Flex Code
10926 status collapsed
10927
10928 \begin_layout Plain Layout
10929 文字列
10930 \end_layout
10931
10932 \end_inset
10933
10934
10935 \begin_inset CommandInset label
10936 LatexCommand label
10937 name "des:Requires"
10938
10939 \end_inset
10940
10941 このレイアウトが
10942 \begin_inset Flex Code
10943 status collapsed
10944
10945 \begin_layout Plain Layout
10946 文字列
10947 \end_layout
10948
10949 \end_inset
10950
10951 で表される機能を必要するか否か。「機能」に関する情報は、上記
10952 \begin_inset Flex Code
10953 status collapsed
10954
10955 \begin_layout Plain Layout
10956 Provides
10957 \end_layout
10958
10959 \end_inset
10960
10961 の説明(
10962 \begin_inset CommandInset ref
10963 LatexCommand pageref
10964 reference "des:FreeSpacing"
10965
10966 \end_inset
10967
10968 ページ)をご参照ください。
10969 \end_layout
10970
10971 \begin_layout Description
10972 \begin_inset Flex Code
10973 status collapsed
10974
10975 \begin_layout Plain Layout
10976 RightMargin
10977 \end_layout
10978
10979 \end_inset
10980
10981  [
10982 \begin_inset Flex Code
10983 status collapsed
10984
10985 \begin_layout Plain Layout
10986 文字列=""
10987 \end_layout
10988
10989 \end_inset
10990
10991
10992 \begin_inset Flex Code
10993 status collapsed
10994
10995 \begin_layout Plain Layout
10996 LeftMargin
10997 \end_layout
10998
10999 \end_inset
11000
11001 に同様。
11002 \end_layout
11003
11004 \begin_layout Description
11005 \begin_inset Flex Code
11006 status collapsed
11007
11008 \begin_layout Plain Layout
11009 Spacing
11010 \end_layout
11011
11012 \end_inset
11013
11014  [
11015 \begin_inset Flex Code
11016 status collapsed
11017
11018 \begin_layout Plain Layout
11019
11020 \emph on
11021 single
11022 \emph default
11023 , onehalf, double, other
11024 \end_layout
11025
11026 \end_inset
11027
11028  
11029 \emph on
11030
11031 \emph default
11032 ] これはレイアウト中の既定の行間をどうすべきか定義するものです。引数の
11033 \begin_inset Flex Code
11034 status collapsed
11035
11036 \begin_layout Plain Layout
11037 single
11038 \end_layout
11039
11040 \end_inset
11041
11042
11043 \begin_inset Flex Code
11044 status collapsed
11045
11046 \begin_layout Plain Layout
11047 onehalf
11048 \end_layout
11049
11050 \end_inset
11051
11052
11053 \begin_inset Flex Code
11054 status collapsed
11055
11056 \begin_layout Plain Layout
11057 double
11058 \end_layout
11059
11060 \end_inset
11061
11062 は、それぞれ乗数1・1.25・1.667に対応します。引数
11063 \begin_inset Flex Code
11064 status collapsed
11065
11066 \begin_layout Plain Layout
11067 other
11068 \end_layout
11069
11070 \end_inset
11071
11072 を指定した場合には、実際の乗数値も引数として指定しなくてはなりません。他のパラメータと違って
11073 \begin_inset Flex Code
11074 status collapsed
11075
11076 \begin_layout Plain Layout
11077 Spacing
11078 \end_layout
11079
11080 \end_inset
11081
11082 は、
11083 \begin_inset Flex Code
11084 status collapsed
11085
11086 \begin_layout Plain Layout
11087 setspace.sty
11088 \end_layout
11089
11090 \end_inset
11091
11092 パッケージを使用した、限定的なLaTeXコードを生成することを意味することにご注意ください。
11093 \end_layout
11094
11095 \begin_layout Description
11096 \begin_inset Flex Code
11097 status collapsed
11098
11099 \begin_layout Plain Layout
11100 Spellcheck
11101 \end_layout
11102
11103 \end_inset
11104
11105  [
11106 \begin_inset Flex Code
11107 status collapsed
11108
11109 \begin_layout Plain Layout
11110 0
11111 \end_layout
11112
11113 \end_inset
11114
11115 ,
11116 \begin_inset Flex Code
11117 status collapsed
11118
11119 \begin_layout Plain Layout
11120 1
11121 \end_layout
11122
11123 \end_inset
11124
11125 ] この様式の段落をスペルチェックするか否か。既定値は真です。
11126 \end_layout
11127
11128 \begin_layout Description
11129 \begin_inset Flex Code
11130 status collapsed
11131
11132 \begin_layout Plain Layout
11133 TextFont
11134 \end_layout
11135
11136 \end_inset
11137
11138  本文に使うフォント。第
11139 \begin_inset CommandInset ref
11140 LatexCommand ref
11141 reference "sub:フォント指定"
11142
11143 \end_inset
11144
11145 節参照。
11146 \end_layout
11147
11148 \begin_layout Description
11149 \begin_inset Flex Code
11150 status collapsed
11151
11152 \begin_layout Plain Layout
11153 TocLevel
11154 \end_layout
11155
11156 \end_inset
11157
11158  [
11159 \begin_inset Flex Code
11160 status collapsed
11161
11162 \begin_layout Plain Layout
11163 整数型
11164 \end_layout
11165
11166 \end_inset
11167
11168 ] 目次中でのこの様式の階層。これは、節見出しの自動連番に使用されます。
11169 \end_layout
11170
11171 \begin_layout Description
11172 \begin_inset Flex Code
11173 status collapsed
11174
11175 \begin_layout Plain Layout
11176 TopSep
11177 \end_layout
11178
11179 \end_inset
11180
11181  [
11182 \begin_inset Flex Code
11183 status collapsed
11184
11185 \begin_layout Plain Layout
11186 浮動小数点型=0
11187 \end_layout
11188
11189 \end_inset
11190
11191 ] このレイアウトを持つ一連の段落群の最初の段落と、その前の段落の間の垂直余白。前の段落が別のレイアウトを持っていれば、余白は単純に追加されるのではなく、それら
11192 の最大値がとられます。
11193 \end_layout
11194
11195 \begin_layout Subsection
11196 \begin_inset CommandInset label
11197 LatexCommand label
11198 name "sub:段落様式の国際化"
11199
11200 \end_inset
11201
11202 段落様式の国際化
11203 \end_layout
11204
11205 \begin_layout Standard
11206 LyXは、長きにわたってレイアウト情報の国際化をサポートしてきましたが、第2.0版までは、これは操作画面にのみ適用されるものであって、たとえばPDF出力には適用さ
11207 れませんでした。たとえば、フランスの著者が、「Theorem 1」の代わりに「
11208 \lang french
11209 Théorème
11210 \lang japanese
11211  1」としたければ、醜いハックに頼るしかありませんでした。Georg Baumのおかげで、これは解消されました。
11212 \end_layout
11213
11214 \begin_layout Standard
11215 もし
11216 \begin_inset Flex MenuItem
11217 status collapsed
11218
11219 \begin_layout Plain Layout
11220 Style
11221 \end_layout
11222
11223 \end_inset
11224
11225 が、組版文書に出力される文字列を定義するのであれば、非英語文書や複数言語文書をサポートするために、
11226 \begin_inset Flex MenuItem
11227 status collapsed
11228
11229 \begin_layout Plain Layout
11230 LangPreamble
11231 \end_layout
11232
11233 \end_inset
11234
11235
11236 \begin_inset Flex MenuItem
11237 status collapsed
11238
11239 \begin_layout Plain Layout
11240 BabelPreamble
11241 \end_layout
11242
11243 \end_inset
11244
11245 を使用することができます。以下の抜粋(
11246 \begin_inset Flex MenuItem
11247 status collapsed
11248
11249 \begin_layout Plain Layout
11250 theorems-ams.inc
11251 \end_layout
11252
11253 \end_inset
11254
11255 より)は、これがどう動作するかを示すものです。
11256 \end_layout
11257
11258 \begin_layout LyX-Code
11259 Preamble
11260 \end_layout
11261
11262 \begin_deeper
11263 \begin_layout LyX-Code
11264   
11265 \backslash
11266 theoremstyle{remark}
11267 \end_layout
11268
11269 \begin_layout LyX-Code
11270   
11271 \backslash
11272 newtheorem{claim}[thm]{
11273 \backslash
11274 protect
11275 \backslash
11276 claimname}
11277 \end_layout
11278
11279 \begin_layout LyX-Code
11280 EndPreamble
11281 \end_layout
11282
11283 \begin_layout LyX-Code
11284 LangPreamble
11285 \end_layout
11286
11287 \begin_layout LyX-Code
11288   
11289 \backslash
11290 providecommand{
11291 \backslash
11292 claimname}{_(Claim)}
11293 \end_layout
11294
11295 \begin_layout LyX-Code
11296 EndLangPreamble
11297 \end_layout
11298
11299 \begin_layout LyX-Code
11300 BabelPreamble
11301 \end_layout
11302
11303 \begin_layout LyX-Code
11304     
11305 \backslash
11306 addto
11307 \backslash
11308 captions$$lang{
11309 \backslash
11310 renewcommand{
11311 \backslash
11312 claimname}{_(Claim)}}
11313 \end_layout
11314
11315 \begin_layout LyX-Code
11316 EndBabelPreamble
11317 \end_layout
11318
11319 \end_deeper
11320 \begin_layout Standard
11321 原則として、
11322 \begin_inset Flex MenuItem
11323 status collapsed
11324
11325 \begin_layout Plain Layout
11326 LangPreamble
11327 \end_layout
11328
11329 \end_inset
11330
11331
11332 \begin_inset Flex MenuItem
11333 status collapsed
11334
11335 \begin_layout Plain Layout
11336 BabelPreamble
11337 \end_layout
11338
11339 \end_inset
11340
11341 タグ内には、有効なLaTeXコードはすべて用いることができますが、実際においては、ここで典型的に示したような形になるでしょう。組版文字列が正しく翻訳されるための
11342 鍵となるのは、LaTeXコマンド
11343 \begin_inset Flex Code
11344 status collapsed
11345
11346 \begin_layout Plain Layout
11347
11348 \backslash
11349 claimname
11350 \end_layout
11351
11352 \end_inset
11353
11354 とその
11355 \begin_inset Flex Code
11356 status collapsed
11357
11358 \begin_layout Plain Layout
11359
11360 \backslash
11361 newtheorem
11362 \end_layout
11363
11364 \end_inset
11365
11366 中での用い方です。
11367 \end_layout
11368
11369 \begin_layout Standard
11370 \begin_inset Flex Code
11371 status collapsed
11372
11373 \begin_layout Plain Layout
11374 LangPreamble
11375 \end_layout
11376
11377 \end_inset
11378
11379 タグは、文書全体の言語に基づいた国際化を提供します。タグの内容は、
11380 \begin_inset Flex Code
11381 status collapsed
11382
11383 \begin_layout Plain Layout
11384 Preamble
11385 \end_layout
11386
11387 \end_inset
11388
11389 タグと同様、プリアンブルに置かれるのですが、これを特別なものにしているのは、「関数」
11390 \begin_inset Flex Code
11391 status collapsed
11392
11393 \begin_layout Plain Layout
11394 _()
11395 \end_layout
11396
11397 \end_inset
11398
11399 が使用されていることです。これは、LyXがLaTeX出力を生成する際、その引数を文書言語に翻訳したもので置き換えられます。
11400 \end_layout
11401
11402 \begin_layout Standard
11403 \begin_inset Flex Code
11404 status collapsed
11405
11406 \begin_layout Plain Layout
11407 BabelPreamble
11408 \end_layout
11409
11410 \end_inset
11411
11412 タグは、複数言語文書をサポートし、
11413 \begin_inset Flex Code
11414 status collapsed
11415
11416 \begin_layout Plain Layout
11417 babel
11418 \end_layout
11419
11420 \end_inset
11421
11422 パッケージへのインタフェースを提供することを意図しているので、もう少し複雑です。その内容は、文書に現れる言語それぞれについて一度、プリアンブルに追加されます。こ
11423 の場合には、
11424 \begin_inset Flex Code
11425 status collapsed
11426
11427 \begin_layout Plain Layout
11428 _()
11429 \end_layout
11430
11431 \end_inset
11432
11433 の引数は、その当該言語への翻訳で置き換えられ、
11434 \begin_inset Flex Code
11435 status collapsed
11436
11437 \begin_layout Plain Layout
11438 $$lang
11439 \end_layout
11440
11441 \end_inset
11442
11443 は言語名(babelパッケージで使用されるもの)で置き換えられます。
11444 \end_layout
11445
11446 \begin_layout Standard
11447 したがって、フランス語のセクションを持つドイツ語文書では、以下のような内容がプリアンブルに追加されます
11448 \end_layout
11449
11450 \begin_layout LyX-Code
11451
11452 \backslash
11453 addto
11454 \backslash
11455 captionsfrench{
11456 \backslash
11457 renewcommand{
11458 \backslash
11459 claimname}{Affirmation}}   
11460 \backslash
11461 addto
11462 \backslash
11463 captionsngerman{
11464 \backslash
11465 renewcommand{
11466 \backslash
11467 claimname}{Behauptung}}   
11468 \backslash
11469 providecommand{
11470 \backslash
11471 claimname}{Behauptung}
11472 \end_layout
11473
11474 \begin_layout Standard
11475 それから、LaTeXと
11476 \begin_inset Flex Code
11477 status collapsed
11478
11479 \begin_layout Plain Layout
11480 babel
11481 \end_layout
11482
11483 \end_inset
11484
11485 は協力して、出力に正しい文字列を生成します。
11486 \end_layout
11487
11488 \begin_layout Standard
11489 ここで注意しなくてはならない重要な点は、翻訳は、操作画面の国際化に使われるのと同じ機構を通じて、LyX自身によって提供されるということです。つまり、ユーザー作成
11490 のレイアウトファイルに入力された文字列は、LyXの国際化ルーチンでは取り扱われないので、
11491 \begin_inset Flex MenuItem
11492 status collapsed
11493
11494 \begin_layout Plain Layout
11495 LangPreamble
11496 \end_layout
11497
11498 \end_inset
11499
11500
11501 \begin_inset Flex MenuItem
11502 status collapsed
11503
11504 \begin_layout Plain Layout
11505 BabelPreamble
11506 \end_layout
11507
11508 \end_inset
11509
11510 は、事実上、LyXとともに提供されるレイアウトファイルでのみ、使うことができるということを意味します。とはいえ、こういうことでありますので、将来的にLyXに同梱
11511 させようという意図を以て作成されたレイアウトは、適切なところではすべて、これらのタグを使用するべきです。
11512 \end_layout
11513
11514 \begin_layout Subsection
11515 フロート
11516 \begin_inset CommandInset label
11517 LatexCommand label
11518 name "sub:フロート"
11519
11520 \end_inset
11521
11522
11523 \end_layout
11524
11525 \begin_layout Standard
11526 LyX第1.3.0版以来、テキストクラス自体の中でフロート(
11527 \begin_inset Flex MenuItem
11528 status collapsed
11529
11530 \begin_layout Plain Layout
11531 figure
11532 \end_layout
11533
11534 \end_inset
11535
11536
11537 \begin_inset Flex MenuItem
11538 status collapsed
11539
11540 \begin_layout Plain Layout
11541 table
11542 \end_layout
11543
11544 \end_inset
11545
11546 ・\SpecialChar \ldots{}
11547 )を定義することが可能となり、かつ必要となりました。標準的なフロートは
11548 \begin_inset Flex Code
11549 status collapsed
11550
11551 \begin_layout Plain Layout
11552 stdfloats.inc
11553 \end_layout
11554
11555 \end_inset
11556
11557 ファイルに含まれているので、作業中のレイアウトファイルに
11558 \end_layout
11559
11560 \begin_layout LyX-Code
11561 Input stdfloats.inc
11562 \end_layout
11563
11564 \begin_layout Standard
11565 と加えるだけで済むことも多いでしょう。LyXに同梱されているAGUクラスのように、それ以外のフロート型を提供するテキストクラスを実装するには、以下の情報が役立つ
11566 でありましょう。
11567 \end_layout
11568
11569 \begin_layout Description
11570 \begin_inset Flex Code
11571 status collapsed
11572
11573 \begin_layout Plain Layout
11574 Extension
11575 \end_layout
11576
11577 \end_inset
11578
11579  [
11580 \begin_inset Flex Code
11581 status collapsed
11582
11583 \begin_layout Plain Layout
11584 文字列
11585 \end_layout
11586
11587 \end_inset
11588
11589 =
11590 \begin_inset Quotes erd
11591 \end_inset
11592
11593
11594 \begin_inset Quotes erd
11595 \end_inset
11596
11597 ] 図などのリストを含む外部ファイルのファイル拡張子名。LaTeXがキャプションを書き込むファイルです。
11598 \end_layout
11599
11600 \begin_layout Description
11601 \begin_inset Flex Code
11602 status collapsed
11603
11604 \begin_layout Plain Layout
11605 GuiName
11606 \end_layout
11607
11608 \end_inset
11609
11610  [
11611 \begin_inset Flex Code
11612 status collapsed
11613
11614 \begin_layout Plain Layout
11615 文字列
11616 \end_layout
11617
11618 \end_inset
11619
11620 =
11621 \begin_inset Quotes erd
11622 \end_inset
11623
11624
11625 \begin_inset Quotes erd
11626 \end_inset
11627
11628 ] メニューとキャプションに使用される文字列。babelが使用される場合には、これは現在の言語に翻訳されます。
11629 \end_layout
11630
11631 \begin_layout Description
11632 \begin_inset Flex Code
11633 status collapsed
11634
11635 \begin_layout Plain Layout
11636 HTML*
11637 \end_layout
11638
11639 \end_inset
11640
11641  これらは、XHTML出力で使用されます。第
11642 \begin_inset CommandInset ref
11643 LatexCommand ref
11644 reference "sec:XHTML出力のタグ"
11645
11646 \end_inset
11647
11648 節をご覧ください。
11649 \end_layout
11650
11651 \begin_layout Description
11652 \begin_inset Flex Code
11653 status collapsed
11654
11655 \begin_layout Plain Layout
11656 ListCommand
11657 \end_layout
11658
11659 \end_inset
11660
11661  [
11662 \begin_inset Flex Code
11663 status collapsed
11664
11665 \begin_layout Plain Layout
11666 文字列
11667 \end_layout
11668
11669 \end_inset
11670
11671 =
11672 \begin_inset Quotes erd
11673 \end_inset
11674
11675
11676 \begin_inset Quotes erd
11677 \end_inset
11678
11679 ] この型のフロートの一覧を生成するのに使用するコマンド。頭部の「
11680 \backslash
11681 」は書きません。
11682 \begin_inset Flex Code
11683 status collapsed
11684
11685 \begin_layout Plain Layout
11686 NeedsFloatPkg
11687 \end_layout
11688
11689 \end_inset
11690
11691 が偽の時には、このコマンドを生成する標準的な方法はないので、これは
11692 \emph on
11693 必ず
11694 \emph default
11695 指定しなくてはなりません。
11696 \begin_inset Flex Code
11697 status collapsed
11698
11699 \begin_layout Plain Layout
11700 NeedsFloatPkg
11701 \end_layout
11702
11703 \end_inset
11704
11705 が真の時は、標準的な方法が存在するので、これは無視されます。
11706 \end_layout
11707
11708 \begin_layout Description
11709 \begin_inset Flex Code
11710 status collapsed
11711
11712 \begin_layout Plain Layout
11713 ListName
11714 \end_layout
11715
11716 \end_inset
11717
11718  [
11719 \begin_inset Flex Code
11720 status collapsed
11721
11722 \begin_layout Plain Layout
11723 文字列
11724 \end_layout
11725
11726 \end_inset
11727
11728 =
11729 \begin_inset Quotes erd
11730 \end_inset
11731
11732
11733 \begin_inset Quotes erd
11734 \end_inset
11735
11736 ] この種類のフロート一覧(図一覧・表一覧など)に使用される見出し。LyX中では、これは画面上のラベルとして使用されます。また、見出しとして使用するために、La
11737 TeXに渡され、XHTML出力でも見出しとして使用されます。これは、文書言語に翻訳されます。
11738 \end_layout
11739
11740 \begin_layout Description
11741 \begin_inset Flex Code
11742 status collapsed
11743
11744 \begin_layout Plain Layout
11745 NeedsFloatPkg
11746 \end_layout
11747
11748 \end_inset
11749
11750  [
11751 \begin_inset Flex Code
11752 status collapsed
11753
11754 \begin_layout Plain Layout
11755 0
11756 \end_layout
11757
11758 \end_inset
11759
11760 ,
11761 \begin_inset Flex Code
11762 status collapsed
11763
11764 \begin_layout Plain Layout
11765
11766 \emph on
11767 1
11768 \end_layout
11769
11770 \end_inset
11771
11772 ] フロートが文書クラス中に既に定義されているか、あるいは代わりに
11773 \begin_inset Flex Code
11774 status collapsed
11775
11776 \begin_layout Plain Layout
11777 float.sty
11778 \end_layout
11779
11780 \end_inset
11781
11782 を読み込んで、それが提供しているものを使用する必要があるかを示します。既定値は
11783 \begin_inset Flex Code
11784 status collapsed
11785
11786 \begin_layout Plain Layout
11787 1
11788 \end_layout
11789
11790 \end_inset
11791
11792 であり、
11793 \begin_inset Flex Code
11794 status collapsed
11795
11796 \begin_layout Plain Layout
11797 float.sty
11798 \end_layout
11799
11800 \end_inset
11801
11802 を使用します。LaTeX文書クラスでフロートが既に定義されているときには、
11803 \begin_inset Flex Code
11804 status collapsed
11805
11806 \begin_layout Plain Layout
11807 0
11808 \end_layout
11809
11810 \end_inset
11811
11812 に設定しなくてはなりません。
11813 \end_layout
11814
11815 \begin_layout Description
11816 \begin_inset Flex Code
11817 status collapsed
11818
11819 \begin_layout Plain Layout
11820 NumberWithin
11821 \end_layout
11822
11823 \end_inset
11824
11825  [
11826 \begin_inset Flex Code
11827 status collapsed
11828
11829 \begin_layout Plain Layout
11830 文字列
11831 \end_layout
11832
11833 \end_inset
11834
11835 =
11836 \begin_inset Quotes erd
11837 \end_inset
11838
11839
11840 \begin_inset Quotes erd
11841 \end_inset
11842
11843 ] この(非必須の)引数は、このクラスのフロートが文書中のある節単位ごとに番号を振り直されるべきかどうかを規定します。たとえば、引数に
11844 \begin_inset Flex Code
11845 status collapsed
11846
11847 \begin_layout Plain Layout
11848 chapter
11849 \end_layout
11850
11851 \end_inset
11852
11853 と指定されていれば、フロートは章ごとに番号が振り直されます。
11854 \end_layout
11855
11856 \begin_layout Description
11857 \begin_inset Flex Code
11858 status collapsed
11859
11860 \begin_layout Plain Layout
11861 Placement
11862 \end_layout
11863
11864 \end_inset
11865
11866  [
11867 \begin_inset Flex Code
11868 status collapsed
11869
11870 \begin_layout Plain Layout
11871 文字列
11872 \end_layout
11873
11874 \end_inset
11875
11876 =
11877 \begin_inset Quotes erd
11878 \end_inset
11879
11880
11881 \begin_inset Quotes erd
11882 \end_inset
11883
11884 ] このクラスのフロートの既定の配置法。文字列は、標準的なLaTeX表記に従い、
11885 \begin_inset Flex Code
11886 status collapsed
11887
11888 \begin_layout Plain Layout
11889 t
11890 \end_layout
11891
11892 \end_inset
11893
11894 ならば上部(top)、
11895 \begin_inset Flex Code
11896 status collapsed
11897
11898 \begin_layout Plain Layout
11899 b
11900 \end_layout
11901
11902 \end_inset
11903
11904 ならば下部(bottom)、
11905 \begin_inset Flex Code
11906 status collapsed
11907
11908 \begin_layout Plain Layout
11909 p
11910 \end_layout
11911
11912 \end_inset
11913
11914 ならばページ(page)、
11915 \begin_inset Flex Code
11916 status collapsed
11917
11918 \begin_layout Plain Layout
11919 h
11920 \end_layout
11921
11922 \end_inset
11923
11924 ならばここ(here)を表します
11925 \begin_inset Foot
11926 status collapsed
11927
11928 \begin_layout Plain Layout
11929 LaTeX同様、文字列中でのこれらの文字の順序は関係ありません。
11930 \end_layout
11931
11932 \end_inset
11933
11934 。これらの他に新しい型
11935 \begin_inset Flex Code
11936 status collapsed
11937
11938 \begin_layout Plain Layout
11939 H
11940 \end_layout
11941
11942 \end_inset
11943
11944 があり、これはフロートを「ここ」に置いていいけれども他の場所はだめ、というものなので、本当はフロートにあるものではありません。しかし、
11945 \begin_inset Flex Code
11946 status collapsed
11947
11948 \begin_layout Plain Layout
11949 H
11950 \end_layout
11951
11952 \end_inset
11953
11954 指定子は特別なものであり、その細かい実装上の理由で、組み込み以外のフロート型では使用することができません。これが何を意味するかおわかりにならない場合には、代わり
11955 に「
11956 \begin_inset Flex Code
11957 status collapsed
11958
11959 \begin_layout Plain Layout
11960 tbp
11961 \end_layout
11962
11963 \end_inset
11964
11965 」を指定してください。
11966 \end_layout
11967
11968 \begin_layout Description
11969 \begin_inset Flex Code
11970 status collapsed
11971
11972 \begin_layout Plain Layout
11973 RefPrefix
11974 \end_layout
11975
11976 \end_inset
11977
11978  [
11979 \begin_inset Flex Code
11980 status collapsed
11981
11982 \begin_layout Plain Layout
11983 文字列
11984 \end_layout
11985
11986 \end_inset
11987
11988 ] この型のフロートを参照する際、生成されるラベルに使用する前置句。これによって、整形参照を使用することができるようになります。コピーした様式が設定した
11989 \begin_inset Flex Code
11990 status collapsed
11991
11992 \begin_layout Plain Layout
11993 RefPrefix
11994 \end_layout
11995
11996 \end_inset
11997
11998 は、特別な文字列「OFF」(すべて大文字)を使えば、いつでも削除することができます。
11999 \end_layout
12000
12001 \begin_layout Description
12002 \begin_inset Flex Code
12003 status collapsed
12004
12005 \begin_layout Plain Layout
12006 Style
12007 \end_layout
12008
12009 \end_inset
12010
12011  [
12012 \begin_inset Flex Code
12013 status collapsed
12014
12015 \begin_layout Plain Layout
12016 文字列
12017 \end_layout
12018
12019 \end_inset
12020
12021 =
12022 \begin_inset Quotes erd
12023 \end_inset
12024
12025
12026 \begin_inset Quotes erd
12027 \end_inset
12028
12029
12030 \begin_inset Flex Code
12031 status collapsed
12032
12033 \begin_layout Plain Layout
12034
12035 \backslash
12036 newfloat
12037 \end_layout
12038
12039 \end_inset
12040
12041 を使用してフロートを定義する際に使用される様式。
12042 \end_layout
12043
12044 \begin_layout Description
12045 \begin_inset Flex Code
12046 status collapsed
12047
12048 \begin_layout Plain Layout
12049 Type
12050 \end_layout
12051
12052 \end_inset
12053
12054  [
12055 \begin_inset Flex Code
12056 status collapsed
12057
12058 \begin_layout Plain Layout
12059 文字列
12060 \end_layout
12061
12062 \end_inset
12063
12064 =
12065 \begin_inset Quotes erd
12066 \end_inset
12067
12068
12069 \begin_inset Quotes erd
12070 \end_inset
12071
12072 ] プログラムやアルゴリズムのような、フロートの新しいクラス「型」。適切な
12073 \begin_inset Flex Code
12074 status collapsed
12075
12076 \begin_layout Plain Layout
12077
12078 \backslash
12079 newfloat
12080 \end_layout
12081
12082 \end_inset
12083
12084 の後で、
12085 \begin_inset Flex Code
12086 status collapsed
12087
12088 \begin_layout Plain Layout
12089
12090 \backslash
12091 begin{program}
12092 \end_layout
12093
12094 \end_inset
12095
12096
12097 \begin_inset Flex Code
12098 status collapsed
12099
12100 \begin_layout Plain Layout
12101
12102 \backslash
12103 end{algorithm*}
12104 \end_layout
12105
12106 \end_inset
12107
12108 といったコマンドが利用できます。
12109 \end_layout
12110
12111 \begin_layout Standard
12112 \begin_inset Flex Code
12113 status collapsed
12114
12115 \begin_layout Plain Layout
12116
12117 \emph on
12118 type
12119 \end_layout
12120
12121 \end_inset
12122
12123 型のフロートを定義すると、自動的に
12124 \emph on
12125 対応する
12126 \emph default
12127
12128 \begin_inset Flex Code
12129 status collapsed
12130
12131 \begin_layout Plain Layout
12132
12133 \emph on
12134 type
12135 \end_layout
12136
12137 \end_inset
12138
12139 名カウンタが定義されます。
12140 \end_layout
12141
12142 \begin_layout Subsection
12143 任意設定差込枠と差込枠レイアウト
12144 \begin_inset CommandInset label
12145 LatexCommand label
12146 name "sub:任意設定差込枠"
12147
12148 \end_inset
12149
12150
12151 \end_layout
12152
12153 \begin_layout Standard
12154 LyXは第1.4.0版から文字様式をサポートしています。第1.6.0版以降、これは任意設定差込枠と呼ばれています。
12155 \end_layout
12156
12157 \begin_layout Standard
12158 任意設定差込枠には次の3種類があります。
12159 \end_layout
12160
12161 \begin_layout Itemize
12162 文字様式(
12163 \begin_inset Flex Code
12164 status collapsed
12165
12166 \begin_layout Plain Layout
12167 CharStyle
12168 \end_layout
12169
12170 \end_inset
12171
12172 )。これは、
12173 \begin_inset Flex Code
12174 status collapsed
12175
12176 \begin_layout Plain Layout
12177
12178 \backslash
12179 noun
12180 \end_layout
12181
12182 \end_inset
12183
12184
12185 \begin_inset Flex Code
12186 status collapsed
12187
12188 \begin_layout Plain Layout
12189
12190 \backslash
12191 code
12192 \end_layout
12193
12194 \end_inset
12195
12196 などのLaTeXコマンドに対応した意味論的マークアップを定義するものです。
12197 \end_layout
12198
12199 \begin_layout Itemize
12200 ユーザ設定(
12201 \begin_inset Flex Code
12202 status collapsed
12203
12204 \begin_layout Plain Layout
12205 Custom
12206 \end_layout
12207
12208 \end_inset
12209
12210 )。これは、TeXコードや脚注などに似たユーザ設定の折りたたみ式差込枠を定義するのに使用することができます。わかりやすい例はendnote差込枠で、これは
12211 \begin_inset Flex Code
12212 status collapsed
12213
12214 \begin_layout Plain Layout
12215 endnote
12216 \end_layout
12217
12218 \end_inset
12219
12220 モジュール中で定義されています。
12221 \end_layout
12222
12223 \begin_layout Itemize
12224 XML要素(
12225 \begin_inset Flex Code
12226 status collapsed
12227
12228 \begin_layout Plain Layout
12229 Element
12230 \end_layout
12231
12232 \end_inset
12233
12234 )。DocBookクラスで使用するものです。
12235 \end_layout
12236
12237 \begin_layout Standard
12238 任意設定差込枠は、以下で説明する
12239 \begin_inset Flex Code
12240 status collapsed
12241
12242 \begin_layout Plain Layout
12243 InsetLayout
12244 \end_layout
12245
12246 \end_inset
12247
12248 タグを使用して定義されます。
12249 \end_layout
12250
12251 \begin_layout Standard
12252 \begin_inset Flex Code
12253 status collapsed
12254
12255 \begin_layout Plain Layout
12256 InsetLayout
12257 \end_layout
12258
12259 \end_inset
12260
12261 タグは、もう一つ別の機能も提供します。これを使えば、いろいろな種類の差込枠全体のレイアウトを設定するのに使用することができるのです。現在のところ、
12262 \begin_inset Flex Code
12263 status collapsed
12264
12265 \begin_layout Plain Layout
12266 InsetLayout
12267 \end_layout
12268
12269 \end_inset
12270
12271 は任意設定差込枠を定義することの他に、脚注・傍注・注釈差込枠・TeXコード(ERT)差込枠・派生枝・リスト・索引・ボックス・表・アルゴリズム・URL・オプション
12272 引数のレイアウトパラメータを設定するのに使用することができます。
12273 \end_layout
12274
12275 \begin_layout Standard
12276 \begin_inset Flex Code
12277 status collapsed
12278
12279 \begin_layout Plain Layout
12280 InsetLayout
12281 \end_layout
12282
12283 \end_inset
12284
12285 定義は以下の形の行では始まらなくてはなりません。
12286 \end_layout
12287
12288 \begin_layout LyX-Code
12289 InsetLayout <型>
12290 \end_layout
12291
12292 \begin_layout Standard
12293 ここで
12294 \begin_inset Flex Code
12295 status collapsed
12296
12297 \begin_layout Plain Layout
12298 <型>
12299 \end_layout
12300
12301 \end_inset
12302
12303 は、レイアウトを定義しようとしている差込枠を指し、以下の2つの場合がありえます。
12304 \end_layout
12305
12306 \begin_layout Enumerate
12307 既存の差込枠のレイアウトを変更する場合。この場合、
12308 \begin_inset Flex Code
12309 status collapsed
12310
12311 \begin_layout Plain Layout
12312 <型>
12313 \end_layout
12314
12315 \end_inset
12316
12317 は以下のいずれかになります:
12318 \begin_inset Flex Code
12319 status collapsed
12320
12321 \begin_layout Plain Layout
12322 Algorithm
12323 \end_layout
12324
12325 \end_inset
12326
12327
12328 \begin_inset Flex Code
12329 status collapsed
12330
12331 \begin_layout Plain Layout
12332 Branch
12333 \end_layout
12334
12335 \end_inset
12336
12337
12338 \begin_inset Flex Code
12339 status collapsed
12340
12341 \begin_layout Plain Layout
12342 Box
12343 \end_layout
12344
12345 \end_inset
12346
12347
12348 \begin_inset Flex Code
12349 status collapsed
12350
12351 \begin_layout Plain Layout
12352 Box:shaded
12353 \end_layout
12354
12355 \end_inset
12356
12357
12358 \begin_inset Flex Code
12359 status collapsed
12360
12361 \begin_layout Plain Layout
12362 ERT
12363 \end_layout
12364
12365 \end_inset
12366
12367
12368 \begin_inset Flex Code
12369 status collapsed
12370
12371 \begin_layout Plain Layout
12372 Figure
12373 \end_layout
12374
12375 \end_inset
12376
12377
12378 \begin_inset Flex Code
12379 status collapsed
12380
12381 \begin_layout Plain Layout
12382 Foot
12383 \end_layout
12384
12385 \end_inset
12386
12387
12388 \begin_inset Flex Code
12389 status collapsed
12390
12391 \begin_layout Plain Layout
12392 Index
12393 \end_layout
12394
12395 \end_inset
12396
12397
12398 \begin_inset Flex Code
12399 status collapsed
12400
12401 \begin_layout Plain Layout
12402 Info
12403 \end_layout
12404
12405 \end_inset
12406
12407
12408 \begin_inset Flex Code
12409 status collapsed
12410
12411 \begin_layout Plain Layout
12412 Info:menu
12413 \end_layout
12414
12415 \end_inset
12416
12417
12418 \begin_inset Flex Code
12419 status collapsed
12420
12421 \begin_layout Plain Layout
12422 Info:shortcut
12423 \end_layout
12424
12425 \end_inset
12426
12427
12428 \begin_inset Flex Code
12429 status collapsed
12430
12431 \begin_layout Plain Layout
12432 Info:shortcuts
12433 \end_layout
12434
12435 \end_inset
12436
12437
12438 \begin_inset Flex Code
12439 status collapsed
12440
12441 \begin_layout Plain Layout
12442 Listings
12443 \end_layout
12444
12445 \end_inset
12446
12447
12448 \begin_inset Flex Code
12449 status collapsed
12450
12451 \begin_layout Plain Layout
12452 Marginal
12453 \end_layout
12454
12455 \end_inset
12456
12457
12458 \begin_inset Flex Code
12459 status collapsed
12460
12461 \begin_layout Plain Layout
12462 Note:Comment
12463 \end_layout
12464
12465 \end_inset
12466
12467
12468 \begin_inset Flex Code
12469 status collapsed
12470
12471 \begin_layout Plain Layout
12472 Note:Note
12473 \end_layout
12474
12475 \end_inset
12476
12477
12478 \begin_inset Flex Code
12479 status collapsed
12480
12481 \begin_layout Plain Layout
12482 Note:GreyedOut
12483 \end_layout
12484
12485 \end_inset
12486
12487
12488 \begin_inset Flex Code
12489 status collapsed
12490
12491 \begin_layout Plain Layout
12492 OptArg
12493 \end_layout
12494
12495 \end_inset
12496
12497
12498 \begin_inset Flex Code
12499 status collapsed
12500
12501 \begin_layout Plain Layout
12502 Table
12503 \end_layout
12504
12505 \end_inset
12506
12507
12508 \begin_inset Flex Code
12509 status collapsed
12510
12511 \begin_layout Plain Layout
12512 URL
12513 \end_layout
12514
12515 \end_inset
12516
12517
12518 \end_layout
12519
12520 \begin_layout Enumerate
12521 任意設定差込枠のレイアウトを定義する場合。この場合には、
12522 \begin_inset Flex Code
12523 status collapsed
12524
12525 \begin_layout Plain Layout
12526 <型>
12527 \end_layout
12528
12529 \end_inset
12530
12531 は既存の差込枠で使用されていないもので有効な識別子であれば、何でも指定できます。任意設定差込枠の定義には、
12532 \begin_inset Flex Code
12533 status collapsed
12534
12535 \begin_layout Plain Layout
12536 LyXType
12537 \end_layout
12538
12539 \end_inset
12540
12541 項目も
12542 \emph on
12543 同時に
12544 \emph default
12545 含まれていて、これがどの型の差込枠なのかが宣言されている必要があります。
12546 \end_layout
12547
12548 \begin_layout Standard
12549 \begin_inset Flex Code
12550 status collapsed
12551
12552 \begin_layout Plain Layout
12553 InsetLayout
12554 \end_layout
12555
12556 \end_inset
12557
12558 定義には以下の項目を入れることができます。
12559 \end_layout
12560
12561 \begin_layout Description
12562 \begin_inset Flex Code
12563 status collapsed
12564
12565 \begin_layout Plain Layout
12566 BgColor
12567 \end_layout
12568
12569 \end_inset
12570
12571  差込枠の背景色。有効な色彩は
12572 \begin_inset Flex Code
12573 status collapsed
12574
12575 \begin_layout Plain Layout
12576 src/ColorCode.h
12577 \end_layout
12578
12579 \end_inset
12580
12581 で定義されています。
12582 \end_layout
12583
12584 \begin_layout Description
12585 \begin_inset Flex Code
12586 status collapsed
12587
12588 \begin_layout Plain Layout
12589 ContentAsLabel
12590 \end_layout
12591
12592 \end_inset
12593
12594  [
12595 \begin_inset Flex Code
12596 status collapsed
12597
12598 \begin_layout Plain Layout
12599
12600 \emph on
12601 0
12602 \end_layout
12603
12604 \end_inset
12605
12606 ,
12607 \begin_inset Flex Code
12608 status collapsed
12609
12610 \begin_layout Plain Layout
12611 1
12612 \end_layout
12613
12614 \end_inset
12615
12616 ] 差込枠を閉じた際、差込枠の内容をラベルとして使用するか否か。既定値は偽です。
12617 \end_layout
12618
12619 \begin_layout Description
12620 \begin_inset Flex Code
12621 status collapsed
12622
12623 \begin_layout Plain Layout
12624 CopyStyle
12625 \end_layout
12626
12627 \end_inset
12628
12629  段落様式と同様です(
12630 \begin_inset CommandInset ref
12631 LatexCommand ref
12632 reference "des:CopyStyle"
12633
12634 \end_inset
12635
12636 )ページ参照)。
12637 \end_layout
12638
12639 \begin_layout Description
12640 \begin_inset Flex Code
12641 status collapsed
12642
12643 \begin_layout Plain Layout
12644 CustomPars
12645 \end_layout
12646
12647 \end_inset
12648
12649  [
12650 \begin_inset Flex Code
12651 status collapsed
12652
12653 \begin_layout Plain Layout
12654
12655 \emph on
12656 0
12657 \end_layout
12658
12659 \end_inset
12660
12661 ,
12662 \begin_inset Flex Code
12663 status collapsed
12664
12665 \begin_layout Plain Layout
12666 1
12667 \end_layout
12668
12669 \end_inset
12670
12671 ] 段落を設定するのに、段落設定ダイアログをユーザが使えるかどうかを指定します。
12672 \end_layout
12673
12674 \begin_layout Description
12675 \begin_inset Flex Code
12676 status collapsed
12677
12678 \begin_layout Plain Layout
12679 Decoration
12680 \end_layout
12681
12682 \end_inset
12683
12684  差込枠の枠とボタンをレンダリングするのに使用する様式を指定するもので、
12685 \begin_inset Flex Code
12686 status collapsed
12687
12688 \begin_layout Plain Layout
12689 Classic
12690 \end_layout
12691
12692 \end_inset
12693
12694
12695 \begin_inset Flex Code
12696 status collapsed
12697
12698 \begin_layout Plain Layout
12699 Minimalistic
12700 \end_layout
12701
12702 \end_inset
12703
12704
12705 \begin_inset Flex Code
12706 status collapsed
12707
12708 \begin_layout Plain Layout
12709 Conglomerate
12710 \end_layout
12711
12712 \end_inset
12713
12714 のいずれかを指定することができます。脚注は通常
12715 \begin_inset Flex Code
12716 status collapsed
12717
12718 \begin_layout Plain Layout
12719 Classic
12720 \end_layout
12721
12722 \end_inset
12723
12724 を使用し、TeXコード差込枠は通常
12725 \begin_inset Flex Code
12726 status collapsed
12727
12728 \begin_layout Plain Layout
12729 Minimalistic
12730 \end_layout
12731
12732 \end_inset
12733
12734 、文字様式は
12735 \begin_inset Flex Code
12736 status collapsed
12737
12738 \begin_layout Plain Layout
12739 Conglomerate
12740 \end_layout
12741
12742 \end_inset
12743
12744 を使用します。
12745 \end_layout
12746
12747 \begin_layout Description
12748 \begin_inset Flex Code
12749 status collapsed
12750
12751 \begin_layout Plain Layout
12752 End
12753 \end_layout
12754
12755 \end_inset
12756
12757  InsetLayout宣言を閉じるのに必要です。
12758 \end_layout
12759
12760 \begin_layout Description
12761 \begin_inset Flex Code
12762 status collapsed
12763
12764 \begin_layout Plain Layout
12765 Font
12766 \end_layout
12767
12768 \end_inset
12769
12770  本文本体とラベル
12771 \emph on
12772 両方に
12773 \emph default
12774 使用されるフォントです。第
12775 \begin_inset CommandInset ref
12776 LatexCommand ref
12777 reference "sub:フォント指定"
12778
12779 \end_inset
12780
12781 節を参照。このフォントを定義すると自動的に
12782 \begin_inset Flex Code
12783 status collapsed
12784
12785 \begin_layout Plain Layout
12786 LabelFont
12787 \end_layout
12788
12789 \end_inset
12790
12791 も同じ値に定義されるので、これらを別々の値にしたいときは、これを先に定義してから後に
12792 \begin_inset Flex Code
12793 status collapsed
12794
12795 \begin_layout Plain Layout
12796 LabelFont
12797 \end_layout
12798
12799 \end_inset
12800
12801 を定義しなくてはならないことに注意してください。
12802 \end_layout
12803
12804 \begin_layout Description
12805 \begin_inset Flex Code
12806 status collapsed
12807
12808 \begin_layout Plain Layout
12809 ForceLTR
12810 \end_layout
12811
12812 \end_inset
12813
12814  たとえばTeXコードやURLで「latex」言語が「左から右」(ラテン式)出力になるように強制します。うまく機能しません。
12815 \end_layout
12816
12817 \begin_layout Description
12818 \begin_inset Flex Code
12819 status collapsed
12820
12821 \begin_layout Plain Layout
12822 ForcePlain
12823 \end_layout
12824
12825 \end_inset
12826
12827  [
12828 \begin_inset Flex Code
12829 status collapsed
12830
12831 \begin_layout Plain Layout
12832
12833 \emph on
12834 0
12835 \end_layout
12836
12837 \end_inset
12838
12839 ,
12840 \begin_inset Flex Code
12841 status collapsed
12842
12843 \begin_layout Plain Layout
12844 1
12845 \end_layout
12846
12847 \end_inset
12848
12849 ] PlainLayoutを使用するべきなのか、それともユーザが差込枠で使用されている段落様式を変更できるのかを指定します。既定値は偽です。
12850 \end_layout
12851
12852 \begin_layout Description
12853 \begin_inset Flex Code
12854 status collapsed
12855
12856 \begin_layout Plain Layout
12857 FreeSpacing
12858 \end_layout
12859
12860 \end_inset
12861
12862  段落様式と同様です(
12863 \begin_inset CommandInset ref
12864 LatexCommand pageref
12865 reference "des:FreeSpacing"
12866
12867 \end_inset
12868
12869 ページ参照)。既定値は偽です。
12870 \end_layout
12871
12872 \begin_layout Description
12873 \begin_inset Flex Code
12874 status collapsed
12875
12876 \begin_layout Plain Layout
12877 HTML*
12878 \end_layout
12879
12880 \end_inset
12881
12882  これらは、XHTML出力で使用されます。第
12883 \begin_inset CommandInset ref
12884 LatexCommand ref
12885 reference "sec:XHTML出力のタグ"
12886
12887 \end_inset
12888
12889 節をご覧ください。
12890 \end_layout
12891
12892 \begin_layout Description
12893 \begin_inset Flex Code
12894 status collapsed
12895
12896 \begin_layout Plain Layout
12897 InToc
12898 \end_layout
12899
12900 \end_inset
12901
12902  [
12903 \begin_inset Flex Code
12904 status collapsed
12905
12906 \begin_layout Plain Layout
12907
12908 \emph on
12909 0
12910 \end_layout
12911
12912 \end_inset
12913
12914 ,
12915 \begin_inset Flex Code
12916 status collapsed
12917
12918 \begin_layout Plain Layout
12919 1
12920 \end_layout
12921
12922 \end_inset
12923
12924 ] 「文書構造」ペイン用に出力される文字列に、この差込枠の内容を含めるかどうか。たとえば、節見出しの脚注の内容が、文書構造の目次に表示されることは望まないでしょ
12925 うが、通常、文字様式の内容は表示されることを望むでしょう。既定値は偽、すなわち含めません。
12926 \end_layout
12927
12928 \begin_layout Description
12929 \begin_inset Flex Code
12930 status collapsed
12931
12932 \begin_layout Plain Layout
12933 KeepEmpty
12934 \end_layout
12935
12936 \end_inset
12937
12938  段落様式と同様です(
12939 \begin_inset CommandInset ref
12940 LatexCommand pageref
12941 reference "des:KeepEmpty"
12942
12943 \end_inset
12944
12945 ページ参照)。既定値は偽です。
12946 \end_layout
12947
12948 \begin_layout Description
12949 \begin_inset Flex Code
12950 status collapsed
12951
12952 \begin_layout Plain Layout
12953 LabelFont
12954 \end_layout
12955
12956 \end_inset
12957
12958  ラベルに使用されるフォント。第
12959 \begin_inset CommandInset ref
12960 LatexCommand ref
12961 reference "sub:フォント指定"
12962
12963 \end_inset
12964
12965 節を参照。非効率を回避するため、この定義は
12966 \begin_inset Flex Code
12967 status collapsed
12968
12969 \begin_layout Plain Layout
12970 Font
12971 \end_layout
12972
12973 \end_inset
12974
12975 の前には決して現れてはなりません。
12976 \end_layout
12977
12978 \begin_layout Description
12979 \begin_inset Flex Code
12980 status collapsed
12981
12982 \begin_layout Plain Layout
12983 LabelString
12984 \end_layout
12985
12986 \end_inset
12987
12988  ボタンなどに差込枠のラベルとして表示されるもの。差込枠型によっては(TeXコードや派生枝)、ラベルが動的に変更されます。
12989 \end_layout
12990
12991 \begin_layout Description
12992 \begin_inset Flex Code
12993 status collapsed
12994
12995 \begin_layout Plain Layout
12996 LatexName
12997 \end_layout
12998
12999 \end_inset
13000
13001  対応するLaTeX関連物の名称。環境名ないしはコマンド名。
13002 \end_layout
13003
13004 \begin_layout Description
13005 \begin_inset Flex Code
13006 status collapsed
13007
13008 \begin_layout Plain Layout
13009 LatexParam
13010 \end_layout
13011
13012 \end_inset
13013
13014  対応する
13015 \begin_inset Flex Code
13016 status collapsed
13017
13018 \begin_layout Plain Layout
13019 LatexName
13020 \end_layout
13021
13022 \end_inset
13023
13024 関連物の非必須パラメータ。
13025 \begin_inset Flex Code
13026 status collapsed
13027
13028 \begin_layout Plain Layout
13029 []
13030 \end_layout
13031
13032 \end_inset
13033
13034 のような括弧対を含む。このパラメータはLyX内部から変更することはできません。
13035 \end_layout
13036
13037 \begin_layout Description
13038 \begin_inset Flex Code
13039 status collapsed
13040
13041 \begin_layout Plain Layout
13042 LatexType
13043 \end_layout
13044
13045 \end_inset
13046
13047  段落様式と同様です(
13048 \begin_inset CommandInset ref
13049 LatexCommand pageref
13050 reference "des:LatexType"
13051
13052 \end_inset
13053
13054 ページ参照)。
13055 \end_layout
13056
13057 \begin_layout Description
13058 \begin_inset Flex Code
13059 status collapsed
13060
13061 \begin_layout Plain Layout
13062 LyxType
13063 \end_layout
13064
13065 \end_inset
13066
13067  
13068 \begin_inset Flex Code
13069 status collapsed
13070
13071 \begin_layout Plain Layout
13072 charstyle
13073 \end_layout
13074
13075 \end_inset
13076
13077
13078 \begin_inset Flex Code
13079 status collapsed
13080
13081 \begin_layout Plain Layout
13082 custom
13083 \end_layout
13084
13085 \end_inset
13086
13087
13088 \begin_inset Flex Code
13089 status collapsed
13090
13091 \begin_layout Plain Layout
13092 element
13093 \end_layout
13094
13095 \end_inset
13096
13097
13098 \begin_inset Flex Code
13099 status collapsed
13100
13101 \begin_layout Plain Layout
13102 end
13103 \end_layout
13104
13105 \end_inset
13106
13107 (charstyleの定義の終わりなどを示すダミー定義)の各値を取ることができます。この項目は、任意設定差込枠に必須であり、かつ任意設定差込枠でしか意味を持ちま
13108 せん。この項目は、就中、差込枠がどのメニューに表示されるかを決定します。
13109 \begin_inset Flex Code
13110 status collapsed
13111
13112 \begin_layout Plain Layout
13113 LyxType
13114 \end_layout
13115
13116 \end_inset
13117
13118
13119 \begin_inset Flex Code
13120 status collapsed
13121
13122 \begin_layout Plain Layout
13123 charstyle
13124 \end_layout
13125
13126 \end_inset
13127
13128 に設定すると、
13129 \begin_inset Flex Code
13130 status collapsed
13131
13132 \begin_layout Plain Layout
13133 MultiPar
13134 \end_layout
13135
13136 \end_inset
13137
13138 が偽に設定されます。文字様式差込枠で
13139 \begin_inset Flex Code
13140 status collapsed
13141
13142 \begin_layout Plain Layout
13143 MultiPar
13144 \end_layout
13145
13146 \end_inset
13147
13148 を真にしたい時には、
13149 \begin_inset Flex Code
13150 status collapsed
13151
13152 \begin_layout Plain Layout
13153 LyxType
13154 \end_layout
13155
13156 \end_inset
13157
13158 を設定した
13159 \emph on
13160 後に
13161 \emph default
13162 設定すれば、真に設定することができます。
13163 \end_layout
13164
13165 \begin_layout Description
13166 \begin_inset Flex Code
13167 status collapsed
13168
13169 \begin_layout Plain Layout
13170 MultiPar
13171 \end_layout
13172
13173 \end_inset
13174
13175  [
13176 \begin_inset Flex Code
13177 status collapsed
13178
13179 \begin_layout Plain Layout
13180
13181 \emph on
13182 0
13183 \end_layout
13184
13185 \end_inset
13186
13187 ,
13188 \begin_inset Flex Code
13189 status collapsed
13190
13191 \begin_layout Plain Layout
13192 1
13193 \end_layout
13194
13195 \end_inset
13196
13197 ] この差込枠中に複数の段落を入れることができるかどうか。これは同時に、
13198 \begin_inset Flex Code
13199 status collapsed
13200
13201 \begin_layout Plain Layout
13202 CustomPars
13203 \end_layout
13204
13205 \end_inset
13206
13207 を同じ値に設定し、
13208 \begin_inset Flex Code
13209 status collapsed
13210
13211 \begin_layout Plain Layout
13212 ForcePlain
13213 \end_layout
13214
13215 \end_inset
13216
13217 を逆の値に設定します。これらは、
13218 \begin_inset Flex Code
13219 status collapsed
13220
13221 \begin_layout Plain Layout
13222 MultiPar
13223 \end_layout
13224
13225 \end_inset
13226
13227
13228 \emph on
13229 後に
13230 \emph default
13231 指定されれば、他の値に指定し直すことができます。既定値は真です。
13232 \end_layout
13233
13234 \begin_layout Description
13235 \begin_inset Flex Code
13236 status collapsed
13237
13238 \begin_layout Plain Layout
13239 NeedProtect
13240 \end_layout
13241
13242 \end_inset
13243
13244  [
13245 \begin_inset Flex Code
13246 status collapsed
13247
13248 \begin_layout Plain Layout
13249
13250 \emph on
13251 0
13252 \end_layout
13253
13254 \end_inset
13255
13256 ,
13257 \begin_inset Flex Code
13258 status collapsed
13259
13260 \begin_layout Plain Layout
13261 1
13262 \end_layout
13263
13264 \end_inset
13265
13266 ] 本レイアウト中で脆弱なコマンドを
13267 \begin_inset Flex Code
13268 status collapsed
13269
13270 \begin_layout Plain Layout
13271
13272 \backslash
13273 protect
13274 \end_layout
13275
13276 \end_inset
13277
13278 するか否か(註:当該コマンド自身をprotectするかどうかでは
13279 \emph on
13280 ありません
13281 \emph default
13282 )。既定値は偽です。
13283 \end_layout
13284
13285 \begin_layout Description
13286 \begin_inset Flex Code
13287 status collapsed
13288
13289 \begin_layout Plain Layout
13290 ParbreakIsNewline
13291 \end_layout
13292
13293 \end_inset
13294
13295  [
13296 \begin_inset Flex Code
13297 status collapsed
13298
13299 \begin_layout Plain Layout
13300
13301 \emph on
13302 0
13303 \end_layout
13304
13305 \end_inset
13306
13307 ,
13308 \begin_inset Flex Code
13309 status collapsed
13310
13311 \begin_layout Plain Layout
13312 1
13313 \end_layout
13314
13315 \end_inset
13316
13317 ] 段落様式と同様です(
13318 \begin_inset CommandInset ref
13319 LatexCommand ref
13320 reference "des:PathThru"
13321
13322 \end_inset
13323
13324 ページ参照)。既定値は偽です。
13325 \end_layout
13326
13327 \begin_layout Description
13328 \begin_inset Flex Code
13329 status collapsed
13330
13331 \begin_layout Plain Layout
13332 PassThru
13333 \end_layout
13334
13335 \end_inset
13336
13337  [
13338 \begin_inset Flex Code
13339 status collapsed
13340
13341 \begin_layout Plain Layout
13342
13343 \emph on
13344 0
13345 \end_layout
13346
13347 \end_inset
13348
13349 ,
13350 \begin_inset Flex Code
13351 status collapsed
13352
13353 \begin_layout Plain Layout
13354 1
13355 \end_layout
13356
13357 \end_inset
13358
13359 ] 段落様式と同様です(
13360 \begin_inset CommandInset ref
13361 LatexCommand ref
13362 reference "des:PathThru"
13363
13364 \end_inset
13365
13366 ページ参照)。既定値は偽です。
13367 \end_layout
13368
13369 \begin_layout Description
13370 \begin_inset Flex Code
13371 status collapsed
13372
13373 \begin_layout Plain Layout
13374 Preamble
13375 \end_layout
13376
13377 \end_inset
13378
13379  段落様式と同様です(
13380 \begin_inset CommandInset ref
13381 LatexCommand pageref
13382 reference "des:Preamble"
13383
13384 \end_inset
13385
13386 ページ参照)。
13387 \end_layout
13388
13389 \begin_layout Description
13390 \begin_inset Flex Code
13391 status collapsed
13392
13393 \begin_layout Plain Layout
13394 RefPrefix
13395 \end_layout
13396
13397 \end_inset
13398
13399  [
13400 \begin_inset Flex Code
13401 status collapsed
13402
13403 \begin_layout Plain Layout
13404 文字列
13405 \end_layout
13406
13407 \end_inset
13408
13409 ] この型の差込枠を参照する際、生成されるラベルに使用する前置句。これによって、整形参照を使用することができるようになります。
13410 \end_layout
13411
13412 \begin_layout Description
13413 \begin_inset Flex Code
13414 status collapsed
13415
13416 \begin_layout Plain Layout
13417 Requires
13418 \end_layout
13419
13420 \end_inset
13421
13422  [
13423 \begin_inset Flex Code
13424 status collapsed
13425
13426 \begin_layout Plain Layout
13427 文字列
13428 \end_layout
13429
13430 \end_inset
13431
13432 ] 段落様式と同様です(
13433 \begin_inset CommandInset ref
13434 LatexCommand pageref
13435 reference "des:Requires"
13436
13437 \end_inset
13438
13439 ページ参照)。
13440 \end_layout
13441
13442 \begin_layout Description
13443 \begin_inset Flex Code
13444 status collapsed
13445
13446 \begin_layout Plain Layout
13447 ResetFont
13448 \end_layout
13449
13450 \end_inset
13451
13452  [
13453 \begin_inset Flex Code
13454 status collapsed
13455
13456 \begin_layout Plain Layout
13457 0
13458 \end_layout
13459
13460 \end_inset
13461
13462
13463 \begin_inset Flex Code
13464 status collapsed
13465
13466 \begin_layout Plain Layout
13467
13468 \emph on
13469 1
13470 \end_layout
13471
13472 \end_inset
13473
13474 ] この差込枠が周囲の環境と同じフォントを用いるか、独自のフォントを用いるか。既定値は真、すなわち独自のフォントを用います。
13475 \end_layout
13476
13477 \begin_layout Description
13478 \begin_inset Flex Code
13479 status collapsed
13480
13481 \begin_layout Plain Layout
13482 Spellcheck
13483 \end_layout
13484
13485 \end_inset
13486
13487  [
13488 \begin_inset Flex Code
13489 status collapsed
13490
13491 \begin_layout Plain Layout
13492 0
13493 \end_layout
13494
13495 \end_inset
13496
13497 ,
13498 \begin_inset Flex Code
13499 status collapsed
13500
13501 \begin_layout Plain Layout
13502
13503 \emph on
13504 1
13505 \end_layout
13506
13507 \end_inset
13508
13509 ] この差込枠の内容をスペルチェックするか否か。既定値は真です。
13510 \end_layout
13511
13512 \begin_layout Subsection
13513 カウンタ
13514 \begin_inset CommandInset label
13515 LatexCommand label
13516 name "sub:カウンタ"
13517
13518 \end_inset
13519
13520
13521 \end_layout
13522
13523 \begin_layout Standard
13524 LyX第1.3.0版以来、テキストクラス自体の中でカウンタ(
13525 \begin_inset Flex MenuItem
13526 status collapsed
13527
13528 \begin_layout Plain Layout
13529 chapter
13530 \end_layout
13531
13532 \end_inset
13533
13534
13535 \begin_inset Flex MenuItem
13536 status collapsed
13537
13538 \begin_layout Plain Layout
13539 figure
13540 \end_layout
13541
13542 \end_inset
13543
13544 ・\SpecialChar \ldots{}
13545 )を定義することが可能となり、かつ必要となりました。標準的なフロートは
13546 \begin_inset Flex Code
13547 status collapsed
13548
13549 \begin_layout Plain Layout
13550 stdcounters.inc
13551 \end_layout
13552
13553 \end_inset
13554
13555 ファイルに含まれているので、作業中のレイアウトファイルに
13556 \end_layout
13557
13558 \begin_layout LyX-Code
13559 Input stdcounters.inc
13560 \end_layout
13561
13562 \begin_layout Standard
13563 と加えるだけで済むことも多いでしょう。しかし自製カウンタを定義したければ、そうすることもできます。カウンタ宣言は、
13564 \end_layout
13565
13566 \begin_layout LyX-Code
13567 Counter 名称
13568 \end_layout
13569
13570 \begin_layout Standard
13571 で始まらなくてはなりません。ここで「
13572 \begin_inset Flex Code
13573 status collapsed
13574
13575 \begin_layout Plain Layout
13576 名称
13577 \end_layout
13578
13579 \end_inset
13580
13581 」はカウンタ名で置き換えます。また、宣言は「
13582 \begin_inset Flex Code
13583 status collapsed
13584
13585 \begin_layout Plain Layout
13586 End
13587 \end_layout
13588
13589 \end_inset
13590
13591 」で終わらなくてはなりません。以下のパラメータを使用することができます。
13592 \end_layout
13593
13594 \begin_layout Description
13595 \begin_inset Flex Code
13596 status collapsed
13597
13598 \begin_layout Plain Layout
13599 LabelString [文字列=""]
13600 \end_layout
13601
13602 \end_inset
13603
13604  定義されていると、ここで指定した文字列がカウンタの表示の仕方を定義します。この値を指定すると、
13605 \begin_inset Flex Code
13606 status collapsed
13607
13608 \begin_layout Plain Layout
13609 LabelStringAppendix
13610 \end_layout
13611
13612 \end_inset
13613
13614 も同じ値に設定されます。文字列中では、以下の構成要素を使用することができます。
13615 \end_layout
13616
13617 \begin_deeper
13618 \begin_layout Itemize
13619 \begin_inset Flex Code
13620 status collapsed
13621
13622 \begin_layout Plain Layout
13623
13624 \backslash
13625 thecounter
13626 \end_layout
13627
13628 \end_inset
13629
13630 は、カウンタ
13631 \begin_inset Flex Code
13632 status collapsed
13633
13634 \begin_layout Plain Layout
13635 counter
13636 \end_layout
13637
13638 \end_inset
13639
13640
13641 \begin_inset Flex Code
13642 status collapsed
13643
13644 \begin_layout Plain Layout
13645 LabelString
13646 \end_layout
13647
13648 \end_inset
13649
13650 (または
13651 \begin_inset Newline linebreak
13652 \end_inset
13653
13654
13655 \begin_inset Flex Code
13656 status collapsed
13657
13658 \begin_layout Plain Layout
13659 LabelStringAppendix
13660 \end_layout
13661
13662 \end_inset
13663
13664 )を展開したもので置き換えられます。 
13665 \end_layout
13666
13667 \begin_layout Itemize
13668 カウンタ値は、LaTeX型マクロ
13669 \begin_inset Flex Code
13670 status collapsed
13671
13672 \begin_layout Plain Layout
13673
13674 \backslash
13675
13676 \emph on
13677 numbertype
13678 \emph default
13679 {
13680 \emph on
13681 カウンタ
13682 \emph default
13683 }
13684 \end_layout
13685
13686 \end_inset
13687
13688 を用いて表現することができます。ここで
13689 \begin_inset Flex Code
13690 status collapsed
13691
13692 \begin_layout Plain Layout
13693
13694 \emph on
13695 numbertype
13696 \end_layout
13697
13698 \end_inset
13699
13700 は以下のいずれかです
13701 \begin_inset Foot
13702 status collapsed
13703
13704 \begin_layout Plain Layout
13705 実は、事態はもう少し複雑です。以下に説明されているもの以外の
13706 \emph on
13707 numbertype
13708 \emph default
13709 は何であれ、アラビア数字を生成します。これが将来変更されたとしても不思議ではないでしょう。
13710 \end_layout
13711
13712 \end_inset
13713
13714
13715 \begin_inset Flex Code
13716 status collapsed
13717
13718 \begin_layout Plain Layout
13719 arabic
13720 \end_layout
13721
13722 \end_inset
13723
13724 :1, 2, 3,\SpecialChar \ldots{}
13725
13726 \begin_inset Flex Code
13727 status collapsed
13728
13729 \begin_layout Plain Layout
13730 alph
13731 \end_layout
13732
13733 \end_inset
13734
13735 :a, b, c, \SpecialChar \ldots{}
13736 (小文字);
13737 \begin_inset Flex Code
13738 status collapsed
13739
13740 \begin_layout Plain Layout
13741 Alph
13742 \end_layout
13743
13744 \end_inset
13745
13746 :A, B, C, \SpecialChar \ldots{}
13747 (大文字);
13748 \begin_inset Flex Code
13749 status collapsed
13750
13751 \begin_layout Plain Layout
13752 roman
13753 \end_layout
13754
13755 \end_inset
13756
13757 :i, ii, iii, \SpecialChar \ldots{}
13758 (小文字ローマ数字);
13759 \begin_inset Flex Code
13760 status collapsed
13761
13762 \begin_layout Plain Layout
13763 Roman
13764 \end_layout
13765
13766 \end_inset
13767
13768 :I, II, III\SpecialChar \ldots{}
13769 (大文字ローマ数字);
13770 \begin_inset Flex Code
13771 status collapsed
13772
13773 \begin_layout Plain Layout
13774 hebrew
13775 \end_layout
13776
13777 \end_inset
13778
13779 (ヘブライ語数字)。
13780 \end_layout
13781
13782 \end_deeper
13783 \begin_layout Standard
13784 LabelStringが定義されていないときは、既定値は以下のように組み立てられます。このカウンタに親カウンタ
13785 \begin_inset Flex Code
13786 status collapsed
13787
13788 \begin_layout Plain Layout
13789 master
13790 \end_layout
13791
13792 \end_inset
13793
13794
13795 \begin_inset Flex Code
13796 status collapsed
13797
13798 \begin_layout Plain Layout
13799 Within
13800 \end_layout
13801
13802 \end_inset
13803
13804 で定義)があるときには、文字列
13805 \begin_inset Newline linebreak
13806 \end_inset
13807
13808
13809 \begin_inset Flex Code
13810 status collapsed
13811
13812 \begin_layout Plain Layout
13813
13814 \backslash
13815 themaster.
13816 \backslash
13817 arabic{カウンタ}
13818 \end_layout
13819
13820 \end_inset
13821
13822 が使用されます。それ以外の場合は、
13823 \begin_inset Flex Code
13824 status collapsed
13825
13826 \begin_layout Plain Layout
13827
13828 \backslash
13829 arabic{カウンタ}
13830 \end_layout
13831
13832 \end_inset
13833
13834 が使用されます。
13835 \end_layout
13836
13837 \begin_layout Description
13838 \begin_inset Flex Code
13839 status collapsed
13840
13841 \begin_layout Plain Layout
13842 LabelStringAppendix
13843 \end_layout
13844
13845 \end_inset
13846
13847  [
13848 \begin_inset Flex Code
13849 status collapsed
13850
13851 \begin_layout Plain Layout
13852 文字列
13853 \end_layout
13854
13855 \end_inset
13856
13857 =""] 
13858 \begin_inset Flex Code
13859 status collapsed
13860
13861 \begin_layout Plain Layout
13862 LabelString
13863 \end_layout
13864
13865 \end_inset
13866
13867 と同様ですが、付録で使用するためのものです。
13868 \end_layout
13869
13870 \begin_layout Description
13871 \begin_inset Flex Code
13872 status collapsed
13873
13874 \begin_layout Plain Layout
13875 PrettyFormat
13876 \end_layout
13877
13878 \end_inset
13879
13880  [
13881 \begin_inset Flex Code
13882 status collapsed
13883
13884 \begin_layout Plain Layout
13885 文字列
13886 \end_layout
13887
13888 \end_inset
13889
13890 =
13891 \begin_inset Quotes erd
13892 \end_inset
13893
13894
13895 \begin_inset Quotes erd
13896 \end_inset
13897
13898 ] このカウンタの整形参照で使用する書式。たとえば、節番号への参照を「Section 2.4」のように表示させたい場合には、文字列に「##」を含めます。これは、カ
13899 ウンタ番号で置換されます。したがって、節の場合には「Section ##」のようにします。
13900 \end_layout
13901
13902 \begin_layout Description
13903 \begin_inset Flex Code
13904 status collapsed
13905
13906 \begin_layout Plain Layout
13907 Within
13908 \end_layout
13909
13910 \end_inset
13911
13912  [
13913 \begin_inset Flex Code
13914 status collapsed
13915
13916 \begin_layout Plain Layout
13917 文字列
13918 \end_layout
13919
13920 \end_inset
13921
13922 =
13923 \begin_inset Quotes erd
13924 \end_inset
13925
13926
13927 \begin_inset Quotes erd
13928 \end_inset
13929
13930 ] これを別のカウンタ名に設定すると、現在のカウンタは、別のカウンタが増加する毎にリセットされます。たとえば、
13931 \begin_inset Flex Code
13932 status collapsed
13933
13934 \begin_layout Plain Layout
13935 subsection
13936 \end_layout
13937
13938 \end_inset
13939
13940
13941 \begin_inset Flex Code
13942 status collapsed
13943
13944 \begin_layout Plain Layout
13945 section
13946 \end_layout
13947
13948 \end_inset
13949
13950 毎に番号がリセットされます。
13951 \end_layout
13952
13953 \begin_layout Subsection
13954 フォント指定
13955 \begin_inset CommandInset label
13956 LatexCommand label
13957 name "sub:フォント指定"
13958
13959 \end_inset
13960
13961
13962 \end_layout
13963
13964 \begin_layout Standard
13965 フォント指定は、以下のような形を取ります。
13966 \end_layout
13967
13968 \begin_layout LyX-Code
13969 Font 
13970 \family roman
13971 \emph on
13972 または
13973 \family default
13974 \emph default
13975  LabelFont
13976 \end_layout
13977
13978 \begin_layout LyX-Code
13979  ...
13980 \end_layout
13981
13982 \begin_layout LyX-Code
13983 EndFont
13984 \end_layout
13985
13986 \begin_layout Standard
13987 以下のコマンドを使用することができます。
13988 \end_layout
13989
13990 \begin_layout Description
13991 \begin_inset Flex Code
13992 status collapsed
13993
13994 \begin_layout Plain Layout
13995 Color
13996 \end_layout
13997
13998 \end_inset
13999
14000  [
14001 \begin_inset Flex Code
14002 status collapsed
14003
14004 \begin_layout Plain Layout
14005
14006 \emph on
14007 none
14008 \end_layout
14009
14010 \end_inset
14011
14012
14013 \begin_inset Flex Code
14014 status collapsed
14015
14016 \begin_layout Plain Layout
14017 black
14018 \end_layout
14019
14020 \end_inset
14021
14022
14023 \begin_inset Flex Code
14024 status collapsed
14025
14026 \begin_layout Plain Layout
14027 white
14028 \end_layout
14029
14030 \end_inset
14031
14032
14033 \begin_inset Flex Code
14034 status collapsed
14035
14036 \begin_layout Plain Layout
14037 red
14038 \end_layout
14039
14040 \end_inset
14041
14042
14043 \begin_inset Flex Code
14044 status collapsed
14045
14046 \begin_layout Plain Layout
14047 green
14048 \end_layout
14049
14050 \end_inset
14051
14052
14053 \begin_inset Flex Code
14054 status collapsed
14055
14056 \begin_layout Plain Layout
14057 blue
14058 \end_layout
14059
14060 \end_inset
14061
14062
14063 \begin_inset Flex Code
14064 status collapsed
14065
14066 \begin_layout Plain Layout
14067 cyan
14068 \end_layout
14069
14070 \end_inset
14071
14072
14073 \begin_inset Flex Code
14074 status collapsed
14075
14076 \begin_layout Plain Layout
14077 magenta
14078 \end_layout
14079
14080 \end_inset
14081
14082
14083 \begin_inset Flex Code
14084 status collapsed
14085
14086 \begin_layout Plain Layout
14087 yellow
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 Family
14101 \end_layout
14102
14103 \end_inset
14104
14105  [
14106 \emph on
14107
14108 \begin_inset Flex Code
14109 status collapsed
14110
14111 \begin_layout Plain Layout
14112 Roman
14113 \end_layout
14114
14115 \end_inset
14116
14117
14118 \emph default
14119
14120 \begin_inset Flex Code
14121 status collapsed
14122
14123 \begin_layout Plain Layout
14124 Sans
14125 \end_layout
14126
14127 \end_inset
14128
14129
14130 \begin_inset Flex Code
14131 status collapsed
14132
14133 \begin_layout Plain Layout
14134 Typewriter
14135 \end_layout
14136
14137 \end_inset
14138
14139
14140 \end_layout
14141
14142 \begin_layout Description
14143 \begin_inset Flex Code
14144 status collapsed
14145
14146 \begin_layout Plain Layout
14147 Misc
14148 \end_layout
14149
14150 \end_inset
14151
14152  [
14153 \begin_inset Flex Code
14154 status collapsed
14155
14156 \begin_layout Plain Layout
14157 文字列
14158 \end_layout
14159
14160 \end_inset
14161
14162 ] 有効な引数は、
14163 \begin_inset Flex Code
14164 status collapsed
14165
14166 \begin_layout Plain Layout
14167 emph
14168 \end_layout
14169
14170 \end_inset
14171
14172
14173 \begin_inset Flex Code
14174 status collapsed
14175
14176 \begin_layout Plain Layout
14177 noun
14178 \end_layout
14179
14180 \end_inset
14181
14182
14183 \begin_inset Flex Code
14184 status collapsed
14185
14186 \begin_layout Plain Layout
14187 strikeout
14188 \end_layout
14189
14190 \end_inset
14191
14192
14193 \begin_inset Flex Code
14194 status collapsed
14195
14196 \begin_layout Plain Layout
14197 underbar
14198 \end_layout
14199
14200 \end_inset
14201
14202
14203 \begin_inset Flex Code
14204 status collapsed
14205
14206 \begin_layout Plain Layout
14207 uuline
14208 \end_layout
14209
14210 \end_inset
14211
14212
14213 \begin_inset Flex Code
14214 status collapsed
14215
14216 \begin_layout Plain Layout
14217 uwave
14218 \end_layout
14219
14220 \end_inset
14221
14222
14223 \begin_inset Flex Code
14224 status collapsed
14225
14226 \begin_layout Plain Layout
14227 no_emph
14228 \end_layout
14229
14230 \end_inset
14231
14232
14233 \begin_inset Flex Code
14234 status collapsed
14235
14236 \begin_layout Plain Layout
14237 no_noun
14238 \end_layout
14239
14240 \end_inset
14241
14242
14243 \begin_inset Flex Code
14244 status collapsed
14245
14246 \begin_layout Plain Layout
14247 no_strikeout
14248 \end_layout
14249
14250 \end_inset
14251
14252
14253 \begin_inset Flex Code
14254 status collapsed
14255
14256 \begin_layout Plain Layout
14257 no_bar
14258 \end_layout
14259
14260 \end_inset
14261
14262
14263 \begin_inset Flex Code
14264 status collapsed
14265
14266 \begin_layout Plain Layout
14267 no_uuline
14268 \end_layout
14269
14270 \end_inset
14271
14272
14273 \begin_inset Flex Code
14274 status collapsed
14275
14276 \begin_layout Plain Layout
14277 no_uwave
14278 \end_layout
14279
14280 \end_inset
14281
14282 です。それぞれ、対応する属性を有効にしたり無効にしたりします。
14283 \begin_inset Newline newline
14284 \end_inset
14285
14286 たとえば、
14287 \begin_inset Flex Code
14288 status collapsed
14289
14290 \begin_layout Plain Layout
14291 emph
14292 \end_layout
14293
14294 \end_inset
14295
14296 は強調を有効にし、
14297 \begin_inset Flex Code
14298 status collapsed
14299
14300 \begin_layout Plain Layout
14301 no_emph
14302 \end_layout
14303
14304 \end_inset
14305
14306 はそれを無効にします。もし後者がわかりにくければ、現在のコンテクストのフォント設定は、一般的に周囲のコンテクストから継承していることを思い出してください。ですか
14307
14308 \begin_inset Flex Code
14309 status collapsed
14310
14311 \begin_layout Plain Layout
14312 no_emph
14313 \end_layout
14314
14315 \end_inset
14316
14317 は、たとえば定理環境で、何をせずとも有効となっている強調を無効にするのです。
14318 \end_layout
14319
14320 \begin_layout Description
14321 \begin_inset Flex Code
14322 status collapsed
14323
14324 \begin_layout Plain Layout
14325 Series
14326 \end_layout
14327
14328 \end_inset
14329
14330  [
14331 \emph on
14332
14333 \begin_inset Flex Code
14334 status collapsed
14335
14336 \begin_layout Plain Layout
14337 Medium
14338 \end_layout
14339
14340 \end_inset
14341
14342
14343 \emph default
14344
14345 \begin_inset Flex Code
14346 status collapsed
14347
14348 \begin_layout Plain Layout
14349 Bold
14350 \end_layout
14351
14352 \end_inset
14353
14354
14355 \end_layout
14356
14357 \begin_layout Description
14358 \begin_inset Flex Code
14359 status collapsed
14360
14361 \begin_layout Plain Layout
14362 Shape
14363 \end_layout
14364
14365 \end_inset
14366
14367  [
14368 \emph on
14369
14370 \begin_inset Flex Code
14371 status collapsed
14372
14373 \begin_layout Plain Layout
14374 Up
14375 \end_layout
14376
14377 \end_inset
14378
14379
14380 \emph default
14381
14382 \begin_inset Flex Code
14383 status collapsed
14384
14385 \begin_layout Plain Layout
14386 Italic
14387 \end_layout
14388
14389 \end_inset
14390
14391
14392 \begin_inset Flex Code
14393 status collapsed
14394
14395 \begin_layout Plain Layout
14396 SmallCaps
14397 \end_layout
14398
14399 \end_inset
14400
14401
14402 \begin_inset Flex Code
14403 status collapsed
14404
14405 \begin_layout Plain Layout
14406 Slanted
14407 \end_layout
14408
14409 \end_inset
14410
14411
14412 \end_layout
14413
14414 \begin_layout Description
14415 \begin_inset Flex Code
14416 status collapsed
14417
14418 \begin_layout Plain Layout
14419 Size
14420 \end_layout
14421
14422 \end_inset
14423
14424  [
14425 \begin_inset Flex Code
14426 status collapsed
14427
14428 \begin_layout Plain Layout
14429 tiny
14430 \end_layout
14431
14432 \end_inset
14433
14434
14435 \begin_inset Flex Code
14436 status collapsed
14437
14438 \begin_layout Plain Layout
14439 small
14440 \end_layout
14441
14442 \end_inset
14443
14444
14445 \begin_inset Flex Code
14446 status collapsed
14447
14448 \begin_layout Plain Layout
14449
14450 \emph on
14451 normal
14452 \end_layout
14453
14454 \end_inset
14455
14456
14457 \begin_inset Flex Code
14458 status collapsed
14459
14460 \begin_layout Plain Layout
14461 large
14462 \end_layout
14463
14464 \end_inset
14465
14466
14467 \begin_inset Flex Code
14468 status collapsed
14469
14470 \begin_layout Plain Layout
14471 larger
14472 \end_layout
14473
14474 \end_inset
14475
14476
14477 \begin_inset Flex Code
14478 status collapsed
14479
14480 \begin_layout Plain Layout
14481 largest
14482 \end_layout
14483
14484 \end_inset
14485
14486
14487 \begin_inset Flex Code
14488 status collapsed
14489
14490 \begin_layout Plain Layout
14491 huge
14492 \end_layout
14493
14494 \end_inset
14495
14496
14497 \begin_inset Flex Code
14498 status collapsed
14499
14500 \begin_layout Plain Layout
14501 giant
14502 \end_layout
14503
14504 \end_inset
14505
14506 ]
14507 \end_layout
14508
14509 \begin_layout Subsection
14510 \begin_inset CommandInset label
14511 LatexCommand label
14512 name "sub:引用書式指定"
14513
14514 \end_inset
14515
14516 引用書式指定
14517 \end_layout
14518
14519 \begin_layout Standard
14520 (引用ダイアログやツールチップなどの)LyX内部やXHTML出力において、書誌情報をどのように表示するべきかの叙述には、
14521 \begin_inset Flex Code
14522 status collapsed
14523
14524 \begin_layout Plain Layout
14525 CiteFormat
14526 \end_layout
14527
14528 \end_inset
14529
14530 ブロックが使用されています。このブロックは、以下のような形をしています。
14531 \end_layout
14532
14533 \begin_layout LyX-Code
14534 CiteFormat
14535 \end_layout
14536
14537 \begin_layout LyX-Code
14538  article ...
14539 \end_layout
14540
14541 \begin_layout LyX-Code
14542  book ...
14543 \end_layout
14544
14545 \begin_layout LyX-Code
14546 End
14547 \end_layout
14548
14549 \begin_layout Standard
14550 上記の各行は、それぞれarticleやbookに関連付けられた書誌情報をどのように表示するべきかを定義するものですが、このような定義は、BibTeXファイル中に
14551 存在しうる「項目型」すべてについて与えることができます。特定の定義が与えられなければ、LyXは、ソースコード中に定義されている既定書式を使用します。LyXは、い
14552 くつかの書式を
14553 \begin_inset Flex Code
14554 status collapsed
14555
14556 \begin_layout Plain Layout
14557 stdciteformats.inc
14558 \end_layout
14559
14560 \end_inset
14561
14562 ファイルで事前定義しており、これはほとんどのLyX文書クラスにインクルードされています。
14563 \end_layout
14564
14565 \begin_layout Standard
14566 この定義は、BibTeXキーをその値で置換できる機能を持った、簡単な言語を使用しています。キーは、
14567 \begin_inset Flex Code
14568 status collapsed
14569
14570 \begin_layout Plain Layout
14571 %author%
14572 \end_layout
14573
14574 \end_inset
14575
14576 のように
14577 \begin_inset Flex Code
14578 status collapsed
14579
14580 \begin_layout Plain Layout
14581 %
14582 \end_layout
14583
14584 \end_inset
14585
14586 記号でくくらなくてはなりません。したがって、簡単な定義は以下のようになります。
14587 \end_layout
14588
14589 \begin_layout LyX-Code
14590 misc %author%, 
14591 \begin_inset Quotes eld
14592 \end_inset
14593
14594 %title%
14595 \begin_inset Quotes erd
14596 \end_inset
14597
14598
14599 \end_layout
14600
14601 \begin_layout Standard
14602 これは、「著者名・コンマ・引用に囲まれたタイトル・終止符」を出力します。
14603 \end_layout
14604
14605 \begin_layout Standard
14606 もちろん、キーが存在するときのみ、キーを出力したい時があるはずです。このようなときには
14607 \begin_inset Flex Code
14608 status collapsed
14609
14610 \begin_layout Plain Layout
14611 {%volume%[[vol.
14612 \begin_inset space ~
14613 \end_inset
14614
14615 %volume%]]}
14616 \end_layout
14617
14618 \end_inset
14619
14620 のように、条件付きの構成を使用することができます。これは、
14621 \begin_inset Flex Code
14622 status collapsed
14623
14624 \begin_layout Plain Layout
14625 volume
14626 \end_layout
14627
14628 \end_inset
14629
14630 が存在するならば,「vol.
14631 \begin_inset space ~
14632 \end_inset
14633
14634 」とvolumeキーを出力するという意味です。また、
14635 \begin_inset Flex Code
14636 status collapsed
14637
14638 \begin_layout Plain Layout
14639 {%author%[[%author%]][[%editor%, ed.]]}
14640 \end_layout
14641
14642 \end_inset
14643
14644 のように、条件の中にelse節を含めることも可能です。ここでは、もし
14645 \begin_inset Flex Code
14646 status collapsed
14647
14648 \begin_layout Plain Layout
14649 author
14650 \end_layout
14651
14652 \end_inset
14653
14654 キーが存在するならば出力され、そうでなければeditorキーと「,
14655 \begin_inset space ~
14656 \end_inset
14657
14658 ed.」が出力されます。ここでもキーは、
14659 \begin_inset Flex Code
14660 status collapsed
14661
14662 \begin_layout Plain Layout
14663 %
14664 \end_layout
14665
14666 \end_inset
14667
14668 記号でくくられていることに注意してください。条件全体は、波括弧で囲まれています。if節およびelse節は、「
14669 \begin_inset Flex Code
14670 status collapsed
14671
14672 \begin_layout Plain Layout
14673 [[
14674 \end_layout
14675
14676 \end_inset
14677
14678 」と「
14679 \begin_inset Flex Code
14680 status collapsed
14681
14682 \begin_layout Plain Layout
14683 ]]
14684 \end_layout
14685
14686 \end_inset
14687
14688 」の二重角括弧で囲まれています。これらすべてのあいだには,空白は入ってはなりません。
14689 \end_layout
14690
14691 \begin_layout Standard
14692 もう一つ、定義中で使用することのできる文法として、
14693 \begin_inset Flex Code
14694 status collapsed
14695
14696 \begin_layout Plain Layout
14697 {!<i>!}
14698 \end_layout
14699
14700 \end_inset
14701
14702 という形をしたものがあります。これは、「リッチテキスト」を生成するときに使われる整形情報を定義するものです。当然のことながら、平文を書き出すときには、HTMLタ
14703 グを出力させたくはありませんから、HTMLタグは「
14704 \begin_inset Flex Code
14705 status collapsed
14706
14707 \begin_layout Plain Layout
14708 {!
14709 \end_layout
14710
14711 \end_inset
14712
14713 」と「
14714 \begin_inset Flex Code
14715 status collapsed
14716
14717 \begin_layout Plain Layout
14718 !}
14719 \end_layout
14720
14721 \end_inset
14722
14723 」でくるんでやらなくてはならないのです。
14724 \end_layout
14725
14726 \begin_layout Standard
14727 \begin_inset Flex Code
14728 status collapsed
14729
14730 \begin_layout Plain Layout
14731 CiteFormat
14732 \end_layout
14733
14734 \end_inset
14735
14736 ブロックでは、他に2つの特殊な定義が可能です。一つめの例としては、
14737 \end_layout
14738
14739 \begin_layout LyX-Code
14740 !quotetitle 
14741 \begin_inset Quotes eld
14742 \end_inset
14743
14744 %title%
14745 \begin_inset Quotes erd
14746 \end_inset
14747
14748
14749 \end_layout
14750
14751 \begin_layout Standard
14752 といった例が挙げられます。これは、短縮形ないしはマクロであり、
14753 \begin_inset Flex Code
14754 status collapsed
14755
14756 \begin_layout Plain Layout
14757 %!quotetitle%
14758 \end_layout
14759
14760 \end_inset
14761
14762 のように、これがキーであるかのように扱って使用することができます。LyXは、
14763 \begin_inset Flex Code
14764 status collapsed
14765
14766 \begin_layout Plain Layout
14767 %!quotetitle%
14768 \end_layout
14769
14770 \end_inset
14771
14772 を、そこで定義されているものを扱う場合と同じように取り扱います。ですから、明白な警告を敢えてさせて頂くと、
14773 \end_layout
14774
14775 \begin_layout LyX-Code
14776 !funfun %funfun%
14777 \end_layout
14778
14779 \begin_layout Standard
14780 のようなことはしないでください。LyXは、無限ループに陥るようなことはありませんが、諦めるまでに長いループに入るかもしれません。
14781 \end_layout
14782
14783 \begin_layout Standard
14784 特殊な定義の二つめは、
14785 \end_layout
14786
14787 \begin_layout LyX-Code
14788 _pptext pp.
14789 \end_layout
14790
14791 \begin_layout Standard
14792 のようなものです。これは、文字列の翻訳可能な部分を定義するもので、書誌情報中の関連部分が翻訳されるようにすることができます。
14793 \begin_inset Flex Code
14794 status collapsed
14795
14796 \begin_layout Plain Layout
14797 %_pptext%
14798 \end_layout
14799
14800 \end_inset
14801
14802 のように、これをキーとして扱って、定義の中に入れることもできます。これらのうちいくつかは、
14803 \begin_inset Flex Code
14804 status collapsed
14805
14806 \begin_layout Plain Layout
14807 stdciteformats.inc
14808 \end_layout
14809
14810 \end_inset
14811
14812 中に事前定義されています。これは、上記で述べたような意味でのマクロではないことに注意してください。
14813 \end_layout
14814
14815 \begin_layout Standard
14816 以下は、これらの機能を全て使った例です。
14817 \end_layout
14818
14819 \begin_layout LyX-Code
14820 !authoredit {%author%[[%author%, ]][[{%editor%[[%editor%, %_edtext%, ]]}]]}
14821 \end_layout
14822
14823 \begin_layout Standard
14824 これは、
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 author
14840 \end_layout
14841
14842 \end_inset
14843
14844 キーが定義されておらず、
14845 \begin_inset Flex Code
14846 status collapsed
14847
14848 \begin_layout Plain Layout
14849 editor
14850 \end_layout
14851
14852 \end_inset
14853
14854 キーが定義されているならば、編集者名の後に
14855 \begin_inset Flex Code
14856 status collapsed
14857
14858 \begin_layout Plain Layout
14859 _edtext
14860 \end_layout
14861
14862 \end_inset
14863
14864 ないしはその翻訳(既定では「ed.」)を出力します。これは実は
14865 \begin_inset Flex Code
14866 status collapsed
14867
14868 \begin_layout Plain Layout
14869 stdciteformats.inc
14870 \end_layout
14871
14872 \end_inset
14873
14874 の中で定義されていますので、このファイルをまず読みこめば、ご自身の定義ないしは再定義の中で使用することができます。
14875 \end_layout
14876
14877 \begin_layout Section
14878 \begin_inset CommandInset label
14879 LatexCommand label
14880 name "sec:XHTML出力のタグ"
14881
14882 \end_inset
14883
14884 XHTML出力のタグ
14885 \end_layout
14886
14887 \begin_layout Standard
14888 LaTeXやDocBookと同様、LyXのXHTML出力の書式も、レイアウト情報によって制御することができます。一般的に、LyXは適切な既定値を提供し、前述した
14889 ように、他のレイアウトタグに基づいて、既定のCSSスタイルの構成まで行ないます。たとえば、章見出しを適切に整形するためのCSSを書き出すために、LyXは、章様式
14890
14891 \begin_inset Flex Code
14892 status collapsed
14893
14894 \begin_layout Plain Layout
14895 Font
14896 \end_layout
14897
14898 \end_inset
14899
14900 宣言で提供されている情報を利用しようと試みます。
14901 \end_layout
14902
14903 \begin_layout Standard
14904 したがって、多くの場合、使いたい環境や任意設定差込枠などのために満足のいくXHTML出力を得るために、まったく何もしなくてよいことになるでしょう。しかしながら、
14905 これが必要になる場合もあるので、LyXは、生成されるXHTMLやCSSをカスタマイズするために使用できるレイアウトタグを、たくさん提供しています。
14906 \end_layout
14907
14908 \begin_layout Standard
14909 様式宣言や差込枠宣言の外で使用することができるタグに、
14910 \begin_inset Flex Code
14911 status collapsed
14912
14913 \begin_layout Plain Layout
14914 HTMLPreamble
14915 \end_layout
14916
14917 \end_inset
14918
14919
14920 \begin_inset Flex Code
14921 status collapsed
14922
14923 \begin_layout Plain Layout
14924 AddToHTMLPreamble
14925 \end_layout
14926
14927 \end_inset
14928
14929 の2つがあることに注意してください。これらの詳細については、第
14930 \begin_inset CommandInset ref
14931 LatexCommand ref
14932 reference "sub:汎用テキストクラスパラメータ"
14933
14934 \end_inset
14935
14936 節をご覧ください。
14937 \end_layout
14938
14939 \begin_layout Subsection
14940 \begin_inset CommandInset label
14941 LatexCommand label
14942 name "sub:段落様式-XHTML"
14943
14944 \end_inset
14945
14946 段落様式
14947 \end_layout
14948
14949 \begin_layout Standard
14950 LyXが段落のために出力するXHTMLの種類は、通常の段落を取り扱っているのか、コマンドを取り扱っているのか、あるいは環境を取り扱っているのかに依存し、これは対
14951 応する
14952 \begin_inset Flex Code
14953 status collapsed
14954
14955 \begin_layout Plain Layout
14956 LaTeXType
14957 \end_layout
14958
14959 \end_inset
14960
14961 タグの内容によって決定されます。
14962 \end_layout
14963
14964 \begin_layout Standard
14965 コマンドや通常の段落の場合には、XHTML出力は以下の形になります。
14966 \end_layout
14967
14968 \begin_layout LyX-Code
14969 <tag attr=
14970 \begin_inset Quotes erd
14971 \end_inset
14972
14973 value
14974 \begin_inset Quotes erd
14975 \end_inset
14976
14977 >
14978 \end_layout
14979
14980 \begin_layout LyX-Code
14981 <labeltag attr=
14982 \begin_inset Quotes erd
14983 \end_inset
14984
14985 value
14986 \begin_inset Quotes erd
14987 \end_inset
14988
14989 >ラベル</labeltag>
14990 \end_layout
14991
14992 \begin_layout LyX-Code
14993 段落の内容
14994 \end_layout
14995
14996 \begin_layout LyX-Code
14997 </tag>
14998 \end_layout
14999
15000 \begin_layout Standard
15001 もちろん、段落にラベルがなければ、ラベルタグは省略することができます。
15002 \end_layout
15003
15004 \begin_layout Standard
15005 環境のうち、リストの変種でないものに関しては、XHTMLは以下の形を取ります。
15006 \end_layout
15007
15008 \begin_layout LyX-Code
15009 <tag attr=
15010 \begin_inset Quotes erd
15011 \end_inset
15012
15013 value
15014 \begin_inset Quotes erd
15015 \end_inset
15016
15017 >
15018 \end_layout
15019
15020 \begin_layout LyX-Code
15021 <itemtag attr=
15022 \begin_inset Quotes erd
15023 \end_inset
15024
15025 value
15026 \begin_inset Quotes erd
15027 \end_inset
15028
15029 ><labeltag attr=
15030 \begin_inset Quotes erd
15031 \end_inset
15032
15033 value
15034 \begin_inset Quotes erd
15035 \end_inset
15036
15037 >環境ラベル</labeltag>最初の段落。
15038 \end_layout
15039
15040 \begin_layout LyX-Code
15041 </itemtag>
15042 \end_layout
15043
15044 \begin_layout LyX-Code
15045 <itemtag>二つめの段落。</itemtag>
15046 \end_layout
15047
15048 \begin_layout LyX-Code
15049 </tag>
15050 \end_layout
15051
15052 \begin_layout Standard
15053 ラベルは、たとえば定理の場合にそうであるように、最初の段落にだけ出力されることに注意してください。
15054 \end_layout
15055
15056 \begin_layout Standard
15057 リストに関しては、次のような形になります。
15058 \end_layout
15059
15060 \begin_layout LyX-Code
15061 <tag attr=
15062 \begin_inset Quotes erd
15063 \end_inset
15064
15065 value
15066 \begin_inset Quotes erd
15067 \end_inset
15068
15069 >
15070 \end_layout
15071
15072 \begin_layout LyX-Code
15073 <itemtag attr=
15074 \begin_inset Quotes erd
15075 \end_inset
15076
15077 value
15078 \begin_inset Quotes erd
15079 \end_inset
15080
15081 ><labeltag attr=
15082 \begin_inset Quotes erd
15083 \end_inset
15084
15085 value
15086 \begin_inset Quotes erd
15087 \end_inset
15088
15089 >リストのラベル</labeltag>最初の項目。</itemtag>
15090 \end_layout
15091
15092 \begin_layout LyX-Code
15093 <itemtag attr=
15094 \begin_inset Quotes erd
15095 \end_inset
15096
15097 value
15098 \begin_inset Quotes erd
15099 \end_inset
15100
15101 ><labeltag attr=
15102 \begin_inset Quotes erd
15103 \end_inset
15104
15105 value
15106 \begin_inset Quotes erd
15107 \end_inset
15108
15109 >リストのラベル</labeltag>二つめの項目。</itemtag>
15110 \end_layout
15111
15112 \begin_layout LyX-Code
15113 </tag>
15114 \end_layout
15115
15116 \begin_layout LyX-Code
15117
15118 \end_layout
15119
15120 \begin_layout LyX-Code
15121 <tag attr=
15122 \begin_inset Quotes erd
15123 \end_inset
15124
15125 value
15126 \begin_inset Quotes erd
15127 \end_inset
15128
15129 >
15130 \end_layout
15131
15132 \begin_layout LyX-Code
15133 <labeltag attr=
15134 \begin_inset Quotes erd
15135 \end_inset
15136
15137 value
15138 \begin_inset Quotes erd
15139 \end_inset
15140
15141 >リストのラベル</labeltag><itemtag attr=
15142 \begin_inset Quotes erd
15143 \end_inset
15144
15145 value
15146 \begin_inset Quotes erd
15147 \end_inset
15148
15149 >最初の項目。</itemtag>
15150 \end_layout
15151
15152 \begin_layout LyX-Code
15153 <labeltag attr=
15154 \begin_inset Quotes erd
15155 \end_inset
15156
15157 value
15158 \begin_inset Quotes erd
15159 \end_inset
15160
15161 >リストのラベル</labeltag><itemtag attr=
15162 \begin_inset Quotes erd
15163 \end_inset
15164
15165 value
15166 \begin_inset Quotes erd
15167 \end_inset
15168
15169 >二つめの項目</itemtag>
15170 \end_layout
15171
15172 \begin_layout LyX-Code
15173 </tag>
15174 \end_layout
15175
15176 \begin_layout Standard
15177 ここで
15178 \begin_inset Flex Code
15179 status collapsed
15180
15181 \begin_layout Plain Layout
15182 labeltag
15183 \end_layout
15184
15185 \end_inset
15186
15187
15188 \begin_inset Flex Code
15189 status collapsed
15190
15191 \begin_layout Plain Layout
15192 itemtag
15193 \end_layout
15194
15195 \end_inset
15196
15197 の順序が違っていることに注意してください。どちらの順序になるかは、
15198 \begin_inset Flex Code
15199 status collapsed
15200
15201 \begin_layout Plain Layout
15202 HTMLLabelFirst
15203 \end_layout
15204
15205 \end_inset
15206
15207 の設定に依存します。もし
15208 \begin_inset Flex Code
15209 status collapsed
15210
15211 \begin_layout Plain Layout
15212 HTMLLabelFirst
15213 \end_layout
15214
15215 \end_inset
15216
15217 が偽であれば(既定値)、最初のケースのようになり、これが真であれば、二番めのケースのように、labelがitemの外側に来るようになります。
15218 \end_layout
15219
15220 \begin_layout Standard
15221 各段落の特定のタグ出力や属性出力は、以下に述べるようなレイアウトタグを使って制御することができます。しかしながら、前述のように、多くの場合、LyXは適切な既定値
15222 を生成するので、たいしたことをしなくても、望ましいXHTML出力を得ることができるということになるはずです。ここで利用出来るタグは、自分の好みにあわせて微調整す
15223 る目的でここにあるものと考えてください。
15224 \end_layout
15225
15226 \begin_layout Description
15227 \begin_inset Flex Code
15228 status collapsed
15229
15230 \begin_layout Plain Layout
15231 HTMLAttr
15232 \end_layout
15233
15234 \end_inset
15235
15236  [
15237 \begin_inset Flex Code
15238 status collapsed
15239
15240 \begin_layout Plain Layout
15241 文字列
15242 \end_layout
15243
15244 \end_inset
15245
15246 ] 主幹タグと共に出力される属性情報を指定します。たとえば、「
15247 \begin_inset Flex Code
15248 status collapsed
15249
15250 \begin_layout Plain Layout
15251 class=`mydiv'
15252 \end_layout
15253
15254 \end_inset
15255
15256 」のようなものです。既定においては、LyXは「
15257 \begin_inset Flex Code
15258 status collapsed
15259
15260 \begin_layout Plain Layout
15261 class=`レイアウト名'
15262 \end_layout
15263
15264 \end_inset
15265
15266 」と出力します。ここで
15267 \begin_inset Flex Code
15268 status collapsed
15269
15270 \begin_layout Plain Layout
15271 レイアウト名
15272 \end_layout
15273
15274 \end_inset
15275
15276 は、レイアウトのLyX名であり、chapterのように小文字で記述します。
15277 \end_layout
15278
15279 \begin_layout Description
15280 \begin_inset Flex Code
15281 status collapsed
15282
15283 \begin_layout Plain Layout
15284 HTMLForceCSS
15285 \end_layout
15286
15287 \end_inset
15288
15289  [
15290 \begin_inset Flex Code
15291 status collapsed
15292
15293 \begin_layout Plain Layout
15294
15295 \emph on
15296 0
15297 \emph default
15298 ,1
15299 \end_layout
15300
15301 \end_inset
15302
15303 ] 
15304 \begin_inset Flex Code
15305 status collapsed
15306
15307 \begin_layout Plain Layout
15308 HTMLStyle
15309 \end_layout
15310
15311 \end_inset
15312
15313 で追加情報が明示的に与えられているときでも、LyXがこのレイアウト用に生成する既定CSS情報を出力するか否か。これを
15314 \begin_inset Flex Code
15315 status collapsed
15316
15317 \begin_layout Plain Layout
15318 1
15319 \end_layout
15320
15321 \end_inset
15322
15323 にすると、生成されたCSSを完全に上書きする代わりに、変更したり追加したりすることができます。既定値は
15324 \begin_inset Flex Code
15325 status collapsed
15326
15327 \begin_layout Plain Layout
15328 0
15329 \end_layout
15330
15331 \end_inset
15332
15333 です。
15334 \end_layout
15335
15336 \begin_layout Description
15337 \begin_inset Flex Code
15338 status collapsed
15339
15340 \begin_layout Plain Layout
15341 HTMLItem
15342 \end_layout
15343
15344 \end_inset
15345
15346  [
15347 \begin_inset Flex Code
15348 status collapsed
15349
15350 \begin_layout Plain Layout
15351 文字列
15352 \end_layout
15353
15354 \end_inset
15355
15356 ] 環境の段落に使用されるタグ。上記各例の
15357 \begin_inset Flex Code
15358 status collapsed
15359
15360 \begin_layout Plain Layout
15361 itemtag
15362 \end_layout
15363
15364 \end_inset
15365
15366 を置き換えます。既定値は
15367 \begin_inset Flex Code
15368 status collapsed
15369
15370 \begin_layout Plain Layout
15371 div
15372 \end_layout
15373
15374 \end_inset
15375
15376 です。
15377 \end_layout
15378
15379 \begin_layout Description
15380 \begin_inset Flex Code
15381 status collapsed
15382
15383 \begin_layout Plain Layout
15384 HTMLItemAttr
15385 \end_layout
15386
15387 \end_inset
15388
15389  [
15390 \begin_inset Flex Code
15391 status collapsed
15392
15393 \begin_layout Plain Layout
15394 文字列
15395 \end_layout
15396
15397 \end_inset
15398
15399 ] itemタグの属性。既定値は
15400 \begin_inset Flex Code
15401 status collapsed
15402
15403 \begin_layout Plain Layout
15404 class=`レイアウト名_item'
15405 \end_layout
15406
15407 \end_inset
15408
15409 です。
15410 \end_layout
15411
15412 \begin_layout Description
15413 \begin_inset Flex Code
15414 status collapsed
15415
15416 \begin_layout Plain Layout
15417 HTMLLabel
15418 \end_layout
15419
15420 \end_inset
15421
15422  [
15423 \begin_inset Flex Code
15424 status collapsed
15425
15426 \begin_layout Plain Layout
15427 文字列
15428 \end_layout
15429
15430 \end_inset
15431
15432 ] 段落と項目ラベルに使用されるタグ。上記各例の
15433 \begin_inset Flex Code
15434 status collapsed
15435
15436 \begin_layout Plain Layout
15437 labeltag
15438 \end_layout
15439
15440 \end_inset
15441
15442 を置き換えます。既定値は
15443 \begin_inset Flex Code
15444 status collapsed
15445
15446 \begin_layout Plain Layout
15447 span
15448 \end_layout
15449
15450 \end_inset
15451
15452 です。
15453 \end_layout
15454
15455 \begin_layout Description
15456 \begin_inset Flex Code
15457 status collapsed
15458
15459 \begin_layout Plain Layout
15460 HTMLLabelAttr
15461 \end_layout
15462
15463 \end_inset
15464
15465  [
15466 \begin_inset Flex Code
15467 status collapsed
15468
15469 \begin_layout Plain Layout
15470 文字列
15471 \end_layout
15472
15473 \end_inset
15474
15475 ] labelタグの属性。既定値は
15476 \begin_inset Flex Code
15477 status collapsed
15478
15479 \begin_layout Plain Layout
15480 class=`レイアウト名_label'
15481 \end_layout
15482
15483 \end_inset
15484
15485 です。
15486 \end_layout
15487
15488 \begin_layout Description
15489 \begin_inset Flex Code
15490 status collapsed
15491
15492 \begin_layout Plain Layout
15493 HTMLLabelFirst
15494 \end_layout
15495
15496 \end_inset
15497
15498  [
15499 \begin_inset Flex Code
15500 status collapsed
15501
15502 \begin_layout Plain Layout
15503
15504 \emph on
15505 0
15506 \emph default
15507 ,1
15508 \end_layout
15509
15510 \end_inset
15511
15512 ] このタグは、リスト関係環境でのみ意味を持ち、labelタグが、itemタグの前に出力されるか、中に出力されるかを制御します。これは、たとえば、descrip
15513 tion環境の中で、
15514 \begin_inset Flex Code
15515 status collapsed
15516
15517 \begin_layout Plain Layout
15518 `<dt>\SpecialChar \ldots{}
15519 </dt><dd>\SpecialChar \ldots{}
15520 </dd>
15521 \end_layout
15522
15523 \end_inset
15524
15525 という形を得るために使用されます。既定値は
15526 \begin_inset Flex Code
15527 status collapsed
15528
15529 \begin_layout Plain Layout
15530 0
15531 \end_layout
15532
15533 \end_inset
15534
15535 で、labelタグはitemタグの中に出力されます。
15536 \end_layout
15537
15538 \begin_layout Description
15539 \begin_inset Flex Code
15540 status collapsed
15541
15542 \begin_layout Plain Layout
15543 HTMLPreamble
15544 \end_layout
15545
15546 \end_inset
15547
15548  この様式が使用されたときに、
15549 \begin_inset Flex Code
15550 status collapsed
15551
15552 \begin_layout Plain Layout
15553 <head>
15554 \end_layout
15555
15556 \end_inset
15557
15558 セクションに出力される情報。これは、たとえば、
15559 \begin_inset Flex Code
15560 status collapsed
15561
15562 \begin_layout Plain Layout
15563 onclick
15564 \end_layout
15565
15566 \end_inset
15567
15568 ハンドラを定義するために
15569 \begin_inset Flex Code
15570 status collapsed
15571
15572 \begin_layout Plain Layout
15573 <script>
15574 \end_layout
15575
15576 \end_inset
15577
15578 ブロックをインクルードするのに使用することができます。
15579 \end_layout
15580
15581 \begin_layout Description
15582 \begin_inset Flex Code
15583 status collapsed
15584
15585 \begin_layout Plain Layout
15586 HTMLStyle
15587 \end_layout
15588
15589 \end_inset
15590
15591   この様式が使用されたときに、インクルードするCSSスタイル情報。これは、レイアウトが生成する
15592 \begin_inset Flex Code
15593 status collapsed
15594
15595 \begin_layout Plain Layout
15596 <style>
15597 \end_layout
15598
15599 \end_inset
15600
15601 ブロックで自動的に包まれますので、CSS自体をインクルードするだけで大丈夫です。
15602 \end_layout
15603
15604 \begin_layout Description
15605 \begin_inset Flex Code
15606 status collapsed
15607
15608 \begin_layout Plain Layout
15609 HTMLTag
15610 \end_layout
15611
15612 \end_inset
15613
15614  [
15615 \begin_inset Flex Code
15616 status collapsed
15617
15618 \begin_layout Plain Layout
15619 文字列
15620 \end_layout
15621
15622 \end_inset
15623
15624 ] 主幹ラベルに使用されるタグ。上記各例の
15625 \begin_inset Flex Code
15626 status collapsed
15627
15628 \begin_layout Plain Layout
15629 tag
15630 \end_layout
15631
15632 \end_inset
15633
15634 を置き換えます。既定値は
15635 \begin_inset Flex Code
15636 status collapsed
15637
15638 \begin_layout Plain Layout
15639 div
15640 \end_layout
15641
15642 \end_inset
15643
15644 です。
15645 \end_layout
15646
15647 \begin_layout Description
15648 \begin_inset Flex Code
15649 status collapsed
15650
15651 \begin_layout Plain Layout
15652 HTMLTitle
15653 \end_layout
15654
15655 \end_inset
15656
15657  [
15658 \begin_inset Flex Code
15659 status collapsed
15660
15661 \begin_layout Plain Layout
15662
15663 \emph on
15664 0
15665 \emph default
15666 ,1
15667 \end_layout
15668
15669 \end_inset
15670
15671 ] この様式が、XHTMLファイルの
15672 \begin_inset Flex Code
15673 status collapsed
15674
15675 \begin_layout Plain Layout
15676 <title>
15677 \end_layout
15678
15679 \end_inset
15680
15681 タグを生成するのに使用する様式であるという印をつけます。既定値は偽です。
15682 \begin_inset Flex Code
15683 status collapsed
15684
15685 \begin_layout Plain Layout
15686 stdtitle.inc
15687 \end_layout
15688
15689 \end_inset
15690
15691 ファイルでは、
15692 \begin_inset Flex Code
15693 status collapsed
15694
15695 \begin_layout Plain Layout
15696 title
15697 \end_layout
15698
15699 \end_inset
15700
15701 環境のこの項目を真に設定しています。
15702 \end_layout
15703
15704 \begin_layout Subsection
15705 差込枠レイアウトXHTML
15706 \end_layout
15707
15708 \begin_layout Standard
15709 差込枠のXHTML出力も、レイアウトファイル内の情報によって制御することができます
15710 \begin_inset Foot
15711 status collapsed
15712
15713 \begin_layout Plain Layout
15714 現在のところ、これは「テキスト」差込枠(中に書き込みができる差込枠)にのみ有効で、「コマンド」差込枠(ダイアログボックスに関連付けられた差込枠)には適用されませ
15715 ん。
15716 \end_layout
15717
15718 \end_inset
15719
15720 。ここでも、LyXは適切な既定値を提供しようと試み、既定のCSS様式を構成します。しかし、すべてカスタマイズ可能です。
15721 \end_layout
15722
15723 \begin_layout Standard
15724 LyXが差込枠用に出力するXHTMLは、以下の形を取ります。
15725 \end_layout
15726
15727 \begin_layout LyX-Code
15728 <tag attr=
15729 \begin_inset Quotes erd
15730 \end_inset
15731
15732 value
15733 \begin_inset Quotes erd
15734 \end_inset
15735
15736 >
15737 \end_layout
15738
15739 \begin_layout LyX-Code
15740 <labeltag>ラベル</labeltag>
15741 \end_layout
15742
15743 \begin_layout LyX-Code
15744 <innertag attr=
15745 \begin_inset Quotes erd
15746 \end_inset
15747
15748 value
15749 \begin_inset Quotes erd
15750 \end_inset
15751
15752 >差込枠の内容。</innertag>
15753 \end_layout
15754
15755 \begin_layout LyX-Code
15756 </tag>
15757 \end_layout
15758
15759 \begin_layout Standard
15760 差込枠が多段落を許可している---つまり
15761 \begin_inset Flex Code
15762 status collapsed
15763
15764 \begin_layout Plain Layout
15765 MultiPar
15766 \end_layout
15767
15768 \end_inset
15769
15770 が真---ならば、差込枠の内容は、それ自身段落として出力され、それらの段落に用いられる様式(標準、引用など)を用いて整形されます。もちろん、段落にラベルがなけれ
15771 ば、labelタグは省略され、ラベルがあれば、現在のところ、つねに
15772 \begin_inset Flex Code
15773 status collapsed
15774
15775 \begin_layout Plain Layout
15776 span
15777 \end_layout
15778
15779 \end_inset
15780
15781 が用いられます。innerタグは非必須であり、既定では出力されません。各差込枠用に出力される特定のタグや属性は、以下のレイアウトタグによって制御することができま
15782 す。
15783 \end_layout
15784
15785 \begin_layout Description
15786 \begin_inset Flex Code
15787 status collapsed
15788
15789 \begin_layout Plain Layout
15790 HTMLAttr
15791 \end_layout
15792
15793 \end_inset
15794
15795  [
15796 \begin_inset Flex Code
15797 status collapsed
15798
15799 \begin_layout Plain Layout
15800 文字列
15801 \end_layout
15802
15803 \end_inset
15804
15805 ] 主幹タグと共に出力される属性情報を指定します。たとえば、「
15806 \begin_inset Flex Code
15807 status collapsed
15808
15809 \begin_layout Plain Layout
15810 class=`mydiv'
15811 \end_layout
15812
15813 \end_inset
15814
15815 」のようなものです。既定においては、LyXは「
15816 \begin_inset Flex Code
15817 status collapsed
15818
15819 \begin_layout Plain Layout
15820 class=`レイアウト名'
15821 \end_layout
15822
15823 \end_inset
15824
15825 」と出力します。ここで
15826 \begin_inset Flex Code
15827 status collapsed
15828
15829 \begin_layout Plain Layout
15830 レイアウト名
15831 \end_layout
15832
15833 \end_inset
15834
15835 は、レイアウトのLyX名であり、chapterのように小文字で記述します。
15836 \end_layout
15837
15838 \begin_layout Description
15839 \begin_inset Flex Code
15840 status collapsed
15841
15842 \begin_layout Plain Layout
15843 HTMLForceCSS
15844 \end_layout
15845
15846 \end_inset
15847
15848  [
15849 \begin_inset Flex Code
15850 status collapsed
15851
15852 \begin_layout Plain Layout
15853
15854 \emph on
15855 0
15856 \emph default
15857 ,1
15858 \end_layout
15859
15860 \end_inset
15861
15862 ] 
15863 \begin_inset Flex Code
15864 status collapsed
15865
15866 \begin_layout Plain Layout
15867 HTMLStyle
15868 \end_layout
15869
15870 \end_inset
15871
15872 で追加情報が明示的に与えられているときでも、LyXがこのレイアウト用に生成する既定CSS情報を出力するか否か。これを
15873 \begin_inset Flex Code
15874 status collapsed
15875
15876 \begin_layout Plain Layout
15877 1
15878 \end_layout
15879
15880 \end_inset
15881
15882 にすると、生成されたCSSを完全に上書きする代わりに、変更したり追加したりすることができます。既定値は
15883 \begin_inset Flex Code
15884 status collapsed
15885
15886 \begin_layout Plain Layout
15887 0
15888 \end_layout
15889
15890 \end_inset
15891
15892 です。
15893 \end_layout
15894
15895 \begin_layout Description
15896 \begin_inset Flex Code
15897 status collapsed
15898
15899 \begin_layout Plain Layout
15900 HTMLInnerAttr
15901 \end_layout
15902
15903 \end_inset
15904
15905  [
15906 \begin_inset Flex Code
15907 status collapsed
15908
15909 \begin_layout Plain Layout
15910 文字列
15911 \end_layout
15912
15913 \end_inset
15914
15915 ] innerタグの属性。既定値は
15916 \begin_inset Flex Code
15917 status collapsed
15918
15919 \begin_layout Plain Layout
15920 class=`差込枠名_inner'
15921 \end_layout
15922
15923 \end_inset
15924
15925 です。
15926 \end_layout
15927
15928 \begin_layout Description
15929 \begin_inset Flex Code
15930 status collapsed
15931
15932 \begin_layout Plain Layout
15933 HTMLInnerTag
15934 \end_layout
15935
15936 \end_inset
15937
15938  [
15939 \begin_inset Flex Code
15940 status collapsed
15941
15942 \begin_layout Plain Layout
15943 文字列
15944 \end_layout
15945
15946 \end_inset
15947
15948 ] innerタグです。上記各例の
15949 \begin_inset Flex Code
15950 status collapsed
15951
15952 \begin_layout Plain Layout
15953 innertag
15954 \end_layout
15955
15956 \end_inset
15957
15958 を置き換えます。既定値はなしです。
15959 \end_layout
15960
15961 \begin_layout Description
15962 \begin_inset Flex Code
15963 status collapsed
15964
15965 \begin_layout Plain Layout
15966 HTMLIsBlock
15967 \end_layout
15968
15969 \end_inset
15970
15971  [
15972 \begin_inset Flex Code
15973 status collapsed
15974
15975 \begin_layout Plain Layout
15976 0,
15977 \emph on
15978 1
15979 \end_layout
15980
15981 \end_inset
15982
15983 ] この差込枠が(脚注のように)独立した文字列ブロックを表すのか、それとも、(派生枝のように)周囲の文字列の中に取り込まれる素材を表すのか。既定値は1です。
15984 \end_layout
15985
15986 \begin_layout Description
15987 \begin_inset Flex Code
15988 status collapsed
15989
15990 \begin_layout Plain Layout
15991 HTMLLabel
15992 \end_layout
15993
15994 \end_inset
15995
15996  [
15997 \begin_inset Flex Code
15998 status collapsed
15999
16000 \begin_layout Plain Layout
16001 文字列
16002 \end_layout
16003
16004 \end_inset
16005
16006 ] 場合によっては、カウンタへの参照を含む、この差込枠のラベル。たとえば、脚注用には
16007 \begin_inset Flex Code
16008 status collapsed
16009
16010 \begin_layout Plain Layout
16011
16012 \backslash
16013 arabic{footnote}
16014 \end_layout
16015
16016 \end_inset
16017
16018 など。これは非必須であり、既定値はありません。
16019 \end_layout
16020
16021 \begin_layout Description
16022 \begin_inset Flex Code
16023 status collapsed
16024
16025 \begin_layout Plain Layout
16026 HTMLPreamble
16027 \end_layout
16028
16029 \end_inset
16030
16031  この様式が使用されたときに、
16032 \begin_inset Flex Code
16033 status collapsed
16034
16035 \begin_layout Plain Layout
16036 <head>
16037 \end_layout
16038
16039 \end_inset
16040
16041 セクションに出力される情報。これは、たとえば、
16042 \begin_inset Flex Code
16043 status collapsed
16044
16045 \begin_layout Plain Layout
16046 onclick
16047 \end_layout
16048
16049 \end_inset
16050
16051 ハンドラを定義するために
16052 \begin_inset Flex Code
16053 status collapsed
16054
16055 \begin_layout Plain Layout
16056 <script>
16057 \end_layout
16058
16059 \end_inset
16060
16061 ブロックをインクルードするのに使用することができます。
16062 \end_layout
16063
16064 \begin_layout Description
16065 \begin_inset Flex Code
16066 status collapsed
16067
16068 \begin_layout Plain Layout
16069 HTMLStyle
16070 \end_layout
16071
16072 \end_inset
16073
16074   この様式が使用されたときに、インクルードするCSSスタイル情報。これは、レイアウトが生成する
16075 \begin_inset Flex Code
16076 status collapsed
16077
16078 \begin_layout Plain Layout
16079 <style>
16080 \end_layout
16081
16082 \end_inset
16083
16084 ブロックで自動的に包まれますので、CSS自体をインクルードするだけで大丈夫です。
16085 \end_layout
16086
16087 \begin_layout Description
16088 \begin_inset Flex Code
16089 status collapsed
16090
16091 \begin_layout Plain Layout
16092 HTMLTag
16093 \end_layout
16094
16095 \end_inset
16096
16097  [
16098 \begin_inset Flex Code
16099 status collapsed
16100
16101 \begin_layout Plain Layout
16102 文字列
16103 \end_layout
16104
16105 \end_inset
16106
16107 ] 主幹ラベルに使用されるタグ。上記各例の
16108 \begin_inset Flex Code
16109 status collapsed
16110
16111 \begin_layout Plain Layout
16112 tag
16113 \end_layout
16114
16115 \end_inset
16116
16117 を置き換えます。既定値は
16118 \begin_inset Flex Code
16119 status collapsed
16120
16121 \begin_layout Plain Layout
16122 MultiPar
16123 \end_layout
16124
16125 \end_inset
16126
16127 の設定に依存し、
16128 \begin_inset Flex Code
16129 status collapsed
16130
16131 \begin_layout Plain Layout
16132 MultiPar
16133 \end_layout
16134
16135 \end_inset
16136
16137 が真ならば
16138 \begin_inset Flex Code
16139 status collapsed
16140
16141 \begin_layout Plain Layout
16142 div
16143 \end_layout
16144
16145 \end_inset
16146
16147 、偽ならば
16148 \begin_inset Flex Code
16149 status collapsed
16150
16151 \begin_layout Plain Layout
16152 span
16153 \end_layout
16154
16155 \end_inset
16156
16157 です。
16158 \end_layout
16159
16160 \begin_layout Subsection
16161 フロートXHTML
16162 \end_layout
16163
16164 \begin_layout Standard
16165 フロートのXHTML出力も、レイアウトファイル内の情報によって制御することができます。出力は、以下の形を取ります。
16166 \end_layout
16167
16168 \begin_layout LyX-Code
16169 <tag attr=
16170 \begin_inset Quotes erd
16171 \end_inset
16172
16173 value
16174 \begin_inset Quotes erd
16175 \end_inset
16176
16177 >
16178 \end_layout
16179
16180 \begin_layout LyX-Code
16181 フロートの内容。
16182 \end_layout
16183
16184 \begin_layout LyX-Code
16185 </tag>
16186 \end_layout
16187
16188 \begin_layout Standard
16189 キャプションは、存在している場合には、独立した差込枠となり、そのような形で出力されます。その外観は、キャプション差込枠のInsetLayoutで制御することがで
16190 きます。
16191 \end_layout
16192
16193 \begin_layout Description
16194 \begin_inset Flex Code
16195 status collapsed
16196
16197 \begin_layout Plain Layout
16198 HTMLAttr
16199 \end_layout
16200
16201 \end_inset
16202
16203  [
16204 \begin_inset Flex Code
16205 status collapsed
16206
16207 \begin_layout Plain Layout
16208 文字列
16209 \end_layout
16210
16211 \end_inset
16212
16213 ] 主幹タグと共に出力される属性情報を指定します。たとえば、「
16214 \begin_inset Flex Code
16215 status collapsed
16216
16217 \begin_layout Plain Layout
16218 class=`myfloat' onclick=`\SpecialChar \ldots{}
16219 '
16220 \end_layout
16221
16222 \end_inset
16223
16224 」のようなものです。既定においては、LyXは「
16225 \begin_inset Flex Code
16226 status collapsed
16227
16228 \begin_layout Plain Layout
16229 class=`float float-フロート型'
16230 \end_layout
16231
16232 \end_inset
16233
16234 」と出力します。ここで
16235 \begin_inset Flex Code
16236 status collapsed
16237
16238 \begin_layout Plain Layout
16239 フロート型
16240 \end_layout
16241
16242 \end_inset
16243
16244 は、フロート宣言で定義された(
16245 \begin_inset CommandInset ref
16246 LatexCommand ref
16247 reference "sub:フロート"
16248
16249 \end_inset
16250
16251 参照)、この型のフロートのLyX名です。ただし、小文字に変換され、アルファベットや数字でない文字はアンダースコアに変換されます。例:float-table。
16252 \end_layout
16253
16254 \begin_layout Description
16255 \begin_inset Flex Code
16256 status collapsed
16257
16258 \begin_layout Plain Layout
16259 HTMLStyle
16260 \end_layout
16261
16262 \end_inset
16263
16264   このフロートが使用されたときに、インクルードするCSSスタイル情報。これは、レイアウトが生成する
16265 \begin_inset Flex Code
16266 status collapsed
16267
16268 \begin_layout Plain Layout
16269 <style>
16270 \end_layout
16271
16272 \end_inset
16273
16274 ブロックで自動的に包まれますので、CSS自体をインクルードするだけで大丈夫です。
16275 \end_layout
16276
16277 \begin_layout Description
16278 \begin_inset Flex Code
16279 status collapsed
16280
16281 \begin_layout Plain Layout
16282 HTMLTag
16283 \end_layout
16284
16285 \end_inset
16286
16287  [
16288 \begin_inset Flex Code
16289 status collapsed
16290
16291 \begin_layout Plain Layout
16292 文字列
16293 \end_layout
16294
16295 \end_inset
16296
16297 ] このフロートに使用されるタグ。上記各例の
16298 \begin_inset Flex Code
16299 status collapsed
16300
16301 \begin_layout Plain Layout
16302 tag
16303 \end_layout
16304
16305 \end_inset
16306
16307 を置き換えます。既定値は
16308 \begin_inset Flex Code
16309 status collapsed
16310
16311 \begin_layout Plain Layout
16312 div
16313 \end_layout
16314
16315 \end_inset
16316
16317 であり、ほとんどの場合変更する必要はありません。
16318 \end_layout
16319
16320 \begin_layout Subsection
16321 書誌情報の整形
16322 \end_layout
16323
16324 \begin_layout Standard
16325 書誌情報は、
16326 \begin_inset Flex Code
16327 status collapsed
16328
16329 \begin_layout Plain Layout
16330 CiteFormat
16331 \end_layout
16332
16333 \end_inset
16334
16335 ブロックを使用して整形することができます。詳細については、第
16336 \begin_inset CommandInset ref
16337 LatexCommand ref
16338 reference "sub:引用書式指定"
16339
16340 \end_inset
16341
16342 節を参照してください。
16343 \end_layout
16344
16345 \begin_layout Subsection
16346 LyXが生成したCSS
16347 \end_layout
16348
16349 \begin_layout Standard
16350 LyXは、提供されている他のレイアウト情報に基づいて、差込枠と段落様式の両方の既定CSS様式ルールを生成ということすることを、これまでに何度か触れました。この節
16351 では、LyXがどのレイアウト情報を、どのように使うのか、ひとこと述べておきたいと思います。
16352 \end_layout
16353
16354 \begin_layout Standard
16355 LyXは、現在のところ、
16356 \begin_inset Flex Code
16357 status collapsed
16358
16359 \begin_layout Plain Layout
16360 Font
16361 \end_layout
16362
16363 \end_inset
16364
16365 宣言で指定されている
16366 \begin_inset Flex Code
16367 status collapsed
16368
16369 \begin_layout Plain Layout
16370 Family
16371 \end_layout
16372
16373 \end_inset
16374
16375
16376 \begin_inset Flex Code
16377 status collapsed
16378
16379 \begin_layout Plain Layout
16380 Series
16381 \end_layout
16382
16383 \end_inset
16384
16385
16386 \begin_inset Flex Code
16387 status collapsed
16388
16389 \begin_layout Plain Layout
16390 Shape
16391 \end_layout
16392
16393 \end_inset
16394
16395
16396 \begin_inset Flex Code
16397 status collapsed
16398
16399 \begin_layout Plain Layout
16400 Size
16401 \end_layout
16402
16403 \end_inset
16404
16405 を利用して、フォント情報についてのみCSSを自動生成します(第
16406 \begin_inset CommandInset ref
16407 LatexCommand ref
16408 reference "sub:フォント指定"
16409
16410 \end_inset
16411
16412 節を参照)。この変換は、きわめて分かりやすく自明です。たとえば、「
16413 \begin_inset Flex Code
16414 status collapsed
16415
16416 \begin_layout Plain Layout
16417 Family Sans
16418 \end_layout
16419
16420 \end_inset
16421
16422 」は「
16423 \begin_inset Flex Code
16424 status collapsed
16425
16426 \begin_layout Plain Layout
16427 font-family: sans-serif
16428 \end_layout
16429
16430 \end_inset
16431
16432 」になります。LyXの寸法とCSSの寸法のあいだの対応は、少し複雑ですが、それでも直感的に分かります。詳細については、
16433 \begin_inset Flex URL
16434 status collapsed
16435
16436 \begin_layout Plain Layout
16437
16438 src/FontInfo.cpp
16439 \end_layout
16440
16441 \end_inset
16442
16443
16444 \begin_inset Flex Code
16445 status collapsed
16446
16447 \begin_layout Plain Layout
16448 getSizeCSS()
16449 \end_layout
16450
16451 \end_inset
16452
16453 関数をご覧ください。
16454 \end_layout
16455
16456 \begin_layout Chapter
16457 外部素材を取り込む
16458 \end_layout
16459
16460 \begin_layout Standard
16461 \begin_inset Box Shadowbox
16462 position "t"
16463 hor_pos "c"
16464 has_inner_box 1
16465 inner_pos "t"
16466 use_parbox 0
16467 use_makebox 0
16468 width "100col%"
16469 special "none"
16470 height "1in"
16471 height_special "totalheight"
16472 status open
16473
16474 \begin_layout Plain Layout
16475 【警告】本説明書のこの部分は、しばらく更新されていません。もちろんまだ正確であることを期待していますが、保証の限りではありません。
16476 \end_layout
16477
16478 \end_inset
16479
16480
16481 \end_layout
16482
16483 \begin_layout Standard
16484 LyX外部のソースから素材を使用する方法は、取扱説明書
16485 \emph on
16486 埋込オブジェクト篇
16487 \emph default
16488 で詳細にカバーされています。本章は、新種の素材を取り込む際に、舞台裏で何をする必要があるかをカバーします。
16489 \end_layout
16490
16491 \begin_layout Section
16492 どのように機能するのか
16493 \end_layout
16494
16495 \begin_layout Standard
16496 外部素材の機能は、ひな型の概念に基づいています。ひな型は、LyXがある型の素材とどのように橋渡しをするべきかを指定するものです。同梱物として、LyXは、Xfig
16497 の図や、様々なラスター形式画像、チェス棋譜、LilyPond楽譜用のひな型を事前に定義されたものとして含んでいます。実際に何が入っているかは、
16498 \begin_inset Flex MenuItem
16499 status collapsed
16500
16501 \begin_layout Plain Layout
16502 挿入\SpecialChar \menuseparator
16503 ファイル\SpecialChar \menuseparator
16504 外部素材
16505 \end_layout
16506
16507 \end_inset
16508
16509 メニューで見ることができます。さらに、特定の型の素材をサポートするのに、自分自身のひな型を作成することも可能です。後でどのようなことをすればいいか詳細に説明しま
16510 すが、できればあなたが作ったすべてのひな型を投稿して、我々がLyXの後の版に取り込むことができるようにしてくださることを希望します。
16511 \end_layout
16512
16513 \begin_layout Standard
16514 外部素材の機能におけるもう一つの基本的な発想は、最終素材の元となるオリジナルファイルと、書き出された文書や印刷された文書に取り込むための生成ファイルとを区別して
16515 いることです。たとえば、
16516 \begin_inset Flex Code
16517 status collapsed
16518
16519 \begin_layout Plain Layout
16520 Xfig
16521 \end_layout
16522
16523 \end_inset
16524
16525 で作成した図の場合を考えてみましょう。Xfigアプリケーション自体は、
16526 \begin_inset Flex Code
16527 status collapsed
16528
16529 \begin_layout Plain Layout
16530 .fig
16531 \end_layout
16532
16533 \end_inset
16534
16535 拡張子を持つオリジナルファイルを操作します。Xfigで図を作成したり変更したりして、作業が終われば
16536 \begin_inset Flex Code
16537 status collapsed
16538
16539 \begin_layout Plain Layout
16540 fig
16541 \end_layout
16542
16543 \end_inset
16544
16545 ファイルに保存します。この図をお使いの文書に取り込みたいときには、LaTeXファイルにそのままインクルードできるように、
16546 \begin_inset Flex Code
16547 status collapsed
16548
16549 \begin_layout Plain Layout
16550 transfig
16551 \end_layout
16552
16553 \end_inset
16554
16555 を呼び出してPostScriptファイルを生成します。この場合には、
16556 \begin_inset Flex Code
16557 status collapsed
16558
16559 \begin_layout Plain Layout
16560 .fig
16561 \end_layout
16562
16563 \end_inset
16564
16565 ファイルがオリジナルファイルであり、PostScriptファイルが生成ファイルになります。
16566 \end_layout
16567
16568 \begin_layout Standard
16569 この区別は、文書を執筆している最中に、素材を更新することができるようにするために重要です。さらに、これによって、複数の書き出し書式をサポートするために必要な柔軟
16570 性が提供されます。たとえば、平文テキストファイルの場合には、図を生のPostScriptファイルとして取り込むのは、とても褒められた発想とはいえません。むしろ、
16571 その図への参照だけを含めるか、最終出力が実際の画像に近いものとなるように画像からASCIIへの変換子を呼び出したいと考えることでしょう。LyXの外部素材マネジメ
16572 ントは、LyXがサポートする各書き出し書式別に仕分けしているので、ユーザがこれを行うことが可能となっています。
16573 \end_layout
16574
16575 \begin_layout Standard
16576 LyXの外部素材マネジメントは、書き出し書式によって異なる生成物をサポートすることの他に、編集・閲覧アプリケーションを緊密に統合することもサポートします。Xfi
16577 gの図の場合には、LyXの外部素材ダイアログからシングルクリックでオリジナルファイルをXfigで開くことができ、ダブルクリックすることで生成されたPostScr
16578 iptファイルをGhostviewで閲覧することができます。もうコマンドラインをもてあそんだり、オリジナルファイルや生成ファイルがどこにあるか探したり変更を加え
16579 るためにファイルブラウザをいじくり回す必要はないのです。このようにして、文書を執筆する際に必要となる多くのアプリケーションを最大限に利用し、最終的により生産性を
16580 上げることができるようになるのです。
16581 \end_layout
16582
16583 \begin_layout Section
16584 外用ひな型設定ファイル
16585 \end_layout
16586
16587 \begin_layout Standard
16588 LyXに自製の外用ひな型を付け加えるのは、比較的簡単です。しかしながら、これを不用心に行ってしまうと、たいていの場合、簡単に濫用されてしまうようなセキュリティホ
16589 ールを作ってしまいがちであることを心に留めておいてください。したがって、これを実行に移す前に、第
16590 \begin_inset CommandInset ref
16591 LatexCommand ref
16592 reference "sec:セキュリティに関する論点"
16593
16594 \end_inset
16595
16596 節のセキュリティに関する議論を読んでおいてください。
16597 \end_layout
16598
16599 \begin_layout Standard
16600 このことに言及した上で、あなたが作成した面白いひな型は、ぜひ投稿してください。
16601 \end_layout
16602
16603 \begin_layout Standard
16604 外用ひな型は、
16605 \begin_inset Flex Code
16606 status collapsed
16607
16608 \begin_layout Plain Layout
16609 LyXDir/lib/external_templates
16610 \end_layout
16611
16612 \end_inset
16613
16614 ファイルで定義されています。自分用の版を
16615 \begin_inset Flex Code
16616 status collapsed
16617
16618 \begin_layout Plain Layout
16619 UserDir/external_templates
16620 \end_layout
16621
16622 \end_inset
16623
16624 に置くこともできます。
16625 \end_layout
16626
16627 \begin_layout Standard
16628 典型的なひな型は以下のようになります。
16629 \end_layout
16630
16631 \begin_layout LyX-Code
16632 Template XFig
16633 \end_layout
16634
16635 \begin_layout LyX-Code
16636 GuiName "XFig: $$AbsOrRelPathParent$$Basename"
16637 \end_layout
16638
16639 \begin_layout LyX-Code
16640 HelpText
16641 \end_layout
16642
16643 \begin_layout LyX-Code
16644 An XFig figure.
16645 \end_layout
16646
16647 \begin_layout LyX-Code
16648 HelpTextEnd
16649 \end_layout
16650
16651 \begin_layout LyX-Code
16652 InputFormat fig
16653 \end_layout
16654
16655 \begin_layout LyX-Code
16656 FileFilter "*.fig"
16657 \end_layout
16658
16659 \begin_layout LyX-Code
16660 AutomaticProduction true
16661 \end_layout
16662
16663 \begin_layout LyX-Code
16664 Transform Rotate
16665 \end_layout
16666
16667 \begin_layout LyX-Code
16668 Transform Resize
16669 \end_layout
16670
16671 \begin_layout LyX-Code
16672 Format LaT
16673 \begin_inset ERT
16674 status collapsed
16675
16676 \begin_layout Plain Layout
16677
16678 {}
16679 \end_layout
16680
16681 \end_inset
16682
16683 eX
16684 \end_layout
16685
16686 \begin_layout LyX-Code
16687 TransformCommand Rotate RotationLatexCommand
16688 \end_layout
16689
16690 \begin_layout LyX-Code
16691 TransformCommand Resize ResizeLatexCommand
16692 \end_layout
16693
16694 \begin_layout LyX-Code
16695 Product "$$RotateFront$$ResizeFront
16696 \end_layout
16697
16698 \begin_layout LyX-Code
16699          
16700 \backslash
16701
16702 \backslash
16703 input{$$AbsOrRelPathMaster$$Basename.pstex_t}
16704 \end_layout
16705
16706 \begin_layout LyX-Code
16707          $$ResizeBack$$RotateBack"
16708 \end_layout
16709
16710 \begin_layout LyX-Code
16711 UpdateFormat pstex
16712 \end_layout
16713
16714 \begin_layout LyX-Code
16715 UpdateResult "$$AbsPath$$Basename.pstex_t"
16716 \end_layout
16717
16718 \begin_layout LyX-Code
16719 Requirement "graphicx"
16720 \end_layout
16721
16722 \begin_layout LyX-Code
16723 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
16724 \end_layout
16725
16726 \begin_layout LyX-Code
16727 ReferencedFile latex "$$AbsPath$$Basename.eps"
16728 \end_layout
16729
16730 \begin_layout LyX-Code
16731 ReferencedFile dvi "$$AbsPath$$Basename.eps"
16732 \end_layout
16733
16734 \begin_layout LyX-Code
16735 FormatEnd
16736 \end_layout
16737
16738 \begin_layout LyX-Code
16739 Format PDFLaT
16740 \begin_inset ERT
16741 status collapsed
16742
16743 \begin_layout Plain Layout
16744
16745 {}
16746 \end_layout
16747
16748 \end_inset
16749
16750 eX
16751 \end_layout
16752
16753 \begin_layout LyX-Code
16754 TransformCommand Rotate RotationLatexCommand
16755 \end_layout
16756
16757 \begin_layout LyX-Code
16758 TransformCommand Resize ResizeLatexCommand
16759 \end_layout
16760
16761 \begin_layout LyX-Code
16762 Product "$$RotateFront$$ResizeFront
16763 \end_layout
16764
16765 \begin_layout LyX-Code
16766          
16767 \backslash
16768
16769 \backslash
16770 input{$$AbsOrRelPathMaster$$Basename.pdftex_t}
16771 \end_layout
16772
16773 \begin_layout LyX-Code
16774          $$ResizeBack$$RotateBack"
16775 \end_layout
16776
16777 \begin_layout LyX-Code
16778 UpdateFormat pdftex
16779 \end_layout
16780
16781 \begin_layout LyX-Code
16782 UpdateResult "$$AbsPath$$Basename.pdftex_t"
16783 \end_layout
16784
16785 \begin_layout LyX-Code
16786 Requirement "graphicx"
16787 \end_layout
16788
16789 \begin_layout LyX-Code
16790 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pdftex_t"
16791 \end_layout
16792
16793 \begin_layout LyX-Code
16794 ReferencedFile latex "$$AbsPath$$Basename.pdf"
16795 \end_layout
16796
16797 \begin_layout LyX-Code
16798 FormatEnd
16799 \end_layout
16800
16801 \begin_layout LyX-Code
16802 Format Ascii
16803 \end_layout
16804
16805 \begin_layout LyX-Code
16806 Product "$$Contents(
16807 \backslash
16808 "$$AbsPath$$Basename.asc
16809 \backslash
16810 ")"
16811 \end_layout
16812
16813 \begin_layout LyX-Code
16814 UpdateFormat asciixfig
16815 \end_layout
16816
16817 \begin_layout LyX-Code
16818 UpdateResult "$$AbsPath$$Basename.asc"
16819 \end_layout
16820
16821 \begin_layout LyX-Code
16822 FormatEnd
16823 \end_layout
16824
16825 \begin_layout LyX-Code
16826 Format DocBook
16827 \end_layout
16828
16829 \begin_layout LyX-Code
16830 Product "<graphic fileref=
16831 \backslash
16832 "$$AbsOrRelPathMaster$$Basename.eps
16833 \backslash
16834 ">
16835 \end_layout
16836
16837 \begin_layout LyX-Code
16838          </graphic>"
16839 \end_layout
16840
16841 \begin_layout LyX-Code
16842 UpdateFormat eps
16843 \end_layout
16844
16845 \begin_layout LyX-Code
16846 UpdateResult "$$AbsPath$$Basename.eps"
16847 \end_layout
16848
16849 \begin_layout LyX-Code
16850 ReferencedFile docbook "$$AbsPath$$Basename.eps"
16851 \end_layout
16852
16853 \begin_layout LyX-Code
16854 ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"
16855 \end_layout
16856
16857 \begin_layout LyX-Code
16858 FormatEnd
16859 \end_layout
16860
16861 \begin_layout LyX-Code
16862 Product "[XFig: $$FName]"
16863 \end_layout
16864
16865 \begin_layout LyX-Code
16866 FormatEnd
16867 \end_layout
16868
16869 \begin_layout LyX-Code
16870 TemplateEnd
16871 \end_layout
16872
16873 \begin_layout Standard
16874 ご覧の通り、ひな型は
16875 \begin_inset Flex Code
16876 status collapsed
16877
16878 \begin_layout Plain Layout
16879 Template
16880 \end_layout
16881
16882 \end_inset
16883
16884  \SpecialChar \ldots{}
16885  
16886 \begin_inset Flex Code
16887 status collapsed
16888
16889 \begin_layout Plain Layout
16890 TemplateEnd
16891 \end_layout
16892
16893 \end_inset
16894
16895 で閉じられます。ひな型には、一般的な設定を行うヘッダ部と、サポートされている主要な文書ファイル書式の設定を行う
16896 \begin_inset Flex Code
16897 status collapsed
16898
16899 \begin_layout Plain Layout
16900 Format
16901 \end_layout
16902
16903 \end_inset
16904
16905  \SpecialChar \ldots{}
16906  
16907 \begin_inset Flex Code
16908 status collapsed
16909
16910 \begin_layout Plain Layout
16911 FormatEnd
16912 \end_layout
16913
16914 \end_inset
16915
16916 部があります。
16917 \end_layout
16918
16919 \begin_layout Subsection
16920 ひな型のヘッダ
16921 \end_layout
16922
16923 \begin_layout Description
16924 \begin_inset Flex Code
16925 status collapsed
16926
16927 \begin_layout Plain Layout
16928 AutomaticProduction
16929 \begin_inset space ~
16930 \end_inset
16931
16932 true|false
16933 \end_layout
16934
16935 \end_inset
16936
16937  このひな型で扱うファイルをLyXが生成しなくてはならないか否か。このコマンドは、一度だけ必ず現れなくてはなりません。
16938 \end_layout
16939
16940 \begin_layout Description
16941 \begin_inset Flex Code
16942 status collapsed
16943
16944 \begin_layout Plain Layout
16945 FileFilter
16946 \begin_inset space ~
16947 \end_inset
16948
16949 <パターン>
16950 \end_layout
16951
16952 \end_inset
16953
16954  望むファイル群を表示するために、ファイルダイアログで使用するフィルタ用globパターン。2つ以上のファイル拡張子があり得る場合(たとえば、tgifには
16955 \begin_inset Flex Code
16956 status collapsed
16957
16958 \begin_layout Plain Layout
16959 .obj
16960 \end_layout
16961
16962 \end_inset
16963
16964
16965 \begin_inset Flex Code
16966 status collapsed
16967
16968 \begin_layout Plain Layout
16969 .tgo
16970 \end_layout
16971
16972 \end_inset
16973
16974 があります)、「
16975 \begin_inset Flex Code
16976 status collapsed
16977
16978 \begin_layout Plain Layout
16979 *.{obj,tgo}
16980 \end_layout
16981
16982 \end_inset
16983
16984 」の様なパターンを使用してください。このコマンドは、一度だけ必ず現れなくてはなりません。
16985 \end_layout
16986
16987 \begin_layout Description
16988 \begin_inset Flex Code
16989 status collapsed
16990
16991 \begin_layout Plain Layout
16992 GuiName
16993 \begin_inset space ~
16994 \end_inset
16995
16996 <GUI名>
16997 \end_layout
16998
16999 \end_inset
17000
17001  この文字列はボタン上に表示されます。このコマンドは、一度だけ必ず現れなくてはなりません。
17002 \end_layout
17003
17004 \begin_layout Description
17005 \begin_inset Flex Code
17006 status collapsed
17007
17008 \begin_layout Plain Layout
17009 HelpText
17010 \begin_inset space ~
17011 \end_inset
17012
17013 <文章>
17014 \begin_inset space ~
17015 \end_inset
17016
17017 HelpTextEnd
17018 \end_layout
17019
17020 \end_inset
17021
17022  外部素材ダイアログで使用されるヘルプ文。このひな型がユーザに何を提供できるのか、ユーザに説明するのに十分な情報を盛り込んでください。このコマンドは、一度だけ必
17023 ず現れなくてはなりません。
17024 \end_layout
17025
17026 \begin_layout Description
17027 \begin_inset Flex Code
17028 status collapsed
17029
17030 \begin_layout Plain Layout
17031 InputFormat
17032 \begin_inset space ~
17033 \end_inset
17034
17035 <書式>
17036 \end_layout
17037
17038 \end_inset
17039
17040  オリジナルファイルのファイル書式。これは、LyXが知っている書式名でなくてはなりません(第
17041 \begin_inset CommandInset ref
17042 LatexCommand ref
17043 reference "sec:書式"
17044
17045 \end_inset
17046
17047 章参照)。このひな型が、2つ以上の書式のオリジナルファイルを取り扱える場合は、「
17048 \begin_inset Flex Code
17049 status collapsed
17050
17051 \begin_layout Plain Layout
17052 *
17053 \end_layout
17054
17055 \end_inset
17056
17057 」を使用してください。この場合、LyXはファイル書式を推定するために、ファイル自体に詮索を試みます。このコマンドは、一度だけ必ず現れなくてはなりません。
17058 \end_layout
17059
17060 \begin_layout Description
17061 \begin_inset Flex Code
17062 status collapsed
17063
17064 \begin_layout Plain Layout
17065 Template
17066 \begin_inset space ~
17067 \end_inset
17068
17069 <ID>
17070 \end_layout
17071
17072 \end_inset
17073
17074  このひな型の(他と重複しない)名称。代入マクロを含めてはなりません(下記参照)。
17075 \end_layout
17076
17077 \begin_layout Description
17078 \begin_inset Flex Code
17079 status collapsed
17080
17081 \begin_layout Plain Layout
17082 Transform
17083 \begin_inset space ~
17084 \end_inset
17085
17086 Rotate|Resize|Clip|Extra
17087 \end_layout
17088
17089 \end_inset
17090
17091  このコマンドは、このひな型がどのような変換をサポートしているかを指定します。これは全く登場しなくても1回以上現れても構いません。このコマンドは、外部素材ダイア
17092 ログ中の対応するタブを使用可能にします。
17093 \begin_inset Flex Code
17094 status collapsed
17095
17096 \begin_layout Plain Layout
17097 Transform
17098 \end_layout
17099
17100 \end_inset
17101
17102 コマンド一つずつに応じて、
17103 \begin_inset Flex Code
17104 status collapsed
17105
17106 \begin_layout Plain Layout
17107 Format
17108 \end_layout
17109
17110 \end_inset
17111
17112 部に、対応する
17113 \begin_inset Flex Code
17114 status collapsed
17115
17116 \begin_layout Plain Layout
17117 TransformCommand
17118 \end_layout
17119
17120 \end_inset
17121
17122 コマンドか
17123 \begin_inset Flex Code
17124 status collapsed
17125
17126 \begin_layout Plain Layout
17127 TransformOption
17128 \end_layout
17129
17130 \end_inset
17131
17132 コマンドを置かなくてはなりません。これを行わないと、この書式での変換はサポートされません。
17133 \end_layout
17134
17135 \begin_layout Subsection
17136 \begin_inset Flex Code
17137 status collapsed
17138
17139 \begin_layout Plain Layout
17140 Format
17141 \end_layout
17142
17143 \end_inset
17144
17145
17146 \end_layout
17147
17148 \begin_layout Description
17149 \begin_inset Flex Code
17150 status collapsed
17151
17152 \begin_layout Plain Layout
17153 Format
17154 \begin_inset space ~
17155 \end_inset
17156
17157 LaT
17158 \begin_inset ERT
17159 status collapsed
17160
17161 \begin_layout Plain Layout
17162
17163 {}
17164 \end_layout
17165
17166 \end_inset
17167
17168 eX|PDFLaT
17169 \begin_inset ERT
17170 status collapsed
17171
17172 \begin_layout Plain Layout
17173
17174 {}
17175 \end_layout
17176
17177 \end_inset
17178
17179 eX|PlainText|DocBook
17180 \end_layout
17181
17182 \end_inset
17183
17184  この書式定義が定める主要な文書ファイル書式。すべてのひな型が、全文書ファイル書式に対して意味のある表示ができるわけではありません。それでも、全書式に対して
17185 \begin_inset Flex Code
17186 status collapsed
17187
17188 \begin_layout Plain Layout
17189 Format
17190 \end_layout
17191
17192 \end_inset
17193
17194 部を定義してください。表示する方法がないときは、ダミーテキストを使用してください。これによって、書き出した文書内で、少なくとも外部素材への参照を見ることができる
17195 ようになります。
17196 \end_layout
17197
17198 \begin_layout Description
17199 \begin_inset Flex Code
17200 status collapsed
17201
17202 \begin_layout Plain Layout
17203 Option
17204 \begin_inset space ~
17205 \end_inset
17206
17207 <名称>
17208 \begin_inset space ~
17209 \end_inset
17210
17211 <値>
17212 \end_layout
17213
17214 \end_inset
17215
17216  このコマンドは、
17217 \begin_inset Flex Code
17218 status collapsed
17219
17220 \begin_layout Plain Layout
17221 Product
17222 \end_layout
17223
17224 \end_inset
17225
17226 での代入に使うマクロ
17227 \begin_inset Flex Code
17228 status collapsed
17229
17230 \begin_layout Plain Layout
17231 $$<名称>
17232 \end_layout
17233
17234 \end_inset
17235
17236 を新たに定義します。
17237 \begin_inset Flex Code
17238 status collapsed
17239
17240 \begin_layout Plain Layout
17241 <値>
17242 \end_layout
17243
17244 \end_inset
17245
17246 自体にも代入マクロを使うことができます。
17247 \begin_inset Flex Code
17248 status collapsed
17249
17250 \begin_layout Plain Layout
17251 Product
17252 \end_layout
17253
17254 \end_inset
17255
17256
17257 \begin_inset Flex Code
17258 status collapsed
17259
17260 \begin_layout Plain Layout
17261 <値>
17262 \end_layout
17263
17264 \end_inset
17265
17266 を直接使用するよりも優れた点は、
17267 \begin_inset Flex Code
17268 status collapsed
17269
17270 \begin_layout Plain Layout
17271 $$<名称>
17272 \end_layout
17273
17274 \end_inset
17275
17276 に代入された値が、その文書書式で有効な非必須引数となるように健全化されることです。このコマンドは全く登場しなくても1回以上現れても構いません。
17277 \end_layout
17278
17279 \begin_layout Description
17280 \begin_inset Flex Code
17281 status collapsed
17282
17283 \begin_layout Plain Layout
17284 Product
17285 \begin_inset space ~
17286 \end_inset
17287
17288 <文>
17289 \end_layout
17290
17291 \end_inset
17292
17293  書き出された文書に挿入される文。実のところ、これが最も重要なコマンドであり、とても複雑になることがあります。このコマンドは、一度だけ必ず現れなくてはなりません
17294
17295 \end_layout
17296
17297 \begin_layout Description
17298 \begin_inset Flex Code
17299 status collapsed
17300
17301 \begin_layout Plain Layout
17302 Preamble
17303 \begin_inset space ~
17304 \end_inset
17305
17306 <名称>
17307 \end_layout
17308
17309 \end_inset
17310
17311  このコマンドは、LaTeXプリアンブルに入れるプリアンブル片を指定します。これは
17312 \begin_inset Flex Code
17313 status collapsed
17314
17315 \begin_layout Plain Layout
17316 PreambleDef
17317 \end_layout
17318
17319 \end_inset
17320
17321  \SpecialChar \ldots{}
17322  
17323 \begin_inset Flex Code
17324 status collapsed
17325
17326 \begin_layout Plain Layout
17327 PreambleDefEnd
17328 \end_layout
17329
17330 \end_inset
17331
17332 を使用して定義しなくてはなりません。このコマンドは全く登場しなくても1回以上現れても構いません。
17333 \end_layout
17334
17335 \begin_layout Description
17336 \begin_inset Flex Code
17337 status collapsed
17338
17339 \begin_layout Plain Layout
17340 ReferencedFile
17341 \begin_inset space ~
17342 \end_inset
17343
17344 <書式>
17345 \begin_inset space ~
17346 \end_inset
17347
17348 <ファイル名>
17349 \end_layout
17350
17351 \end_inset
17352
17353  このコマンドは、変換過程で生成され、特定の書き出し書式に必要とされるファイルを示します。ファイル名が相対パスである場合には、親文書に対する相対パスとして解釈さ
17354 れます。このコマンドは全く登場しなくても1回以上現れても構いません。
17355 \end_layout
17356
17357 \begin_layout Description
17358 \begin_inset Flex Code
17359 status collapsed
17360
17361 \begin_layout Plain Layout
17362 Requirement
17363 \begin_inset space ~
17364 \end_inset
17365
17366 <package>
17367 \end_layout
17368
17369 \end_inset
17370
17371  必要とされるLaTeXパッケージ名。パッケージは、LaTeXプリアンブル中で
17372 \begin_inset Flex Code
17373 status collapsed
17374
17375 \begin_layout Plain Layout
17376
17377 \backslash
17378 usepackage{}
17379 \end_layout
17380
17381 \end_inset
17382
17383 を使って取り込まれます。このコマンドは全く登場しなくても1回以上現れても構いません。
17384 \end_layout
17385
17386 \begin_layout Description
17387 \begin_inset Flex Code
17388 status collapsed
17389
17390 \begin_layout Plain Layout
17391 TransformCommand
17392 \begin_inset space ~
17393 \end_inset
17394
17395 Rotate
17396 \begin_inset space ~
17397 \end_inset
17398
17399 RotationLatexCommand
17400 \end_layout
17401
17402 \end_inset
17403
17404  このコマンドは、回転用に、組み込みのLaTeXコマンドを使用するように指定します。このコマンドは、1回現れても全く現れなくても構いません。
17405 \end_layout
17406
17407 \begin_layout Description
17408 \begin_inset Flex Code
17409 status collapsed
17410
17411 \begin_layout Plain Layout
17412 TransformCommand
17413 \begin_inset space ~
17414 \end_inset
17415
17416 Resize
17417 \begin_inset space ~
17418 \end_inset
17419
17420 ResizeLatexCommand
17421 \end_layout
17422
17423 \end_inset
17424
17425  このコマンドは、伸縮用に、組み込みのLaTeXコマンドを使用するように指定します。このコマンドは、1回現れても全く現れなくても構いません。
17426 \end_layout
17427
17428 \begin_layout Description
17429 \begin_inset Flex Code
17430 status collapsed
17431
17432 \begin_layout Plain Layout
17433 TransformOption
17434 \begin_inset space ~
17435 \end_inset
17436
17437 Rotate
17438 \begin_inset space ~
17439 \end_inset
17440
17441 RotationLatexOption
17442 \end_layout
17443
17444 \end_inset
17445
17446  このコマンドは、回転が非必須引数を通じて行われるように指定します。このコマンドは、1回現れても全く現れなくても構いません。
17447 \end_layout
17448
17449 \begin_layout Description
17450 \begin_inset Flex Code
17451 status collapsed
17452
17453 \begin_layout Plain Layout
17454 TransformOption
17455 \begin_inset space ~
17456 \end_inset
17457
17458 Resize
17459 \begin_inset space ~
17460 \end_inset
17461
17462 ResizeLatexOption
17463 \end_layout
17464
17465 \end_inset
17466
17467  このコマンドは、伸縮が非必須引数を通じて行われるように指定します。このコマンドは、1回現れても全く現れなくても構いません。
17468 \end_layout
17469
17470 \begin_layout Description
17471 \begin_inset Flex Code
17472 status collapsed
17473
17474 \begin_layout Plain Layout
17475 TransformOption
17476 \begin_inset space ~
17477 \end_inset
17478
17479 Clip
17480 \begin_inset space ~
17481 \end_inset
17482
17483 ClipLatexOption
17484 \end_layout
17485
17486 \end_inset
17487
17488  このコマンドは、切り抜きが非必須引数を通じて行われるように指定します。このコマンドは、1回現れても全く現れなくても構いません。
17489 \end_layout
17490
17491 \begin_layout Description
17492 \begin_inset Flex Code
17493 status collapsed
17494
17495 \begin_layout Plain Layout
17496 TransformOption
17497 \begin_inset space ~
17498 \end_inset
17499
17500 Extra
17501 \begin_inset space ~
17502 \end_inset
17503
17504 ExtraLatexOption
17505 \end_layout
17506
17507 \end_inset
17508
17509  このコマンドは、追加の非必須引数を使用することを指定します。このコマンドは、1回現れても全く現れなくても構いません。
17510 \end_layout
17511
17512 \begin_layout Description
17513 \begin_inset Flex Code
17514 status collapsed
17515
17516 \begin_layout Plain Layout
17517 UpdateFormat
17518 \begin_inset space ~
17519 \end_inset
17520
17521 <書式>
17522 \end_layout
17523
17524 \end_inset
17525
17526  変換されたファイルのファイル書式。これは、LyXが知っている書式名でなくてはなりません(
17527 \begin_inset Flex MenuItem
17528 status collapsed
17529
17530 \begin_layout Plain Layout
17531 ツール\SpecialChar \menuseparator
17532 設定:変換子
17533 \end_layout
17534
17535 \end_inset
17536
17537 ダイアログを参照)。このコマンドは、一度だけ必ず現れなくてはなりません。
17538 \end_layout
17539
17540 \begin_layout Description
17541 \begin_inset Flex Code
17542 status collapsed
17543
17544 \begin_layout Plain Layout
17545 UpdateResult
17546 \begin_inset space ~
17547 \end_inset
17548
17549 <ファイル名>
17550 \end_layout
17551
17552 \end_inset
17553
17554  変換されたファイルのファイル名。ファイル名は絶対パスでなくてはなりません。このコマンドは、一度だけ必ず現れなくてはなりません。
17555 \end_layout
17556
17557 \begin_layout Subsection
17558 プリアンブルの定義
17559 \end_layout
17560
17561 \begin_layout Standard
17562 外用ひな型設定ファイルには、
17563 \begin_inset Flex Code
17564 status collapsed
17565
17566 \begin_layout Plain Layout
17567 PreambleDef
17568 \end_layout
17569
17570 \end_inset
17571
17572  \SpecialChar \ldots{}
17573  
17574 \begin_inset Flex Code
17575 status collapsed
17576
17577 \begin_layout Plain Layout
17578 PreambleDefEnd
17579 \end_layout
17580
17581 \end_inset
17582
17583 で囲んだプリアンブル定義を追加することができます。これらの定義は、ひな型の
17584 \begin_inset Flex Code
17585 status collapsed
17586
17587 \begin_layout Plain Layout
17588 Format
17589 \end_layout
17590
17591 \end_inset
17592
17593 部で使用することができます。
17594 \end_layout
17595
17596 \begin_layout Section
17597 代入機構
17598 \end_layout
17599
17600 \begin_layout Standard
17601 外部素材機構が外部プログラムを呼び出すときには、ひな型設定ファイルで定義されたコマンドにしたがって行われます。これらのコマンドには、実行前に展開されるマクロをい
17602 ろいろ入れることができます。実行は、つねに元の文書があるディレクトリで行われます。
17603 \end_layout
17604
17605 \begin_layout Standard
17606 また、外部素材が表示されるときにはいつでも、その名称は代入機構によって組み立てられ、ひな型定義中の他のほとんどのコマンドも代入をサポートしています。
17607 \end_layout
17608
17609 \begin_layout Standard
17610 使用できるマクロは以下の通りです。
17611 \end_layout
17612
17613 \begin_layout Description
17614 \begin_inset Flex Code
17615 status collapsed
17616
17617 \begin_layout Plain Layout
17618 $$AbsOrRelPathMaster
17619 \end_layout
17620
17621 \end_inset
17622
17623  LyX親文書への絶対ファイルパスないしは相対ファイルパス
17624 \end_layout
17625
17626 \begin_layout Description
17627 \begin_inset Flex Code
17628 status collapsed
17629
17630 \begin_layout Plain Layout
17631 $$AbsOrRelPathParent
17632 \end_layout
17633
17634 \end_inset
17635
17636  LyX文書への絶対ファイルパスないしは相対ファイルパス
17637 \end_layout
17638
17639 \begin_layout Description
17640 \begin_inset Flex Code
17641 status collapsed
17642
17643 \begin_layout Plain Layout
17644 $$AbsPath
17645 \end_layout
17646
17647 \end_inset
17648
17649  絶対ファイルパス
17650 \end_layout
17651
17652 \begin_layout Description
17653 \begin_inset Flex Code
17654 status collapsed
17655
17656 \begin_layout Plain Layout
17657 $$Basename
17658 \end_layout
17659
17660 \end_inset
17661
17662  パスおよび拡張子を除いたファイル名
17663 \end_layout
17664
17665 \begin_layout Description
17666 \begin_inset Flex Code
17667 status collapsed
17668
17669 \begin_layout Plain Layout
17670 $$Contents(
17671 \begin_inset Quotes eld
17672 \end_inset
17673
17674 filename.ext
17675 \begin_inset Quotes erd
17676 \end_inset
17677
17678 )
17679 \end_layout
17680
17681 \end_inset
17682
17683  このマクロは、
17684 \begin_inset Flex Code
17685 status collapsed
17686
17687 \begin_layout Plain Layout
17688 filename.ext
17689 \end_layout
17690
17691 \end_inset
17692
17693 と云う名のファイルの中身を展開します。
17694 \end_layout
17695
17696 \begin_layout Description
17697 \begin_inset Flex Code
17698 status collapsed
17699
17700 \begin_layout Plain Layout
17701 $$Extension
17702 \end_layout
17703
17704 \end_inset
17705
17706  ファイル拡張子(点を含む)
17707 \end_layout
17708
17709 \begin_layout Description
17710 \begin_inset Flex Code
17711 status collapsed
17712
17713 \begin_layout Plain Layout
17714 $$FName
17715 \end_layout
17716
17717 \end_inset
17718
17719  外部素材ダイアログで指定されたファイルのファイル名。これはLyX文書への絶対パスでも良いですし、相対パスでも構いません。
17720 \end_layout
17721
17722 \begin_layout Description
17723 \begin_inset Flex Code
17724 status collapsed
17725
17726 \begin_layout Plain Layout
17727 $$FPath
17728 \end_layout
17729
17730 \end_inset
17731
17732  
17733 \begin_inset Flex Code
17734 status collapsed
17735
17736 \begin_layout Plain Layout
17737 $$FName
17738 \end_layout
17739
17740 \end_inset
17741
17742 のパス部分(LyX文書への絶対パス名か相対パス名)
17743 \end_layout
17744
17745 \begin_layout Description
17746 \begin_inset Flex Code
17747 status collapsed
17748
17749 \begin_layout Plain Layout
17750 $$RelPathMaster
17751 \end_layout
17752
17753 \end_inset
17754
17755  LyX親文書への相対ファイルパス
17756 \end_layout
17757
17758 \begin_layout Description
17759 \begin_inset Flex Code
17760 status collapsed
17761
17762 \begin_layout Plain Layout
17763 $$RelPathParent
17764 \end_layout
17765
17766 \end_inset
17767
17768  LyX文書への相対ファイルパス
17769 \end_layout
17770
17771 \begin_layout Description
17772 \begin_inset Flex Code
17773 status collapsed
17774
17775 \begin_layout Plain Layout
17776 $$Sysdir
17777 \end_layout
17778
17779 \end_inset
17780
17781  このマクロは、システムディレクトリの絶対パスを展開します。これは、典型的には、LyXに同梱されているヘルパースクリプト群を示したりするのに使用されます。
17782 \end_layout
17783
17784 \begin_layout Description
17785 \begin_inset Flex Code
17786 status collapsed
17787
17788 \begin_layout Plain Layout
17789 $$Tempname
17790 \end_layout
17791
17792 \end_inset
17793
17794  元の文書が閉じられたり、挿入されていた外部素材が削除されたりすると自動的に削除される一時ファイルのフルパスとファイル名。
17795 \end_layout
17796
17797 \begin_layout Standard
17798 パスを示すマクロはすべて最後のディレクトリ区切りも含んでいますので、たとえば絶対パスのファイル名を 
17799 \begin_inset Flex Code
17800 status collapsed
17801
17802 \begin_layout Plain Layout
17803 $$AbsPath$$Basename$$Extension
17804 \end_layout
17805
17806 \end_inset
17807
17808 のようにして作ることができます。
17809 \end_layout
17810
17811 \begin_layout Standard
17812 上記マクロは、特記しない限りはすべてのコマンドで代入が行われます。
17813 \begin_inset Flex Code
17814 status collapsed
17815
17816 \begin_layout Plain Layout
17817 Transform
17818 \end_layout
17819
17820 \end_inset
17821
17822 コマンドと
17823 \begin_inset Flex Code
17824 status collapsed
17825
17826 \begin_layout Plain Layout
17827 TransformCommand
17828 \end_layout
17829
17830 \end_inset
17831
17832 コマンドが有効にされている場合、
17833 \begin_inset Flex Code
17834 status collapsed
17835
17836 \begin_layout Plain Layout
17837 Product
17838 \end_layout
17839
17840 \end_inset
17841
17842 コマンドは、これらに加えて以下の代入もサポートします。
17843 \end_layout
17844
17845 \begin_layout Description
17846 \begin_inset Flex Code
17847 status collapsed
17848
17849 \begin_layout Plain Layout
17850 $$ResizeFront
17851 \end_layout
17852
17853 \end_inset
17854
17855  伸縮コマンドの前置部。
17856 \end_layout
17857
17858 \begin_layout Description
17859 \begin_inset Flex Code
17860 status collapsed
17861
17862 \begin_layout Plain Layout
17863 $$ResizeBack
17864 \end_layout
17865
17866 \end_inset
17867
17868  伸縮コマンドの後置部。
17869 \end_layout
17870
17871 \begin_layout Description
17872 \begin_inset Flex Code
17873 status collapsed
17874
17875 \begin_layout Plain Layout
17876 $$RotateFront
17877 \end_layout
17878
17879 \end_inset
17880
17881  回転コマンドの前置部。
17882 \end_layout
17883
17884 \begin_layout Description
17885 \begin_inset Flex Code
17886 status collapsed
17887
17888 \begin_layout Plain Layout
17889 $$RotateBack
17890 \end_layout
17891
17892 \end_inset
17893
17894  回転コマンドの後置部。
17895 \end_layout
17896
17897 \begin_layout Standard
17898 \begin_inset Flex Code
17899 status collapsed
17900
17901 \begin_layout Plain Layout
17902 Option
17903 \end_layout
17904
17905 \end_inset
17906
17907 コマンドの値に入れる文字列では、
17908 \begin_inset Flex Code
17909 status collapsed
17910
17911 \begin_layout Plain Layout
17912 Transform
17913 \end_layout
17914
17915 \end_inset
17916
17917 コマンドと
17918 \begin_inset Flex Code
17919 status collapsed
17920
17921 \begin_layout Plain Layout
17922 TransformOption
17923 \end_layout
17924
17925 \end_inset
17926
17927 コマンドが有効にされていれば、以下の代入もサポートされます。
17928 \end_layout
17929
17930 \begin_layout Description
17931 \begin_inset Flex Code
17932 status collapsed
17933
17934 \begin_layout Plain Layout
17935 $$Clip
17936 \end_layout
17937
17938 \end_inset
17939
17940  切り抜きオプション。
17941 \end_layout
17942
17943 \begin_layout Description
17944 \begin_inset Flex Code
17945 status collapsed
17946
17947 \begin_layout Plain Layout
17948 $$Extra
17949 \end_layout
17950
17951 \end_inset
17952
17953  追加オプション。
17954 \end_layout
17955
17956 \begin_layout Description
17957 \begin_inset Flex Code
17958 status collapsed
17959
17960 \begin_layout Plain Layout
17961 $$Resize
17962 \end_layout
17963
17964 \end_inset
17965
17966  伸縮オプション。
17967 \end_layout
17968
17969 \begin_layout Description
17970 \begin_inset Flex Code
17971 status collapsed
17972
17973 \begin_layout Plain Layout
17974 $$Rotate
17975 \end_layout
17976
17977 \end_inset
17978
17979  回転オプション。
17980 \end_layout
17981
17982 \begin_layout Standard
17983 どうしてこんなに多くのパス関連マクロがあるのか不思議に思われるかもしれません。主に以下の二つの理由があります。
17984 \end_layout
17985
17986 \begin_layout Enumerate
17987 相対ファイル名と絶対ファイル名は、それぞれ相対的あるいは絶対的なままで維持されなくてはなりません。ユーザにはどちらかの形を好む理由があるのかもしれません。たとえ
17988 ば相対名は、いろいろなマシンで作業をする持ち運び用の文書で役立ちます。絶対名は、プログラムによっては必要とされることがあり得ます。
17989 \end_layout
17990
17991 \begin_layout Enumerate
17992 LaTeXは、相対ファイル名に関して、LyXや入れ子にした取り込みファイル中の他のプログラムとは異なった取り扱いを行います。LyXにとって相対ファイル名とは、常
17993 にこのファイル名が書かれている文書に対して相対的なものになります。LaTeXにとっての相対ファイル名は、常に親文書に対するものになります。これら二つの定義は、一
17994 つの文書しかないときには同じですが、部分文書を含む親文書があるときには異なったものとなってきます。つまり、相対ファイル名は、LaTeXに提示されるときに変換され
17995 なくてはならないのです。幸い、正しいマクロを選びさえすれば、これはLyXが自動的に行ってくれます。
17996 \end_layout
17997
17998 \begin_layout Standard
17999 すると、新しく作ったひな型定義では、どのパス関連マクロを使うべきでしょうか。このルールは難しくありません。つまり、
18000 \end_layout
18001
18002 \begin_layout Itemize
18003 絶対パスが必要とされるときには
18004 \begin_inset Flex Code
18005 status collapsed
18006
18007 \begin_layout Plain Layout
18008 $$AbsPath
18009 \end_layout
18010
18011 \end_inset
18012
18013 を使う。
18014 \end_layout
18015
18016 \begin_layout Itemize
18017 代入された文字列が、LaTeXインプットの一種である場合には、
18018 \begin_inset Flex Code
18019 status collapsed
18020
18021 \begin_layout Plain Layout
18022 $$AbsOrRelPathMaster
18023 \end_layout
18024
18025 \end_inset
18026
18027 を使う。
18028 \end_layout
18029
18030 \begin_layout Itemize
18031 それ以外ならば、ユーザの選択を尊重するために
18032 \begin_inset Flex Code
18033 status collapsed
18034
18035 \begin_layout Plain Layout
18036 $$AbsOrRelPathParent
18037 \end_layout
18038
18039 \end_inset
18040
18041 を使う。
18042 \end_layout
18043
18044 \begin_layout Standard
18045 このルールが機能せずに、たとえば相対名が必要となる特殊な場合もありますが、通常、上記でうまく動作します。特殊例の例としては、上述のXFigひな型での
18046 \begin_inset Flex Code
18047 status collapsed
18048
18049 \begin_layout Plain Layout
18050 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
18051 \end_layout
18052
18053 \end_inset
18054
18055 というコマンドがあります。この場合、
18056 \begin_inset Flex Code
18057 status collapsed
18058
18059 \begin_layout Plain Layout
18060 .pstex_t
18061 \end_layout
18062
18063 \end_inset
18064
18065 ファイルの複写子は、ファイル内容を書き換えるのに相対名を必要とするために、絶対名を使用することができないのです。
18066 \end_layout
18067
18068 \begin_layout Section
18069 セキュリティに関する論点
18070 \begin_inset CommandInset label
18071 LatexCommand label
18072 name "sec:セキュリティに関する論点"
18073
18074 \end_inset
18075
18076
18077 \end_layout
18078
18079 \begin_layout Standard
18080 外部素材機能は、多くの外部プログラムとの橋渡しをし、しかもそれを自動的に行うので、そのセキュリティ面での帰結を考慮しなくてはなりません。特に、ユーザは好きなファ
18081 イル名やパラメータ文字列を含めることが許されていて、しかもそれらがコマンドに展開されるので、ユーザが文書を閲覧したり印刷したりしたときに、任意のコマンドを実行す
18082 ることができるような悪意ある文書を作成することが可能となりましょう。これは、我々がぜひとも避けたいことなのです。
18083 \end_layout
18084
18085 \begin_layout Standard
18086 しかしながら、外部プログラムコマンドはひな型設定ファイルでのみ指定されているので、LyXが安全なひな型でのみ適切に設定されているならば、セキュリティ上の問題は発
18087 生しません。これは、外部プログラムが
18088 \begin_inset Flex Code
18089 status collapsed
18090
18091 \begin_layout Plain Layout
18092 system
18093 \end_layout
18094
18095 \end_inset
18096
18097 システムコールではなく、
18098 \begin_inset Flex Code
18099 status collapsed
18100
18101 \begin_layout Plain Layout
18102 execvp
18103 \end_layout
18104
18105 \end_inset
18106
18107 システムコールで呼び出されているため、ファイル名やパラメータ部からシェル経由で任意のコマンドを実行することはできないためです。
18108 \end_layout
18109
18110 \begin_layout Standard
18111 これは、外部素材ひな型でどのようなコマンド文字列を使用することのできるかについて、制限があることを意味します。特に、パイプやリダイレクトはそのまま使用することは
18112 できません。これは、LyXの安全性を維持するためにそうしなくてはならないのです。もしシェル機能の一部を使用したいとすると、これを完全に統御の下においたまま行う安
18113 全なスクリプトを書いた上で、このスクリプトをコマンド文字列から呼び出すようにしなくてはなりません。
18114 \end_layout
18115
18116 \begin_layout Standard
18117 シェルと直接やりとりするひな型を設計することは可能ではありますが、悪意のあるユーザが狡猾なファイル名やパラメータを書くことによって、任意のコマンドを実行できるよ
18118 うになるため、一般的には、統御下に置いた状態で
18119 \begin_inset Flex Code
18120 status collapsed
18121
18122 \begin_layout Plain Layout
18123 execvp
18124 \end_layout
18125
18126 \end_inset
18127
18128 システムコールを使用する安全なスクリプトのみを使用することをお勧めします。確かに、管理された環境下で使用する分には、通常のシェルスクリプトを使用する方に流れる誘
18129 惑はあります。そうした場合には、お使いのシステムに簡単に濫用することのできるセキュリティホールを、
18130 \emph on
18131 間違いなく
18132 \emph default
18133 導入することを理解しておいてください。オープンソースの伝統に従って、私たちは人々に新しいひな型を投稿してくれるよう促していますが、そのような安全でないひな型はL
18134 yXの標準頒布版には取り入れるべきでないとすることには当然の正当性があります。公式の頒布チャンネルから出荷されているLyXには、安全でないひな型は決して入ってい
18135 ません。
18136 \end_layout
18137
18138 \begin_layout Standard
18139 外部素材を含めることで強力な力を手に入れることができますが、この力とともにセキュリティ上の危険を導入してしまわないように気をつける必要があります。無防備なスクリ
18140 プトのたった一行に入り込んだ、ちょっとしたエラーが、巨大なセキュリティ上の問題に扉を開きうるのです。したがって、もしこの問題を完全に理解していないならば、特定の
18141 ひな型が安全であるかどうか疑問がある際には、知識豊富なセキュリティの専門家か、LyX開発チームに相談してみてください。そしてこの相談は、管理されていない環境下で
18142 これを使用する前に、行うようにしてください。
18143 \end_layout
18144
18145 \end_body
18146 \end_document