#LyX 2.2 created this file. For more info see http://www.lyx.org/ \lyxformat 501 \begin_document \begin_header \origin /systemlyxdir/doc/ja/ \textclass scrbook \begin_preamble % DO NOT ALTER THIS PREAMBLE!!! % % This preamble is designed to ensure that the manual prints % out as advertised. If you mess with this preamble, % parts of the manual may not print out as expected. If you % have problems LaTeXing this file, please contact % the documentation team % email: lyx-docs@lists.lyx.org \IfFileExists{pxjahyper.sty} {\usepackage{pxjahyper}} % if pdflatex is used \usepackage{ifpdf} \ifpdf % set fonts for nicer pdf view \IfFileExists{lmodern.sty} {\usepackage{lmodern}}{} \fi % end if pdflatex is used % the pages of the TOC are numbered roman % and a PDF-bookmark for the TOC is added \pagenumbering{roman} \let\myTOC\tableofcontents \renewcommand{\tableofcontents}{% \pdfbookmark[1]{\contentsname}{} \myTOC \cleardoublepage \pagenumbering{arabic}} % extra space for tables \newcommand{\extratablespace}[1]{\noalign{\vskip#1}} \usepackage{t1enc} \end_preamble \options fleqn,bibliography=totoc,index=totoc,BCOR7.5mm,titlepage,captions=tableheading \use_default_options false \begin_modules logicalmkup theorems-ams theorems-ams-extended multicol shapepar \end_modules \maintain_unincluded_children false \begin_local_layout InsetLayout Flex:MenuItem LyxType charstyle LabelString menu LatexType command LatexName menuitem Font Family Sans EndFont Preamble \newcommand*{\menuitem}[1]{{\sffamily #1}} EndPreamble End InsetLayout Flex:Ruby LyxType charstyle LatexType command LatexName ruby BgColor none LabelString "ルビ" Decoration Conglomerate Argument post:1 LabelString "ルビ文" MenuString "ルビ文(S)|S" Decoration Conglomerate Font Size tiny EndFont LabelFont Size tiny EndFont Mandatory 1 EndArgument Preamble \IfFileExists{okumacro.sty} {\usepackage{okumacro}} {\newcommand{\ruby}[2]{#2}} EndPreamble End \end_local_layout \language japanese \language_package default \inputencoding auto \fontencoding global \font_roman "default" "default" \font_sans "default" "default" \font_typewriter "default" "default" \font_math "auto" "auto" \font_default_family default \use_non_tex_fonts false \font_sc false \font_osf false \font_sf_scale 100 100 \font_tt_scale 100 100 \graphics default \default_output_format pdf \output_sync 0 \bibtex_command default \index_command default \paperfontsize 12 \spacing single \use_hyperref true \pdf_title "LyX's Additional Features manual" \pdf_author "LyX Team" \pdf_subject "LyX's additional features documentation" \pdf_keywords "LyX, Documentation, Additional" \pdf_bookmarks false \pdf_bookmarksnumbered true \pdf_bookmarksopen false \pdf_bookmarksopenlevel 1 \pdf_breaklinks false \pdf_pdfborder false \pdf_colorlinks true \pdf_backref false \pdf_pdfusetitle false \pdf_quoted_options "pdfencoding=pdfdoc, linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue, pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false" \papersize default \use_geometry false \use_package amsmath 1 \use_package amssymb 1 \use_package cancel 0 \use_package esint 0 \use_package mathdots 1 \use_package mathtools 0 \use_package mhchem 1 \use_package stackrel 0 \use_package stmaryrd 0 \use_package undertilde 0 \cite_engine basic \cite_engine_type default \biblio_style plain \use_bibtopic false \use_indices false \paperorientation portrait \suppress_date false \justification true \use_refstyle 0 \notefontcolor #0000ff \index 索引 \shortcut idx \color #008000 \end_index \secnumdepth 3 \tocdepth 3 \paragraph_separation indent \paragraph_indentation default \quotes_language english \papercolumns 1 \papersides 2 \paperpagestyle headings \tracking_changes false \output_changes false \html_math_output 0 \html_css_as_file 0 \html_be_strict true \end_header \begin_body \begin_layout Title \SpecialCharNoPassThru LyX の高度な機能 \begin_inset Newline newline \end_inset \size large 第2.1.x版 \end_layout \begin_layout Author \SpecialCharNoPassThru LyX プロジェクトチーム \begin_inset Foot status collapsed \begin_layout Plain Layout このファイルは主にRichard Heckによって管理されています。コメントをされたい場合や誤りを発見された場合には、\SpecialCharNoPassThru LyX 文書化メーリングリスト \begin_inset Flex Code status open \begin_layout Plain Layout \noindent \family typewriter \end_layout \end_inset に英文にてお知らせ下さい。この文書の翻訳は、当初人見光太郎氏が行った貢献に基づいています。 \end_layout \end_inset \end_layout \begin_layout Standard \begin_inset CommandInset toc LatexCommand tableofcontents \end_inset \end_layout \begin_layout Chapter はじめに \end_layout \begin_layout Standard いまお読みの取扱説明書『 \emph on \SpecialCharNoPassThru LyX 拡張機能篇 \emph default 』は、基本的には『 \emph on ユーザーの手引き \emph default 』の第二部です。これらの文書を別部とした理由は、単純に『 \emph on ユーザーの手引き \emph default 』がすでに大部となっていることと、『 \emph on ユーザーの手引き \emph default 』が、ほとんどの文書を作成する上で必要な基本機能をすべて説明してしまっているためです。一方で、\SpecialCharNoPassThru LyX プロジェクトチームは、\SpecialCharNoPassThru LyX を各設定ファイルと外部パッケージ によって拡張可能な状態にしておくことを長期的な目標にしています。つまり、ある\SpecialCharNoPassThru LaTeX パッケージをサポートしたい場合に、\SpecialCharNoPassThru LyX 自身に変更を加えることなく、当該パ ッケージ用のレイアウトファイル(ないしモジュール)を作成すればいいようにしているのです。すでにこのような形で、いくつもの新機能がユーザーによって追加されています 。この取扱説明書は、そのような形での貢献を文書化する冊子として位置付けられています。 \end_layout \begin_layout Standard この取扱説明書では、ファックスのサポート・バージョン管理・SGMLサポートのような、正しく機能するためには追加的なソフトウェアを必要とする特殊機能についても説明 しています。さらに、\SpecialCharNoPassThru LaTeX の強力な機能を直接使って文書を美しく仕上げるための、\SpecialCharNoPassThru LaTeX ツールやテクニックを述べた章も収録しています。つきつめれば、\SpecialCharNoPassThru LyX と はあくまでWYSIWYMたることを企図しているため、\SpecialCharNoPassThru LaTeX の全機能の一部へのインタフェースは用意するものの、すべてを用意することはないでしょう。 \end_layout \begin_layout Standard もし、まだ『 \emph on はじめの一歩 \emph default 』をお読みでなかったら、この取扱説明書から読みはじめるのは誤りです。『 \emph on はじめの一歩 \emph default 』には、全取扱説明書に共通の表記法と書式が説明されていますので、まずそれからお読みください。さらに、この取扱説明書を読もうとする前に、『 \emph on ユーザーの手引き \emph default 』をよくお読みになって、\SpecialCharNoPassThru LyX の全基本機能を習得してください。 \end_layout \begin_layout Standard この取扱説明書の取り上げられている話題は、\SpecialCharNoPassThru LyX が\SpecialCharNoPassThru LaTeX にどう関わっているかに強く関係していますので、まず次章では、\SpecialCharNoPassThru LyX の内部動作がどうなっているか、Ly Xに希望する\SpecialCharNoPassThru LaTeX コードを正確に生成させるにはどうしたらいいかを収録しています。本章は、あきらかに熟練\SpecialCharNoPassThru LyX ユーザー向けの章となっています。 \end_layout \begin_layout Chapter \SpecialCharNoPassThru LyX と\SpecialCharNoPassThru LaTeX \end_layout \begin_layout Section \SpecialCharNoPassThru LyX は\SpecialCharNoPassThru LaTeX をどう使っているか \end_layout \begin_layout Standard 本章 \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none は、\SpecialCharNoPassThru TeX 熟練者と\SpecialCharNoPassThru LaTeX に興味のある方向けの章です。ここでは、\SpecialCharNoPassThru LyX と\SpecialCharNoPassThru LaTeX が、印刷可能な出力を生成するのに、どのように協働しているのかを説明します。全 取扱説明書中で本章だけは、\SpecialCharNoPassThru LaTeX のことを多少なりともご存知であることを前提とします。 \end_layout \begin_layout Standard \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none かつて\SpecialCharNoPassThru LyX は、「\SpecialCharNoPassThru LaTeX の \family default \series default \shape default \size default \emph default \bar default \noun default \color inherit WYSIWYM \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none なフロントエンド」と呼ばれていましたが、いまではこれは正しくありません。\SpecialCharNoPassThru LaTeX のフロントエンドは、いくつも出回っています \begin_inset Foot status collapsed \begin_layout Plain Layout \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none 有名なものとしては、Linux上の\SpecialCharNoPassThru TeX makerとkile、OSX上の\SpecialCharNoPassThru TeX shopなどがあります。もちろんviとemacsの\SpecialCharNoPassThru LaTeX モードも含まれます。 \end_layout \end_inset 。これらは、基本的に\SpecialCharNoPassThru LaTeX を走らせる機能を有し、編集中のファイルのエラーを表示する機能を持ったテキストエディタです。\SpecialCharNoPassThru LyX も、エディタであり、\SpecialCharNoPassThru LaTeX を走 らせる機能を有し、ファイル中のエラーを指摘しますが、それ以上にもっともっと多くのことをしてくれます。 \family default \series default \shape default \size default \emph default \bar default \noun default \color inherit ひとつには、 \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none \SpecialCharNoPassThru LyX を効果的に使うのに、\SpecialCharNoPassThru LaTeX の知識が必要とされないことが挙げられます。また\SpecialCharNoPassThru LyX は、それ自身、いくつかの拡張を\SpecialCharNoPassThru LaTeX に加えています。時間のあるときに でも、いちど以下の手順を試してみてください。まず \family sans \series default \shape default \size default \emph default \bar default \noun default \color inherit \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout \family sans ファイル \end_layout \end_inset \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none メニューから \family sans \series default \shape default \size default \emph default \bar default \noun default \color inherit \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout \family sans エクスポート\SpecialChar menuseparator \SpecialCharNoPassThru LaTeX \end_layout \end_inset \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none (あるいは \family sans \series default \shape default \size default \emph default \bar default \noun default \color inherit \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout \family sans 表示\SpecialChar menuseparator ソースを閲覧 \end_layout \end_inset \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none )を選択し、そこから出力される \begin_inset Flex Code status collapsed \begin_layout Plain Layout \family typewriter .tex \end_layout \end_inset ファイルのプリアンブルをご覧ください。\SpecialCharNoPassThru LyX によって特別に定義された新しいマクロが複数定義されていることに気づかれるはずです \family default \series default \shape default \size default \emph default \bar default \noun default \color inherit 。これらのマクロは、文書中で使用する機能に応じて、自動的に定義されます。 \end_layout \begin_layout Standard \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none 自動的に\SpecialCharNoPassThru LaTeX を実行するコマンドが、以下のようにいくつかあります。 \end_layout \begin_layout Itemize \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout 表示\SpecialChar menuseparator \emph on 書式 \end_layout \end_inset \end_layout \begin_layout Itemize \family sans \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout \bar no 表示\SpecialChar menuseparator 更新\SpecialChar menuseparator \emph on 書式 \end_layout \end_inset \end_layout \begin_layout Itemize \family sans \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout ファイル\SpecialChar menuseparator 印刷 \end_layout \end_inset \end_layout \begin_layout Itemize \family sans \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout ファイル\SpecialChar menuseparator ファックス \end_layout \end_inset \end_layout \begin_layout Standard \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none これらは、最後に\SpecialCharNoPassThru LaTeX を実行してからファイルに変更が加えられた場合のみ、\SpecialCharNoPassThru LaTeX を実行します。 \end_layout \begin_layout Standard \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none \SpecialCharNoPassThru LyX が編集中のファイルを\SpecialCharNoPassThru LaTeX にかけるとき、\SpecialCharNoPassThru LyX は以下の段階をふみます。 \end_layout \begin_layout Enumerate \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none 文書を\SpecialCharNoPassThru LaTeX に変換し、ファイルの拡張子を \begin_inset Flex Code status collapsed \begin_layout Plain Layout \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none .lyx \end_layout \end_inset から \begin_inset Flex Code status collapsed \begin_layout Plain Layout \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none .tex \end_layout \end_inset に変えて保存。 \end_layout \begin_layout Enumerate \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none この \begin_inset Flex Code status collapsed \begin_layout Plain Layout \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none .tex \end_layout \end_inset ファイルに対して(必要に応じて複数回)\SpecialCharNoPassThru LaTeX を実行し、\SpecialCharNoPassThru LaTeX ファイルをコンパイルするのに必要な他のコマンド( \begin_inset Flex Code status collapsed \begin_layout Plain Layout \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none bibtex \end_layout \end_inset や \begin_inset Flex Code status collapsed \begin_layout Plain Layout \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none makeindex \end_layout \end_inset など)を実行。。 \end_layout \begin_layout Enumerate \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none もしエラーがあれば、エラーログを表示。 \end_layout \begin_layout Standard \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none \SpecialCharNoPassThru LaTeX を \family sans \series default \shape default \size default \emph default \bar default \noun default \color inherit \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout \family sans 表示\SpecialChar menuseparator DVI \end_layout \end_inset \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none を使用して実行した場合には、\SpecialCharNoPassThru LyX はこの後、DVIビューアを実行してDVIファイルを表示します。 \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none 表示\SpecialChar menuseparator PostScript \end_layout \end_inset を使用した場合には、\SpecialCharNoPassThru LyX はさらに以下の段階をふみます。 \end_layout \begin_layout Itemize \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none \begin_inset Flex Code status collapsed \begin_layout Plain Layout \family typewriter dvips \end_layout \end_inset を実行して、 \family default \series default \shape default \size default \emph default \bar default \noun default \color inherit DVI \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none ファイルをPostScript® \family default \series default \shape default \size default \emph default \bar default \noun default \color inherit に変換。 \end_layout \begin_layout Itemize \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none \begin_inset Flex Code status collapsed \begin_layout Plain Layout \family typewriter ghostview \end_layout \end_inset などのPostScript®ビューアを実行して、PostScript® \family default \series default \shape default \size default \emph default \bar default \noun default \color inherit ファイルを表示。 \end_layout \begin_layout Standard \SpecialCharNoPassThru LyX は、他の書式を表示したりエクスポートしたりする際にも、同様のことを行います。 \end_layout \begin_layout Section \SpecialCharNoPassThru LaTeX ファイルを\SpecialCharNoPassThru LyX に読み込む \end_layout \begin_layout Standard \SpecialCharNoPassThru LyX で \family sans \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout \family sans ファイル\SpecialChar menuseparator インポート\SpecialChar menuseparator \SpecialCharNoPassThru LaTeX \end_layout \end_inset \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none コマンドを使用すると、\SpecialCharNoPassThru LaTeX ファイルを \family default \series default \shape default \size default \emph default \bar default \noun default \family roman \series medium \shape up \size normal \emph off \bar no \noun off \SpecialCharNoPassThru LyX にインポートすることができます。このコマンドは、 \family typewriter \series default \shape default \size default \emph default \bar default \noun default \color inherit \begin_inset Flex Code status collapsed \begin_layout Plain Layout \family typewriter tex2lyx \end_layout \end_inset \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none というプログラムを呼び出し、 \family typewriter \series default \shape default \size default \emph default \bar default \noun default \color inherit \begin_inset Flex Code status collapsed \begin_layout Plain Layout \family typewriter foo.tex \end_layout \end_inset \family default などというファイルから \begin_inset Flex Code status collapsed \begin_layout Plain Layout \family typewriter foo.lyx \end_layout \end_inset を生成します。\SpecialCharNoPassThru LyX は、この変換したファイルを開きます \begin_inset Foot status collapsed \begin_layout Plain Layout \begin_inset Flex Code status collapsed \begin_layout Plain Layout tex2lyx \end_layout \end_inset は、もちろんコマンドラインから実行することもできます。 \end_layout \end_inset 。 \end_layout \begin_layout Standard \family typewriter \begin_inset Flex Code status collapsed \begin_layout Plain Layout \family typewriter tex2lyx \end_layout \end_inset \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none は、文法的に正しい\SpecialCharNoPassThru LaTeX ファイルのほとんどを変換することができますが、すべてを変換できるわけではありません。 \family typewriter \series default \shape default \size default \emph default \bar default \noun default \color inherit \begin_inset Flex Code status collapsed \begin_layout Plain Layout \family typewriter tex2lyx \end_layout \end_inset \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none は、理解不能な部分は\SpecialCharNoPassThru TeX コードボックスの形で残しますので、ファイルを \family typewriter \series default \shape default \size default \emph default \bar default \noun default \color inherit \begin_inset Flex Code status collapsed \begin_layout Plain Layout \family typewriter tex2lyx \end_layout \end_inset \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none で変換したのち、\SpecialCharNoPassThru TeX コードボックスを探して、手動で正しく編集してください。 \end_layout \begin_layout Standard \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none \SpecialCharNoPassThru TeX コードボックスがなにかご存じなければ、次節をお読みください。 \end_layout \begin_layout Section \SpecialCharNoPassThru LaTeX コードを挿入する \begin_inset CommandInset label LatexCommand label name "sec:LaTeXコードを挿入する" \end_inset \end_layout \begin_layout Standard \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none どの\SpecialCharNoPassThru LyX 文書にもつねに\SpecialCharNoPassThru TeX コードを挿入することが可能であるというきわめて単純な理由によって、\SpecialCharNoPassThru LaTeX にできることは、つねに\SpecialCharNoPassThru LyX でも行うことができます。一 方、\SpecialCharNoPassThru LyX は、すべての\SpecialCharNoPassThru LaTeX 構成物を\SpecialCharNoPassThru LyX 内に表示できるわけではなく、将来的にもそうならないでしょう。かりに\SpecialCharNoPassThru LaTeX コマンドを\SpecialCharNoPassThru LyX 文書に挿入する必要が出 てきた場合には、 \begin_inset Flex Code status collapsed \begin_layout Plain Layout \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none \SpecialCharNoPassThru TeX コード \end_layout \end_inset ボックスを使用してください。これは、 \family sans \series default \shape default \size default \emph default \bar default \noun default \color inherit \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout \family sans 挿入\SpecialChar menuseparator \SpecialCharNoPassThru TeX コード \end_layout \end_inset \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none 若しくは \family default \series default \shape default \size default \emph default \bar default \noun default \color inherit \begin_inset Flex Ruby status collapsed \begin_layout Plain Layout \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none 捷径 \family default \series default \shape default \size default \emph default \bar default \noun default \color inherit \begin_inset Argument post:1 status collapsed \begin_layout Plain Layout ショートカット \end_layout \end_inset \end_layout \end_inset \begin_inset Flex Ruby status collapsed \begin_layout Plain Layout \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none 鍵 \begin_inset Argument post:1 status collapsed \begin_layout Plain Layout キー \end_layout \end_inset \end_layout \end_inset \begin_inset Info type "shortcut" arg "ert-insert" \end_inset \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none で、文書中に挿入することができます。 \end_layout \begin_layout Standard 以下は、\SpecialCharNoPassThru LaTeX コマンドを\SpecialCharNoPassThru LyX 文書中に挿入する例です。コードは以下のようになっているとしましょう。 \end_layout \begin_layout LyX-Code \backslash begin{tabular}{ll} \begin_inset Newline newline \end_inset \backslash begin{minipage}{5cm} \begin_inset Newline newline \end_inset これは、ミニページ環境の例です。 \begin_inset Newline newline \end_inset これには、 \begin_inset Newline newline \end_inset (フロートでない)図表を \begin_inset Newline newline \end_inset 含め、ほとんど何でも \begin_inset Newline newline \end_inset 入れることができます。 \begin_inset Newline newline \end_inset \backslash end{minipage} \begin_inset Newline newline \end_inset & \begin_inset Newline newline \end_inset \backslash begin{minipage}{5cm} \begin_inset Newline newline \end_inset \backslash begin{verbatim} \begin_inset Newline newline \end_inset \backslash begin{minipage}{5cm} \begin_inset Newline newline \end_inset これは... \begin_inset Newline newline \end_inset \backslash end{minipage} \begin_inset Newline newline \end_inset \backslash end{verbatim} \begin_inset Newline newline \end_inset \backslash end{minipage} \begin_inset Newline newline \end_inset \backslash end{tabular} \end_layout \begin_layout LyX-Code \end_layout \begin_layout Standard 上記のテキストを含んだ \begin_inset Flex Code status collapsed \begin_layout Plain Layout \SpecialCharNoPassThru TeX コード \end_layout \end_inset ボックスが、この段落の直後にあります。この取扱説明書を\SpecialCharNoPassThru LyX 上でご覧になっていれば、\SpecialCharNoPassThru TeX コード差込枠のみが見えるはずです。印刷した取扱説明書をご覧であれば、実 際の結果が見れるはずです。 \end_layout \begin_layout Standard \begin_inset VSpace bigskip \end_inset \begin_inset ERT status open \begin_layout Plain Layout \backslash begin{tabular}{ll} \end_layout \begin_layout Plain Layout \backslash begin{minipage}{5cm} \end_layout \begin_layout Plain Layout これは、ミニページ環境の例です。これには、(フロートでない)図表を含め、ほとんど何でも入れることができます。 \backslash end{minipage} \end_layout \begin_layout Plain Layout & \end_layout \begin_layout Plain Layout \backslash begin{minipage}{5cm} \end_layout \begin_layout Plain Layout \backslash begin{verbatim} \end_layout \begin_layout Plain Layout \backslash begin{minipage}{5cm} \end_layout \begin_layout Plain Layout これは... \backslash end{minipage} \end_layout \begin_layout Plain Layout \backslash end{verbatim} \end_layout \begin_layout Plain Layout \backslash end{minipage} \end_layout \begin_layout Plain Layout \backslash end{tabular} \end_layout \end_inset \begin_inset VSpace bigskip \end_inset \end_layout \begin_layout Standard \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none \SpecialCharNoPassThru TeX コードを使用する方法に加えて、複雑な\SpecialCharNoPassThru LaTeX コードを含む部分を別ファイルとして作成しておき、そのファイルをインクルードするのに \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none 挿入\SpecialChar menuseparator ファイル\SpecialChar menuseparator 子文書 \end_layout \end_inset を使用する方法もあります(取り込みの型として \begin_inset Flex Code status collapsed \begin_layout Plain Layout \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none Input \end_layout \end_inset を選択しなくてはなりません)。この方法をとる場合には、.texファイルが正しく動作することが \family default \series default \shape default \size default \emph on \bar default \noun default \color inherit 確認できている \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none 場合のみに限った方がよいでしょう。さもないと、\SpecialCharNoPassThru LaTeX エラーを追跡するたいへんな作業を行わなくてはならなくなります。 \end_layout \begin_layout Standard \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none 最後に、いくつか強調しておくべきことがあります。 \end_layout \begin_layout Itemize \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none \SpecialCharNoPassThru LyX は、あなたの\SpecialCharNoPassThru LaTeX コードが正しいかどうかを \family default \series default \shape default \size default \emph on \bar default \noun default \color inherit チェックしません \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none 。 \end_layout \begin_layout Itemize \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none 車輪の再発明をしないようにご注意ください。 \end_layout \begin_layout Standard \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none 二番目の点に関して、\SpecialCharNoPassThru LyX はひじょうにたくさんの機能を装備しており、その数は増えつづけています。ご自身で\SpecialCharNoPassThru LaTeX コードを書かなくてはならないと思い込む前に、L yXがこれこれの機能をもっていないことを、取扱説明書で確実に確かめてください。さらに世の中には、封筒のラベルから美しい複数ページにわたる表を作るものまで、ありと あらゆることを行う膨大な数の\SpecialCharNoPassThru LaTeX パッケージが存在します。 \family default \series default \shape default \size default \emph default \bar default \noun default \color inherit 詳細については、 \begin_inset CommandInset href LatexCommand href name "CTAN" target "http://www.ctan.org/" \end_inset \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none と第 \begin_inset CommandInset ref LatexCommand ref reference "chap:Special-features" \end_inset 節をご覧ください。 \end_layout \begin_layout Standard \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none もし、文書中で例外的に手の込んだことをなさりたければ、かならず良い\SpecialCharNoPassThru LaTeX 関連書籍を参考とするようにしてください。『 \family default \series default \shape default \size default \emph on \bar default \noun default \color inherit ユーザーの手引き \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none 』の書誌情報に多くの\SpecialCharNoPassThru LaTeX 関連書籍が引用されています。 \end_layout \begin_layout Section \SpecialCharNoPassThru LyX と\SpecialCharNoPassThru LaTeX プリアンブル \end_layout \begin_layout Subsection \SpecialCharNoPassThru LaTeX プリアンブルについて \end_layout \begin_layout Standard \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none すでに\SpecialCharNoPassThru LaTeX についてご存知であれば、ここでプリアンブル(前置文)が何に向いているか説明する必要はないでしょう。もしご存じなければ、以下の説明で大まかな理解は 得られるはずです。詳しくは\SpecialCharNoPassThru LaTeX 関連書籍をご参照ください。いずれにしても、以下で\SpecialCharNoPassThru LyX 文書の\SpecialCharNoPassThru LaTeX プリアンブルで何ができるか、または何をする必要がないか 説明をしますので、以下の各要点はお読みになった方が良いでしょう。 \end_layout \begin_layout Standard \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none \SpecialCharNoPassThru LaTeX プリアンブルは、\SpecialCharNoPassThru LaTeX 文書のいちばん始め、本文の \family default \series default \shape default \size default \emph on \bar default \noun default \color inherit 前 \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none の部分に来ます。ここでは以下のことを行います。 \end_layout \begin_layout Itemize \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none 文書クラス(ドキュメントクラス)の宣言。 \begin_inset Newline newline \end_inset これは\SpecialCharNoPassThru LyX がすでに行ってくれています。もしあなたが熟達した\SpecialCharNoPassThru LaTeX 使いであり、自作の文書クラスを使いたい場合には、取扱説明書『 \family default \series default \shape default \size default \emph on \bar default \noun default \color inherit カスタマイズ篇 \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none 』をご覧になれば、\SpecialCharNoPassThru LyX に自作文書クラスへの仲介を行わせるにはどうすればよいかの情報があります。 \end_layout \begin_layout Itemize \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none パッケージ使用の宣言。 \begin_inset Newline newline \end_inset \SpecialCharNoPassThru LaTeX パッケージは、パッケージがプリアンブルで宣言された場合のみ、文書中で利用可能となる、追加コマンド群を提供します。パッケージをインクルードすると、特別な コマンドが提供されることに加え、文書に変更を加えることができます。例えば \family typewriter \series default \shape default \size default \emph default \bar default \noun default \color inherit 、 \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none \begin_inset Flex Code status collapsed \begin_layout Plain Layout \family typewriter indentfirst \end_layout \end_inset パッケージは、すべての段落の最初の行を字下げします。他にも、ラベルや宛名書き、余白設定等の様々なパッケージがあります。 \end_layout \begin_layout Itemize \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none カウンタ・変数・長さ・幅の設定。 \begin_inset Newline newline \end_inset \SpecialCharNoPassThru LaTeX のカウンタと変数の中には、プリアンブルでグローバルに \family default \series default \shape default \size default \emph default \bar default \noun default \color inherit 設定 \emph on しないかぎり \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none 、望んだ効果を持たないものがあります。(文書中で設定したり再設定したりすることのできる変数もあります。)余白は、プリアンブルで設定しなくてはならない変数の代表例 です。他には、箇条書きに付けるラベル書式が挙げられます。じつは、この設定は文書中どこでもできるのですが、プリアンブルでいちどだけ設定するのが望ましい方法です。 \end_layout \begin_layout Itemize \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none ユーザー定義コマンドの宣言( \begin_inset Flex Code status collapsed \begin_layout Plain Layout \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none \backslash newcommand \end_layout \end_inset または \begin_inset Flex Code status collapsed \begin_layout Plain Layout \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none \backslash renewcommand \end_layout \end_inset を使用)。 \begin_inset Newline newline \end_inset ユーザー定義コマンドは、文書中で頻出する\SpecialCharNoPassThru LaTeX コマンドの短縮形です。このようなコマンドを宣言するには、プリアンブルが適した場所ですが、どこで宣言することも \family default \series default \shape default \size default \emph on \bar default \noun default \color inherit 可能 \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none です(もちろんコマンドが初めて使用される場所よりも前です)。あまりないことではありますが、お使いの文書中に生の\SpecialCharNoPassThru LaTeX コードがあふれている場合には便利でしょう 。 \end_layout \begin_layout Standard \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none \SpecialCharNoPassThru LyX は、その生成する \begin_inset Flex Code status collapsed \begin_layout Plain Layout \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none .tex \end_layout \end_inset ファイルのプリアンブルに、それ自身の定義を追加します。これによって、\SpecialCharNoPassThru LyX の生成する\SpecialCharNoPassThru LaTeX ファイルの可搬性を高めています。 \end_layout \begin_layout Subsection プリアンブルの変更 \end_layout \begin_layout Standard \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none \SpecialCharNoPassThru LyX が\SpecialCharNoPassThru LaTeX ファイルのプリアンブルに追加するコマンドは、つねに同じです。これは、\SpecialCharNoPassThru LyX 自体にパッチを当てないかぎり変更できないようになっています。しかしな がら、 \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none 文書\SpecialChar menuseparator 設定 \end_layout \end_inset ダイアログの \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none \SpecialCharNoPassThru LaTeX プリアンブル \end_layout \end_inset の項から、プリアンブルに追加をすることはできます。\SpecialCharNoPassThru LyX は、 \family sans \series default \shape default \size default \emph default \bar default \noun default \color inherit \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout \family sans プリアンブル \end_layout \end_inset \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none ダイアログ内のすべてのものを、\SpecialCharNoPassThru LyX 埋込みのプリアンブルに付け加えます。ご自身の宣言をプリアンブルに追加する前に、あなたがしようとしていることを\SpecialCharNoPassThru LyX がすでにサ ポートしていないかどうか確認してください(車輪の再発明をしないように、とはすでに申しあげたことです)。 \family default \series default \shape default \size default \emph default \bar default \noun default \color inherit また、 \emph on プリアンブルコードが正しいことを確認してください。 \emph default \SpecialCharNoPassThru LyX は、プリアンブルをチェックしません。 \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none もしエラーがあれば、「 \begin_inset Flex Code status collapsed \begin_layout Plain Layout \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none Missing \backslash begin{document} \end_layout \end_inset 」といったエラーが出ることでしょう。このようなエラーが出たときは、プリアンブルを再確認してください。 \end_layout \begin_layout Subsection 例 \end_layout \begin_layout Standard \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none 以下は、プリアンブルに追加できるものとその効果を示す例です。 \end_layout \begin_layout Subsubsection 例1:オフセット \end_layout \begin_layout Standard \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none \SpecialCharNoPassThru LaTeX には \family default \series default \shape default \size default \emph default \bar default \noun default \color inherit 、 \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none \begin_inset Flex Code status collapsed \begin_layout Plain Layout \family typewriter \backslash hoffset \end_layout \end_inset と \family typewriter \series default \shape default \size default \emph default \bar default \noun default \color inherit \begin_inset Flex Code status collapsed \begin_layout Plain Layout \family typewriter \backslash voffset \end_layout \end_inset \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none というページ位置を制御する2つの変数があります。その機能は名前から明らかなとおりです。これらの変数は、ラベルを印刷するときなどに便利です。往々にして、印刷用紙の 寸法とそのうち実際に印字可能な範囲は同じではありません。ここに \begin_inset Flex Code status collapsed \begin_layout Plain Layout \family typewriter \backslash hoffset \end_layout \end_inset と \family typewriter \series default \shape default \size default \emph default \bar default \noun default \color inherit \begin_inset Flex Code status collapsed \begin_layout Plain Layout \family typewriter \backslash voffset \end_layout \end_inset \family default が役立つわけです。 \end_layout \begin_layout Standard \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none \begin_inset Flex Code status collapsed \begin_layout Plain Layout \family typewriter \backslash hoffset \end_layout \end_inset と \family typewriter \series default \shape default \size default \emph default \bar default \noun default \color inherit \begin_inset Flex Code status collapsed \begin_layout Plain Layout \family typewriter \backslash voffset \end_layout \end_inset \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none の既定値はともに0ポイント、つまりページをシフトしません。残念ながら、DVIドライバによってはつねにページをシフトすることがあるようです。我々には、どうしてその ようなことをするのか、そしてシスアドがどうしてそれを修正しないのか理解できませんが、もし個人的に管理できないシステムで\SpecialCharNoPassThru LyX を使用していて、シスアドがお馬鹿さん である場合には、 \begin_inset Flex Code status collapsed \begin_layout Plain Layout \family typewriter \backslash hoffset \end_layout \end_inset と \family typewriter \series default \shape default \size default \emph default \bar default \noun default \color inherit \begin_inset Flex Code status collapsed \begin_layout Plain Layout \family typewriter \backslash voffset \end_layout \end_inset \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none が役に立ちます。かりに、上余白と左余白がつねに0.5インチずつ大きすぎるものとしましょう。その場合は、以下をプリアンブルに追加するとよいでしょう。 \end_layout \begin_layout LyX-Code \backslash setlength{ \backslash hoffset}{-0.5 in} \end_layout \begin_layout LyX-Code \backslash setlength{ \backslash voffset}{-0.5 in} \end_layout \begin_layout Standard \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none これで余白が修正されます。 \end_layout \begin_layout Subsubsection 例2:ラベル \end_layout \begin_layout Standard \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none いま、たくさんの宛名ラベルを印刷をしたいものとしましょう。ラベルシートを印刷するために便利な \begin_inset Flex Code status collapsed \begin_layout Plain Layout \family typewriter labels.sty \end_layout \end_inset という\SpecialCharNoPassThru LaTeX パッケージが、お近くのCTANアーカイブで入手可能です。お使いのシステムには、既定ではこのパッケージは導入されていないかもしれません。ご自身でお 確かめください。また、このパッケージの取扱説明書を読まれたいかもしれませんが、それもご自身にお任せします。これは使用例ですので、このパッケージをどう使うかの例だ けお見せすることにします。 \end_layout \begin_layout Standard \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none まず、 \begin_inset Flex Code status collapsed \begin_layout Plain Layout \family sans article \end_layout \end_inset 文書クラスを使用していることをご確認ください。次に、以下のような設定をプリアンブルに追加しなければなりません。 \end_layout \begin_layout LyX-Code \backslash usepackage{labels} \end_layout \begin_layout LyX-Code \backslash LabelCols=3 \end_layout \begin_layout LyX-Code \backslash LabelRows=7 \end_layout \begin_layout LyX-Code \backslash LeftBorder=8mm \end_layout \begin_layout LyX-Code \backslash RightBorder=8mm \end_layout \begin_layout LyX-Code \backslash TopBorder=9mm \end_layout \begin_layout LyX-Code \backslash BottomBorder=2mm \end_layout \begin_layout Standard \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none これは \family default \series default \shape default \size default \emph default \bar default \noun default \color inherit Avery®ラベルシートのストック5360 \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none 番を使用する場合の設定です。これで、各宛名を \begin_inset Flex Code status collapsed \begin_layout Plain Layout \family typewriter \backslash begin{labels} \end_layout \end_inset と \family typewriter \series default \shape default \size default \emph default \bar default \noun default \color inherit \begin_inset Flex Code status collapsed \begin_layout Plain Layout \family typewriter \backslash end{labels} \end_layout \end_inset \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none で囲めば、宛名ラベルの印刷をすることができます。本機能およびその他の機能に関しては、 \begin_inset Flex Code status collapsed \begin_layout Plain Layout \family typewriter labels.sty \end_layout \end_inset の取扱説明書に説明されています。 \end_layout \begin_layout Standard \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none そのうち誰かが、このパッケージを直接サポートする\SpecialCharNoPassThru LyX レイアウトファイルを作ってくれるかもしれません。その誰かはあなたかもしれません。 \end_layout \begin_layout Subsubsection 例3: 段落の字下げ \end_layout \begin_layout Standard \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none アメリカ人は \family default \series default \shape default \size default \emph default \bar default \noun default \color inherit 、 \emph on すべての \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none 段落の最初の行を字下げするように教育されています。そのために彼らの他の変な習慣と同じく、いつものようにすべての段落の最初の行を下げるまで、アメリカ人はごちゃごち ゃと文句を言いつづけるのです \family default \series default \shape default \size default \emph default \bar default \noun default \color inherit 。(これはユーモアです。(ほんと?) \emph on ユーモアですってば \emph default 。) \end_layout \begin_layout Standard \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none もちろん、これは標準的な組版ルールではありません。書籍では、典型的には、他の段落のあとにくる段落 \family default \series default \shape default \size default \emph on \bar default \noun default \color inherit のみ \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none 字下げを行ないます。一行めを字下げをするそもそもの目的は、隣接する段落から区別するためです。したがって、図のあとや節の最初の段落など、先行する段落がない場合には 、字下げをする必要はないのです。 \end_layout \begin_layout Standard \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none けれどもあなたが典型的なアメリカ人なら(ユーーモアですって!)、そのような小難しいことはかまわずに、いつもどおりの字下げをせずにはいられないでしょう!プリアンブ ルに次の行を加えて下さい。 \end_layout \begin_layout LyX-Code \backslash usepackage{indentfirst} \end_layout \begin_layout Standard \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none もしお使いの\SpecialCharNoPassThru TeX 頒布版が脳死状態でなければ、このパッケージが入っているはずなので、建国の父たちが意図したように、すべての段落が字下げされます。 \end_layout \begin_layout Subsubsection 例4:この文書 \end_layout \begin_layout Standard \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none この文書のプリアンブルを見てみると、どのような高度な設定ができるか、おおまかな理解が得られるでしょう。また第 \family default \series default \shape default \size default \emph default \bar default \noun default \color inherit \begin_inset CommandInset ref LatexCommand ref reference "chap:Special-features" \end_inset \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none 章には、他の例や、\SpecialCharNoPassThru LaTeX の各種の「汚い技」があります。 \end_layout \begin_layout Section \SpecialCharNoPassThru LyX および\SpecialCharNoPassThru LaTeX のエラー \end_layout \begin_layout Standard \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none \SpecialCharNoPassThru LyX が\SpecialCharNoPassThru LaTeX を呼び出す際、\SpecialCharNoPassThru LyX は\SpecialCharNoPassThru LaTeX に、かりにエラーがあったとしても楽観的に無視して先に進むように指示します。その後\SpecialCharNoPassThru LyX は、\SpecialCharNoPassThru LaTeX の実行ログ ファイルを事後処理用に使います。ログファイルを分析したのち、\SpecialCharNoPassThru LyX はエラーを一覧表示するダイアログを表示します。エラーのうちどれかをクリックすると、\SpecialCharNoPassThru LyX ファイ ル中、そのエラーの発生した場所に表示を移動します \begin_inset Foot status collapsed \begin_layout Plain Layout \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none 正確にいうと、通常は、です。ログファイルの分析は難しい仕事ですので、\SpecialCharNoPassThru LyX はつねに正しい行に連れて行ってくれるとは限りません。ときには、\SpecialCharNoPassThru LaTeX がある行にエラ ーがあると報告したとしても、実際のエラーはそれよりも前であることもあります。これは、プログラムで閉じ括弧を忘れたときに似ていなくもありません。エラーは表示されま すが、実際にエラーのある場所よりも後ろでエラーが報告されるのです。 \end_layout \end_inset \family default \series default \shape default \size default \emph default \bar default \noun default \color inherit 。 \end_layout \begin_layout Standard \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none 人によっては、ログファイルを直接ご覧になりたいかもしれません。これは、 \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none 文書\SpecialChar menuseparator \SpecialCharNoPassThru LaTeX ログ \end_layout \end_inset で見ることができます。エラーメッセージや警告には、よく見かけるものがいくつかありますので、それらをここに収録しておきます。ここにないエラーや警告に関しては、La \SpecialCharNoPassThru TeX 関連の良書を参照してください。 \end_layout \begin_layout Itemize \family typewriter \begin_inset Flex Code status collapsed \begin_layout Plain Layout \family typewriter LaTe \begin_inset ERT status collapsed \begin_layout Plain Layout {} \end_layout \end_inset X Warning \end_layout \end_inset \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none \begin_inset Newline newline \end_inset これで始まるメッセージは、\SpecialCharNoPassThru LaTeX コード自体を「デバッグ」するための警告メッセージです。相互参照や書誌情報を追加したり変更した場合に、もう一度\SpecialCharNoPassThru LaTeX を実行 する必要があることを知らせるために、このようなメッセージが表示されます。このメッセージは、だいたいにおいて無視しても大丈夫です。 \end_layout \begin_layout Itemize \family typewriter \begin_inset Flex Code status collapsed \begin_layout Plain Layout \family typewriter LaTe \begin_inset ERT status collapsed \begin_layout Plain Layout {} \end_layout \end_inset X Font Warning \end_layout \end_inset \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none \begin_inset Newline newline \end_inset \SpecialCharNoPassThru LaTeX がフォントを見つけられなかったと言う警告メッセージです。多くの場合、このメッセージの後に、\SpecialCharNoPassThru LaTeX が使用した代替フォントに関する情報が続きます。これ も無視して構いません。 \end_layout \begin_layout Itemize \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none \begin_inset Flex Code status collapsed \begin_layout Plain Layout \family typewriter Overfull \backslash hbox \end_layout \end_inset \begin_inset Newline newline \end_inset \SpecialCharNoPassThru LaTeX は、 \family default \series default \shape default \size default \emph on \bar default \noun default \color inherit ほぼどんなときでも \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none この警告を吐き出します。これは、一行が長すぎて右余白にはみ出してしまったという警告ですが、ほとんどの場合、最終出力を見ても判別できないくらい(せいぜい1ポイント か2ポイント)です。あるいは1文字か2文字右余白に出ているくらいです。\SpecialCharNoPassThru LaTeX は、どんな文書を書いても、少なくとも一つはこのメッセージを出すようです。 \begin_inset Newline newline \end_inset このメッセージは無視しても大丈夫です。何か行が長すぎるような問題があれば、目で見ればわかります。出力を目で確認してください \begin_inset Foot status collapsed \begin_layout Plain Layout あるいは、 \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout 文書\SpecialChar menuseparator 設定 \end_layout \end_inset で「draft」オプションを指定する方法もあります。こうすると、\SpecialCharNoPassThru LaTeX は、overfullの発生した行の余白に黒い四角を描画します。 \end_layout \end_inset 。 \end_layout \begin_layout Itemize \family typewriter \begin_inset Flex Code status collapsed \begin_layout Plain Layout \family typewriter Underfull \backslash hbox \end_layout \end_inset \begin_inset Newline newline \end_inset \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none これは上の警告と違ってあまり出てきません。なぜだかは分かりませんが、\SpecialCharNoPassThru LaTeX は1行を短めにする印字するよりは、長めにする方が好きなようです。 \end_layout \begin_layout Itemize \begin_inset Flex Code status collapsed \begin_layout Plain Layout \family typewriter Overfull \backslash vbox \end_layout \end_inset と \family typewriter \begin_inset Flex Code status collapsed \begin_layout Plain Layout \family typewriter Underfull \backslash vbox \end_layout \end_inset \family default \begin_inset Newline newline \end_inset \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none ページ区切りに問題があったという警告です。この場合も、出力を目で確認してください。何か問題があれば、見てすぐわかります。 \end_layout \begin_layout Itemize \family typewriter \begin_inset Flex Code status collapsed \begin_layout Plain Layout \family typewriter LaTe \begin_inset ERT status collapsed \begin_layout Plain Layout {} \end_layout \end_inset X Error: File \begin_inset Quotes els \end_inset Xxxx \begin_inset Quotes ers \end_inset not found \end_layout \end_inset \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none \begin_inset Newline newline \end_inset ファイル「Xxxx」が、システムに導入されていません。これは通常、文書が必要としている\SpecialCharNoPassThru LaTeX パッケージに、導入済でないものがある場合に現れます。プリアンブル に変更を加えておらず、 \begin_inset Flex Code status collapsed \begin_layout Plain Layout \family typewriter \backslash usepackage{} \end_layout \end_inset コマンドも使用していないとすれば、\SpecialCharNoPassThru LyX が読み込もうしているパッケージに存在しないものがあるということです。 \family default \series default \shape default \size default \emph default \bar default \noun default \color inherit \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout ヘルプ\SpecialChar menuseparator \SpecialCharNoPassThru LaTeX の設定 \end_layout \end_inset \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none を使用して、\SpecialCharNoPassThru LyX が認識しているパッケージの一覧を得てください。このファイルは、( \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none ツール\SpecialChar menuseparator 再設定 \end_layout \end_inset を使用して)\SpecialCharNoPassThru LyX の再設定を行うたびに更新され、どのパッケージが検出されたか、それらのパッケージが何をするものかを表示します。 \begin_inset Newline newline \end_inset \family sans \series default \shape default \size default \emph default \bar default \noun default \color inherit \begin_inset Flex Code status collapsed \begin_layout Plain Layout \family sans \backslash usepackage{} \end_layout \end_inset \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none コマンドを使っていて、肝心のパッケージが導入されていない場合には、ご自身で導入する必要があります。 \end_layout \begin_layout Itemize \family typewriter \begin_inset Flex Code status collapsed \begin_layout Plain Layout \family typewriter LaTe \begin_inset ERT status collapsed \begin_layout Plain Layout {} \end_layout \end_inset X Error: Unknown option \end_layout \end_inset \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none \begin_inset Newline newline \end_inset このように始まるエラーメッセージは、パッケージに誤ったあるいは未定義のオプションが指定されていることを伝えようとするものです。パッケージの取扱説明書をご確認くだ さい。 \end_layout \begin_layout Itemize \family typewriter \begin_inset Flex Code status collapsed \begin_layout Plain Layout \family typewriter Undefined control sequence \end_layout \end_inset \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none \begin_inset Newline newline \end_inset お使いの文書に\SpecialCharNoPassThru LaTeX コードを挿入した際、打ち間違いをしてしまうと、このようなメッセージが表示されます。あるいは、パッケージを読み込ませるのを忘れたのかもしれ ません。いずれにしても、このメッセージは、あなたが未定義のコマンドを使用したことを示しています。 \end_layout \begin_layout Standard \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none これ以外にも、エラーメッセージや警告メッセージがあります。一般に、読んで意味がすぐにわかるものは、\SpecialCharNoPassThru LaTeX のメッセージです。何を言っているのかさっぱりわからな いものもありますが、通常これらは、\SpecialCharNoPassThru TeX のメッセージであり、それが何を意味しているのか、どのように解読すればいいのか、 \family default \series default \shape default \size default \emph on \bar default \noun default \color inherit まったく \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none 手がかりがありません。誰もわからないのです。 \end_layout \begin_layout Standard \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none エラーメッセージが表示された場合は、つねに以下のチェックリストにしたがった方がよいでしょう。 \end_layout \begin_layout Enumerate \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none ご自分で挿入した\SpecialCharNoPassThru LaTeX コードに打ち間違いがないかどうか確かめる。 \end_layout \begin_layout Enumerate \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none 打ち間違いがなければ、コマンドを正しく使ったかどうか確かめる。 \end_layout \begin_layout Enumerate \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none 文書のもっともはじめの部分にエラーボックスが多数積み上がった場合には\threehyphens 特に \begin_inset Flex Code status collapsed \begin_layout Plain Layout \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none Missing \backslash begin{document} \end_layout \end_inset が表示されているならば\threehyphens 、プリアンブルにエラーがあることを意味します。プリアンブルのデバックを行ってください。 \end_layout \begin_layout Enumerate \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none プリアンブルに何も追加せず、文書に\SpecialCharNoPassThru LaTeX コードをまったく挿入しなかった場合には、\SpecialCharNoPassThru LaTeX 頒布版自体をまず疑ってください。導入されていないパッケージを探しだ して、導入してください。 \end_layout \begin_layout Enumerate \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none 導入されていないパッケージはなかったものとしましょう。\SpecialCharNoPassThru LyX を微調整するオプションを使用していますか。特に、手動で \begin_inset Flex Code status collapsed \begin_layout Plain Layout \family sans Protected \begin_inset space ~ \end_inset Blank \end_layout \end_inset や \begin_inset Flex Code status collapsed \begin_layout Plain Layout \family sans Linebreak \end_layout \end_inset 、 \family sans \series default \shape default \size default \emph default \bar default \noun default \color inherit \begin_inset Flex Code status collapsed \begin_layout Plain Layout \family sans Pagebreak \end_layout \end_inset \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none などをたくさん挿入するなど、微調整オプションを \family default \series default \shape default \size default \emph on \bar default \noun default \color inherit 悪用 \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none していませんか。適切な段落環境を使用する代わりに、これらを使用してその場をしのごうとしていませんか。 \end_layout \begin_layout Enumerate \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none 微調整オプションはまったく使用しておらず、規則に乗っ取って作業していたものとしましょう。何か曲芸のようなことをしようとはしていませんか。数式や表中で、たとえば表 のセルに図を入れるなど、おかしなことをしようとしていませんか。 \end_layout \begin_layout Enumerate \SpecialCharNoPassThru LaTeX が改行位置を見つけられないほど長い一節がありませんか。既定では、改行するために単語間に空白をたくさん追加することを、\SpecialCharNoPassThru LaTeX はかなり嫌います。可能で あれば、問題が生じないように段落を修正するのが望ましいでしょう。それが難しければ、\SpecialCharNoPassThru LaTeX が改行しやすく(sloppy)なるように、その部分を \family typewriter \begin_inset Flex Code status collapsed \begin_layout Plain Layout \family typewriter \backslash sloppypar \end_layout \end_inset \family default で囲んでください。 \end_layout \begin_layout Enumerate \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none 入れ子の階層を深くしすぎていませんか。\SpecialCharNoPassThru LyX は、(今のところ)環境の入れ子の階層が制限内にあるかチェックしません。かりに、環境を17段の入れ子にしたりしていたら 、それが原因です(\SpecialCharNoPassThru LaTeX の上限は5段です)。 \end_layout \begin_layout Enumerate \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none エラーメッセージは発生しないけれども、出力がひどいものとしましょう。図表が幅が広すぎたり長すぎてページに収まらない場合には、 \bar default \family default \color inherit \series default \shape default \size default \begin_inset Separator parbreak \end_inset \end_layout \begin_deeper \begin_layout Enumerate \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none 図がページに合うように大きさを変える、 \end_layout \begin_layout Enumerate \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none 表がページに合うように削る、 \end_layout \begin_layout Standard \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none などの手段を採る必要があります。 \end_layout \end_deeper \begin_layout Enumerate 他に出力におかしいところがあり、曲芸をやろうとしたり微調整オプションでしのごうとしたりはしていないとすれば、何がおかしいのか確定的なことは言えません。 \end_layout \begin_layout Standard \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none これらすべてが役に立たないとすれば、 \family default \series default \shape default \size default \emph on \bar default \noun default \color inherit ひょっとしたら \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none \SpecialCharNoPassThru LyX のバグを発見したのかもしれません‥‥。 \end_layout \begin_layout Chapter 補完ツール \end_layout \begin_layout Section Bib\SpecialCharNoPassThru TeX による書誌情報のカスタマイズ \end_layout \begin_layout Standard Bib\SpecialCharNoPassThru TeX の基本的な使用法は、『 \emph on ユーザーの手引き \emph default 』の「 \emph on 文献データベース(Bib\SpecialCharNoPassThru TeX ) \emph default 」の節に説明があります。以下の各小節では、\SpecialCharNoPassThru LyX でサポートされている書誌情報の特別な機能について説明することとします。 \end_layout \begin_layout Subsection 他の引用様式 \end_layout \begin_layout Standard 標準のBib\SpecialCharNoPassThru TeX は、引用された著作を参照するのに、([12]のように)数字を使用します。しかし、多くの科学分野で、これとは異なる引用様式が用いられています。も っともよく見られるのは、著者-出版年様式(例:Knuth 1984a)です。\SpecialCharNoPassThru LyX は、この様式を提供する2つのパッケージ \begin_inset Flex Code status collapsed \begin_layout Plain Layout natbib \end_layout \end_inset と \begin_inset Flex Code status collapsed \begin_layout Plain Layout jurabib \end_layout \end_inset をサポートしています。これらのパッケージには、それぞれ長所短所がありますが、ここでは詳細に立ち入る紙幅がありません。単純な著者-出版年様式(あるいは著者-番号) 様式が欲しい場合や、無数にある \begin_inset Flex Code status collapsed \begin_layout Plain Layout natbib \end_layout \end_inset 用スタイルファイルのうちどれかを使用したい場合には、定評のある \begin_inset Flex Code status collapsed \begin_layout Plain Layout natbib \end_layout \end_inset パッケージがおそらくよい選択でしょう。短縮タイトルによる参照や \emph on ibid. \emph default など、特別な機能が必要な場合には、 \begin_inset Flex Code status collapsed \begin_layout Plain Layout jurabib \end_layout \end_inset パッケージの利用を考えるとよいかもしれません。 \end_layout \begin_layout Standard \SpecialCharNoPassThru LyX での両パッケージの取扱い方は、ほぼ同じです。 \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout 文書\SpecialChar menuseparator 設定 \end_layout \end_inset メニューを開き、 \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout 書誌情報 \end_layout \end_inset 項目から \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout Natbib \end_layout \end_inset オプションか \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout Jurabib \end_layout \end_inset オプションを選択してください。これらのパッケージによって、引用ダイアログに機能が追加され、参照の様式が選択できるようになります(「Knuth 1984」、「Kn uth (1984)」、「Knuth, 1984」、「1984」など)。両パッケージは、専用にデザインされたスタイルファイルを必要とすることに注意してください。 両者ともそれ自身のスタイルファイルを同梱していますが、他にもたくさんの追加スタイルファイルがありますし、 \begin_inset Flex Code status collapsed \begin_layout Plain Layout natbib \end_layout \end_inset に至っては、対話的なスタイルファイルビルダーさえ存在します \begin_inset Foot status collapsed \begin_layout Plain Layout \begin_inset Flex URL status open \begin_layout Plain Layout ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/ \end_layout \end_inset をご参照ください。 \end_layout \end_inset 。 \end_layout \begin_layout Subsection 節分けされた書誌情報 \end_layout \begin_layout Standard 場合によっては、書誌情報をいくつかの節に分ける必要があることがあります。たとえば、あなたが歴史家であるとすれば、出典と学術文献を分ける機能は、おそらく「必需品」 でさえあります。残念ながら、Bib\SpecialCharNoPassThru TeX 自身ではこのようなことができません。しかし、適切な\SpecialCharNoPassThru LaTeX パッケージの助けを借りると、Bib\SpecialCharNoPassThru TeX をこのような必要性を 満たすように拡張することができます。 \end_layout \begin_layout Standard \SpecialCharNoPassThru LyX は、このようなパッケージの一つである \begin_inset Flex Code status collapsed \begin_layout Plain Layout bibtopic \end_layout \end_inset \begin_inset Foot status collapsed \begin_layout Plain Layout \begin_inset Flex URL status open \begin_layout Plain Layout ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/ \end_layout \end_inset から入手可能です。 \end_layout \end_inset をそのままでサポートします。このパッケージの長所は、( \begin_inset Flex Code status collapsed \begin_layout Plain Layout multibib \end_layout \end_inset のような他のパッケージと比較すると)新規の引用コマンドを定義する必要がないことです。そのかわりに、書誌情報の違う節には、その節向けの項目を収録した別の文献データ ベースを用意する必要があります。たとえば、書誌情報を「出典」の節と「学術文献」の節に分けたい場合には、それぞれの文献データベース、たとえば \begin_inset Flex Code status collapsed \begin_layout Plain Layout souces.bib \end_layout \end_inset と \begin_inset Flex Code status collapsed \begin_layout Plain Layout scientific.bib \end_layout \end_inset とを作成する必要があります。 \end_layout \begin_layout Standard \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout 文書\SpecialChar menuseparator 設定 \end_layout \end_inset を開いて \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout 書誌情報 \end_layout \end_inset の下の \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout 節分けされた書誌情報 \end_layout \end_inset をチェックしてください。すると、書誌情報の各節に一つずつ、複数の書誌情報を挿入することができます。上記の例では、Bib\SpecialCharNoPassThru TeX 書誌情報 \begin_inset Flex Code status collapsed \begin_layout Plain Layout sources.bib \end_layout \end_inset と二つめの文献データベース \begin_inset Flex Code status collapsed \begin_layout Plain Layout scientific.bib \end_layout \end_inset を挿入します。各節に同じスタイルを用いるか異なるスタイルを用いるかは自由です。くわえて、書誌情報の節に、指定したデータベースの「引用されたすべての参照」を載せる (これが既定です)か、「引用されなかったすべての参照」を載せるか、あるいは「すべての参照」を載せるかを選択することができます。これは、もし書誌情報を「本文に引用 された出典」・「本文に引用されていない出典」・「学術文献」の三つの節に分割したい場合に、便利でありましょう。各節の見出しは、通常の節や小節として入れることができ ます。 \begin_inset Flex Code status collapsed \begin_layout Plain Layout bibtopic \end_layout \end_inset は、書誌情報用の見出しを取り除いてしまいますので、手動でこれを追加しなくてはなりません(たとえば章*や節*などをお使いください)。 \end_layout \begin_layout Subsection 複数の書誌情報 \end_layout \begin_layout Standard 文書の節ごとあるいは章ごとの書誌情報など、複数の書誌情報はBib\SpecialCharNoPassThru TeX 自身ではサポートされていません。しかしながら、もし若干の \begin_inset Flex Code status collapsed \begin_layout Plain Layout \SpecialCharNoPassThru TeX コード \end_layout \end_inset (第 \begin_inset CommandInset ref LatexCommand ref reference "sec:LaTeXコードを挿入する" \end_inset 節を参照)を利用することを厭わなければ、\SpecialCharNoPassThru LyX で節分けされた書誌情報を作るのに使用されている(前節を参照) \begin_inset Flex Code status collapsed \begin_layout Plain Layout bibtopic \end_layout \end_inset パッケージが、この課題を解決する簡単な方法を提供します \begin_inset Foot status collapsed \begin_layout Plain Layout ほかに、 \begin_inset Flex Code status collapsed \begin_layout Plain Layout chapterbib \end_layout \end_inset や \begin_inset Flex Code status collapsed \begin_layout Plain Layout bibunits \end_layout \end_inset パッケージを利用する方法もあります。 \end_layout \end_inset 。 \end_layout \begin_layout Standard まず \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout 文書\SpecialChar menuseparator 設定 \end_layout \end_inset に行って \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout 書誌情報 \end_layout \end_inset の下の \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout 節分けされた書誌情報 \end_layout \end_inset を有効にしてください。つぎに文書中において、書誌情報(Bib\SpecialCharNoPassThru TeX 書誌情報本体を含む)の入った節を \begin_inset Flex Code status collapsed \begin_layout Plain Layout \backslash begin{btUnit} \end_layout \end_inset と \begin_inset Flex Code status collapsed \begin_layout Plain Layout \backslash end{btUnit} \end_layout \end_inset のあいだにはさまなくてはなりません(これらのコマンドは\SpecialCharNoPassThru TeX コードとして挿入する必要があります)。書誌情報には、現在位置の \begin_inset Flex Code status collapsed \begin_layout Plain Layout btUnit \end_layout \end_inset において引用されたすべての参照が含まれることになります。 \series bold (註) \series default この方法を用いる場合には、すべての参照はいずれかの \begin_inset Flex Code status collapsed \begin_layout Plain Layout btUnit \end_layout \end_inset 内部になくてはなりません。また、 \begin_inset Flex Code status collapsed \begin_layout Plain Layout btUnit \end_layout \end_inset は入れ子構造にすることができません。 \end_layout \begin_layout Section 複合文書 \end_layout \begin_layout Subsection 一般的な操作 \end_layout \begin_layout Standard たくさんの節を含んだ大きなファイルで作業をする場合、文書をいくつかのファイルに分割した方が往々にして便利ですし、場合によっては、表部分にはしょっちゅう変更が加え られるけれども、その前の文章はつねに同じであるようなケースもあるでしょう。このような場合には、複合文書を利用することを、まずご検討ください。たとえば、科学論文は 通常、導入部・所見・結果・議論・結論の五つの節から成ります。これら各節を別々の\SpecialCharNoPassThru LyX ファイルにして、タイトル・著者・概要・書誌情報等と、これら五つのインクルード \begin_inset Foot status collapsed \begin_layout Plain Layout \series bold (訳註) \series default 「取り込む」の意です。原語「include」に対する訳語として、プログラミング用語の「インクルードする」以外に適語がないので、ここではプログラミング用語をそのま ま使用します。 \end_layout \end_inset ファイルを持つ、もう一つ別の「マスター」ファイルを作成するようにすることができます。これらの各ファイルは、単にマスターファイルにインクルードされるだけでなく、単 独でも出力したり印刷したりすることのできる完全な\SpecialCharNoPassThru LyX ファイルであるように注意することが重要です。しかも、これらの各ファイルは、同じ文書クラスでなくてはなりませ ん。articleクラスとbookクラスを混在させるようなことはなさらないでください。\SpecialCharNoPassThru LaTeX ファイルをインクルードすることもできますが、このファイルにはプリ アンブルがあってはなりません( \begin_inset Flex Code status collapsed \begin_layout Plain Layout \backslash begin{document} \end_layout \end_inset 行とその前のすべて、および \begin_inset Flex Code status collapsed \begin_layout Plain Layout \backslash end{document}行 \end_layout \end_inset は削除しておかなければなりません)。さもないと、DVIファイルを作成する際にエラーが発生するでしょう。 \end_layout \begin_layout Standard \SpecialCharNoPassThru LyX では、 \family sans 挿入\SpecialChar menuseparator ファイル\SpecialChar menuseparator 子文書 \family default で簡単にファイルをインクルードすることができます。このメニューを選んでクリックすると、カーソルの現在位置に小さな枠が挿入されます。この枠をクリックすると、ダイア ログが現れるので、そこでインクルードするファイルとインクルード方法を選択することができます。 \end_layout \begin_layout Standard ファイル選択ボックスは、いまや自明でしょう。インクルード方法には、「include」・「input」・「verbatim」の三つがあります。「include」と 「input」の違いは、正確には\SpecialCharNoPassThru LaTeX の達人にしか意味のないものですが、ほとんどの人にとって意味のある違いといえば、「include」されたファイルは新規頁 から組版されるのに対し、「input」されたファイルは現在のページから組版される点です。 \end_layout \begin_layout Standard 一般に、マスターファイルは、組版前に完全な\SpecialCharNoPassThru LaTeX ファイルに変換されますが、インクルードされるファイルは、プリアンブル情報をまったく持たない\SpecialCharNoPassThru LaTeX ファイル に変換されます。 \end_layout \begin_layout Standard 「verbatim」インクルードファイルでは、ファイルの内容がそのまま(つまり「 \begin_inset Flex Code status collapsed \begin_layout Plain Layout verbatim \end_layout \end_inset 」モードで)固定幅タイプライタフォントで組版されます。通常、このファイルの空白は、通常の\SpecialCharNoPassThru LyX での空白の取扱いとは違って、連続した複数の空白がそのまま出力される ものの、単なる見えない空白です。ただし、 \family sans \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout \family sans 出力の空白に印付けをする \end_layout \end_inset \family default チェックボックスを有効にすると、空白が存在することを明確にするために空白の印が出力されます。 \end_layout \begin_layout Subsection ファイル間の相互参照 \end_layout \begin_layout Standard \begin_inset Box Shadowbox position "t" hor_pos "c" has_inner_box 1 inner_pos "t" use_parbox 0 use_makebox 0 width "100col%" special "none" height "1in" height_special "totalheight" thickness "0.4pt" separation "3pt" shadowsize "4pt" framecolor "black" backgroundcolor "none" status open \begin_layout Plain Layout この節の内容は、すでに古くなっています。既定のマスター文書についてと、マスターが開いているときに子文書をどう開くかについて記述する必要があります。[[要修正]] \end_layout \end_inset \end_layout \begin_layout Standard 異なるファイル間に相互参照を設定することも可能です。まず、すべての関係するファイルを開いてください。例として、2つのファイルを扱う場合を考え、各ファイルをA・B と呼びます。BがAにインクルードされるファイルだとします。Aにラベルを入れて、Bで参照したいとしましょう。文書Bで相互参照ダイアログを開いて、使用する「バッファ 」を選んでください。 \end_layout \begin_layout Subsection すべての子文書での書誌情報 \end_layout \begin_layout Standard \begin_inset Box Shadowbox position "t" hor_pos "c" has_inner_box 1 inner_pos "t" use_parbox 0 use_makebox 0 width "100col%" special "none" height "1in" height_special "totalheight" thickness "0.4pt" separation "3pt" shadowsize "4pt" framecolor "black" backgroundcolor "none" status open \begin_layout Plain Layout この節も更新が必要です。この点に関する内容がwikiにあるので、それをここにコピーすることも可か。 \end_layout \end_inset \end_layout \begin_layout Standard すべての子文書の全文献項目を含んだ書誌情報一覧をコピーし、それをコメントに変更してください。このようにすることで、\SpecialCharNoPassThru LyX は.bibファイルを見つけることができ、書 誌情報一覧を見えるようにせずとも簡単に参照を挿入することができるようになります。 \end_layout \begin_layout Standard 書誌情報一覧がコメントにあるために、\SpecialCharNoPassThru LaTeX はそれを使用しないので、参照は[1]のようには表示されないで[?]のように表示されます。ひとつの解決法として、コメ ントをインクルードする\SpecialCharNoPassThru LaTeX パッケージの \begin_inset Flex Code status collapsed \begin_layout Plain Layout comment \end_layout \end_inset を使用して、ファイルを別々に処理する方法があります。そのためには、すべての子文書のプリアンブルに以下を書き加えてください。 \end_layout \begin_layout LyX-Code \backslash usepackage{comment} \end_layout \begin_layout LyX-Code \backslash includecomment{comment} \end_layout \begin_layout Standard \begin_inset Flex URL status collapsed \begin_layout Plain Layout http://wiki.lyx.org/FAQ/Unsorted#toc31 \end_layout \end_inset も参照してください。 \end_layout \begin_layout Section \SpecialCharNoPassThru LyX 書庫 \end_layout \begin_layout Standard しばしばユーザーは、出版社に送ったり、共著者とやりとりするために、\SpecialCharNoPassThru LyX ファイルを、その依存する全画像(及び他のファイル)と「同梱」する必要に迫られることがあり ます。\SpecialCharNoPassThru LyX 2.0には、この過程を自動化するPythonスクリプト( \begin_inset Flex Code status collapsed \begin_layout Plain Layout lyxpak.py \end_layout \end_inset )が含まれています。これを使うには、 \begin_inset Flex Code status collapsed \begin_layout Plain Layout zipfile \end_layout \end_inset pythonモジュールまたは \begin_inset Flex Code status collapsed \begin_layout Plain Layout tarfile \end_layout \end_inset pythonモジュールが、システムに導入済みであることが必要です。既定設定では、Unix系システムでは、 \begin_inset Flex Code status collapsed \begin_layout Plain Layout gzip \end_layout \end_inset 圧縮 \begin_inset Flex Code status collapsed \begin_layout Plain Layout tar \end_layout \end_inset ファイル形式が優先され、Windowsでは \begin_inset Flex Code status collapsed \begin_layout Plain Layout zip \end_layout \end_inset 形式が優先されます。 \end_layout \begin_layout Standard \SpecialCharNoPassThru LyX の環境構成時には、「\SpecialCharNoPassThru LyX 書庫」を書き出すことができるようにスクリプトが準備され、 \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout ファイル\SpecialChar menuseparator 書き出し \end_layout \end_inset の下で利用可能となります。 \end_layout \begin_layout Standard \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout ツール\SpecialChar menuseparator 設定\SpecialChar menuseparator ファイル処理\SpecialChar menuseparator 変換子 \end_layout \end_inset の \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout \SpecialCharNoPassThru LyX \SpecialChar menuseparator \SpecialCharNoPassThru LyX 書庫 \end_layout \end_inset 変換子に、 \begin_inset Flex Code status collapsed \begin_layout Plain Layout -t \end_layout \end_inset スイッチや \begin_inset Flex Code status collapsed \begin_layout Plain Layout -z \end_layout \end_inset スイッチを加えることで、プラットホームとは独立に、 \begin_inset Flex Code status collapsed \begin_layout Plain Layout tar \end_layout \end_inset 形式や \begin_inset Flex Code status collapsed \begin_layout Plain Layout zip \end_layout \end_inset 形式を強制することができます(スイッチは、スクリプト名の前ではなく、後ろに加えてください)。 \end_layout \begin_layout Section 装飾的なヘッダ・フッタ \end_layout \begin_layout Standard 既定のページレイアウトは、どちらかといえば素っ気ないものです。 \begin_inset Flex Code status collapsed \begin_layout Plain Layout article \end_layout \end_inset 文書クラスの場合には、ページの下の真ん中にページ番号がつくだけです。この取扱説明書はKOMA-scriptのbookクラスなので、すこしは凝ってますが、ほんとう に着飾るには、『 \emph on ユーザーの手引き \emph default 』に述べられているように、文書ページスタイルを「装飾的(fancy)」に設定する必要があります。この節では、望んだとおりの効果を得るために、\SpecialCharNoPassThru LaTeX プリアンブ ルに挿入する必要のある\SpecialCharNoPassThru LaTeX コードについて解説します。 \end_layout \begin_layout Standard ページへッダは、「left(左)」・「center(中央)」・「right(右)」と命名された3つのフィールドに分けられています。フッタも同様に3つのフィールド に分類されています。これらのフィールドをもっとも簡単に設定する\SpecialCharNoPassThru LaTeX コマンドには、 \family typewriter \begin_inset Flex Code status collapsed \begin_layout Plain Layout \family typewriter \backslash lhead \end_layout \end_inset \family default ・ \family typewriter \begin_inset Flex Code status collapsed \begin_layout Plain Layout \family typewriter \backslash chead \end_layout \end_inset \family default ・ \family typewriter \begin_inset Flex Code status collapsed \begin_layout Plain Layout \family typewriter \backslash rhead \end_layout \end_inset \family default ・ \begin_inset Flex Code status collapsed \begin_layout Plain Layout \backslash lfoot \end_layout \end_inset などがあります。かりに、各ページの左上端に自分の名前を入れたいものとしましょう。次のようなコマンドをプリアンブルに入れるだけです。 \end_layout \begin_layout Standard \family typewriter \backslash lhead{物書 はじめ} \end_layout \begin_layout Standard これで自分の名前が左上に現れます。フィールドに取り除きたい既定の内容がある場合(往々にして中央のフッタにはページ番号が入ります)には、空の引数を持つコマンドを入 れるだけです。すなわち、 \end_layout \begin_layout Standard \family typewriter \backslash cfoot{} \begin_inset Newline newline \end_inset \family default とします。 \end_layout \begin_layout Standard もっと美しくしてみましょう。節番号を「第‥節」という言葉といっしょに(第3節のように)左上に入れ、ページ番号を(4ページのように)右上に、自分の名前を左下に、日 付を右下に入れます。以下のコマンドをプリアンブルに入れます。 \end_layout \begin_layout Standard \family typewriter \backslash lhead{第 \backslash thesection 節} \end_layout \begin_layout Standard \family typewriter \backslash chead{} \end_layout \begin_layout Standard \family typewriter \backslash rhead{ \backslash thepage ページ} \end_layout \begin_layout Standard \family typewriter \backslash lfoot{物書 はじめ} \end_layout \begin_layout Standard \family typewriter \backslash cfoot{} \end_layout \begin_layout Standard \family typewriter \backslash rfoot{ \backslash today} \end_layout \begin_layout Standard コマンド \family typewriter \begin_inset Flex Code status collapsed \begin_layout Plain Layout \family typewriter \backslash thesecti \family default o \family typewriter n \end_layout \end_inset \family default と \begin_inset Flex Code status collapsed \begin_layout Plain Layout \family typewriter \backslash thepa \family default ge \end_layout \end_inset は、それぞれ\SpecialCharNoPassThru LaTeX の節カウンタおよびページカウンタを取得するもので、これによって現在の節番号とページ番号を印字します。 \begin_inset Flex Code status collapsed \begin_layout Plain Layout \family typewriter \backslash tod \family default ay \end_layout \end_inset は、今日の日付を印字するものです。 \end_layout \begin_layout Standard へッダ下またはフッタ上に描かれる罫線の太さも変更することができます。もし罫線が必要なければ、太さを0にしてください。ヘッダ罫線は、既定では0.4ptの太さであり、 フッタ罫線は0ptです。太さを変更するには、 \family typewriter \begin_inset Flex Code status collapsed \begin_layout Plain Layout \family typewriter \backslash renewcommand{ \backslash headrulewidth}{0.4pt} \end_layout \end_inset \family default や \family typewriter \begin_inset Flex Code status collapsed \begin_layout Plain Layout \family typewriter \backslash renewcommand{ \backslash footrulewidth}{0.4pt} \end_layout \end_inset \family default のようなコマンドを使用してください。 \end_layout \begin_layout Standard \begin_inset Flex Code status collapsed \begin_layout Plain Layout \family typewriter \backslash thispagestyle{empty} \end_layout \end_inset ・ \begin_inset Flex Code status collapsed \begin_layout Plain Layout \family typewriter \backslash thispagestyle{plain} \end_layout \end_inset ・ \begin_inset Flex Code status collapsed \begin_layout Plain Layout \family typewriter \backslash thispagestyle{fancy} \end_layout \end_inset のようなコマンドを使えば、各ページごとにへッダ・フッタ設定を有効にしたり無効にしたりすることができます。設定を変更したいページに、これらのコマンドを\SpecialCharNoPassThru TeX コード として挿入してください。実は、タイトルページは、その後のページは大域的に装飾的(fancy)に設定されていれば装飾的(fancy)になるにもかかわらず、既定でプ レーン(plain)になるように設定されているのです。 \end_layout \begin_layout Standard 奇数ページの左上だけに何かを挿入するなど、もっと複雑なコマンドもあるのですが、詳しい解説は \begin_inset Flex Code status collapsed \begin_layout Plain Layout \family typewriter fancyhdr \end_layout \end_inset パッケージの取扱説明書をご参照ください( \begin_inset Flex Code status collapsed \begin_layout Plain Layout fancyhdr.dvi \end_layout \end_inset を探してください)。 \end_layout \begin_layout Standard 最後の例として、へッダやフッタに画像を挿入できることを取り上げましょう。会社のロゴをページ左上に入れたいものとします。たとえば、 \end_layout \begin_layout Standard \family typewriter \backslash lhead{ \backslash resizebox{1in}{!}{ \backslash includegraphics{logo.eps}}} \end_layout \begin_layout Standard \noindent とすれば、これを実現できます(文書中に他に画像を挿入していない場合には、 \begin_inset Newline newline \end_inset \begin_inset Flex Code status collapsed \begin_layout Plain Layout \noindent \family typewriter \backslash usepackage{graphics} \end_layout \end_inset をプリアンブルに宣言する必要があります)。 \end_layout \begin_layout Section 箇条書き(記号)ブリットの指定 \begin_inset CommandInset label LatexCommand label name "sec:ブリット" \end_inset \end_layout \begin_layout Standard \noun on Allan Rae文 \end_layout \begin_layout Subsection はじめに \end_layout \begin_layout Standard \SpecialCharNoPassThru LyX には、ブリットの形が216個準備されていて、簡単なダイアログから呼び出すことができます。このダイアログを使えば、箇条書き(記号)の各階層で使うブリットの形 を変更することができます。この設定は文書全体に共通なので、段落ごとに別のブリットを指定することはできません \begin_inset Foot status collapsed \begin_layout Plain Layout 正確には可能ですが、手動で行う必要があります。 \end_layout \end_inset 。 \end_layout \begin_layout Subsection 外見 \end_layout \begin_layout Standard メニュー項目の \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout 文書\SpecialChar menuseparator 設定 \end_layout \end_inset を選択してダイアログを開き、 \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout ブリット \end_layout \end_inset タブを選択してください。 \end_layout \begin_layout Standard このダイアログは、ブリット形の一覧表を提示します。 \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout フォント \end_layout \end_inset と書いてあるドロップダウンメニューで、6つの各ブリット形パネルを切り替えることができます。また、一覧表左の \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout 階層 \end_layout \end_inset パネルは、変更したい階層を選択するものです。 \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout 任意のブリット \end_layout \end_inset では、指定したい\SpecialCharNoPassThru LaTeX 表現を入力することができます。任意のブリットを指定した場合には、そのコマンドが必要とするパッケージを\SpecialCharNoPassThru LaTeX プリアンブルで指定する必 要があります。 \end_layout \begin_layout Standard 6つのパネルは、それぞれが必要とするパッケージによって分類されています。下記は、フォント名と\SpecialCharNoPassThru LaTeX パッケージの対応表です。 \begin_inset Separator parbreak \end_inset \end_layout \begin_layout Standard \align center \begin_inset Tabular \begin_inset Text \begin_layout Plain Layout フォント \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none 必要とするパッケージ \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \family sans 標準 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \series medium \shape up \size normal \emph off \bar no \noun off \color none \SpecialCharNoPassThru LaTeX \family roman 本体 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \family sans \series medium \shape up \size normal \emph off \bar no \noun off \color none 数式 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \family typewriter \series medium \shape up \size normal \emph off \bar no \noun off \color none amssymb.sty \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \family sans \series medium \shape up \size normal \emph off \bar no \noun off \color none 絵文字1 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \family typewriter \series medium \shape up \size normal \emph off \bar no \noun off \color none pifont.sty \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \family sans \series medium \shape up \size normal \emph off \bar no \noun off \color none 絵文字2 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \family typewriter \series medium \shape up \size normal \emph off \bar no \noun off \color none pifont.sty \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \family sans \series medium \shape up \size normal \emph off \bar no \noun off \color none 絵文字3 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \family typewriter \series medium \shape up \size normal \emph off \bar no \noun off \color none pifont.sty \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \family sans \series medium \shape up \size normal \emph off \bar no \noun off \color none 絵文字4 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \family typewriter \series medium \shape up \size normal \emph off \bar no \noun off \color none pifont.sty \end_layout \end_inset \end_inset \end_layout \begin_layout Standard \SpecialCharNoPassThru LyX は、ユーザーが導入されていないパッケージのブリットを使用したとしても、警告を発しません。ファイルを閲覧したり印刷したりしようとしたときに\SpecialCharNoPassThru LaTeX エラーが 出るようならば、パッケージが導入されていない可能性が大です \begin_inset Foot status collapsed \begin_layout Plain Layout \SpecialCharNoPassThru LyX が、パッケージがなくてもブリットを使用することを許すのは、編集をここで行ったとしても、別のところへエクスポートする可能性があるからです。 \end_layout \end_inset 。 \end_layout \begin_layout Subsection 使用法 \end_layout \begin_layout Standard 変更したいブリット階層を選んで、ブリット形と寸法を選択してください。何らかの変更を加えたとしても、\SpecialCharNoPassThru LyX 上には反映されませんが、文書の表示を行えば確認されます。 \end_layout \begin_layout Standard ブリット形は、適切な階層のブリットボタンをマウスで右クリックすれば、簡単に既定値に初期化することができます \begin_inset Foot status collapsed \begin_layout Plain Layout もし \emph on 本当に \emph default 段落ごとに異なるブリットの形を使いたいならば、\SpecialCharNoPassThru TeX コードを使って少し手を汚す必要があります。この場合も、ブリット選択ダイアログを使えば、さまざまな形のLaTe Xコードを確認することができるので手助けとなるでしょう。任意に設定した段落をつくるには、以下のような選択肢があります。 \end_layout \begin_layout Plain Layout \begin_inset ERT status open \begin_layout Plain Layout \backslash let \backslash savelabelitemi= \backslash labelitemi \end_layout \end_inset \end_layout \begin_layout Plain Layout \begin_inset ERT status open \begin_layout Plain Layout \backslash renewcommand \backslash labelitemi[0]{ \backslash small \backslash ( \backslash sharp \backslash )} \end_layout \end_inset \end_layout \begin_layout Itemize 特定の階層の新しいブリット形を指定するには、\SpecialCharNoPassThru LaTeX コマンド \begin_inset Flex Code status collapsed \begin_layout Plain Layout \family typewriter \backslash renewcommand{}{} \end_layout \end_inset を使用します。あとで現在のブリット形に戻すことができるように、現在のブリット形を保存しておく必要もあります。ここで使っている箇条書きでは、第1階層のブリットを変 更するために、以下の\SpecialCharNoPassThru LaTeX コードが使用されています。 \family default \begin_inset Separator parbreak \end_inset \end_layout \begin_deeper \begin_layout LyX-Code \family typewriter \backslash let \backslash savelabelitemi= \backslash labelitemi \end_layout \begin_layout LyX-Code \family typewriter \backslash renewcommand \backslash labelitemi[0]{ \backslash small \backslash ( \backslash sharp \backslash )} \end_layout \end_deeper \begin_layout Itemize 箇条書き(記号)の階層は、 \begin_inset Flex Code status collapsed \begin_layout Plain Layout \backslash labelitem \end_layout \end_inset コマンドの一部にローマ数字で指定されていることに注意してください。 \end_layout \begin_layout Itemize \begin_inset ERT status open \begin_layout Plain Layout [ \backslash ( \backslash star \backslash )] \end_layout \end_inset 各項目のブリットを指定するには、角括弧で囲んだブリット形を、行頭に \begin_inset Flex Code status collapsed \begin_layout Plain Layout \SpecialCharNoPassThru TeX コード \end_layout \end_inset として挿入してください。たとえば、この項目の行頭には \family typewriter 、 \begin_inset Flex Code status collapsed \begin_layout Plain Layout \family typewriter [ \backslash ( \backslash star \backslash )] \end_layout \end_inset \family default が指定されています。 \end_layout \begin_layout Plain Layout \begin_inset ERT status open \begin_layout Plain Layout \backslash renewcommand \backslash labelitemi[0]{ \backslash savelabelitemi} \end_layout \end_inset \end_layout \begin_layout Plain Layout 文書全体で使用するブリット形が有効であるようにするために、labelitemを元の設定に戻す必要があります。そのためには、以下のようにします。 \end_layout \begin_layout LyX-Code \family typewriter \backslash renewcommand \backslash labelitemi[0]{ \backslash savelabelitemi} \end_layout \end_inset 。 \end_layout \begin_layout Chapter \SpecialCharNoPassThru LyX とインターネット網 \end_layout \begin_layout Standard \SpecialCharNoPassThru LyX は、これまでも長い間、HTMLを始めとするウェブフレンドリーな文書諸形式への書き出しをサポートしてきました。しかしながら、第2.0版以前では、HTMLへの書 き出しは、常に外部変換子を用いることで実現されていました \begin_inset Foot status collapsed \begin_layout Plain Layout \SpecialCharNoPassThru LyX で外部変換子を使うことについての詳細は、取扱説明書『 \emph on カスタマイズ篇 \emph default 』の「 \emph on 変換子 \emph default 」の節をご覧ください。 \end_layout \end_inset 。これらは2つのグループに大別できます。1つは、 \begin_inset Flex Code status collapsed \begin_layout Plain Layout htlatex \end_layout \end_inset ・ \begin_inset Flex Code status collapsed \begin_layout Plain Layout html2latex \end_layout \end_inset ・ \begin_inset Flex Code status collapsed \begin_layout Plain Layout plastex \end_layout \end_inset のように、\SpecialCharNoPassThru LaTeX を中間形式として用い、その\SpecialCharNoPassThru LaTeX を生成するのに\SpecialCharNoPassThru LyX を用いるもの。2つめは、 \begin_inset Flex Code status collapsed \begin_layout Plain Layout e\SpecialCharNoPassThru LyX er \end_layout \end_inset のように、直接\SpecialCharNoPassThru LyX ファイルに働きかける変換子です。これらは、それぞれに長所・短所を有しています。 \end_layout \begin_layout Standard \SpecialCharNoPassThru LaTeX ベースの変換子は、原則として、\SpecialCharNoPassThru LaTeX が書きだす文書についてのすべてを知っているという長所があります。この種の変換子は、例えば、特定のコードのくだり が、\SpecialCharNoPassThru LyX によって生成されたのか、\SpecialCharNoPassThru TeX コードで書かれたのかについては気にしません。これらの変換子は、 \begin_inset Flex Code status collapsed \begin_layout Plain Layout aux \end_layout \end_inset ファイルやカウンタや参照を取り扱うことができ、Bib\SpecialCharNoPassThru TeX が生成する \begin_inset Flex Code status collapsed \begin_layout Plain Layout bbl \end_layout \end_inset ファイルも利用することがよくあります。一方で、\SpecialCharNoPassThru LaTeX は解析の非常に難しい言語であり\threehyphens \SpecialCharNoPassThru TeX 自身だけが\SpecialCharNoPassThru TeX を理解することができると言われたりすることがあ ります\threehyphens 、\SpecialCharNoPassThru LaTeX ベースの変換子は、非常に簡単な文法に見えるものでさえ飲み込めず、複雑なものになると全く歯が立たないこともあります。例えば、この現行を書い ている時点では、取扱説明書『 \emph on 埋込オブジェクト篇 \emph default 』は、他の変換子では書き出しができるのに、 \begin_inset Flex Code status collapsed \begin_layout Plain Layout htlatex \end_layout \end_inset では行うことができません。他には、数式をどう取り扱うかという問題があります。これらの変換子の典型的なものは、数式を小さな画像に変換して、HTML文書からこれらの 画像へのリンクを張ります。これらの画像は、実は\SpecialCharNoPassThru LaTeX によって生成されているので、正確です。しかしながら、これらはうまく伸縮できないので、実際の文書の中で表現 されるように\threehyphens フォント寸が凡そ正しくなるように\threehyphens 見せようとすると、大変な苦労を伴います。 \end_layout \begin_layout Standard Alex Fernandezの \begin_inset Flex Code status collapsed \begin_layout Plain Layout e\SpecialCharNoPassThru LyX er \end_layout \end_inset ( \begin_inset CommandInset href LatexCommand href name "http://elyxer.nongnu.org/" target "http://elyxer.nongnu.org/" \end_inset )は、これらの問題の一部を解決します。特に、これは数式を画像に変換するのではなく、HTMLとCSSを組み合わせて数式を生成するので、生成される数式は完璧な大きさ に伸縮されて表示されます。しかしながら、ちょっとだけ複雑な数式でさえ、 \begin_inset Flex Code status collapsed \begin_layout Plain Layout htlatex \end_layout \end_inset よりも質が落ちます。これはHTMLの限界を示しています \begin_inset Foot status collapsed \begin_layout Plain Layout とはいえ、 \begin_inset Flex Code status collapsed \begin_layout Plain Layout e\SpecialCharNoPassThru LyX er \end_layout \end_inset では、数式用にjsMathとMathJaxを使用することもできます。ただし、この設定はグローバルにしか設定することができず、バックエンドで実行させるサーバへのア クセスが利用できる必要があります。 \end_layout \end_inset 。さらに重要なことは(少なくとも第1.1.1版においては)、 \begin_inset Flex Code status collapsed \begin_layout Plain Layout e\SpecialCharNoPassThru LyX er \end_layout \end_inset は数式マクロを一部しかサポートしておらず、ユーザ定義の段落様式や文字様式をサポートしていません。これらの制約によって、\SpecialCharNoPassThru LyX ユーザが生成する文書の多くにとっては 、 \begin_inset Flex Code status collapsed \begin_layout Plain Layout e\SpecialCharNoPassThru LyX er \end_layout \end_inset は不向きなものになっています。もちろん、原理的に、これらの問題を解決することもできたのですが、\SpecialCharNoPassThru LyX 開発陣は別の方法を採ることとし、\SpecialCharNoPassThru LyX が\SpecialCharNoPassThru LaTeX やDocB ook、平文を書き出すことができるのと同様に、\SpecialCharNoPassThru LyX 自身にXHTMLを書きだす能力を身につけさせることとしたのです。 \end_layout \begin_layout Standard この原稿執筆時点では、XHTML出力は開発途上であり、おそらく「実験的」機能として解されるべきでしょう \begin_inset Foot status collapsed \begin_layout Plain Layout \SpecialCharNoPassThru LyX ソースツリーもしくは \begin_inset CommandInset href LatexCommand href name "オンラインでのアクセス" target "http://www.lyx.org/trac/browser/lyx-devel/trunk/development/HTML/HTML.notes" \end_inset にある \begin_inset Flex Code status collapsed \begin_layout Plain Layout development/HTML.notes \end_layout \end_inset ファイルには、通常、XHTML出力の現状についての最新の情報が収録されています。 \begin_inset CommandInset href LatexCommand href name "バグ追跡ページ" target "http://www.lyx.org/trac/query?status=reopened&status=assigned&status=new&max=0&component=xhtml+export&order=id&col=id&col=summary&col=reporter&col=keywords&keywords=%21%7Efixedintrunk&desc=1" \end_inset にあるXHTML関連バグ一覧も参照のこと。 \end_layout \end_inset 。それでもこのアプローチは、他の2つの方法よりも、潜在的な利点がいくつもあるので、開発陣はこの方法を選択したのです。 \end_layout \begin_layout Standard これらの利点は、主に、XHTML出力ルーチンが\SpecialCharNoPassThru LyX の一部となっているため、\SpecialCharNoPassThru LyX が出力する文書について\SpecialCharNoPassThru LyX が関知しているところのものは、すべて知り得るという ところから来ています \begin_inset Foot status collapsed \begin_layout Plain Layout 他には、これらのルーチンが\SpecialCharNoPassThru LyX 内部にあるため、\SpecialCharNoPassThru LyX ファイル形式や既存の差込枠の文法に変更があっても、影響を受けずに済むという利点もあります。 \end_layout \end_inset 。つまり、XHTML出力ルーチンは、(文書構造に表示されるような形での)目次や、それぞれの段落様式に関連付けられたカウンタや、ユーザ定義の様式についても知ってい るのです。XHTML出力ルーチンは、国際化について\SpecialCharNoPassThru LyX が関知しているものも知っているので、ちょうどその時に有効になっている言語に依存して、「Chapter 1」と出力されたり、「Kapitel 1」と出力されたりするのです。 \end_layout \begin_layout Standard 汎く一般的に、出力ルーチンは、\SpecialCharNoPassThru LyX が文書レイアウトについて関知しているものは知っており、したがって、文書が画面上にどのように描画されるかも知っています。文書を XHTMLに出力するときには、この情報を利用します。特に、\SpecialCharNoPassThru LyX は、文書を画面上に描画するときに使用するレイアウト情報に対応したCSSスタイル情報を \emph on 自動的に \emph default 生成します。もし節見出しが、\SpecialCharNoPassThru LyX 中でサンセリフ体かつボールド体であるとすると、(既定では)ウェブブラウザに表示した時にも、サンセリフでボールドになります。これ は、節のような定義済み様式だけでなく、ユーザ定義のものも含めて、すべての様式でそうです。実際、XHTML出力ルーチンは、ユーザ定義の段落・文字様式と、\SpecialCharNoPassThru LyX 自身 の定義済み様式とを区別しません。どちらの場合も、\SpecialCharNoPassThru LyX が様式について関知しているところのものは、全てレイアウトファイルに含まれています。これは、脚注のような定義 済み差込枠や、各種ユーザ設定差込枠でもそうです。 \end_layout \begin_layout Standard 結果として、XHTML出力は、レイアウトファイルやモジュールを通して、\SpecialCharNoPassThru LaTeX 出力と全く同じように、ユーザが設定したり拡張したりすることができるのです。詳細に ついては、取扱説明書『 \emph on カスタマイズ篇 \emph default 』の第5章をごらんください。 \end_layout \begin_layout Standard 本章の残りでは、XHTML出力についての、さらに詳細な情報について取り扱い、その制約や、制約の回避の仕方を取り扱います。 \end_layout \begin_layout Section XHTMLにおける数式出力 \end_layout \begin_layout Standard \SpecialCharNoPassThru LyX では、数式描画に4つの方法を選択できます。以下に示すように、それぞれに利点と欠点があります。 \end_layout \begin_layout Itemize MathML \begin_inset Newline newline \end_inset MathMLは、ウェブ上で数学を用いるために、特にデザインされたXMLの一方言であり、これをサポートするブラウザ上では、通常、特に美しい表現が得られます。欠点は 、すべてのブラウザがMathMLをサポートしているわけではないという事と、FirefoxのようなGeckoベースのブラウザでも、サポートが完璧ではないという事で す。 \begin_inset Newline newline \end_inset 例えば、数式が \begin_inset Flex Code status collapsed \begin_layout Plain Layout xymatrix \end_layout \end_inset パッケージを使用していたり、\SpecialCharNoPassThru TeX コードを使用しているなどで、もし\SpecialCharNoPassThru LyX が数式をMathMLとして描画できないとすると、\SpecialCharNoPassThru LyX は数式を代わりに画像として出力しま す。 \end_layout \begin_layout Itemize HTML \begin_inset Newline newline \end_inset 前述のとおり、 \begin_inset Flex Code status collapsed \begin_layout Plain Layout elyxer \end_layout \end_inset は、数式をCSSで装飾したHTMLとして出力します \begin_inset Foot status collapsed \begin_layout Plain Layout \SpecialCharNoPassThru LyX は、 \begin_inset Flex Code status collapsed \begin_layout Plain Layout elyxer \end_layout \end_inset からのHTML出力のために、CSSの一部を拝借しています。 \end_layout \end_inset 。簡単な数式では、これは非常にうまく行きますが、少し複雑な数式になると、 \begin_inset Flex Code status collapsed \begin_layout Plain Layout elyxer \end_layout \end_inset は歯が立たなくなります。それでも、この方法は非常に広くサポートされているという利点があり、かなり簡単な数式を少しだけ含んでいるような文書に適しているでしょう。 \begin_inset Newline newline \end_inset 例えば、数式が \begin_inset Flex Code status collapsed \begin_layout Plain Layout xymatrix \end_layout \end_inset パッケージを使用していたり、\SpecialCharNoPassThru TeX コードを使用しているなどで、もし\SpecialCharNoPassThru LyX が数式をHTMLとして描画できないとすると、\SpecialCharNoPassThru LyX は数式を代わりに画像として出力します。 \end_layout \begin_layout Itemize 画像 \begin_inset Newline newline \end_inset \begin_inset Flex Code status collapsed \begin_layout Plain Layout htlatex \end_layout \end_inset のように、\SpecialCharNoPassThru LyX は数式を画像としても出力できます。この画像は、実は、自動プレビューで使用されているものと全く同じです \begin_inset Foot status collapsed \begin_layout Plain Layout ただし、画像を出力に使うために、自動プレビューを入にしておく必要は \emph on ありません \emph default 。 \end_layout \end_inset 。この方法の利点は、画像が他ならぬ\SpecialCharNoPassThru LaTeX によって生成されているので、非常に正確であることです。欠点は、前述したとおり、画像がビットマップなので、伸縮が全くう まく行かなかったり、コピーが出来なかったりといったことがあります(執筆時点においては、数式の付番にも問題があります。 \begin_inset CommandInset href LatexCommand href name "バグ 6894" target "http://www.lyx.org/trac/ticket/6894" \end_inset を参照のこと。)。 \begin_inset Newline newline \end_inset 画像の寸法は、 \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout 文書\SpecialChar menuseparator 設定\SpecialChar menuseparator 出力 \end_layout \end_inset の「数式画像の伸縮」パラメータを変更することで制御できます \begin_inset Foot status collapsed \begin_layout Plain Layout 必要な方のために述べておくと、これは、画像の解像度をdpi (1インチあたりドット数)で制御するためのもので、75dpiを基準としています。 \end_layout \end_inset 。 \begin_inset Newline newline \end_inset もし\SpecialCharNoPassThru LyX が、何らかの理由によって数式の画像を生成できない(例えば、必要な\SpecialCharNoPassThru LaTeX パッケージが導入済みでないなど)ときは、回避策として、生の\SpecialCharNoPassThru LaTeX を出力し ます。 \end_layout \begin_layout Itemize \SpecialCharNoPassThru LaTeX \begin_inset Newline newline \end_inset 最後に、\SpecialCharNoPassThru LyX は、数式を\SpecialCharNoPassThru LaTeX としても出力することができます。この方法は、最終手段としての出力方法である一方で、HTML文書に埋め込まれた\SpecialCharNoPassThru LaTeX を描画す るのにJavaScriptを使用する、 \begin_inset CommandInset href LatexCommand href name "jsMath" target "http://www.math.union.edu/~dpvc/jsMath/" \end_inset のようなツールとともに使用することもできます。\SpecialCharNoPassThru LyX は、jsMathで必要とされているのと同じように、\SpecialCharNoPassThru LaTeX 部分を、 \begin_inset Flex Code status collapsed \begin_layout Plain Layout span \end_layout \end_inset (行内数式用)または \begin_inset Flex Code status collapsed \begin_layout Plain Layout div \end_layout \end_inset (別行立て数式用)に \begin_inset Flex Code status collapsed \begin_layout Plain Layout class='math' \end_layout \end_inset を指定したもので、包んで出力します。 \end_layout \begin_layout Standard これらの出力方法のいずれかを \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout 文書\SpecialChar menuseparator 設定\SpecialChar menuseparator 出力 \end_layout \end_inset で選択しなくてはなりません。既定では、\SpecialCharNoPassThru LyX はMathMLで出力を行います。これは、文書全体に適用される設定となります。 \end_layout \begin_layout Standard 最後に、\SpecialCharNoPassThru LyX では、例えば、MathMLではあまりうまく出力されないような差込枠に対して、別の出力方法を選択できる選択肢が用意されています \begin_inset Foot status collapsed \begin_layout Plain Layout その他にも、\SpecialCharNoPassThru LyX は、差込枠に\SpecialCharNoPassThru TeX コードが含まれていると画像出力に回帰するので、数式中に \begin_inset Formula $a=b\relax$ \end_inset のような無害な\SpecialCharNoPassThru TeX コードを挿入することによって、画像出力を強制することができます。 \end_layout \end_inset 。 \end_layout \begin_layout Section 書誌情報と引用 \end_layout \begin_layout Standard XHTML出力は、書誌情報と引用を完全にサポートしています。 \end_layout \begin_layout Standard 引用ラベルは、\SpecialCharNoPassThru LyX 画面上のラベルを生成するのと同じ機構で生成されているので、出力中のラベルは、\SpecialCharNoPassThru LyX 中の外見と同質またはそれよりも上質な仕上がりとなっています 。連番引用を使用している場合には、\SpecialCharNoPassThru LyX は、画面上で表示されるような各カッコに囲まれた引用鍵を単純に表示するのではなく、[1]や[17]などの連番ラベルを出力し ます。著者-出版年形式の引用を使用している場合で、同じ著者-出版年の組み合わせが複数ある場合、\SpecialCharNoPassThru LyX は、Bib\SpecialCharNoPassThru TeX が行うように出版年に小文字を付します。ラベル は、書誌情報項目とともに印字されます。現在のところ、角括弧を丸括弧に変更するなど、ラベルの外見を変更する手段はありませんのでご注意ください。 \end_layout \begin_layout Standard 書誌情報出力は、引用ダイアログで文献情報表示を取り扱うのと同じ機構で取り扱われているので、XHTML出力は、引用ダイアログで特定の文献項目を表示させた時のものに 非常によく似ています。整形の仕方は、レイアウトファイルや望ましくはモジュールでカスタマイズすることができます。詳細については、取扱説明書『カスタマイズ篇』をご覧 ください。 \end_layout \begin_layout Standard 現在のところ、主だった瑕疵は、相互参照された情報が、関連した項目の全てに印字されてしまうことです。つまり、以下のような表示が為されます。 \end_layout \begin_layout Quote Jason Stanley, \begin_inset Quotes eld \end_inset Context and Logical Form \begin_inset Quotes erd \end_inset , in \emph on Language in Context: Selected Essays \emph default (Oxford: Oxford University Press, 2007), pp. 30\twohyphens 68. \end_layout \begin_layout Quote Jason Stanley, \begin_inset Quotes eld \end_inset Semantics in Context \begin_inset Quotes erd \end_inset , in \emph on Language in Context: Selected Essays \emph default (Oxford: Oxford University Press, 2007), pp. 201\twohyphens 30. \end_layout \begin_layout Standard これは、遠くないうちに修正されるでしょう。 \end_layout \begin_layout Standard 現在のところ、節ごとの書誌情報出力はサポートされていません。複数の書誌情報がある場合には、\SpecialCharNoPassThru LyX は同じ情報を繰り返し出力してしまいます。 \end_layout \begin_layout Section 索引 \end_layout \begin_layout Standard \SpecialCharNoPassThru LyX は、索引をXHTMLとして書きだすことができますが、現在のところ、若干の制約があります。 \end_layout \begin_layout Standard 索引の書き出しは、 \emph on ユーザーの手引き \emph default の索引の節に書かれているような手の込んだ方法を使おうとしないほうが、信頼性が保てます \begin_inset Foot status collapsed \begin_layout Plain Layout ここでの主な問題は、これらの操作の際に、\SpecialCharNoPassThru LyX 自身は何もしていないという点です。つまり、生の\SpecialCharNoPassThru LaTeX で入力しなくてはならないようなものをそのまま入力しているの です。 \end_layout \end_inset 。当該節の小節見出しに沿って、それらがどう処理されるかを説明しましょう。 \end_layout \begin_layout Itemize 索引項目のグループ化(下層項目): \SpecialCharNoPassThru LyX はこれらをサポートしようと努めていますが、項目は「 ! 」(感嘆符の周りに空白)で分離しなくてはなりません。これは、そ うしないと数式などで使われているエスケープされた感嘆符をチェックするのが非常に難しくなるからです。 \end_layout \begin_layout Itemize ページ範囲: ページ範囲については、XHTMLでは意味がないので、全くサポートされません。その代わりに、引用項目のはじめと終わりの頁それぞれに、2つの索引項目が 得られるだけです。 \end_layout \begin_layout Itemize 相互参照: 相互参照のサポートはありません。\SpecialCharNoPassThru LyX が「|see\SpecialChar ldots 」という下だりを持つ項目を検出すると、その部分はただ無視されて、残りの部分が通常の索引項目だとみな されます。 \end_layout \begin_layout Itemize 索引項目の整序: \SpecialCharNoPassThru LyX は整序順の変更をサポートします。\SpecialCharNoPassThru LyX は、最初に検出した「@」の前の部分を取り出して、それを整序に用い、最初の「@」の後の部分を実際の項 目として取り出します。現在のところ、\SpecialCharNoPassThru LyX はエスケープされた「@」を取り扱わないので、電子メールアドレスを索引に使わないでください。 \end_layout \begin_layout Itemize 索引項目のレイアウト: 項目は、テキスト様式ダイアログを使うなり、\SpecialCharNoPassThru LyX 内で使用可能な方法を用いることで、索引項目を成形することができます。「項目|textbf 」のような文法はサポートされません。\SpecialCharNoPassThru LyX は、項目内にパイプ記号「|」を検出すると、パイプ記号とその後に続くものすべてを削除してしまいます。 \end_layout \begin_layout Itemize 複数の索引: 複数の索引はサポートされていません。すべての項目は、ひとつの大きな索引として印字されます。索引が何度も印字されることを防ぐため、中心となる索引だけ を印字しますので、その索引は必ず置くようにしてください。 \end_layout \begin_layout Section 記号一覧および用語集 \end_layout \begin_layout Standard 現在のところ、用語集のサポートはありません。この機能の追加は、比較的容易だと思われますので、あなたの貢献をお待ちしております。 \end_layout \begin_layout Chapter \SpecialCharNoPassThru LyX サーバー \begin_inset CommandInset label LatexCommand label name "chap:LyXサーバー" \end_inset \end_layout \begin_layout Section はじめに \end_layout \begin_layout Standard 「\SpecialCharNoPassThru LyX サーバー」を使用すると、他のプログラムが、\SpecialCharNoPassThru LyX と通信したり、\SpecialCharNoPassThru LyX コマンドを実行させたり、\SpecialCharNoPassThru LyX の内部状態に関する情報を取得したりすることができるよう になります。これは熟練したユーザー向けの機能ですが、便利なはずです。たとえば、\SpecialCharNoPassThru LyX サーバーに書き込むことによって、JabRefのような書誌情報管理ソフトが、L yXに文献引用を「押し込む」ことが可能となります。 \end_layout \begin_layout Section \SpecialCharNoPassThru LyX サーバーを開始するには \end_layout \begin_layout Standard \SpecialCharNoPassThru LyX サーバーは、名前をつけたパイプの対を利用することで機能します。パイプは、通常 \begin_inset Flex Code status collapsed \begin_layout Plain Layout UserDir \end_layout \end_inset の下に作られ(Windowsを除く。Windowsでは、名前を付けた \emph on ローカルの \emph default パイプは \begin_inset Flex Code status collapsed \begin_layout Plain Layout \backslash \backslash . \backslash pipe \end_layout \end_inset に特別なオブジェクトとして置かれます)、「 \begin_inset Flex Code status collapsed \begin_layout Plain Layout .lyxpipe.in \end_layout \end_inset 」および「 \begin_inset Flex Code status collapsed \begin_layout Plain Layout .lyxpipe.out \end_layout \end_inset 」という名前がついています。外部プログラムは、 \begin_inset Flex Code status collapsed \begin_layout Plain Layout .lyxpipe.in \end_layout \end_inset に書き込みを行い、戻りデータを \begin_inset Flex Code status collapsed \begin_layout Plain Layout .lyxpipe.out \end_layout \end_inset から読み出します。パイプ名の語幹は、 \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout ツール\SpecialChar menuseparator 設定 \end_layout \end_inset から、たとえば「 \begin_inset Flex Code status collapsed \begin_layout Plain Layout /home/myhome/lyxpipe \end_layout \end_inset 」あるいはWindowsでは「 \begin_inset Flex Code status collapsed \begin_layout Plain Layout \backslash \backslash . \backslash pipe \backslash lyxpipe \end_layout \end_inset 」などに設定することができます。サーバーを開始するためには、これを \emph on 手動で設定しなくてはなりません \emph default 。 \end_layout \begin_layout Standard \SpecialCharNoPassThru LyX は、パイプを生成するに際して、「 \begin_inset Flex Code status collapsed \begin_layout Plain Layout .in \end_layout \end_inset 」および「 \begin_inset Flex Code status collapsed \begin_layout Plain Layout .out \end_layout \end_inset 」を付け加えます。パイプがすでに存在していれば、\SpecialCharNoPassThru LyX は他の\SpecialCharNoPassThru LyX プロセスがすでに実行中であると判断して、サーバーを開始しません。POSIX(Unix型)システ ムでは、なんらかの理由で、\SpecialCharNoPassThru LyX が終了する際に使用されていない「古い」パイプが削除されずに残ったりすると、\SpecialCharNoPassThru LyX はこれを削除しようとします。何らかの理由でこれが 失敗した場合、手動でパイプを削除したのちに、\SpecialCharNoPassThru LyX を再起動する必要があります。Windowsでは、プログラムが終了したりクラッシュしたりすると、OSがパイプを削 除するので、「古い」パイプが残ることはありません。 \end_layout \begin_layout Standard サーバーを使用する\SpecialCharNoPassThru LyX プロセスを複数起動するには、それぞれのプロセスに、別のユーザーディレクトリを使用させたり、別々の \begin_inset Flex Code status collapsed \begin_layout Plain Layout preferences \end_layout \end_inset ファイルを使用させるなど、別々の設定を使用する必要があります。 \end_layout \begin_layout Standard クライアントプログラムを開発しようとされているのであれば、\SpecialCharNoPassThru LyX サーバーからのデバッグ情報を有効にすると便利かもしれません。そのためには、Lyxを \begin_inset Flex Code status collapsed \begin_layout Plain Layout lyx -dbg lyxserver \end_layout \end_inset として起動してください。 \end_layout \begin_layout Standard C言語で書かれた完全なサンプルクライアントが、ソース頒布版の \begin_inset Newline newline \end_inset \begin_inset Flex Code status collapsed \begin_layout Plain Layout development/lyxserver/server_monitor.c \end_layout \end_inset にあります。 \end_layout \begin_layout Standard もう一つの便利なツールとして、 \begin_inset Flex Code status collapsed \begin_layout Plain Layout src/client/lyxclient \end_layout \end_inset にあるコマンドラインベースのクライアントがあります。 \end_layout \begin_layout Section 通常の通信 \end_layout \begin_layout Standard \SpecialCharNoPassThru LyX コールを発行するには、クライアントはASCIIテキスト行を入力パイプに書き込みまなくてはなりません。この行は、以下の書式を持ちます。 \end_layout \begin_layout Quote LYXCMD: \emph on クライアント名 \emph default : \emph on 関数 \emph default : \emph on 引数 \end_layout \begin_layout Description クライアント名 は、クライアントが自由に選べる名前です。これが用いられるのは、クライアントが他の要求クライアントから結果を見分けることができるように、\SpecialCharNoPassThru LyX が返 答をする際、クライアント名をエコーするときだけです。 \end_layout \begin_layout Description 関数 は、\SpecialCharNoPassThru LyX に実行させたい関数です。これは、ミニバッファで使用するコマンドと同じです。 \end_layout \begin_layout Description 引数 は、一部の関数のみに効力を持つオプションの引数です(たとえば、「自己挿入」LFUNは、現在のカーソル位置に引数を文章として挿入します)。 \end_layout \begin_layout Standard \SpecialCharNoPassThru LyX からの返答は、出力パイプに送り出され、 \end_layout \begin_layout Quote INFO: \emph on クライアント名 \emph default : \emph on 関数 \emph default : \emph on データ \end_layout \begin_layout Standard の書式をしています。ここで \emph on クライアント名 \emph default と \emph on 関数 \emph default は、コマンド要求からそのままエコーされますが、 \emph on データ \emph default はコマンド実行の結果に依存した、多少なりとも有用な情報です。「font-state」のような一部のコマンドは、\SpecialCharNoPassThru LyX の内部状態に関する情報を返しますが、空のデー タ応答を返すものもあります。空のデータ返答は、コマンド実行が無事終わったことを意味します。 \end_layout \begin_layout Standard エラーが発生した場合の\SpecialCharNoPassThru LyX の返答は \end_layout \begin_layout Quote ERROR: \emph on クライアント名 \emph default : \emph on 関数 \emph default : \emph on エラーメッセージ \end_layout \begin_layout Standard の書式をしており、 \emph on エラーメッセージ \emph default には、なぜコマンドが失敗したかの説明が入っているはずです。 \end_layout \begin_layout Standard (例) \end_layout \begin_layout LyX-Code echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in \begin_inset Newline newline \end_inset echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in \begin_inset Newline newline \end_inset read a <~/.lyxpipe.out \begin_inset Newline newline \end_inset echo $a \end_layout \begin_layout Section 通知 \end_layout \begin_layout Standard \SpecialCharNoPassThru LyX は、発生しているイベントを、非同期的にクライアントに通知することができます。いまのところ、ユーザーがある \begin_inset Flex Ruby status collapsed \begin_layout Plain Layout 鍵 \begin_inset Argument post:1 status collapsed \begin_layout Plain Layout キー \end_layout \end_inset \end_layout \end_inset 列を関数「notify」に割り当てているときのみ、\SpecialCharNoPassThru LyX はこの通知を行います。\SpecialCharNoPassThru LyX が送る文字列の書式は \end_layout \begin_layout Quote \begin_inset Flex Code status collapsed \begin_layout Plain Layout NOTIFY: \end_layout \end_inset \emph on 鍵列 \end_layout \begin_layout Standard となっていて、 \emph on 鍵列 \emph default は、ユーザーが実際に打鍵した鍵列の印字表現になります。 \end_layout \begin_layout Standard この機構は、\SpecialCharNoPassThru LyX のコマンド群を拡張してマクロを実装するのに使用することができます。なんらかの鍵列を「notify」に割り当ててください。それから出力パイプで待 機するクライアントを起動し、鍵列に応じたコマンドを読み込み、一つないし複数の\SpecialCharNoPassThru LyX コマンドを発行する\SpecialCharNoPassThru LyX 要求と\SpecialCharNoPassThru LyX コールを使用する関数を開始するのです。 \end_layout \begin_layout Section 単純な\SpecialCharNoPassThru LyX サーバープロトコル \end_layout \begin_layout Standard \SpecialCharNoPassThru LyX は、セッション管理に使用することができる単純なプロトコルを実装しています。メッセージは、すべて \end_layout \begin_layout Quote LYXSRV: \emph on クライアント名 \emph default : \emph on プロトコルメッセージ \end_layout \begin_layout Standard の書式をしており、 \emph on プロトコルメッセージ \emph default は「hello」ないし「bye」です。クライアントから「hello」を受け取ると、\SpecialCharNoPassThru LyX はメッセージを聴いていることをクライアントに伝えるために返答をし、\SpecialCharNoPassThru LyX が終了することをクライアントに伝えるのには、\SpecialCharNoPassThru LyX が「bye」を送信します。 \end_layout \begin_layout Section DVIとPDFの遡及検索 \end_layout \begin_layout Standard DVI/PDFビューア \begin_inset Foot status collapsed \begin_layout Plain Layout PDFの遡及検索機能を提供しているビューアには、KDE/Linux上のOkularとMac OS X上のSkim、Windows上のSumatraPDFがありま す。 \end_layout \end_inset には、遡及検索(reverse searchないしinverse searchと呼ばれます)機能を提供しているものがあります。これを使えば、DVI/PDF出力の 特定の場所をクリックすることによって、\SpecialCharNoPassThru LyX の文書中で対応する行にカーソルを移動させることができます。これを実現するためには、ビューアは\SpecialCharNoPassThru LyX と情報交換を行う必 要があります。これは、命名パイプ( \emph on lyxpipe \emph default )を使用するか、\SpecialCharNoPassThru LyX が作業ディレクトリに生成するUNIXドメインソケット( \emph on lyxsocket \emph default )を使用する(これは \begin_inset Flex Code status collapsed \begin_layout Plain Layout lyxclient \end_layout \end_inset プログラムが\SpecialCharNoPassThru LyX と通信するのに使用している方法です)ことで、\SpecialCharNoPassThru LyX サーバを経由して実現することができます。場合によっては、ビューアと\SpecialCharNoPassThru LyX を橋渡しする補助スク リプトを必要とすることがあるかもしれませんが、それ以外は、ビューアは\SpecialCharNoPassThru LyX と直接通信することができます。これは、選んだビューアと基本ソフトに依存します。また、必 要とされるビューアの設定法と遡及検索が実際に行われる方法とにも依存します。したがって、下記では個々のビューア毎の遡及検索の設定の仕方を説明することとします。その 前に、DVI/PDF出力で遡及検索を有効にするためには、一般に何が必要とされるかを説明します。 \end_layout \begin_layout Subsection \begin_inset CommandInset label LatexCommand label name "subsec:遡及検索" \end_inset 自動有効化 \end_layout \begin_layout Standard \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout 文書\SpecialChar menuseparator 設定\SpecialChar menuseparator 出力 \end_layout \end_inset メニューで \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout 出力と同期 \end_layout \end_inset オプションを有効にすれば、ほとんどの場合、\SpecialCharNoPassThru LyX がすべてをうまくこなしてくれます。その場合、\SpecialCharNoPassThru LyX は、自動的に、必要なSync\SpecialCharNoPassThru TeX マクロ(PDFの場合)や、s rcltxパッケージ(DVIの場合)を挿入してくれます。このオプションは、 \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout 表示/更新 \end_layout \end_inset ツールバーからも容易にアクセスすることができます。 \end_layout \begin_layout Standard もし、これとは別の設定が必要な場合には、 \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout 文書\SpecialChar menuseparator 設定\SpecialChar menuseparator 出力\SpecialChar menuseparator 出力と同期 \end_layout \end_inset の直下にあるドロップダウンボックスから、自製マクロを選択ないし入力することができます。 \end_layout \begin_layout Standard 方式として \begin_inset Flex Code status collapsed \begin_layout Plain Layout \backslash synctex=1 \end_layout \end_inset を用いると、gzip圧縮が有効となることに注意してください。使用しているビューアがgzip圧縮をサポートしていない場合には、代わりに \begin_inset Flex Code status collapsed \begin_layout Plain Layout \backslash synctex=-1 \end_layout \end_inset を指定してください。 \end_layout \begin_layout Standard また、 \begin_inset Flex Code status collapsed \begin_layout Plain Layout srcltx \end_layout \end_inset パッケージや \begin_inset Flex Code status collapsed \begin_layout Plain Layout src-specials \end_layout \end_inset を取り込むと、組版上、不具合が生じることがあるのでご注意ください。したがって、 \begin_inset Flex Code status collapsed \begin_layout Plain Layout srcltx \end_layout \end_inset パッケージや \begin_inset Flex Code status collapsed \begin_layout Plain Layout src-specials \end_layout \end_inset を使用している場合には、最終版を組版する際には、出力同期を無効にするべきです。 \end_layout \begin_layout Standard 自動設定でカバーされている範囲よりも、さらに特殊なものが必要な場合には、出力同期を手動で設定する仕方を述べた次節をお読みください。自動設定で事足りる場合には、自 動設定・手動設定ともに必要となるビューア上の設定を述べた、第 \begin_inset CommandInset ref LatexCommand ref reference "subsec:特定のビューアを設定して使うには" \end_inset 節に進むことができます。 \end_layout \begin_layout Subsection 手動有効化 \end_layout \begin_layout Standard \SpecialCharNoPassThru LaTeX は、遡及検索のために複数の方法を提供しています。ある方法は \begin_inset Flex Code status collapsed \begin_layout Plain Layout latex/pdflatex \end_layout \end_inset プログラムに組み込まれており、他の方法は外部パッケージとして提供されています。どちらを選択するかは、お使いの\SpecialCharNoPassThru LaTeX 頒布版が既に特定の方法を提供しているか(組 み込みによる方法は比較的新しいものです)と、お使いのビューアがそれに対応しているかに依存します。使用可能な方法を以下に述べます。 \end_layout \begin_layout Subsubsection* src-special経由のDVI組み込み検索(DVIのみ) \end_layout \begin_layout Standard この方法は、DVIファイルに遡及検索に必要な情報を追加するものです。これは、かなり前の\SpecialCharNoPassThru LaTeX から利用可能となっており(比較的最近の\SpecialCharNoPassThru LaTeX 頒布版はすべて対 応しています)、安定して動作します。これを有効にするには、 \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout 設定\SpecialChar menuseparator ファイル処理\SpecialChar menuseparator 変換子 \end_layout \end_inset の \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout LaT \begin_inset ERT status collapsed \begin_layout Plain Layout {} \end_layout \end_inset eX (plain)->DVI \end_layout \end_inset ないし \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout LaT \begin_inset ERT status collapsed \begin_layout Plain Layout {} \end_layout \end_inset eX (plain)->DraftDVI \end_layout \end_inset 変換子を \begin_inset Flex Code status collapsed \begin_layout Plain Layout latex -src-specials $$i \end_layout \end_inset に変更します。もしこれが動作しないときは、お使いの\SpecialCharNoPassThru LaTeX エンジンが違うオプションを必要としていないか確認してください(頒布版によっては文法の異なることがあり ます)。 \end_layout \begin_layout Subsubsection* 外部パッケージ(PDFSyncおよびsrcltx) \end_layout \begin_layout Standard \emph on pdfsync \emph default および \emph on srcltx \emph default パッケージは、PDF出力(pdflatex経由)およびDVI出力での遡及検索を提供します。これを有効にするには、\SpecialCharNoPassThru LyX プリアンブルで以下のようにパッケージを読み 込んでください。 \end_layout \begin_layout Itemize PDFの遡及検索には \begin_inset Flex Code status collapsed \begin_layout Plain Layout \backslash usepackage{pdfsync} \end_layout \end_inset \end_layout \begin_layout Itemize DVIの遡及検索には \begin_inset Flex Code status collapsed \begin_layout Plain Layout \backslash usepackage[active]{srcltx} \end_layout \end_inset \end_layout \begin_layout Standard と書きます。DVIとPDFの両方の遡及検索を実行できるようにするためには、プリアンブルに以下の行を挿入する方法があります。 \end_layout \begin_layout LyX-Code \backslash usepackage{ifpdf} \begin_inset Newline newline \end_inset \backslash ifpdf \begin_inset Newline newline \end_inset \backslash usepackage{pdfsync} \begin_inset Newline newline \end_inset \backslash else \begin_inset Newline newline \end_inset \backslash usepackage[active]{srcltx} \begin_inset Newline newline \end_inset \backslash fi \end_layout \begin_layout Standard このようにすれば、DVIでもPDF(pdflatex)でも正しいパッケージを使いながら、ファイルを閲覧することができます。 \end_layout \begin_layout Standard なお、PDFSyncは、文書の出力レイアウトに干渉する可能性があるので注意してください。したがって、仕上がり文書ではPDFSyncを無効にすることをお勧めします 。 \end_layout \begin_layout Subsubsection* Sync\SpecialCharNoPassThru TeX を使った組み込み遡及検索(DVIおよびPDF) \end_layout \begin_layout Standard \begin_inset Flex Code status collapsed \begin_layout Plain Layout (pdf)latex \end_layout \end_inset の最近のバージョンは、PDFおよびDVI両方の遡及検索を組み込みでサポートしています。このいわゆる \emph on Sync\SpecialCharNoPassThru TeX \emph default 機能は、主に、PDFSyncパッケージをpdftexプログラムへ統合したことと、それをsrc-specialsアプローチへ取り込んだことの成果です。これを使用す るためには、少なくとも\SpecialCharNoPassThru TeX Live 2008か最近のMik\SpecialCharNoPassThru TeX 頒布版が必要です。また、既にSync\SpecialCharNoPassThru TeX サポートを提供しているPDFビューアは少ししかありま せん(Mac上のSkimとWindows上のSumatraPDF)。 \end_layout \begin_layout Standard DVI出力でSync\SpecialCharNoPassThru TeX を有効にするには、 \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout 設定\SpecialChar menuseparator ファイル処理\SpecialChar menuseparator 変換子 \end_layout \end_inset の \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout LaT \begin_inset ERT status collapsed \begin_layout Plain Layout {} \end_layout \end_inset eX (plain)->DVI \end_layout \end_inset ないし \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout LaT \begin_inset ERT status collapsed \begin_layout Plain Layout {} \end_layout \end_inset eX (plain)->DraftDVI \end_layout \end_inset 変換子を \begin_inset Flex Code status collapsed \begin_layout Plain Layout latex -synctex=1 $$i \end_layout \end_inset に変更します。PDF出力用には、 \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout LaT \begin_inset ERT status collapsed \begin_layout Plain Layout {} \end_layout \end_inset eX (pdflatex)->PDF (pdflatex) \end_layout \end_inset 変換子を \begin_inset Flex Code status collapsed \begin_layout Plain Layout pdflatex -synctex=1 $$i \end_layout \end_inset に変更してください。また、ビューアをSync\SpecialCharNoPassThru TeX で使うのに設定を行う必要があるかどうか、お使いのビューアの取扱説明書をご確認ください。 \begin_inset Foot status collapsed \begin_layout Plain Layout \begin_inset Flex Code status collapsed \begin_layout Plain Layout -synctex=1 \end_layout \end_inset オプションは、gzip圧縮を有効にします。お使いのビューアがgzip圧縮をサポートしていない場合には、代わりに \begin_inset Flex Code status collapsed \begin_layout Plain Layout -synctex=-1 \end_layout \end_inset を使用してください。 \end_layout \end_inset \end_layout \begin_layout Subsection 特定のビューアを設定して使うには \begin_inset CommandInset label LatexCommand label name "subsec:特定のビューアを設定して使うには" \end_inset \end_layout \begin_layout Subsubsection* Xdvi(全プラットフォーム) \end_layout \begin_layout Standard \SpecialCharNoPassThru LyX は、 \begin_inset Flex Code status collapsed \begin_layout Plain Layout lyxclient \end_layout \end_inset プログラムを自動的に使うのに必要なフックを、既に提供しているので、 \begin_inset Flex Code status collapsed \begin_layout Plain Layout xdvi \end_layout \end_inset を使用する場合には、DVI遡及検索を実行するのに他にするべきことはありません。使用中の文書を上記で述べたように設定するだけです(遡及検索は、Ctrl-クリックか 、Mac OS X上ではAlt-クリックで始動します)。 \end_layout \begin_layout Standard しかし、何らかの理由で、\SpecialCharNoPassThru LyX と通信するのにソケットではなく命名パイプを使用したい場合には、 \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout 設定\SpecialChar menuseparator ファイル処理\SpecialChar menuseparator ファイル書式 \end_layout \end_inset のDVIビューアを \begin_inset Flex Code status collapsed \begin_layout Plain Layout xdvi -editor "lyxeditor.sh %f %l" \end_layout \end_inset ( \begin_inset Flex Code status collapsed \begin_layout Plain Layout lyxeditor.sh \end_layout \end_inset は適切なスクリプト名)に変更してください。たとえば、最低限のシェルスクリプトは \end_layout \begin_layout LyX-Code #!/bin/sh \begin_inset Newline newline \end_inset LYXPIPE="/path/to/lyxpipe" \begin_inset Newline newline \end_inset COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2" \begin_inset Newline newline \end_inset echo "$COMMAND" > "${LYXPIPE}".in || exit \begin_inset Newline newline \end_inset read TMP < "${LYXPIPE}".out || exit \end_layout \begin_layout Standard のようになります。ここで \begin_inset Flex Code status collapsed \begin_layout Plain Layout /path/to/lyxpipe \end_layout \end_inset は、 \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout 設定\SpecialChar menuseparator パス \end_layout \end_inset で指定したLy \begin_inset ERT status open \begin_layout Plain Layout {} \end_layout \end_inset XServerパイプのパスを指定してください \begin_inset Foot status collapsed \begin_layout Plain Layout ソース頒布版の \begin_inset Flex Code status collapsed \begin_layout Plain Layout development/tools \end_layout \end_inset フォルダには、ユーザが設定した \emph on lyxpipe \emph default を探し出す \begin_inset Flex Code status collapsed \begin_layout Plain Layout lyxeditor \end_layout \end_inset スクリプトがあります。 \end_layout \end_inset 。 \end_layout \begin_layout Subsubsection* MacDviX(Mac OS X) \end_layout \begin_layout Standard \begin_inset Flex Code status collapsed \begin_layout Plain Layout /Applications/MacDviX_Folder/calleditor.script \end_layout \end_inset の終わりに \end_layout \begin_layout LyX-Code /Applications/Ly \begin_inset ERT status collapsed \begin_layout Plain Layout {} \end_layout \end_inset X.app/Contents/MacOS/lyxeditor "$2" $1 \begin_inset Newline newline \end_inset exit 1 \end_layout \begin_layout Standard という行を付け加えてください。Applicationsフォルダ以外の場所に\SpecialCharNoPassThru LyX を導入した場合には、それに従って上記の行を修正してください。 \end_layout \begin_layout Standard 遡及検索は、Alt-クリック(OPTION-クリック)で始動します。 \end_layout \begin_layout Subsubsection* Skim(Mac OS X) \end_layout \begin_layout Standard \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout 設定\SpecialChar menuseparator ファイル処理\SpecialChar menuseparator ファイル書式\SpecialChar menuseparator PDF (pdflatex) \end_layout \end_inset のビューア設定に \begin_inset Flex Code status collapsed \begin_layout Plain Layout open -a Skim.app $$i \end_layout \end_inset と入力し、 \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout Skim\SpecialChar menuseparator 設定\SpecialChar menuseparator Sync \end_layout \end_inset でLy \begin_inset ERT status collapsed \begin_layout Plain Layout {} \end_layout \end_inset Xを選択してください。 \end_layout \begin_layout Standard 遡及検索は、COMMAND-SHIFT-クリックで始動します。 \end_layout \begin_layout Subsubsection* Okular (KDE) \end_layout \begin_layout Standard \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout 設定\SpecialChar menuseparator Okularを設定\SpecialChar ldots \SpecialChar menuseparator 編集 \end_layout \end_inset で「カスタムテキストエディタ」を選択し、コマンドに \begin_inset Flex Code status collapsed \begin_layout Plain Layout lyxclient -g %f %l \end_layout \end_inset を加えてください。 \end_layout \begin_layout Standard 遡及検索は、SHIFT-クリックで始動します。 \end_layout \begin_layout Subsubsection* YAP(Windows) \end_layout \begin_layout Standard yapを起動し、 \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout View\SpecialChar menuseparator Options \end_layout \end_inset メニューを選択し、「Inverse DVI Search」タブを選択します。「New\SpecialChar ldots 」ボタンをクリックして開くウィンドウの「Name:」フィールドに「\SpecialCharNoPassThru LyX Editor」(または自分の好きな名称)と入力してください。「\SpecialChar ldots 」というラベルのボタンをクリックしてファイルダイアログを開き、バッチファイル \begin_inset Flex Code status collapsed \begin_layout Plain Layout lyxeditor.bat \end_layout \end_inset (以下参照)のあるディレクトリを見つけます。 \begin_inset Flex Code status collapsed \begin_layout Plain Layout lyxeditor.bat \end_layout \end_inset を選択してプログラムの引数を \begin_inset Flex Code status collapsed \begin_layout Plain Layout %f %l \end_layout \end_inset と指定してください。 \begin_inset Flex Code status collapsed \begin_layout Plain Layout lyxeditor.bat \end_layout \end_inset は、 \emph on lyxpipe \emph default を通じて\SpecialCharNoPassThru LyX と通信するためのラッパとして使用され、以下のようになっています。 \end_layout \begin_layout LyX-Code @echo off \begin_inset Newline newline \end_inset echo LYXCMD:revdvi:server-goto-file-row:%1 %2> \backslash \backslash . \backslash pipe \backslash lyxpipe.in \begin_inset Newline newline \end_inset type \backslash \backslash . \backslash pipe \backslash lyxpipe.out \end_layout \begin_layout Standard \SpecialCharNoPassThru LyX で指定した\SpecialCharNoPassThru LyX Serverパイプパスが、 \begin_inset Flex Code status collapsed \begin_layout Plain Layout \backslash \backslash . \backslash pipe \backslash lyxpipe \end_layout \end_inset となっていることを確認するか、 \begin_inset Flex Code status collapsed \begin_layout Plain Layout lyxeditor.bat \end_layout \end_inset ラッパの方を適切に修正してください。 \end_layout \begin_layout Standard yapでは、遡及検索はダブルクリックで始動します。 \end_layout \begin_layout Subsubsection* SumatraPDF(Windows) \end_layout \begin_layout Standard SumatraPDFを遡及検索で使用するためには、 \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout 設定\SpecialChar menuseparator ファイル処理\SpecialChar menuseparator ファイル書式\SpecialChar menuseparator PDF (pdflatex) \end_layout \end_inset のビューア設定で \begin_inset Flex Code status collapsed \begin_layout Plain Layout SumatraPDF -inverse-search \begin_inset Quotes eld \end_inset lyxeditor.bat %f %l \begin_inset Quotes erd \end_inset \end_layout \end_inset ( \begin_inset Flex Code status collapsed \begin_layout Plain Layout lyxeditor.bat \end_layout \end_inset は上記のラッパ)と入力してください。SumatraPDF.exeがコマンドPATHにない場合、フルファイル名を使用してください。 \end_layout \begin_layout Standard 遡及検索はダブルクリックで始動します。 \end_layout \begin_layout Subsubsection* YAP(Cygwin) \end_layout \begin_layout Standard まずはじめに、yapがWindows環境での既定のDVIビューアになっていることを確認してから、yapを起動し、 \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout View\SpecialChar menuseparator Options \end_layout \end_inset メニューを選択し、「Inverse DVI Search」タブを選択します。「New\SpecialChar ldots 」ボタンをクリックして開くウィンドウの「Name:」フィールドに「\SpecialCharNoPassThru LyX Editor」(または自分の好きな名称)と入力してください。「\SpecialChar ldots 」というラベルのボタンをクリックしてファイルダイアログを開き、バッチファイル \begin_inset Flex Code status collapsed \begin_layout Plain Layout lyxeditor.exe \end_layout \end_inset プログラム(これは、Cygwinでは既定で\SpecialCharNoPassThru LyX 実行ファイルとともに導入されます)のあるディレクトリを見つけます。 \begin_inset Flex Code status collapsed \begin_layout Plain Layout lyxeditor.exe \end_layout \end_inset を選択してプログラムの引数を \begin_inset Flex Code status collapsed \begin_layout Plain Layout -g %f %l \end_layout \end_inset と指定してください。これによって、\SpecialCharNoPassThru LyX との通信に \emph on lyxsocket \emph default が使用されるようになります。何らかの理由で \emph on lyxpipe \emph default を使用したい場合には、 \begin_inset Flex Code status collapsed \begin_layout Plain Layout -g \end_layout \end_inset オプションを削除して、\SpecialCharNoPassThru LyX 設定で\SpecialCharNoPassThru LyX Serverパイプパスを指定することを忘れないでください。 \end_layout \begin_layout Standard yapでは、遡及検索はダブルクリックで始動します。 \end_layout \begin_layout Subsubsection* SumatraPDF(Cygwin) \end_layout \begin_layout Standard SumatraPDFを遡及検索で使用するためには、 \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout 設定\SpecialChar menuseparator ファイル処理\SpecialChar menuseparator ファイル書式\SpecialChar menuseparator PDF (pdflatex) \end_layout \end_inset のビューア設定で \begin_inset Flex Code status collapsed \begin_layout Plain Layout SumatraPDF.sh \end_layout \end_inset と入力してください。ここで \begin_inset Flex Code status collapsed \begin_layout Plain Layout SumatraPDF.sh \end_layout \end_inset は以下のようなスクリプトです(お使いのコマンドパスに置きます。 \begin_inset Flex Code status collapsed \begin_layout Plain Layout /usr/local/bin \end_layout \end_inset がもっとも良い選択肢でしょう)。 \end_layout \begin_layout LyX-Code #!/bin/bash \begin_inset Newline newline \end_inset cd $(dirname $1) \begin_inset Newline newline \end_inset SumatraPDF -inverse-search "lyxeditor -g %f %l" $(basename $1) \end_layout \begin_layout Standard SumatraPDFは、Windowsネイティブのアプリケーションであり、\SpecialCharNoPassThru LyX のCygwin版が使用するPOSIXパスを理解しないので、このラッパスクリプトが 必要となります。SumatraPDF.exeがお使いのコマンドパスにない場合は、上記のスクリプトでPOSIXのフルパスを使用してください。 \begin_inset Flex Code status collapsed \begin_layout Plain Layout -g \end_layout \end_inset は \emph on lyxsocket \emph default 経由の通信を有効にします。ここでも、 \emph on lyxpipe \emph default を使用したい場合には、 \begin_inset Flex Code status collapsed \begin_layout Plain Layout -g \end_layout \end_inset オプションを削除して、\SpecialCharNoPassThru LyX 設定で\SpecialCharNoPassThru LyX Serverパイプパスを指定することを忘れないでください。 \end_layout \begin_layout Standard 遡及検索はダブルクリックで始動します。 \end_layout \begin_layout Section 順検索 \end_layout \begin_layout Standard 順検索とは、名前が示すとおり、いわば遡及検索の「逆」を意味します。すなわち、\SpecialCharNoPassThru LyX 内部から、ビューアに特定の箇所を表示させることを可能にします。(以下に説明する ように)もし順検索の準備ができていれば、カーソルを\SpecialCharNoPassThru LyX 文書の好きなところに置いて、 \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout 移動\SpecialChar menuseparator 順検索 \end_layout \end_inset を選択すると(あるいはマウスの右クリックで表示される文脈依存メニューから \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout 順検索 \end_layout \end_inset を選択してもよい)、ビューアも同じ箇所に移動します。もちろん、使用しているビューアが、この機能をサポートしていなくてはなりません。 \end_layout \begin_layout Standard 順検索を有効にするためには、生成されたPDF/DVI出力ファイルに、\SpecialCharNoPassThru TeX ソースに関する情報を追加する必要があります。これは、第 \begin_inset CommandInset ref LatexCommand ref reference "subsec:遡及検索" \end_inset 節に述べられている方法で実行することができます。 \end_layout \begin_layout Standard 次に、 \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout ツール\SpecialChar menuseparator 設定\SpecialChar menuseparator 出力\SpecialChar menuseparator 一般 \end_layout \end_inset で自分の使うビューアを利用するように、\SpecialCharNoPassThru LyX を設定する必要があります。いくつかのビューアについては、試験済みの設定が前もって準備されており、ドロップダウンリスト から選択することができます。これらの設定の何れも意にそぐわない場合には、ご自身で適切な設定を見つけ出して入力しなくてはなりません。定義文法は、以下の変数を使用し ます。 \end_layout \begin_layout Itemize \begin_inset Flex Code status collapsed \begin_layout Plain Layout $$n \end_layout \end_inset :行番号 \end_layout \begin_layout Itemize \begin_inset Flex Code status collapsed \begin_layout Plain Layout $$t \end_layout \end_inset :書き出された(一時).texファイル名(パスを除く) \end_layout \begin_layout Itemize \begin_inset Flex Code status collapsed \begin_layout Plain Layout $$f \end_layout \end_inset :書き出された(一時).texファイル名(パスを含む) \end_layout \begin_layout Itemize \begin_inset Flex Code status collapsed \begin_layout Plain Layout $$o \end_layout \end_inset :書き出された出力ファイル名(どちらが一時ディレクトリに存在するかに依存して、dviあるいはpdf)。 \end_layout \begin_layout Standard yap・xdvi・okular \begin_inset Foot status collapsed \begin_layout Plain Layout \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout ツール\SpecialChar menuseparator 設定\SpecialChar menuseparator ファイル処理\SpecialChar menuseparator ファイル形式 \end_layout \end_inset で \begin_inset Flex Code status collapsed \begin_layout Plain Layout okular \twohyphens unique \end_layout \end_inset と設定すると良いかもしれません。 \end_layout \end_inset ・Sumatra PDFなど、一部のビューアでしか、完全な順検索機能は提供されていないことに注意してください \begin_inset Foot status collapsed \begin_layout Plain Layout Sumatraの場合には、 \begin_inset CommandInset href LatexCommand href target "http://www.istri.fr/zip/CMCDDE.zip" \end_inset からダウンロードできるCMCDDEが必要です。 \end_layout \end_inset 。広く使われているPDFビューアの多く(特にAdobe Reader)は、順検索を全く提供していませんが、他の一部のビューア(たとえばEvinceやxpdf)で は、少なくとも、文書を読み込み直したり、ファイルの特定ページに移動することはできますので、少なくとも「近く」には移動することができます。この後者の機能は、syn ctexの外部コールで提供されています(事前に用意されている用例をご覧ください)。 \end_layout \begin_layout Standard 順検索は、DVI出力とPDF出力の双方で動作します。\SpecialCharNoPassThru LyX は、過去にあなたが使用したプレビュー形式をチェックして(つまり、一時ディレクトリにどちらの形式が存在す るかをチェックして)、その形式に適切な設定を選択します。 \end_layout \begin_layout Chapter 特別な文書クラス \end_layout \begin_layout Section A&Aの論文 \end_layout \begin_layout Standard \noun on Peter Sütterlin文 \end_layout \begin_layout Subsection はじめに \end_layout \begin_layout Standard この節では、文書クラス \family typewriter aa.cls \family default 第5.01版を使用して科学雑誌 \emph on Astronomy and Astrophysics \emph default (『天文学と宇宙物理学』:www.edpsciences.fr/aa/ \begin_inset Flex URL status collapsed \begin_layout Plain Layout http://www.edpsciences.fr/aa/ \end_layout \end_inset )に投稿する論文を執筆するための\SpecialCharNoPassThru LyX の使用法を説明します。このパッケージは、FTPサイト \family default \begin_inset Separator parbreak \end_inset \end_layout \begin_layout Standard \align center \begin_inset VSpace medskip \end_inset \begin_inset Flex URL status collapsed \begin_layout Plain Layout ftp://ftp.edpsciences.org/pub/aa/readme.html \end_layout \end_inset \begin_inset VSpace medskip \end_inset \end_layout \begin_layout Standard \noindent からダウンロードすることができます。 \end_layout \begin_layout Standard このパッケージには取扱説明書がついていますが、本節は、本来の取扱説明書の代わりとなることを意図したものではなく、あなたの論文を正しい様式に整えるための小さな案内 書であるに過ぎません。 \end_layout \begin_layout Standard この学術誌の出版元は、2001年1月1日以降、Springer社からEDP Science社に変更されていることにご注意ください。この出版社の変更によって、th esaurusコマンドの廃止など、スタイルファイルに若干の変更が加わっています。\SpecialCharNoPassThru LyX のaaクラスは、スタイルファイルの最新版(第5.01版)をサポートしています 。もし古い版が装備されている場合には、更新してください。互換性のために、古い(第4版)レイアウトは、 \family sans article (A&A V4) \family default として残してあります。 \family typewriter $\SpecialCharNoPassThru LyX Dir/layouts/aapaper.layout \family default のコメントをご参照ください。 \end_layout \begin_layout Subsection 最初の一歩 \end_layout \begin_layout Standard \SpecialCharNoPassThru LyX とともに頒布されている例示用のひな型を土台として、書き始めることをお勧めします。ひな型を使用しない場合には、以下の設定にしてください。 \end_layout \begin_layout Itemize \family sans 文書\SpecialChar menuseparator 設定 \family default ダイアログで \family sans article (A&A) \family default を選択してください(まぁ、これは自明ですね)。 \end_layout \begin_layout Itemize \family sans ページレイアウト \family default オプションは変更しないで、既定値のままに設定しておいてください。全体のレイアウトはマクロが行うので、何も変更してはいけません。 \end_layout \begin_layout Subsection へッダ部 \end_layout \begin_layout Standard 最初に入力すべきものは、へッダ情報です。ヘッダ情報には、以下の7つの項目があり、いくつかは必須ではありません。 \end_layout \begin_layout Itemize \family sans タイトル \family default :[必須] \end_layout \begin_layout Itemize \family sans サブタイトル \family default :[非必須] \end_layout \begin_layout Itemize \family sans 著者 \family default :[必須] \end_layout \begin_layout Itemize \family sans 住所 \family default :[必須] \end_layout \begin_layout Itemize \family sans 抜き刷り \family default :[非必須]著者が複数いる場合、抜き刷りの送付を依頼するのに連絡すべき人を記す。 \end_layout \begin_layout Itemize \family sans メール \family default :[非必須]連絡用の電子メールアドレス。 \end_layout \begin_layout Itemize \family sans 日付 \family default :[必須]推奨されるフォーマットは、 \family typewriter Received: <日付>; Accepted <日付> \family default です。 \end_layout \begin_layout Standard \family typewriter \backslash maketitle \family default コマンドは、へッダが終了した場所に、\SpecialCharNoPassThru LyX が自動的に入れてくれるので、手動で挿入する必要はありません。各項目の順序は関係ありませんが、見た目のためと、実際の文書 のレイアウトに合わせるために、上記の順序を維持しておくと良いでしょう。 \end_layout \begin_layout Standard 現住所の付記などのために、へッダ部に脚注を挿入したい場合には、 \family sans 挿入\SpecialChar menuseparator 脚注 \family default を使用して標準の脚注を挿入してください。この場合には、\SpecialCharNoPassThru LyX は自動的に \family typewriter \backslash thanks{} \family default を使用します。 \end_layout \begin_layout Standard これらのトピックの他に、このマクロは、\SpecialCharNoPassThru LyX が対応していない、以下の3つの\SpecialCharNoPassThru LaTeX コマンドを使用します。 \end_layout \begin_layout Itemize 複数の著者名あるいは所属名を区切るための \family typewriter \backslash and \end_layout \begin_layout Itemize 著者と所属の対応付けをするための \family typewriter \backslash inst{<番号>} \family default 。所属は、 \family sans 住所 \family default フィールドに現れる順に番号が付けられるので、各著者に番号マーカーを置く必要があります。 \end_layout \begin_layout Itemize \family typewriter \backslash email{アドレス} \family default は、至急連絡用に電子メールアドレスを付記します。 \end_layout \begin_layout Standard いずれの場合にも、\SpecialCharNoPassThru LyX 中に対応したコマンドを入力し、\SpecialCharNoPassThru LaTeX コードとしてマークしてください。 \begin_inset Flex Code status collapsed \begin_layout Plain Layout $\SpecialCharNoPassThru LyX Dir/examples \end_layout \end_inset にある用例を参照してください。 \end_layout \begin_layout Subsection 概要 \end_layout \begin_layout Standard 概要は、へッダ部の直後に置きます。第5版から、概要は環境からコマンドに変更され、一段落に限るという制限が加えられました。さらに、ここにはキーワードを含む項目を入 れなくてはなりません。これは、まだ\SpecialCharNoPassThru LyX では実装されていないため、\SpecialCharNoPassThru LaTeX コマンド \family typewriter \backslash keywords{} \family default を手動で入力し、\SpecialCharNoPassThru LaTeX コードとしてマークする必要があります。用例にある論文を参照してください。 \end_layout \begin_layout Subsection サポートされる環境 \end_layout \begin_layout Standard A&A論文用レイアウトでは、文章を構造化するために、以下の環境がサポートされています。 \end_layout \begin_layout Itemize \family sans 標準 \end_layout \begin_layout Itemize \family sans 節 \end_layout \begin_layout Itemize \family sans 小節 \end_layout \begin_layout Itemize \family sans 小々節 \end_layout \begin_layout Itemize \family sans 箇条書き(記号) \end_layout \begin_layout Itemize \family sans 箇条書き(連番) \end_layout \begin_layout Itemize \family sans 箇条書き(記述) \end_layout \begin_layout Itemize \family sans キャプション \end_layout \begin_layout Itemize \family sans 概要 \end_layout \begin_layout Itemize \family sans 謝辞(Acknowledgment) \end_layout \begin_layout Itemize \family sans 書誌情報 \end_layout \begin_layout Itemize \family sans \SpecialCharNoPassThru LaTeX \end_layout \begin_layout Subsection \SpecialCharNoPassThru LyX でサポートされていないコマンド \end_layout \begin_layout Standard \SpecialCharNoPassThru LyX の \family sans article (A&A) \family default レイアウトでは、まだサポートされていないコマンドがあります。そのうちいくつかは既に紹介しましたが、網羅するために、以下にすべて列挙しておきます。 \end_layout \begin_layout Itemize \family typewriter \backslash and \end_layout \begin_layout Itemize \family typewriter \backslash email \end_layout \begin_layout Itemize \family typewriter \backslash appendix \end_layout \begin_layout Itemize \family typewriter \backslash authorrunning \end_layout \begin_layout Itemize \family typewriter \backslash inst{} \end_layout \begin_layout Itemize \family typewriter \backslash keywords{} \end_layout \begin_layout Itemize \family typewriter \backslash object{} \end_layout \begin_layout Itemize \family typewriter \backslash titlerunning{} \end_layout \begin_layout Standard これらのコマンドのいずれかを使いたい場合には、自分で入力する必要があります。 \series bold これを\SpecialCharNoPassThru LaTeX コマンドとしてマークすることを忘れないで下さい。 \end_layout \begin_layout Subsection 図フロートおよび表フロート \end_layout \begin_layout Standard \SpecialCharNoPassThru LyX は、必要なフロート環境 \family sans figure \family default ・ \family sans figure* \family default ・ \family sans table \family default ・ \family sans table* \family default をサポートしていますので、ここでは詳しい説明はしません。 \emph on ユーザーの手引き \emph default をご覧ください。ただ、表は左揃えにしなくてはならないことに注意して下さい。そうするためには、表を選択して、 \family sans 編集\SpecialChar menuseparator 段落設定 \family default で配置を変更してください。 \end_layout \begin_layout Standard 一つだけ、特別なものがあります。それは、図横にキャプションを配置する図です。この図を作成するには、以下のようにしなくてはなりません。 \end_layout \begin_layout Enumerate \family sans 挿入\SpecialChar menuseparator フロート\SpecialChar menuseparator 図 \family default を使って、幅広の図フロートを作成します。それから、図フロートのラベルを右クリックして \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout 設定\SpecialChar ldots \end_layout \end_inset を選択し、それで開かれる \family sans フロートの設定 \family default ダイアログで \family sans 段をまたぐ \family default を有効にして、 \family sans OK \family default ボタンを押します。 \end_layout \begin_layout Enumerate キャプション文を入力します。 \end_layout \begin_layout Enumerate キャプションの前にカーソルを移動し、 \family sans Return \family default を押して、カーソルをキャプションの上に移動します。 \end_layout \begin_layout Enumerate 図を挿入します。 \end_layout \begin_layout Enumerate カーソルを図の後ろに置いて、 \family sans 挿入\SpecialChar menuseparator 整形 \bar under \SpecialChar menuseparator \bar default 水平方向の空白 \family default を選択して \family sans 水平方向の空白の設定 \family default ダイアログを開き、 \family sans 空白 \family default ドロップダウンから \family sans 水平フィル \family default を選択して、水平フィルを挿入します。 \end_layout \begin_layout Enumerate \family sans 挿入\SpecialChar menuseparator \SpecialCharNoPassThru TeX コード \family default を選択して、\SpecialCharNoPassThru TeX 差込枠を挿入します。 \end_layout \begin_layout Enumerate \SpecialCharNoPassThru TeX 差込枠中に \family typewriter \backslash parbox[b]{55mm}{ \family default と入力します。 \series bold ここでは波括弧を閉じないでください。 \end_layout \begin_layout Enumerate カーソルをキャプション文の後ろに移動し、 \family sans 挿入\SpecialChar menuseparator \SpecialCharNoPassThru TeX コード \family default を選択して、別の\SpecialCharNoPassThru TeX 差込枠を挿入し、その中に閉じ括弧を入力します 。 \end_layout \begin_layout Standard 例示用論文中の図もご参照ください。 \end_layout \begin_layout Subsection Refereeレイアウト \end_layout \begin_layout Standard 投稿用には、論文を特別なダブルスペースレイアウトに整形しなくてはなりません。このためには、文書クラスに \family typewriter referee \family default オプションを与える必要があります。これは、 \family sans 文書\SpecialChar menuseparator 設定 \family default ダイアログの \family sans 任意設定 \family default クラスオプションフィールドを使って行うことができます。この欄に \family typewriter referee \family default と云う文字列を入力してください。 \end_layout \begin_layout Subsection 例示用論文 \end_layout \begin_layout Standard \family sans Examples \family default ディレクトリには、\SpecialCharNoPassThru LyX で書かれた例示用論文が収録されています。これは、元のマクロパッケージの例示用論文を\SpecialCharNoPassThru LyX 用に直したものです。これはヒントを得るために使用 したり、元の \SpecialCharNoPassThru LaTeX コードと\SpecialCharNoPassThru LyX での書き方の比較に使ったりしてください。 \end_layout \begin_layout Section AAS\SpecialCharNoPassThru TeX \end_layout \begin_layout Standard \noun on Mike Ressler \noun default 文 \end_layout \begin_layout Subsection はじめに \end_layout \begin_layout Standard AAS\SpecialCharNoPassThru TeX は、American Astronomical Society(アメリカ天文学会)が発行するAstrophysical Journal(宇宙物理学雑 誌)同誌のLettersとSupplementを含む)・Astronomical Journal(天文学雑誌)・Publications of the Astronomical Society of the Pacific(太平洋天文学会誌)三誌への電子投稿を可能にするために、同学会が作成したマクロ集 です。\SpecialCharNoPassThru LyX は、これらの文書を生成する上で、なかでも数式・引用・画像処理能力において、優れたツールであることが認識されています。\SpecialCharNoPassThru LyX は、同マクロ第5.0版以降を 必要としており、できればここで説明されている第5.2版以降が望まれます。第5.0版未満の版は、\SpecialCharNoPassThru LaTeX 2.09で使用するよう企図されているため、根本的に\SpecialCharNoPassThru LyX とは互 換性がありません。AAS\SpecialCharNoPassThru TeX パッケージは、以下のAAS\SpecialCharNoPassThru TeX ウェブサイトからダウンロードできるでしょう。 \begin_inset Separator parbreak \end_inset \end_layout \begin_layout Standard \align center \begin_inset VSpace medskip \end_inset \begin_inset Flex URL status collapsed \begin_layout Plain Layout http://www.journals.uchicago.edu/AAS/AAS\SpecialCharNoPassThru TeX \end_layout \end_inset \begin_inset VSpace medskip \end_inset \end_layout \begin_layout Standard パッケージ中には、完備したユーザーの手引きが収録されていますので、\SpecialCharNoPassThru LyX で論文を書き始める前に、その中身を完全に理解しておく必要があります。\SpecialCharNoPassThru LyX は、AASTe Xの全コマンドを理解する必然性をなくすものではなく、すべてを手入力する苦労を減らすだけです。仕上がりの\SpecialCharNoPassThru LaTeX 文書が、論文を投稿しようとしているジャーナルの要 求事項に完全に合致していることを確認するのは、あなたの責任です。 \end_layout \begin_layout Subsection 新しい論文を書き始める \end_layout \begin_layout Standard 論文を書き始めるには、AAS\SpecialCharNoPassThru TeX ひな型ファイルを土台に始めることを強くお勧めします。 \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout ファイル\SpecialChar menuseparator 新規(ひな型使用) \end_layout \end_inset をクリックして、新しいファイル名を入力し、ひな型 \family typewriter aastex.lyx \family default を選んでください。これには、論文原稿のほとんどに共通して使われるフィールドが書き込まれています。書き込まれている文字列(括弧 \family typewriter <> \family default を含む)を正しい情報で上書きしてください。AAS\SpecialCharNoPassThru TeX コマンド・AAS\SpecialCharNoPassThru TeX 環境の多くは、\SpecialCharNoPassThru LyX 中で直接実行することができますが、特に \family typewriter \backslash altaffilmark \family default や \family typewriter \backslash altaffiltext \family default のようにできないものもあります。この二つのコマンドは、ひな型ファイルを開いたとき、赤色に表示されているのですぐ目に入ることでしょう。このようなコマンドは、直接L a\SpecialCharNoPassThru TeX コードを入力して、それを\SpecialCharNoPassThru TeX コードとしてマークしなければなりません。このようなコマンドは、\SpecialCharNoPassThru TeX コードあるいはEvil Red Text(邪悪な赤い文 )と呼ばれます。AAS\SpecialCharNoPassThru TeX 文書に必要とされる \SpecialCharNoPassThru TeX コードを最小にするよう努力はしていますが、まだ望まれるほどにはなっていません。 \end_layout \begin_layout Subsection 論文を書き終わったら \end_layout \begin_layout Standard 論文を満足する水準で書き終え、プレビューや印刷が正しく為されているとしても、まだ学術誌に投稿する前にしなくてはならない「後処理」が残されています。 \end_layout \begin_layout Enumerate 論文を \SpecialCharNoPassThru LaTeX ファイルとして書き出します( \family sans ファイル\SpecialChar menuseparator 書き出し\SpecialChar menuseparator LateX \family default )。 \end_layout \begin_layout Enumerate 出力した \family typewriter .tex \family default ファイルを好きなエディタで編集します。 \family default \begin_inset Separator parbreak \end_inset \end_layout \begin_deeper \begin_layout Enumerate \family typewriter \backslash documentclass \family default コマンドよりも前のコメント行を削除します。 \end_layout \begin_layout Enumerate \family typewriter \backslash usepackage...{fontenc} \family default という行があれば(通常は \family typewriter \backslash documentclass \family default の直後にあります)削除します。また、 \family typewriter \backslash secnumdepth \family default 行があれば、これも削除します。 \end_layout \begin_layout Enumerate \SpecialCharNoPassThru LaTeX プリアンブル中に意図的に置いたコマンド( \family typewriter .tex \family default ファイル中、「User specified \SpecialCharNoPassThru LaTeX commands」というコメントの直後にあります)を除いて、 \family typewriter \backslash makeatletter \family default と \family typewriter \backslash makeatother \family default の間のもの(これらのコマンドを含む)をすべて削除します。 \end_layout \end_deeper \begin_layout Enumerate 編集後のファイルを \SpecialCharNoPassThru LaTeX にかけて、正しく処理されることを確認します。 \end_layout \begin_layout Enumerate 学術誌の要求事項を再読して、ファイル名と書式が正しいことを確認します。 \end_layout \begin_layout Enumerate 投稿してください。 \end_layout \begin_layout Subsection 特定のコマンドに関するコメント \end_layout \begin_layout Standard AAS\SpecialCharNoPassThru TeX ユーザーの手引き( \family typewriter aasguide.tex \family default )に、各AAS\SpecialCharNoPassThru TeX コマンドの詳しい説明があるので、ここでは、各コマンドの使用法の詳細な説明は行いません。そこで、ここではユーザーの手引きに現れるとおりに一覧を 列挙して、必要なところだけコメントを加えることにしましょう。 \end_layout \begin_layout Subsubsection 期待通りに動作するもの \end_layout \begin_layout Standard これらは期待通りに動作するので、ここでは列挙するだけにして、コマンドの説明されている節を挙げておきます。 \family typewriter \backslash documentclass \family default (2.1.1)・ \family typewriter \backslash begin{document} \family default (2.2)・ \family typewriter \backslash title \family default (2.3)・ \family typewriter \backslash author \family default (2.3)・ \family typewriter \backslash affil \family default (2.3)・ \family typewriter \backslash abstract \family default (2.4)・ \family typewriter \backslash keywords \family default (2.5)・ \family typewriter \backslash section \family default (2.7)・ \family typewriter \backslash subsection \family default (2.7)・ \family typewriter \backslash subsubsection \family default (2.7)・ \family typewriter \backslash paragraph \family default (2.7)・ \family typewriter \backslash facility \family default (2.10)・ \family typewriter \backslash begin{displaymath} \family default (2.12)・ \family typewriter \backslash begin{equation} \family default (2.12)・ \family typewriter \backslash begin{eqnarray} \family default (2.12)・ \family typewriter \backslash begin{mathletters} \family default (2.12)・ \family typewriter \backslash begin{thebibliography} \family default (2.13.1)・ \family typewriter \backslash bibitem \family default (2.13.2)・全引用コマンドとその派生(2.13.2)・一般的なgraphicx図コマンド(2.14.1)・ \family typewriter \backslash begin{table} \family default (2.15.4)・ \family typewriter \backslash begin{tabular} \family default (2.15.4)・ \family typewriter \backslash caption \family default (2.15.4)・ \family typewriter \backslash label \family default (他にもあるが特に2.15.4)・ \family typewriter \backslash tablerefs \family default (2.15.5)・ \family typewriter \backslash tablecomments \family default (2.15.5)・ \family typewriter \backslash url \family default (2.17.4)・ \family typewriter \backslash end{document} \family default (2.18)。 \end_layout \begin_layout Standard 以下のスタイルオプションも正しく動作します。 \family typewriter longabstract \family default (2.4)・ \family typewriter preprint \family default (3.2.1)・ \family typewriter preprint2 \family default (3.2.2)・ \family typewriter eqsecnum \family default (3.3)・ \family typewriter flushrt \family default (3.4)。これらは、 \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout 文書\SpecialChar menuseparator 設定 \end_layout \end_inset にある、 \family sans クラスオプション \family default の \family sans 任意設定 \family default ボックスに入力してください。 \end_layout \begin_layout Subsubsection 動作するが、若干説明が必要なもの \end_layout \begin_layout Standard 以下のコマンドは動作しますが、若干の説明が必要です。 \end_layout \begin_layout Itemize 以下の項目は、学術誌の編集者向けに取ってあるものですが、どうしても必要ならば、\SpecialCharNoPassThru LaTeX プリアンブルに入れることができます。 \family typewriter \backslash received \family default ・ \family typewriter \backslash revised \family default ・ \family typewriter \backslash accepted \family default ・ \family typewriter \backslash ccc \family default ・ \family typewriter cpright \family default (すべて 2.1.3)。 \end_layout \begin_layout Itemize 以下の項目は、\SpecialCharNoPassThru LaTeX のプリアンブルに置くことができるもので、これらは、ひな型ファイルには、空の引数と共に含まれています。 \family typewriter \backslash slugcomment \family default (2.1.4)・ \family typewriter \backslash shorttitle \family default (2.1.5)・ \family typewriter \backslash shortauthors \family default (2.1.5)。 \end_layout \begin_layout Itemize \family typewriter \backslash email \family default (2.3)―「単独で」使うことはできますが、段落の途中で使うことはできません。埋め込む必要がある場合には、\SpecialCharNoPassThru TeX コードを使用してください。 \end_layout \begin_layout Itemize \family typewriter \backslash and \family default (2.3)―後ろに{}が付記されます。これはエラーの原因にはなりません。 \end_layout \begin_layout Itemize \family typewriter \backslash notetoeditor \family default (2.6)―「単独で」使うことはできますが、段落の途中で使うことはできません。埋め込む必要がある場合には、\SpecialCharNoPassThru TeX コードを使用してください。 \end_layout \begin_layout Itemize \family typewriter \backslash placetable \family default (2.8)―相互参照用タグを挿入することはできません。手動でタグ名を入力する必要があります。 \end_layout \begin_layout Itemize \family typewriter \backslash placefigure \family default (2.8)— \family typewriter \backslash placetable \family default と同様。 \end_layout \begin_layout Itemize \family typewriter \backslash acknowledgements \family default (2.9)―後ろに{}が付記されます。これはエラーの原因にはなりません。 \end_layout \begin_layout Itemize \family typewriter \backslash appendix \family default (2.11)―後ろに{}が付記されます。これはエラーの原因にはなりません。 \end_layout \begin_layout Itemize \family typewriter \backslash figcaption \family default (2.14.2)―文章のはじめにカーソルを置いて \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout 挿入\SpecialChar menuseparator 短縮タイトル \end_layout \end_inset を選択すれば、非必須のファイル名引数を挿入することができます。「短縮タイトル」とありますが、 \family typewriter \backslash figcaption \family default が必要とする型の非必須引数を挿入します。望むらくはいつの日か改名されることでしょう。 \end_layout \begin_layout Itemize \family typewriter \backslash objectname \family default (2.17.1)―非必須パラメータとしてカタログIDを取る以外は、 \family typewriter \backslash figcaption \family default と同様。 \end_layout \begin_layout Itemize \family typewriter \backslash dataset \family default (2.17.1)―非必須パラメータとしてカタログIDを取る以外は、 \family typewriter \backslash figcaption \family default と同様。 \end_layout \begin_layout Subsubsection 実装されていないため、\SpecialCharNoPassThru TeX コードを使用するもの \end_layout \begin_layout Standard \family typewriter \backslash altaffilmark \family default (2.3)・ \family typewriter \backslash altaffiltext \family default (2.3)・ \family typewriter \backslash eqnum \family default (2.12)・ \family typewriter \backslash setcounter{equation} \family default (2.12)・学術誌名略語(2.12.4)・ \family typewriter \backslash figurenum \family default (2.14.1)・ \family typewriter \backslash epsscale \family default (2.14.1)・ \family typewriter \backslash plotone \family default (2.14.1)・ \family typewriter \backslash plottwo \family default (2.14.1)・ \family typewriter \backslash tablenum \family default (2.15.4)・ \family typewriter \backslash tableline \family default (2.15.4:入れたい場所の後ろに、左側セルの最初の要素として挿入する。表中では、\SpecialCharNoPassThru LyX の方法は使わないでください)・ \family typewriter \backslash tablenotemark \family default (2.15.5)・ \family typewriter \backslash tablenotetext \family default (2.15.5)・補遺(2.17)の大半( \family typewriter \backslash objectname \family default ・ \family typewriter \backslash dataset \family default ・ \family typewriter \backslash url \family default ・ \family typewriter \backslash email \family default を除く。上記参照)・ \family typewriter \backslash singlespace \family default (3.1)・ \family typewriter \backslash doublespace \family default (3.1)・ \family typewriter \backslash onecolumn \family default (3.2)・ \family typewriter \backslash twocolumn \family default (3.2) \end_layout \begin_layout Subsubsection 実装できないもの \end_layout \begin_layout Standard references(2.12.3)環境とdeluxetable(2.14)環境は、少なくとも意味のあるような形で実装することができないので、無視してください。もし、 絶対に、どうしても、deluxetableを使う必要があるならば、テキストエディタで別ファイルとして編集し、 \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout 挿入\SpecialChar menuseparator ファイル \begin_inset Formula $\text{\textipa{}}$ \end_inset \SpecialChar menuseparator 子文書 \end_layout \end_inset を使用して、\SpecialCharNoPassThru LyX ファイルに読み込むことを推奨します。この実例は、 \family typewriter aas_sample.lyx \family default ファイルをご参照ください。 \end_layout \begin_layout Subsection FAQとヒントと技とその他の考察 \end_layout \begin_layout Subsubsection \SpecialCharNoPassThru LyX をAAS\SpecialCharNoPassThru TeX と協調させる \end_layout \begin_layout Standard \SpecialCharNoPassThru LyX に、新しいレイアウトと文書クラスを認識させるには若干コツが要ります。もしうまく行かなかったら、次のようにしてみてください。 \end_layout \begin_layout Enumerate \SpecialCharNoPassThru LaTeX が、AAS\SpecialCharNoPassThru TeX を検出できることを確認してください。AAS\SpecialCharNoPassThru TeX 頒布版に含まれる \family typewriter sample.tex \family default (あるいは \family typewriter table.tex \family default でも可)を、\SpecialCharNoPassThru LaTeX やAAS\SpecialCharNoPassThru TeX とまったく関係のないディレクトリにコピーして、 \family typewriter sample.tex \family default を\SpecialCharNoPassThru LaTeX にかけてください。 \end_layout \begin_layout Enumerate \family typewriter aastex.layout \family default が、\SpecialCharNoPassThru LyX の \family typewriter layouts \family default フォルダにあることを確認してください。 \end_layout \begin_layout Enumerate \SpecialCharNoPassThru LyX 中から \family sans ツール\SpecialChar menuseparator 環境構成 \family default を再度実行し、\SpecialCharNoPassThru LyX を再起動してください。 \end_layout \begin_layout Enumerate ひな型ではなく、通常の新規ファイルを開いてください。AAS\SpecialCharNoPassThru TeX が、 \family sans 文書\SpecialChar menuseparator 設定 \family default のクラス一覧に表示されていますか? \end_layout \begin_layout Standard 既存のAAS\SpecialCharNoPassThru TeX 文書を処理する際に、AAS\SpecialCharNoPassThru TeX レイアウトを見つけられないとか、「タイトルレイアウトと通常のレイアウトを混在させないでください」といった警告が 出るようであれば、正しい導入が行われていません。 \end_layout \begin_layout Subsubsection 表を処理する際の\SpecialCharNoPassThru LaTeX エラー \end_layout \begin_layout Standard 既定では、\SpecialCharNoPassThru LyX は、表のキャプションやタイトルを中央揃えにしようと試みます。これはAAS\SpecialCharNoPassThru TeX と悪い相互干渉を発生させるようですので、キャプションやタイトルのど こかをクリックして、 \family sans 編集\SpecialChar menuseparator 段落設定 \family default を選択し、 \family sans 配置 \family default を \family sans 両端揃え \family default に設定してください。私のところではこれで解決しました。 \end_layout \begin_layout Subsubsection 書誌情報 \end_layout \begin_layout Standard 若干の注意があります。(1)文献項目の本文中の空白取りが少しおかしくなることがあるようです。書誌情報を入力する際には、最後の著者と、著作年を入れる括弧の間にスペ ースを \emph on 入れない \emph default ようにしてください。たとえば、 \family typewriter Ressler(1992) \family default はいいですが、 \family typewriter Ressler (1992) \family default ではだめです。(2)書誌情報の入力の仕方は、必ずしも自明ではありません。もっとも簡単な方法は、文書の最後に、最初の書誌情報をまず書き込み、それを \family sans 書誌情報 \family default 環境としてマークすることです。すると、入力したものの前に、小さな灰色のボックスが現れます。このボックスをクリックして、残りの情報を入力してください。新しい書誌情 報を追加するには、既存の書誌情報の後ろでリターンを押します。すると、新しいボックスの付いた新規行が出てくるので、後は同様にしてください。 \end_layout \begin_layout Subsubsection EPSファイルの読み込み \end_layout \begin_layout Standard AAS\SpecialCharNoPassThru TeX には、自前の図関連コマンド(たとえば \family typewriter \backslash plotone \family default )がありますが、私は(既定のgraphicxを使った)\SpecialCharNoPassThru LaTeX の標準図コマンドの方がずっと好きです。望めば、図フロートボックスに、\SpecialCharNoPassThru TeX コードで \family typewriter \backslash plotone \family default 等のコマンドを挿入することはできますが、私には正しいレイアウトを得ることができた試しがありません。標準の画像コマンドを使えば、\SpecialCharNoPassThru LyX は、 \family typewriter \backslash usepackage{graphics} \family default コマンドを\SpecialCharNoPassThru LaTeX プリアンブルに挿入し、図を\SpecialCharNoPassThru LaTeX2e の標準的な方法で取り扱って、文章の中にちりばめます。現在、ApJは、ちょうどこのようにして作成した図 を受け入れていますが、AJはまだ「すべてを末尾に積み上げる」方法を使用しているかもしれません。 \end_layout \begin_layout Subsubsection 可能だったが、実装しなかったもの \end_layout \begin_layout Standard 「素敵な」ものの中には、実装することも可能だったけれども、あえて実装しなかったものがあります。たとえば、紙の原稿ではダブルスペースであったとしても、\SpecialCharNoPassThru LyX ウィン ドウ中で、文章をダブルスペースにする意味はないと考えました。また、preprint様式とpreprint2様式を、独立したレイアウトにすることもしませんでした。 いずれにしても、執筆時間のほとんどを、平の原稿モードで使うのがほとんどですから、これらの機能でディスクスペースを消費しないことにしました。 \end_layout \begin_layout Subsection 最後に \end_layout \begin_layout Standard これまでに進んできた道のりは、長い人も短い人もいることでしょう。私には、ApJとAJに発表した論文がありますが、その努力の98 \begin_inset space \thinspace{} \end_inset %は\SpecialCharNoPassThru LyX 上で為されました。残りの2 \begin_inset space \thinspace{} \end_inset %が、\SpecialCharNoPassThru LaTeX での後処理と若干の後片付けです。投稿の過程では何のトラブルもなく、これらの学術誌が通常の投稿原稿と違う点に気づくことはなかったでしょう。ですから 、がんばって発表してください! \end_layout \begin_layout Section AMS \SpecialCharNoPassThru LaTeX \end_layout \begin_layout Standard \noun on David Johnson \noun default 文 \noun on Richard Heck \noun default 改訂 \begin_inset VSpace bigskip \end_inset \end_layout \begin_layout Standard AMS \SpecialCharNoPassThru LaTeX レイアウトは、American Mathematical Society(アメリカ数学会)の刊行物に投稿する数学論文用のスタイルです。レイアウ トは、特定の学術誌向けに仕立てられてはいませんが、簡単にそうすることができます。各学術誌毎の指示については、AMSの説明書をご参照ください(通常は、\SpecialCharNoPassThru TeX 出力中 の一行を変更する必要があるだけです)。AMSの説明書は、ウェブWeb上の \begin_inset Flex URL status open \begin_layout Plain Layout http://www.ams.org \end_layout \end_inset か、FTPで \begin_inset Flex URL status open \begin_layout Plain Layout ftp://ftp.ams.org/pub/tex/amslatex/ \end_layout \end_inset から入手することができます。これらのレイアウトは、数学的な文章を書くのであれば、どんなときでも適切かつ有用であるはずです。 \end_layout \begin_layout Standard 基本となるAMS \SpecialCharNoPassThru LaTeX レイアウトには、以下の二つがあります。 \end_layout \begin_layout Itemize amsart:標準のAMS article書式。 \end_layout \begin_layout Itemize amsbook:標準のAMS book(実際はモノグラフ)書式。 \end_layout \begin_layout Standard これらのレイアウトには、それ自身では、AMSクラスを使用するのに必要最低限のものしか含まれていません。特に、定理や補題などを設定するのに使用される「theore m」環境は、何一つ含まれていません。これらは、代わりに \begin_inset Flex Code status collapsed \begin_layout Plain Layout 定理(AMS) \end_layout \end_inset モジュールに収録されており、AMSクラスのいずれかを選択すると、このモジュールが既定で読み込まれるようになっています(これは別のクラスでも使用することができ、別 のものに変えたいときは取り除くこともできます)。少し使用頻度の低いものとしては、 \begin_inset Flex Code status collapsed \begin_layout Plain Layout 定理(AMS拡張) \end_layout \end_inset モジュールがあり、これは手動で読み込む必要があります。 \end_layout \begin_layout Standard 既定では、定理類は、文書を通して連番が振られますが、これは \begin_inset Flex Code status collapsed \begin_layout Plain Layout 定理(節毎連番) \end_layout \end_inset モジュールを読み込めば変更することができ、 \begin_inset Flex Code status collapsed \begin_layout Plain Layout book (AMS) \end_layout \end_inset を使用している場合には \begin_inset Flex Code status collapsed \begin_layout Plain Layout 定理(章毎連番) \end_layout \end_inset を用いても変更することができます。これらを用いると、出力は \begin_inset Formula $n.m$ \end_inset のようになり、最初の数字は節番号(または章番号)、次の数字はそれまで同節内(章内)に現れた出力の全数を表します。大半の環境は、連番なしでも用いることができます。 連番なしのものは、環境名の後ろにアスタリスクを付けたもので表されます。連番なしの出力 \emph on のみ \emph default が欲しい場合には、 \begin_inset Flex Code status collapsed \begin_layout Plain Layout 定理(連番なし) \end_layout \end_inset モジュールを用います。 \end_layout \begin_layout Standard これらのモジュールは、AMSクラスで使用する \emph on 必要はない \emph default ことに注意してください。 \begin_inset Flex Code status collapsed \begin_layout Plain Layout 定理(AMS) \end_layout \end_inset モジュールや上述の他のモジュールは、他のクラス、たとえば \begin_inset Flex Code status collapsed \begin_layout Plain Layout article \end_layout \end_inset ・ \begin_inset Flex Code status collapsed \begin_layout Plain Layout report \end_layout \end_inset ・ \begin_inset Flex Code status collapsed \begin_layout Plain Layout book (KOMA-script) \end_layout \end_inset などで問題なく使用することができます。 \end_layout \begin_layout Subsection これらのレイアウトが提供するもの \end_layout \begin_layout Standard これらのレイアウトが提供している環境を列挙すると、長い一覧となります。AMS-\SpecialCharNoPassThru LaTeX では、実のところ、「theorem」環境の派生型を際限なく定義していくこ とが可能です。しかし、AMSは、\SpecialCharNoPassThru LyX で利用可能になっている環境のみを使用することを推奨しています。 \end_layout \begin_layout Standard \begin_inset Flex Code status collapsed \begin_layout Plain Layout article (AMS) \end_layout \end_inset と \begin_inset Flex Code status collapsed \begin_layout Plain Layout book (AMS) \end_layout \end_inset には、\threehyphens \threehyphens \begin_inset space ~ \end_inset \begin_inset Flex Noun status collapsed \begin_layout Plain Layout 節 \end_layout \end_inset ・ \begin_inset Flex Noun status collapsed \begin_layout Plain Layout 書誌情報 \end_layout \end_inset ・ \begin_inset Flex Noun status collapsed \begin_layout Plain Layout タイトル \end_layout \end_inset ・ \begin_inset Flex Noun status collapsed \begin_layout Plain Layout 著者 \end_layout \end_inset ・ \begin_inset Flex Noun status collapsed \begin_layout Plain Layout 日付 \end_layout \end_inset のような標準環境の他に \begin_inset space ~ \end_inset \threehyphens \threehyphens \begin_inset space ~ \end_inset 以下の環境があります。 \end_layout \begin_layout Description 住所 これは著者の恒久的な住所です。 \end_layout \begin_layout Description 現在の住所 住所と別に指定されているときには、著者の投稿時の仮初めの住所です。 \end_layout \begin_layout Description 電子メール 著者の電子メールアドレス \end_layout \begin_layout Description URL 著者のウェブアドレス。任意。 \end_layout \begin_layout Description キーワード 論文中で論じられているトピックを識別するためのキーワードやキーフレーズ。 \end_layout \begin_layout Description 分野分類 \emph on Mathematical Reviews \emph default に説明が公表されているAMS Subject Classificationsの分類番号を指します。上述したAMSのウェブサイトでも、オンラインで見ることができま す。 \end_layout \begin_layout Description 謝辞 \end_layout \begin_layout Description 献呈 \end_layout \begin_layout Description 翻訳者 \end_layout \begin_layout Standard 以下の環境は、 \begin_inset Flex Code status collapsed \begin_layout Plain Layout 定理 \end_layout \end_inset モジュールと \begin_inset Flex Code status collapsed \begin_layout Plain Layout 定理(AMS) \end_layout \end_inset モジュールの両方で提供され、後者の場合には、星付き(連番なし)版と星なし(連番)版の両方が提供されます。 \begin_inset Flex Code status collapsed \begin_layout Plain Layout 定理(連番なし) \end_layout \end_inset モジュールでは、同環境の星付き版だけが提供されます。 \end_layout \begin_layout Theorem これは、通常、得られた主要な結果を叙述するのに使用されます。 \end_layout \begin_layout Corollary* これは直前の叙述から比較的直接に導き出せる結果を叙述するのに使います。これも主要な結果であることがあります。 \end_layout \begin_layout Lemma 他の叙述を証明するために必要とされる、比較的小さな結果です。 \end_layout \begin_layout Proposition 議論されている一般的な理論に(希望的には)何かを付け加えるような、主要ではない結果です。 \end_layout \begin_layout Conjecture 正当化を与えずに述べられた叙述で、著者には証明法がわからないけれども、正しいと(少なくとも著者にとっては)思われるものです。 \end_layout \begin_layout Definition* これは自明でしょう。この環境のフォントは、前述の環境とは異なるフォントが使用されます。 \end_layout \begin_layout Problem これが何を指すかは必ずしも特定されていません。ご自分で解明してください。 \end_layout \begin_layout Exercise* この環境の説明を記述せよ。 \end_layout \begin_layout Note この環境もtheorem型、通常は重要性の低い所見に用いられます。 \end_layout \begin_layout Claim* より大きな結果の証明を与える途中で、しばしば用いられます。 \end_layout \begin_layout Case 一般的に、これらはある条件の特定の場合を取り上げて、長い議論を区切るのに用いられます。 \end_layout \begin_layout Case ケースの連番の枠組みは、それ自身で独立していて、他の連番の叙述とは区別されます。 \end_layout \begin_layout Proof この環境の最後には、証了記号(通常は四角ですがスタイルによって変わります)が置かれます。この環境の中に別の環境を入れたい\threehyphens \threehyphens たとえばケース環境など\threehyphens \threehyphens 場合で、証了記号は証明環境の終わりにのみ現れるようにしたい場合には、他の環境は証明環境の中に入れ子にしなくてはなりません。入れ子に関する情報については、 \emph on ユーザーの手引き \emph default の \emph on 環境を入れ子にする \emph default の節をご覧ください。 \end_layout \begin_layout Standard そして、以下は \begin_inset Flex Code status collapsed \begin_layout Plain Layout 定理(AMS拡張) \end_layout \end_inset で提供されるものです。 \end_layout \begin_layout Criterion* 必要とされる条件です。 \end_layout \begin_layout Algorithm* 使用する一般的手順です。 \end_layout \begin_layout Axiom* 議論されている系内部で真と仮定される性質や命題です。 \end_layout \begin_layout Condition* 議論の現在の文脈で仮定されている条件を述べるのに、よく用いられます。 \end_layout \begin_layout Note* 注記と同様です。 \end_layout \begin_layout Notation* 表記法の説明に用いられます。 \end_layout \begin_layout Summary 本当に説明する必要がありますか? \end_layout \begin_layout Acknowledgement* 謝辞(acknowledgement)です。 \end_layout \begin_layout Conclusion* 長い議論の終わりに時々用いられます。 \end_layout \begin_layout Fact 命題と同様の用いられ方をしますが、だいたい長くないものに使われるようです。 \end_layout \begin_layout Standard さらに、AMSクラスは、AMS \SpecialCharNoPassThru LaTeX パッケージとAMSフォントパッケージを自動的に提供します。これらの環境を使用するためには、お使いのシステム上で利用可能 となっている必要があります。 \end_layout \begin_layout Section AGU各誌( \family sans aguplus) \end_layout \begin_layout Standard \noun on Martin Vermeer \noun default 文 \end_layout \begin_layout Subsection 概要 \end_layout \begin_layout Standard これはAmerican Geophysical Society(アメリカ地球物理学会) の各学術誌向けのレイアウトファイルです。AGU発行のクラスファイルおよび AGUplusの両方(これらは \begin_inset Flex URL status collapsed \begin_layout Plain Layout http://publications.agu.org/files/2013/08/AGU-\SpecialCharNoPassThru LaTeX .zip \end_layout \end_inset にあります)が導入されていることが必要です。 \end_layout \begin_layout Subsection 新しいスタイル \end_layout \begin_layout Standard \family sans 段落 \family default および \family sans 段落* \family default は、定義し直されています。\SpecialCharNoPassThru LyX の画面では、依然として \family sans 段落 \family default ・ \family sans 段落* \family default と表示されますが、AGUクラスにおける\SpecialCharNoPassThru LaTeX の対応物は、 \family sans Subsubsubsection \family default と \family sans Subsubsubsection* \family default です。 \end_layout \begin_layout Standard 新しく定義されたスタイルには、 \family sans 左ヘッダ \family default ・ \family sans 右ヘッダ \family default ・ \family sans 受理日 \family default ・ \family sans 改訂 \family default ・ \family sans 採択日 \family default ・ \family sans CCC \family default ・ \family sans 論文ID \family default ・ \family sans 著者住所 \family default ・ \family sans 廃棄用コメント \family default があります。これらは、ほとんど草稿用属性で、AGUクラス説明書で説明されています。 \end_layout \begin_layout Standard おそらく、これはまだ恐ろしく不完全です。 \end_layout \begin_layout Subsection 新しいフロート \end_layout \begin_layout Standard \family sans 平面表(Planotable \family default )と \family sans 挿絵 \family default (Plate)が新しいフロートです。また、 \family sans 表キャプション \family default も付け加えられています。 \end_layout \begin_layout Subsection サポートされている学術誌 \end_layout \begin_layout Itemize \emph on Journal of Geophysical Research \emph default : \family typewriter jgrga.layout \family default \threehyphens Martin Vermeer \end_layout \begin_layout Standard ここにあなたの作ったものを加えてください。難しくはありません。 \family typewriter jgrga.layout \family default と \family typewriter aguplus.inc \family default を用例として見てください。 \end_layout \begin_layout Subsection バグと注意すべきこと \end_layout \begin_layout Standard 新しいレイアウトを使うためには、新規文書の作成時に以下の手順を行う必要があります。 \end_layout \begin_layout Enumerate \emph on babelを無効にしてください。 \emph default これは、 \family sans ツール\SpecialChar menuseparator 設定 \family default メニュー項目で行うことができます(AGUの論文は常に英語ですよね。ですから他の言語は \emph on 選ばないで下さい \emph default )。 \end_layout \begin_layout Enumerate 使用文書の追加オプションフィールドに \family typewriter jgrga \family default と入力してください(すみません、これはバグです)。 \end_layout \begin_layout Enumerate Bib\SpecialCharNoPassThru TeX 差込枠の2番目のフィールドに \family sans agu \family default と入力して、書誌情報のスタイルに \family typewriter agu.bst \family default を使用していることを確認してください。標準スタイルはうまく動作しません。 \end_layout \begin_layout Section Broadway \end_layout \begin_layout Standard \noun on Garst Reese \noun default 文 \end_layout \begin_layout Subsection はじめに \end_layout \begin_layout Standard Broadwayは演劇を書くためのものです。書式はHollywoodよりも装飾的で、それほど標準化されていません。この書式はワークショップに向いているでしょう。 \end_layout \begin_layout Subsection 特別な問題 \end_layout \begin_layout Standard Hollywoodと同様です。 \end_layout \begin_layout Subsection 特別の機能 \end_layout \begin_layout Standard \family sans 話者 \family default の名前をラベルとして挿入し、名前を挿入する際には、このラベルを相互参照してください。相互参照ダイアログには、登場人物の現在の配役が表示されます。 \end_layout \begin_layout Subsection 用紙寸法と余白 \end_layout \begin_layout Standard USレター寸法で、余白は左1.6インチ、右0.75インチ、上0.5インチ、下0.75インチです。 \end_layout \begin_layout Subsection 環境 \end_layout \begin_layout Standard 以下の環境を使うことができます。右に記してある \begin_inset Flex Ruby status collapsed \begin_layout Plain Layout 鍵 \begin_inset Argument post:1 status collapsed \begin_layout Plain Layout キー \end_layout \end_inset \end_layout \end_inset 割当ては、broadway.bindを使った場合のものです。 \end_layout \begin_layout Itemize \family sans 標準 \begin_inset Newline newline \end_inset \family default これは使わなくていいはずですが、他の環境が当てはまらない場合のためにここに挙げておきます。 \end_layout \begin_layout Itemize \family sans ト書き \begin_inset space \hfill{} \end_inset M-z n \begin_inset Newline newline \end_inset \family default 舞台設定と動作の説明に用います。最初に話者名をすべて大文字で書いておきます。 \end_layout \begin_layout Itemize \family sans 幕 \begin_inset space \hfill{} \end_inset M-z a \begin_inset Newline newline \end_inset \family default 自動的に連番が振られます。連番は、画面上ではアラビア数字ですが、出力ではローマ数字です。 \end_layout \begin_layout Itemize \family sans 幕* \begin_inset space \hfill{} \end_inset M-z S at \begin_inset Newline newline \end_inset \family default 幕の副題です。単に中央揃えの文になります。 \end_layout \begin_layout Itemize \family sans 場面 \begin_inset space \hfill{} \end_inset M-z S-S \begin_inset Newline newline \end_inset \family default 自動的に連番は振られませんので、手動で番号を付けてください。これは私がどうすればいいか分からなかったためです。 \end_layout \begin_layout Itemize \family sans 幕開きに: \begin_inset space \hfill{} \end_inset M-z S-R \begin_inset Newline newline \end_inset \family default ト書きの特殊な場合で、カーテンが上がるときの舞台設定と動作を説明します。 \end_layout \begin_layout Itemize \family sans 話者 \begin_inset space \hfill{} \end_inset M-z s \begin_inset Newline newline \end_inset \family default 話者(役者)の配役です。すべて大文字で中央揃えに置かれます。 \end_layout \begin_layout Itemize \family sans 括弧付き \begin_inset space \hfill{} \end_inset M-z p \begin_inset Newline newline \end_inset \family default 話者への指示です。括弧は自動的に挿入されます。画面上には左括弧(のみが表示されますが、印字出力には両方の括弧が表示されます。この環境は、 \family sans 対話 \family default の中だけで使用されます。 \end_layout \begin_layout Itemize \family sans 対話 \begin_inset space \hfill{} \end_inset M-z d \begin_inset Newline newline \end_inset \family default 話者の言う内容。 \end_layout \begin_layout Itemize \family sans 幕切れ \begin_inset space \hfill{} \end_inset M-z S-C \begin_inset Newline newline \end_inset \family default 幕が降ります。 \end_layout \begin_layout Itemize \family sans タイトル \begin_inset space \hfill{} \end_inset M-z S-T \end_layout \begin_layout Itemize \family sans 著者 \begin_inset space \hfill{} \end_inset M-z S-A \end_layout \begin_layout Itemize \family sans 右寄せ住所 \begin_inset space \hfill{} \end_inset M-z r \end_layout \begin_layout Section Dinbrief \end_layout \begin_layout Standard 文書クラス \family sans dinbrief \family default は、ドイツの慣習に則った書簡の組版を行うのに用いられます。ひな型ファイルが \family typewriter .../lyx/share/templates \family default にあるので、それを土台として使用してください。 \end_layout \begin_layout Section EGS各誌 \family sans (egs) \end_layout \begin_layout Standard \noun on Martin Vermeer \noun default 文 \end_layout \begin_layout Subsection 概要 \end_layout \begin_layout Standard これはEuropean Geophysical Society(欧州地球物理学会)の学術誌向けのレイアウトファイルです。必要とされる \family typewriter egs.cls \family default は、EGSのウェブサイト \begin_inset Flex URL status collapsed \begin_layout Plain Layout http://www.copernicus.org/ \end_layout \end_inset からダウンロードできます。 \end_layout \begin_layout Subsection 新しいスタイル \end_layout \begin_layout Standard 新しいスタイルとして、 \family sans 右寄せ住所 \family default ・ \family sans \SpecialCharNoPassThru LaTeX タイトル \family default ・ \family sans 所属 \family default ・ \family sans 学術誌名 \family default ・ \family sans 原稿番号 \family default ・ \family sans 筆頭著者 \family default ・ \family sans 受理日 \family default ・ \family sans 採択日 \family default ・ \family sans オフセット \family default があります。現在のレイアウトファイルは、残念ながらほとんどモジュール化されておらず、さまざまな \family typewriter std*.inc \family default ファイルを読み込む形に変えた方が便利になると思われます。 \end_layout \begin_layout Section Elsevier各誌 \end_layout \begin_layout Standard \SpecialCharNoPassThru LyX ひな型ファイルの \family typewriter elsarticle.lyx \family default を参照してください。必要な情報は全てそこにあります。 \end_layout \begin_layout Section Foils (別名Foil\SpecialCharNoPassThru TeX ) \begin_inset CommandInset label LatexCommand label name "sec:foiltex" \end_inset \end_layout \begin_layout Standard \noun on Allan Rae \noun default 文 \end_layout \begin_layout Subsection はじめに \end_layout \begin_layout Standard 本節では、プレゼンテーション用のスライドを作るための、\SpecialCharNoPassThru LyX の使用法を解説します。スライドを作ることのできる文書クラスには、slides・Foil\SpecialCharNoPassThru TeX ・sem inar・beamer・powerdotといったクラスがありますが、本節では、そのうちslidesの解説を行います。 \end_layout \begin_layout Standard 誤解のないように、わかりやすく明確に、もう一度言っておきます。 \end_layout \begin_layout Standard \begin_inset VSpace bigskip \end_inset \end_layout \begin_layout Standard \align center \size large 本節は「 \family sans presentation (FoilT \size default \begin_inset ERT status collapsed \begin_layout Plain Layout {} \end_layout \end_inset \size large eX) \family default 」クラス \emph on のみの \emph default 解説を行います。 \end_layout \begin_layout Standard \begin_inset VSpace bigskip \end_inset \end_layout \begin_layout Standard 「 \family sans transparencies (slides) \family default 」の解説をお探しであれば、第 \begin_inset CommandInset ref LatexCommand ref reference "sec:slitex" \end_inset 節をご覧ください。お使いのコンピュータに \family sans foils \family default クラス( \family sans presentation (FoilT \begin_inset ERT status collapsed \begin_layout Plain Layout {} \end_layout \end_inset eX) \family default )が導入されていなければ、 \family sans foils \family default ほど良くはありませんが、おそらく \family sans slides \family default クラスを使わざるをえないでしょう。 \end_layout \begin_layout Standard \family sans foils \family default クラスは、\SpecialCharNoPassThru LaTeX2e の一部として含まれている\SpecialCharNoPassThru LaTeX クラスファイル \family sans foils.cls \family default の第2.1版とともに使われるように設計されています。 \end_layout \begin_layout Subsection 最初の一歩 \end_layout \begin_layout Standard いうまでもなく、この文書クラスを使うには、 \family sans 文書\SpecialChar menuseparator 設定\SpecialChar menuseparator 文書クラス \family default メニューの \family sans 文書クラス \family default ドロップダウンで「 \family sans presentation (FoilT \begin_inset ERT status collapsed \begin_layout Plain Layout {} \end_layout \end_inset eX) \family default 」を選択する必要があります。また、 \family sans 文書設定 \family default ダイアログ中には、以下のように、このクラスに特有の設定がいくつかあることを知っておかなくてはなりません。 \end_layout \begin_layout Itemize \family sans 文書設定 \family default ダイアログ中の、 \family sans 両面文書 \family default オプションと \family sans 二段組文書 \family default オプションは変更しないでください。これらは \family sans foils \family default クラスでは無視されます。 \end_layout \begin_layout Itemize 既定のフォント寸法は20ptであり、17pt・25pt・30ptを選択することも可能です。 \end_layout \begin_layout Itemize 既定のフォントは \family sans sans \family default \family sans serif \family default ですが、数式ではすべて、通常のローマン体が使用されます。 \end_layout \begin_layout Itemize Foil\SpecialCharNoPassThru TeX は、35 \begin_inset space \thinspace{} \end_inset mmスライド用の特殊寸法の他、A4とレター大の用紙寸法をサポートします。A5・B5・リーガル・エグゼクティブ大の用紙寸法はサポートしていません。 \end_layout \begin_layout Itemize \family sans フロートの配置 \family default の設定は無視されますので、わざわざ変更する必要はありません。フロートはすべて、本文中で定義された位置に表示されます。 \end_layout \begin_layout Itemize このクラスの \family sans ページレイアウト \family default の設定は、若干異なった挙動を示します。Foil\SpecialCharNoPassThru TeX では、ユーザ定義のロゴをはじめ、フッタとへッダに広範な設定ができます。詳細については第 \begin_inset CommandInset ref LatexCommand ref reference "sec:foilfoot" \end_inset 節をご覧ください。タイトルページは、文書中の他のページとは異なった取扱がなされ、ページ番号は \emph on つねに \emph default 付けられず、(ロゴが定義されていれば)ロゴは、 \emph on つねに \emph default ページ下部中央に表示されます。使用できるページ様式とその挙動は、以下の通りです。 \family default \begin_inset Separator parbreak \end_inset \end_layout \begin_deeper \begin_layout Labeling \labelwidthstring MMMMMMM \family sans \series bold empty \family default \series default 最終出力には、ページ番号をはじめ、へッダ・フッタが出力されません(もちろん脚注は除きます)。 \end_layout \begin_layout Labeling \labelwidthstring MMMMMMM \family sans \series bold plain \family default \series default 最終出力には、ページ番号がページ下部の中央に出力されますが、他のへッダ・フッタは出力されません(脚注除く)。 \end_layout \begin_layout Labeling \labelwidthstring MMMMMMM \series bold foilheadings \series default ページ番号が右下隅に出力されます。追記したへッダ・フッタも出力されます。これが既定値です。 \end_layout \begin_layout Labeling \labelwidthstring MMMMMMM \series bold fancy \series default これは \family sans fancyheadings \family default パッケージを使えるようにします。ただし、Foil\SpecialCharNoPassThru TeX パッケージの作者は、ページレイアウトが崩れる可能性があるので、これを使用することは勧めないと言及しています 。 \end_layout \end_deeper \begin_layout Subsubsection 任意設定クラスオプション \end_layout \begin_layout Standard 以下のオプションは \family sans 文書設定 \family default ダイアログの任意設定クラスオプションボックスで使うことができます。 \end_layout \begin_layout Labeling \labelwidthstring MMMMMMx \series bold 35mmSlide \series default これは、ページレイアウトを縦7.33インチ横11インチに設定します。これは35 \begin_inset space \space{} \end_inset mmスライドの縦横比にほぼ等しく、このメディアを作る作業が若干易しくなります。 \end_layout \begin_layout Labeling \labelwidthstring MMMMMMx \series bold headrule \series default タイトルページを除くすべてのページのへッダの下に罫線を入れます。 \end_layout \begin_layout Labeling \labelwidthstring MMMMMMx \series bold footrule \series default タイトルページを除くすべてのページのフッタの上に罫線を入れます。 \end_layout \begin_layout Labeling \labelwidthstring MMMMMMx \series bold dvips \series default これは、新規 \family sans foils \family default 文書を作成する度に自動的に設定されます。このオプションは、横向きに設定されたページを回転させるのに、dvipsドライバを使うようFoil\SpecialCharNoPassThru TeX に指示します。 \end_layout \begin_layout Labeling \labelwidthstring MMMMMMx \series bold landscape \series default このオプションは、用紙寸法を横向きページ大に変更するだけで、回転は行いません。したがって、このオプションを使う場合は、各ページを回転させる外部プログラムを使用 する、プリンタに用紙を横向きに給紙する必要があります。また、このオプションは、 \family sans Foilhead \family default 環境と \family sans Rotatefoilhead \family default 環境の役割を逆転させることに注意してください(これらの環境については次節で説明します)。 \end_layout \begin_layout Labeling \labelwidthstring MMMMMMx \series bold leqno \series default 数式番号を左側に付けます。 \end_layout \begin_layout Labeling \labelwidthstring MMMMMMx \series bold fleqn \series default 数式を左揃えにします。 \end_layout \begin_layout Subsection サポートされる環境 \end_layout \begin_layout Standard 他のクラスで標準的にサポートされている環境は、 \family sans foils \family default クラスでもサポートされています。それ以外に、Foil\SpecialCharNoPassThru TeX が提供している環境と、\SpecialCharNoPassThru LyX が付け加えた環境があります。以下の環境は、他のクラスと共通の環境です。 \end_layout \begin_layout Standard \family sans \begin_inset Flex Multiple Columns status open \begin_layout Itemize \family sans 標準 \end_layout \begin_layout Itemize \family sans 箇条書き(記号) \end_layout \begin_layout Itemize \family sans 箇条書き(連番) \end_layout \begin_layout Itemize \family sans 箇条書き(記述) \end_layout \begin_layout Itemize \family sans 箇条書き(リスト) \end_layout \begin_layout Itemize \family sans \SpecialCharNoPassThru LyX コード \end_layout \begin_layout Itemize \family sans 詩句 \end_layout \begin_layout Itemize \family sans 引用(字下げあり) \end_layout \begin_layout Itemize \family sans 引用(字下げなし) \end_layout \begin_layout Itemize \family sans タイトル \end_layout \begin_layout Itemize \family sans 著者 \end_layout \begin_layout Itemize \family sans 日付 \end_layout \begin_layout Itemize \family sans 概要 \end_layout \begin_layout Itemize \family sans 書誌情報 \end_layout \begin_layout Itemize \family sans 住所 \end_layout \begin_layout Itemize \family sans 右寄せ住所 \end_layout \begin_layout Itemize \family sans キャプション \end_layout \begin_layout Itemize \family sans コメント \end_layout \end_inset \end_layout \begin_layout Standard つまり、節区切りを除けば、主な環境のすべてです。一枚のスライドは、基本的にタイトルと本文を備えた自己完結した節なので、 \family sans Foil \family default \SpecialCharNoPassThru TeX は新しいスライドを始める以下のようなコマンドを備えています。 \end_layout \begin_layout Itemize \family sans スライドタイトル(Foilhead) \end_layout \begin_layout Itemize \family sans 横置きスライドタイトル(Rotatefoilhead) \end_layout \begin_layout Standard \SpecialCharNoPassThru LyX は、以下のような、これらを若干修正した環境も用意しています。 \end_layout \begin_layout Itemize \family sans スライドタイトル(小)(ShortFoilhead) \end_layout \begin_layout Itemize \family sans 横置きスライドタイトル(小)(ShortRotatefoilhead) \end_layout \begin_layout Standard これらの違いは次節で説明します。 \end_layout \begin_layout Standard スライドは、アイデアを説明したり、新しい定理を説明したりするのにしばしば使われるので、 \family sans Foil \family default \SpecialCharNoPassThru TeX はそれらを説明するのに便利な環境を幅広く用意しています。 \end_layout \begin_layout Standard \family sans \begin_inset Flex Multiple Columns status open \begin_layout Itemize \family sans 定理 \end_layout \begin_layout Itemize \family sans 補題 \end_layout \begin_layout Itemize \family sans 系 \end_layout \begin_layout Itemize \family sans 命題 \end_layout \begin_layout Itemize \family sans 定義 \end_layout \begin_layout Itemize \family sans 証明 \end_layout \begin_layout Itemize \family sans 定理* \end_layout \begin_layout Itemize \family sans 補題* \end_layout \begin_layout Itemize \family sans 系* \end_layout \begin_layout Itemize \family sans 命題* \end_layout \begin_layout Itemize \family sans 定義* \end_layout \end_inset \end_layout \begin_layout Standard 星付き版は連番が振られず、星なし版は連番が振られます。他に、\SpecialCharNoPassThru LyX で追加された以下の2つの箇条書き環境があります。 \end_layout \begin_layout Itemize \family sans 箇条書き(チック) \end_layout \begin_layout Itemize \family sans 箇条書き(クロス) \end_layout \begin_layout Standard Foil\SpecialCharNoPassThru TeX には、強力なヘッダ機能とフッタ機能があり、これらはプリアンブルで設定するのが最良ですが、文章中のどこでも設定することができます。もし文書中でこれら の設定を変更したい場合には、スライドの一番上、foilheadの直後で行うのが良いでしょう。 \end_layout \begin_layout Standard この目的のためには、以下のコマンドスタイルがあります( \shape smallcaps Martin Vermeer)。 \end_layout \begin_layout Standard \begin_inset Flex Multiple Columns status open \begin_layout Itemize \family sans グラフィックスロゴ \end_layout \begin_layout Itemize \family sans 配布制限 \end_layout \begin_layout Itemize \family sans 右フッタ \end_layout \begin_layout Itemize \family sans 右ヘッダ \end_layout \begin_layout Itemize \family sans 左ヘッダ \family default \begin_inset Separator parbreak \end_inset \end_layout \begin_deeper \begin_layout Plain Layout \begin_inset space ~ \end_inset \end_layout \end_deeper \end_inset \end_layout \begin_layout Standard Foil\SpecialCharNoPassThru TeX が提供しているコマンドで、\SpecialCharNoPassThru LyX が直接サポートしていないコマンドもありますが、これらの説明と使い方については、第 \begin_inset CommandInset ref LatexCommand ref reference "sec:unsuppfoils" \end_inset 節で行います。 \end_layout \begin_layout Subsection スライドの組を作る \end_layout \begin_layout Standard この節は、様々な環境を使ってスライドの組を作る方法を簡単に紹介します。スライド組の例をご覧になりたい場合は、\SpecialCharNoPassThru LyX の \family typewriter examples \family default フォルダにある \family typewriter Foils.lyx \family default ファイルをご覧ください。 \end_layout \begin_layout Subsubsection タイトルページを作る \end_layout \begin_layout Standard \family sans タイトル \family default ・ \family sans 著者 \family default ・ \family sans 日付 \family default ・ \family sans 概要 \family default 環境のある他のクラスとは異なり、 \family sans foils \family default は独立したページにタイトルを作成します。 \family sans 日付 \family default 環境を使用しなかった場合には、\SpecialCharNoPassThru LaTeX は(出力を生成し直したときにはいつも)その時点の日付を挿入します。 \end_layout \begin_layout Subsubsection 新しいスライドを開始する \end_layout \begin_layout Standard 前述のように、新しいスライドを開始するには、4つの方法があります。縦向きのスライドを開始するには、 \family sans スライドタイトル(Foilhead) \family default や \family sans スライドタイトル(小)(ShortFoilhead) \family default を使用します。両環境の違いは、スライドタイトル(foilhead)とスライド本文の間の余白の違いです。 \end_layout \begin_layout Standard 横向きのスライドは、 \family sans 横向きスライドタイトル(Rotatefoilhead) \family default か横向きスライドタイトル(小)( \family sans ShortRotatefoilhead) \family default 環境を使用して生成します。ここでも両環境の違いは、タイトルと本文の間の余白のみです。どちらの場合も、(小)と記された版は、タイトルと本文の間の余白が、0.5インチ (約1.27cm)小さくなります。 \end_layout \begin_layout Standard 横向きのスライドをサポートする際、一つ問題となるのは、スライドを回転させようと思うと、PostScript出力を生成するのに \family typewriter dvips \family default ドライバを使用することを要求してしまうことです。もしスライドをプリンタに横に給紙することができれば、 \family typewriter dvips \family default ドライバを持っていなくても、横向きのスライドをつくることができます ;-) \end_layout \begin_layout Subsubsection 定理・補題・証明など \end_layout \begin_layout Standard \SpecialCharNoPassThru LyX 中の小さなバグによって、これらの環境の同じ型をお互いに直接続けて置くことはできません。これらは何かによって分離されなくてはなりません。仮に二つ続けて置いて も、2つの環境をマージしたかのように、前の環境が延長されるだけです。この問題を回避するにはどうすればよいのでしょうか。最も簡単な方法は、二つの環境の間に何か文章 を置くか、あるいは二つの間に「 \family typewriter % \family default 」だけから成る\SpecialCharNoPassThru LaTeX 環境を置くことです。これによって、\SpecialCharNoPassThru LyX は2つの別々の環境を生成するように強制され、正しい\SpecialCharNoPassThru LaTeX 出力を得ることができます。\SpecialCharNoPassThru LyX 頒布 版に含まれる用例ファイルに例があります。この問題は、二つの同じ定理型環境を立て続けに置こうとした場合にのみ発生することに注意してください。 \end_layout \begin_layout Subsubsection 箇条書き \end_layout \begin_layout Standard 他のクラスでも共通にサポートされている箇条書き様式すべてに加えて、二つの新しい様式を使用することができます。ここでは、その新しい様式のみを説明することにします。 他の箇条書き環境について詳しく知りたい場合には、 \emph on ユーザーの手引き \emph default をご覧ください。記号による箇条書きを使用したい場合には、上記第 \begin_inset CommandInset ref LatexCommand ref reference "sec:ブリット" \end_inset 節の \family sans 箇条書き(記号)ブリットの指定 \family default の節も、読まれることが望ましいでしょう。 \end_layout \begin_layout Standard \family sans 箇条書き(チック) \family default と \family sans 箇条書き(クロス) \family default の二つの新しい様式は、チェック印や \begin_inset Formula $\times$ \end_inset 印を箇条書きのラベルに使用する専用の環境を提供することで、予定一覧や正誤一覧を作りやすくするように設計されたものです。これらの箇条書きは、 \family sans 箇条書き(記号) \family default の派生型を専用に用意したものに過ぎません。ただし、これらは、 \family typewriter psnfss \family default パッケージが導入済であることを要求します。 \end_layout \begin_layout Subsubsection 図と表 \end_layout \begin_layout Standard Foil\SpecialCharNoPassThru TeX では、図表フロートは、本文中の挿入箇所にこれらが正確に表示されるように再定義されており、ページの上部やユーザー指定場所に押しのけたりはしないように なっています。たとえフロート配置の設定に変更を加えたとしても、単に無視されます。 \end_layout \begin_layout Subsubsection ページヘッダおよびページフッタ \begin_inset CommandInset label LatexCommand label name "sec:foilfoot" \end_inset \end_layout \begin_layout Standard \family sans グラフィックスロゴ \family default と \family sans 配布制限 \family default の二つは、左フッタ文を制御するものです。前者は、グラフィックスのロゴをスライドに入れるためのもので、既定値は「-Typeset by \family sans Foil \family default \SpecialCharNoPassThru TeX -」となっています。後者は、「機密事項」などのように、聴衆に秘密区分を提示することを意図しています。既定値では、何も設定されていません。 \end_layout \begin_layout Standard スライドの残り三隅には、 \family sans 右フッタ \family default (既定ではページ番号)・ \family sans 右ヘッダ \family default (右上)・ \family sans 左ヘッダ \family default (左上)を使って文字を入れることができます。 \end_layout \begin_layout Subsection サポートされない \family sans Foil \family default \SpecialCharNoPassThru TeX 機能 \begin_inset CommandInset label LatexCommand label name "sec:unsuppfoils" \end_inset \end_layout \begin_layout Standard 以下で言及されているコマンドは、 \family sans \SpecialCharNoPassThru LaTeX \family default 環境内で設定されるか、他の環境中の \family sans \SpecialCharNoPassThru TeX コード \family default として設定される必要があります。 \end_layout \begin_layout Subsubsection 長さ \end_layout \begin_layout Standard 長さは、すべて \family typewriter \backslash setlength{ \family default \emph on 長さ名 \family typewriter \emph default }{ \family default \emph on 新規長さ \family typewriter \emph default } \family default コマンドで調節されます。ここで \emph on 長さ名 \emph default は、変更したい長さに付けられている名前で置き換え、 \emph on 新規長さ \emph default は、その長さの値で置き換えます。長さはすべて、インチ(in)・ミリメートル(mm)・ポイント(pt)のような長さ単位か、 \family typewriter \backslash textwidth \family default のように文書比あるいはフォント基準の長さで指定する必要があります。 \end_layout \begin_layout Standard \family typewriter \backslash foilheadskip \family default で指定される長さを調節することによって、スライドタイトルとスライド本文の間の余白を変更することができます。たとえば、スライドタイトルをすべて0.5 \begin_inset space \space{} \end_inset inだけスライド本文に近づけるには、プリアンブルに \family typewriter \backslash setlength{ \backslash foilheadskip}{-0.5in} \family default と書き込みます。 \end_layout \begin_layout Standard フロート周囲の余白は、以下の長さを設定することで調整することができます。 \end_layout \begin_layout Labeling \labelwidthstring MMMMMMMMMMM \family typewriter \backslash abovefloatskip \family default 本文とフロート上辺との間隔 \end_layout \begin_layout Labeling \labelwidthstring MMMMMMMMMMM \family typewriter \backslash abovecaptionskip \family default フロートとキャプションとの間隔 \end_layout \begin_layout Labeling \labelwidthstring MMMMMMMMMMM \family typewriter \backslash belowcaptionskip \family default キャプションとそれに続く本文との間隔 \end_layout \begin_layout Labeling \labelwidthstring MMMMMMMMMMM \family typewriter \backslash captionwidth \family default この長さを調整することでキャプションを、周囲の本文より短くすることができます。 \family typewriter \backslash textwidth \family default に対する相対的な長さで調整するのが最も良いでしょう。 \end_layout \begin_layout Standard 以下のようなタイトルページ関連の長さもあり、タイトルが長い場合や、著者が複数いる場合に使うと便利かもしれません。 \end_layout \begin_layout Labeling \labelwidthstring MMMMMMMMMMM \family typewriter \backslash abovetitleskip \family default へッダとタイトルとの間隔 \end_layout \begin_layout Labeling \labelwidthstring MMMMMMMMMMM \family typewriter \backslash titleauthorskip \family default \family sans タイトル \family default 環境と \family sans 著者 \family default 環境との間隔 \end_layout \begin_layout Labeling \labelwidthstring MMMMMMMMMMM \family typewriter \backslash authorauthorskip \family default 著者が複数いる場合の \family sans 著者 \family default 行の間隔 \end_layout \begin_layout Labeling \labelwidthstring MMMMMMMMMMM \family typewriter \backslash authordateskip \family default \family sans 著者 \family default と \family sans 日付 \family default との間隔 \end_layout \begin_layout Labeling \labelwidthstring MMMMMMMMMMM \family typewriter \backslash dateabstractskip \family default \family sans 日付 \family default と \family sans 概要 \family default との間隔 \end_layout \begin_layout Standard 最後に紹介する長さ関連コマンドは、箇条書き環境すべてに使用できるものです。 \family typewriter \backslash zerolistvertdimens \family default を箇条書き環境の内側に置くと、項目間の垂直余白がすべて取り除かれます。これは長さではなくコマンドなので、上述のもののように \family typewriter \backslash setlength \family default を使う必要がないことに注意してください。 \end_layout \begin_layout Subsubsection へッダとフッタ \end_layout \begin_layout Standard \family typewriter \backslash LogoOn \family default および \family typewriter \backslash LogoOff \family default は、 \family typewriter MyLogo \family default で定義したロゴを特定のページに入れるかどうかを制御します。 \family typewriter \backslash LogoOff \family default をプリアンブルに入れると、全スライドからロゴが取り除かれます。特定のスライドにのみロゴを付けたくない場合は、当該ページのスライドタイトルの直後に直接 \family typewriter \backslash LogoOff \family default を置き、次のスライドタイトルの直後に直接 \family typewriter \backslash LogoOn \family default を置いてください。 \end_layout \begin_layout Standard \family sans 文書レイアウト \family default ダイアログで \family sans fancy \family default ページ様式を使用することを選択した場合には、横置きページのヘッダとフッタが回転後も正しく配置されるように、プリアンブルに \family typewriter \backslash let \backslash headwidth \backslash textwidth \family default を加える必要があるでしょう。これは、 \family sans fancyheadings \family default パッケージが提供するページレイアウトと \family sans foils \family default クラスの提供するページレイアウトの間に衝突が発生するためです。 \end_layout \begin_layout Section Hollywood(Hollywoodスペック・スクリプト) \end_layout \begin_layout Standard \noun on Garst Reese \noun default 文 \end_layout \begin_layout Subsection はじめに \end_layout \begin_layout Standard 脚本を正しい書式で書くことは、ハリウッドにおける「通過儀礼」です。ハリウッドの脚本は、読み手が内容に集中できるようにし、俳優にとっても読みやすくかつ親しみやすい ように設計されています。脚本の1ページは、映画の1分でなければならず、銀幕上で見えたり聞こえたりしないものは、脚本に混入してはなりません。また、全体を通してCo urier 12 \begin_inset space \space{} \end_inset ptフォントを使わなければならず、イタリック体は用いてはいけません。 \end_layout \begin_layout Subsection 特別な問題 \end_layout \begin_layout Standard 話者の行は、文の途中で改行することは \emph on 決して \emph default あってはなりません。もし話者行の塊が、次頁にまたがる場合には、 \family sans 話者 \family default 名を再度書き、その後に(Cont'd)と加えます。 \end_layout \begin_layout Subsection 特別な機能 \end_layout \begin_layout Standard \family sans 話者 \family default 名はラベルとして挿入し、話者名を挿入するには、そのラベルを相互参照してください。相互参照ダイアログは、登場人物の現在の配役を表示することになります。これは、ト書 きに話者名を挿入するのにも使用することができます。 \end_layout \begin_layout Subsection 用紙寸法と余白 \end_layout \begin_layout Standard USレター寸法で、左余白1.6インチ・右余白0.75インチ・上余白0.5インチ・下余白0.75インチです。 \end_layout \begin_layout Subsection 環境 \end_layout \begin_layout Standard 以下の環境が利用可能です。右に示されている \begin_inset Flex Ruby status collapsed \begin_layout Plain Layout 鍵 \begin_inset Argument post:1 status collapsed \begin_layout Plain Layout キー \end_layout \end_inset \end_layout \end_inset 割当てを使用するには、hollywood.bindを使用してください。 \end_layout \begin_layout Itemize \family sans 一般 \begin_inset Newline newline \end_inset \family default 他の環境が動作しない場合に使用しますが、これを使うことは避けるようにしてください。 \end_layout \begin_layout Itemize フェイドイン: \begin_inset space \hfill{} \end_inset \family sans M-z S-I \family default \begin_inset Newline newline \end_inset 通常、この後には「Sallyは目を覚ますと」のように続きます。 \end_layout \begin_layout Itemize \family sans 屋内: \begin_inset space \hfill{} \end_inset M-z i \begin_inset Newline newline \end_inset \family default 新しい屋内(INTERIOR)カメラの設定を指定します。この後には、かならずDAYやNIGHTなどを指定して、必要な照明を定義します。この行はすべて大文字で書き ます。 \end_layout \begin_layout Itemize \family sans 屋外: \begin_inset space \hfill{} \end_inset M-z e \begin_inset Newline newline \end_inset \family default 屋外(EXTERIOR)カメラの設定を指定します。この行はすべて大文字で書きます。 \end_layout \begin_layout Itemize \family sans 話者 \begin_inset space \hfill{} \end_inset M-z s \begin_inset Newline newline \end_inset \family default 話す役。 \end_layout \begin_layout Itemize \family sans 括弧付き \begin_inset space \hfill{} \end_inset M-z p \begin_inset Newline newline \end_inset 話者 \family default への指示。自動的に括弧()が挿入されますが、\SpecialCharNoPassThru LyX 上で表示されるのは、左括弧( のみです。印刷出力には右括弧も表示されます。 \end_layout \begin_layout Itemize \family sans 対話 \begin_inset space \hfill{} \end_inset M-z d \begin_inset Newline newline \end_inset 話者 \family default が話す内容。 \end_layout \begin_layout Itemize \family sans 画面遷移 \begin_inset space \hfill{} \end_inset M-z t \begin_inset Newline newline \end_inset \family default カメラの動きの指示。例:CUT TO:。 \end_layout \begin_layout Itemize \family sans フェイドアウト: \begin_inset space \hfill{} \end_inset M-z S-I \end_layout \begin_layout Itemize \family sans 著者 \begin_inset space \hfill{} \end_inset M-z S-A \end_layout \begin_layout Itemize \family sans タイトル \begin_inset space \hfill{} \end_inset M-z S-T \end_layout \begin_layout Itemize \family sans 右寄せ住所 \begin_inset space \hfill{} \end_inset M-z r \end_layout \begin_layout Subsection 脚本で使われる特別な用語 \end_layout \begin_layout Itemize (O.S) — off screen \end_layout \begin_layout Itemize (V.0) — voice over \end_layout \begin_layout Itemize b.g. — background \end_layout \begin_layout Itemize C.U. — close-up \end_layout \begin_layout Itemize PAN — camera movement \end_layout \begin_layout Itemize INSERT — cut to close-up of \end_layout \begin_layout Section ijmpcおよびijmpd \end_layout \begin_layout Standard \noun on Panayotis Papasotiriou \noun default 文 \end_layout \begin_layout Subsection 概観 \end_layout \begin_layout Standard ijpmcパッケージは、 \emph on International Journal of Modern Physics C \emph default への電子投稿を可能にするためのマクロ集です。同様に、ijpmdパッケージは、 \emph on International Journal of Modern Physics D \emph default へ投稿する現行を作成するためのものです。両誌ともWorld Scientific社の刊行です。対応する文書クラス名は、それぞれ \family typewriter ws-ijmpc.cls \family default および \family typewriter ws-ijmpd.cls \family default です。これらのファイルは、著者のための指針とともに、 \begin_inset Flex URL status collapsed \begin_layout Plain Layout http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml \end_layout \end_inset および \begin_inset Flex URL status collapsed \begin_layout Plain Layout http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml \end_layout \end_inset の各サイトからダウンロードすることができます。両パッケージは、標準「article」パッケージの修正版であり、両者は(一部を除き)ほぼ同一です。\SpecialCharNoPassThru LyX は、これら のパッケージのほとんどの機能をサポートしています。私は両誌へ投稿する論文を\SpecialCharNoPassThru LyX で書き上げましたが、何らの問題も生じませんでした。 \end_layout \begin_layout Subsection 論文を書く \end_layout \begin_layout Standard 通常と同じく、論文を書く上で最も易しい方法は、ひな型を使って書き始めることです。 \family sans ファイル\SpecialChar menuseparator 新規(ひな型使用) \family default をクリックして、ひな型 \family typewriter ijmpc.lyx \family default もしくは \family typewriter ijmpd.lyx \family default を選択してください。すると、原稿で良く使用されるフィールドを含んだ、ほぼ空の文書ができますので、既存のフィールド(鍵括弧 \family typewriter <> \family default を含む)を正しい情報で置き換えてください。以下の各点にご留意ください。 \end_layout \begin_layout Enumerate 両パッケージでは、フォント寸法や文書のページ様式を変更することが禁じられているので、\SpecialCharNoPassThru LyX 中でこれらを変更することはできません。 \end_layout \begin_layout Enumerate 文書言語は変更してはいけません。論文をプレビューする前に、babelパッケージが使用されていないことを確認してください。これは、 \family sans ツール\SpecialChar menuseparator 設定 \family default をクリックして、 \family sans 言語オプション \family default タブを選択し、言語設定で \family sans Babelを使う \family default チェックボックスを無効にしてから、 \family sans 適用 \family default をクリックすれば、設定することができます(この変更を固定するなら \family sans 保存 \family default を押してください)。 \end_layout \begin_layout Enumerate キーワードを定義するに際しては、「キーワード」様式を用いなくてはなりません。 \end_layout \begin_layout Enumerate ijmpcパッケージが提供する「分類コード」様式は、PACS番号のような分類コードを定義するのに使用することができます。この機能は、ijmpdパッケージではサポ ートされていませんので、ご注意ください。 \end_layout \begin_layout Enumerate 「定義」「ステップ」「例」「注記」「記法」「定理」「証明」「系」「補題」「命題」「命題(Prop)」「問題」「主張」「予想」といった新しい環境を使用することがで きます。これらの使い方は、大凡自明でしょう。\SpecialCharNoPassThru LyX は、これらの環境をすべてサポートし、それぞれについて、適切なラベルと文字様式および連番スキームを使用します。 \end_layout \begin_layout Enumerate 両パッケージは、単純な引用を使用しますので、natbibパッケージは使用してはなりません。\SpecialCharNoPassThru LyX 中では、引用参照は通常通り表示されますが、出力では上付き文字とし て表示されます。引用に通常の本文を使用したい場合には、「See Ref. \begin_inset space \space{} \end_inset \family typewriter \backslash refcite{ \family default \begin_inset Flex Ruby status collapsed \begin_layout Plain Layout \family typewriter 鍵 \family default \begin_inset Argument post:1 status collapsed \begin_layout Plain Layout キー \end_layout \end_inset \end_layout \end_inset \family typewriter } \family default 」のように \family typewriter refcite \family default コマンドを使用してください。 \end_layout \begin_layout Enumerate 両パッケージには、「謝辞」環境がありません。謝辞を置くには、「節*」環境を使用してください。 \end_layout \begin_layout Enumerate 付録は、論文中、謝辞の \emph on 後 \emph default かつ書誌情報の \emph on 前 \emph default であれば、入れることができます。\SpecialCharNoPassThru LyX 上では、「付録領域」という特別な環境があり、これを使って付録の開始位置を指定することができます。この環境は空のままにしてお かなくてはなりません。この環境は、\SpecialCharNoPassThru LaTeX コマンドを書き出すだけで、実際に出力は行いません。\SpecialCharNoPassThru LyX 上では、青字で「Appendix」という単語が表示され、この 箇所より後の節はすべて付録であることを明示します。「付録領域」は、最初の付録の前に \emph on なくてはならない \emph default ことに注意してください。さもなくば、出力中において、付録はすべて通常の節として連番が振られてしまいます。 \end_layout \begin_layout Enumerate ijmpcおよびijmpdパッケージは、表キャプションを実装するのに \family typewriter tbl \family default コマンドを使用します。そのため、\SpecialCharNoPassThru LyX が作成した表は正しく印字されますが、そのキャプションは無視されます。しかし、\SpecialCharNoPassThru TeX コードを少し使えば、この問題を回避して、 キャプションを望み通り印字することができるようになります。そうするには、表フロートを通常通り作成して、キャプションを削除し、代わりに\SpecialCharNoPassThru TeX コードで \family typewriter \backslash tbl{表キャプション}{ \family default (ママ)と入れます。そこに表の内容を入れて、直後を\SpecialCharNoPassThru TeX コード \family typewriter } \family default で閉じてください。このからくりがどのように実装されているかを見るには、ひな型ファイルに入っている表の例を精査してみてください。別の方法としては、表キャプションが 欲しい場合に、表フロート全体を \family typewriter .tex \family default ファイルに収め、このファイルを\SpecialCharNoPassThru LyX 文書に取り込んでください( \family sans 挿入\SpecialChar menuseparator ファイル\SpecialChar menuseparator 子文書 \family default )。表フロートの作り方についての詳細は、各パッケージに含まれている \family typewriter ws-ijmpc.tex \family default または \family typewriter ws-ijmpd.tex \family default ファイルをご覧ください。 \end_layout \begin_layout Subsection 原稿を投稿するための準備 \end_layout \begin_layout Standard 論文を投稿する前には、\SpecialCharNoPassThru LyX 文書を\SpecialCharNoPassThru LaTeX ファイルに書き出し( \family sans ファイル\SpecialChar menuseparator 書き出し\SpecialChar menuseparator \SpecialCharNoPassThru LaTeX \family default ) \begin_inset Foot status open \begin_layout Plain Layout 実は、\SpecialCharNoPassThru LaTeX (plain)とpdflatexとの間で選択ができます。論文を準備するのにpdflatexを使用しようとするのであれば、取り込んである画像がP DF形式に変換され、pdflatexで使用できるように、pdflatexオプションを指定しなくてはなりません。 \end_layout \end_inset 、その \family typewriter .tex \family default ファイルに以下の変更を加える必要があります。 \end_layout \begin_layout Enumerate \family typewriter \backslash documentclass \family default コマンドより前にあるコメント行を削除する。 \end_layout \begin_layout Enumerate 自身で明示的に\SpecialCharNoPassThru LaTeX プリアンブルに置いたコマンドを除き、 \family typewriter \backslash makeatletter \family default コマンドと \family typewriter \backslash makeatother \family default コマンドの間にあるものをすべて削除する。 \end_layout \begin_layout Standard こうして修正を加えた \family typewriter .tex \family default ファイルを保存し、必要な回数\SpecialCharNoPassThru LaTeX で処理してください。それによって得られた \family typewriter .dvi \family default 文書も確認された方がよろしいでしょう。 \end_layout \begin_layout Subsection \SpecialCharNoPassThru TeX コードの使用 \end_layout \begin_layout Standard \SpecialCharNoPassThru TeX コードを使用するのは、2つのコマンドに限られ、これらは文書の最初に置かれなくてはなりません。論文をひな型 \family typewriter ijmpc.lyx \family default または \family typewriter ijmpd.lyx \family default を使用して書き始めた場合には、これら必要な\SpecialCharNoPassThru TeX コードは、すでに書き込まれています。通常、これらを削除する必要はありません。2つのうち1番めの\SpecialCharNoPassThru TeX コードのみが 、奇数ページおよび偶数ページの上部に印字する情報(それぞれ著者名と論文の短縮タイトル)を指定するために、修正する必要があります。この\SpecialCharNoPassThru TeX コードは、 \family typewriter \backslash markboth{著者名}{論文の短縮タイトル} \family default という形である必要があります。 \end_layout \begin_layout Section iopart \end_layout \begin_layout Standard \noun on Uwe Stöhr \noun default 文 \end_layout \begin_layout Subsection 概要 \end_layout \begin_layout Standard iopartパッケージは、Institute of Physics(イギリス物理学会)発行の学術誌へ電子的に投稿する原稿を作成するための文書クラスを提供していま す。iopartクラスを使用した論文作成方法の著者用説明書は、ウェブサイト \begin_inset Flex URL status collapsed \begin_layout Plain Layout ftp://ftp.iop.org/pub/journals/latex2e \end_layout \end_inset からiopartパッケージとともにダウンロード可能です。 \end_layout \begin_layout Subsection 論文を書く \end_layout \begin_layout Standard 論文を書くもっとも簡単な方法は、\SpecialCharNoPassThru LyX の用例ファイルフォルダにある \emph on IOP-article.lyx \emph default を土台にすることです。このファイルを開き、新しい名前で保存して、書き始めてください。この用例ファイルは、特定の環境の使用法についても説明しています。もっとも重要 な助言として、以下の点にご注意ください。 \end_layout \begin_layout Itemize 文書がPDF・PS・DVIにコンパイルできるようにするためには、文書設定の \family sans 数式オプション \family default で、二つの \family sans AMS mathパッケージを使う \family default 関連オプションが有効になっていないことを確認してください! \end_layout \begin_layout Itemize タイトル環境の選択如何によって、論文の種類が定義されます。種類毎に以下の環境をタイトルに使用してください。 \begin_inset Separator parbreak \end_inset \end_layout \begin_deeper \begin_layout Itemize 論文用には \family sans タイトル \end_layout \begin_layout Itemize Review用には \family sans Review \end_layout \begin_layout Itemize Topical review用には \family sans Topical \end_layout \begin_layout Itemize Comment用には \family sans Comment \end_layout \begin_layout Itemize Note用には \family sans 注釈 \end_layout \begin_layout Itemize 論文用には \family sans Paper \family default (タイトルと同じ) \end_layout \begin_layout Itemize Preliminary communication用には \family sans Prelim \end_layout \begin_layout Itemize Rapid communication用には \family sans Rapid \end_layout \begin_layout Itemize 編集者へのLetterには \family sans 書簡 \end_layout \end_deeper \begin_layout Itemize \family sans 書簡 \family default 以外のタイトル環境には、すべて短縮タイトルをつけることもできます。 \end_layout \begin_layout Itemize \SpecialCharNoPassThru LyX では直接にサポートされていませんが、一般的なタイトル環境として \family sans Article \family default があります。執筆する文書が、他のタイトル型にそぐわない場合には、\SpecialCharNoPassThru TeX コードでこれを指定することができます。 \end_layout \begin_layout Standard 特別な表や数式組版に関するヒントなど、詳しい情報については、IOP著者用ガイドラインを参照してください。 \end_layout \begin_layout Section Kluwer \end_layout \begin_layout Standard \noun on Panayotis Papasotiriou \noun default 文 \end_layout \begin_layout Subsection 概要 \end_layout \begin_layout Standard Kluwerパッケージは、Kluwer Academic Publishers社が発行する学術誌への電子投稿を可能にするために、同社が作成したマクロ集です。同社 の発行誌のうち、(少なくとも私の専門内で)もっともよく知られているものは、 \emph on Astrophysics and Space Science \emph default (『宇宙物理学と宇宙科学』)と \emph on Solar Physics \emph default (『太陽系物理学』)ですが、他にも多くの学術誌があります( \begin_inset Flex URL status collapsed \begin_layout Plain Layout http://www.wkap.nl/jrnllist.htm/JRNLHOME \end_layout \end_inset に全覧があります)。Kluwerパッケージは、 \begin_inset Flex URL status collapsed \begin_layout Plain Layout http://www.wkap.nl/kaphtml.htm/STYLEFILES \end_layout \end_inset からダウンロードできます。完全なユーザーの手引きも同パッケージ内に収録されています(個別にダウンロードすることも可能です)。 \end_layout \begin_layout Standard \SpecialCharNoPassThru LyX は、このパッケージの機能の多くをサポートしていますが、すべてではありません。しかし、\SpecialCharNoPassThru TeX コードを必要とするのは、パッケージ中のいくつかの「変わった」コマ ンドだけになりました( \begin_inset CommandInset ref LatexCommand ref reference "subsec:kluwer_peculiarities" \end_inset 参照)。最近、私は\SpecialCharNoPassThru LyX を使って書いた論文を \emph on Astrophysics and Space Science \emph default に投稿しましたが、何らの問題も発生しませんでした。 \end_layout \begin_layout Subsection 論文を書く \end_layout \begin_layout Standard 論文を書き始めるには、ひな型ファイルKluwerを使うのが最も簡単です。 \family sans ファイル\SpecialChar menuseparator 新規(ひな型使用) \family default をクリックし、ひな型 \family typewriter kluwer.lyx \family default を選択してください。これは、原稿に通常必要となる各フィールドと、それらの使用法が短く書かれただけの、(ほとんど)何も書かれていない文書です。他のテンプレートと同 様に、既存の文章を(括弧 \family typewriter <> \family default を含む)正しい情報で上書きしてください。 \end_layout \begin_layout Subsection 投稿の準備 \end_layout \begin_layout Standard AAS\SpecialCharNoPassThru TeX パッケージと同様、論文を投稿する前に、以下のような「後処理」を行う必要があります。 \end_layout \begin_layout Enumerate \family sans ファイル\SpecialChar menuseparator 書き出し\SpecialChar menuseparator LateX \family default をクリックして、論文を\SpecialCharNoPassThru LaTeX ファイルに書き出す。 \end_layout \begin_layout Enumerate 生成された \family typewriter .tex \family default ファイルに、テキストエディタを使用して、以下のような変更を加える。 \family default \begin_inset Separator parbreak \end_inset \end_layout \begin_deeper \begin_layout Enumerate \family typewriter \backslash documentclass \family default コマンドより前にあるコメント行を削除する。 \end_layout \begin_layout Enumerate 意図的に\SpecialCharNoPassThru LaTeX プリアンブルに加えたコマンドを除き、 \family typewriter \backslash makeatletter \family default から \family typewriter \backslash makeatother \family default の間にあるものを、これらのコマンドも含め、すべて削除する。 \end_layout \begin_layout Standard 変更した \family typewriter .tex \family default ファイルを保存する。 \end_layout \end_deeper \begin_layout Enumerate この \family typewriter .tex \family default ファイルを必要な回数(通常3回以内)だけ\SpecialCharNoPassThru LaTeX にかける。 \end_layout \begin_layout Enumerate 生成された \family typewriter .dvi \family default ファイルを \family sans xdvi \family default などを使って開き、問題がないか確認する(間違いをしていない限り問題ないはずです)。 \end_layout \begin_layout Subsection Kluwerパッケージの「風変わり」な特徴 \begin_inset CommandInset label LatexCommand label name "subsec:kluwer_peculiarities" \end_inset \end_layout \begin_layout Standard Kluwerパッケージには、以下のような「風変わりな」特徴があります。 \end_layout \begin_layout Enumerate 複数の論文を1つの\SpecialCharNoPassThru LaTeX ファイルへ入れることができます \begin_inset Foot status collapsed \begin_layout Plain Layout わざわざこんなことをする必要はないでしょう。 \end_layout \end_inset 。各論文は、「article」環境で囲まなくてはなりません。残念ながら、1つの論文だけを書く場合でも、この環境を省略することはできません。つまり、各論文は \family typewriter \backslash begin{article} \family default で始まり、 \family typewriter \backslash end{article} \family default で終わります。この環境を\SpecialCharNoPassThru LyX に実装することも可能でしたが、醜い上に初心者を混乱させる可能性があるので、実装することはしませんでした。したがって、これらの命令( \family typewriter \backslash begin{article} \family default と \family typewriter \backslash end{article} \family default )は、直接本文中に入力して、\SpecialCharNoPassThru LaTeX コード(「\SpecialCharNoPassThru TeX コード」のことです)としてマークする必要があります。 \end_layout \begin_layout Enumerate 論文の冒頭に置く情報(タイトル・サブタイトル・著者名・所属・ヘッダ用タイトル・ヘッダ用著者名・概要・キーワード)は、「opening」とよばれる環境に入れなくて はなりません。これは\SpecialCharNoPassThru LyX では実装されていませんので、タイトルやサブタイトルなどは、2つの\SpecialCharNoPassThru TeX コード行( \family typewriter \backslash begin{opening} \family default および \family typewriter \backslash end{opening} \family default )の間に入れる必要があります。 \end_layout \begin_layout Enumerate ユーザーの手引きによれば、書誌情報の各項目のラベルは、 \family typewriter \begin_inset Newline newline \end_inset \backslash protect \backslash citeauthoryear{ \family default \emph on 著者名 \family typewriter \emph default }{ \family default \emph on 年 \family typewriter \emph default } \family default と書く必要があります。 \end_layout \begin_layout Standard ひな型 \family typewriter kluwer.lyx \family default は、これらの風変わりな点がすべて考慮されています。このひな型を使用して、論文を新たに書きはじめる場合には、特別なことを行う必要はありません。以下の点にのみ留意し てください。 \end_layout \begin_layout Enumerate ひな型にある\SpecialCharNoPassThru TeX コードを削除しないでください。 \end_layout \begin_layout Enumerate 新しい書誌情報項目を入力する場合には、ひな型に例示されている書誌情報項目をコピーして、必要に応じて修正してください。 \end_layout \begin_layout Section Koma-Script \end_layout \begin_layout Standard \noun on Bernd Rellermeyer \noun default 文 \end_layout \begin_layout Subsection 概要 \end_layout \begin_layout Standard \SpecialCharNoPassThru LyX の文書クラス \emph on article (koma-script) \emph default ・ \emph on report (koma-script) \emph default ・ \emph on book \emph default \emph on (koma-script) \emph default ・ \emph on letter \emph default \emph on (koma-script) \emph default は、それぞれKoma-Scriptファミリーの\SpecialCharNoPassThru LaTeX 文書クラス \family typewriter scrartcl.cls \family default ・ \family typewriter scrreprt.cls \family default ・ \family typewriter scrbook.cls \family default ・ \family typewriter scrlettr.cls \family default に対応しています。これらは、標準文書クラス \family typewriter article.cls \family default ・ \family typewriter report.cls \family default ・ \family typewriter book.cls \family default ・ \family typewriter letter.cls \family default の代替物であり、これらよりも多くの点でヨーロッパに於ける活版印刷の慣例に合致します。 \end_layout \begin_layout Itemize 標準文字寸法は、 \emph on article (koma-script) \emph default ・ \emph on report (koma-script) \emph default ・ \emph on book (koma-script) \emph default で11pt、 \emph on letter (koma-script) \emph default で12ptです。 \end_layout \begin_layout Itemize 見出しや箇条書き(記述)環境のラベル、および \emph on letter (koma-script) \emph default 文書クラスの要素の多くでは、ボールド体サンセリフフォントが使われます \begin_inset Foot status collapsed \begin_layout Plain Layout ボールド体サンセリフフォントには、古いcmフォントと新しいecフォントの間に大きな違いがあり、特に見出しの表示の違いが際立ちます。比較すると、ecボールドサンセ リフフォントの方が、少し細く見えます。ecフォントを使用する際に「通常の」外観が欲しい場合には、 \shape smallcaps Walter Schmidt \shape default 作の\SpecialCharNoPassThru LaTeX パッケージ \family typewriter cmsd.sty \family default が役立ちます。 \end_layout \end_inset 。章見出しの連番は、節見出しの連番と同様に行われ、別行立てで「 Chapter\SpecialChar ldots 」という行がつきません。さらに、多くのオプションによって、見出しの外観を修正するこ とができます(\SpecialCharNoPassThru LyX では、 \family sans 文書\SpecialChar menuseparator 設定 \family default ダイアログの \family sans クラスオプション \family default フィールドで指定します)。これらのオプションの独語での詳細な説明が、Koma-Scriptの取扱説明書 \emph on scrguide \emph default にあります。 \end_layout \begin_layout Itemize Koma-Script文書クラスで、印字部分をデザインする主な方法は、 \family sans BCOR \family default オプションまたは \family sans DIV \family default オプションを使う方法です(\SpecialCharNoPassThru LyX では、 \family sans 文書\SpecialChar menuseparator 設定 \family default ダイアログの \family sans クラスオプション \family default フィールドで指定します)。これらのオプションは \family sans 文書\SpecialChar menuseparator 設定 \family default ダイアログのオプションと同様に、ページ余白を明示的に変更することができます。これらとその他印字領域オプションのドイツ語での詳細な説明が、Koma-Script取 扱説明書 \emph on scrguide \emph default にあります。 \end_layout \begin_layout Itemize Koma-Scriptファミリーの\SpecialCharNoPassThru LaTeX 文書クラスには、多くの追加コマンドが定義されています。それらのうち、\SpecialCharNoPassThru LyX で意味を持つものは、対応する段落環境として 実装されています。 \end_layout \begin_layout Standard Koma-Scriptファミリーの\SpecialCharNoPassThru LaTeX 文書クラスに関する独語の詳細な説明が、Koma-Script取扱説明書 \emph on scrguide \emph default にあります \begin_inset Foot status collapsed \begin_layout Plain Layout 英語翻訳版の \emph on screnggu \emph default もありますが、完訳ではありません。 \end_layout \end_inset 。以下の各節では、\SpecialCharNoPassThru LyX に関係する側面のみ説明致します。 \end_layout \begin_layout Subsection article (koma-script)・report (koma-script)・book (koma-script) \end_layout \begin_layout Standard 文書クラス \emph on article (koma-script) \emph default ・ \emph on report (koma-script) \emph default ・ \emph on book \emph default \emph on (koma-script) \emph default は、それぞれレイアウトファイル \family typewriter scrartcl.layout \family default ・ \family typewriter scrreprt.layou \family default t・ \family typewriter crbook.layout \family default によって実装されています。これらは、対応する標準文書クラス \emph on article \emph default ・ \emph on report \emph default ・ \emph on book \emph default の段落環境を、若干の修正を加えた上ですべて含んでいますが、\SpecialCharNoPassThru LyX 固有の \family sans 箇条書き(一覧) \family default 環境は例外であり、同じ機能を持つ新しい \family sans ラベリング \family default 環境で置き換えられています。この \family sans ラベリング \family default 環境以外にも、新しい段落環境が多く追加されています。これらは、 \emph on letter (koma-script) \emph default には含まれていないのでご注意ください。 \end_layout \begin_layout Itemize \family sans 部(addpart) \family default ・ \family sans 章(addchap) \family default ・ \family sans 節(addsec) \family default :これらは、それぞれ \family sans 部* \family default ・ \family sans 章* \family default ・ \family sans 節* \family default と同等の働きをしますが、加えて目次に項目が表示されるようになります。 \family sans 部(addpart) \family default と \family sans 章(addchap) \family default は、 \emph on article (koma-script) \emph default には収録されていません。 \end_layout \begin_layout Itemize \family sans 章(addchap*) \family default ・ \family sans 節(addsec*) \family default :これらは、 \family sans 章(addchap \family default )と \family sans 節(addsec) \family default とまったく同等に動作しますが、加えてランニングへッダを取り除きます。 \family sans 章(addchap*) \family default は、 \emph on article (koma-script) \emph default には収録されていません \begin_inset Foot status collapsed \begin_layout Plain Layout \emph on book (koma-script) \emph default と \emph on report (koma-script) \emph default には、 \family typewriter \backslash addpart* \family default コマンドもありますが、これは \family sans Part* \family default と同一なので、\SpecialCharNoPassThru LyX では実装されていません。 \end_layout \end_inset 。 \end_layout \begin_layout Itemize \family sans 小見出し(minisec) \family default :これは文書構造に現れない形で、続く段落の直上に標準文字寸法の見出しを付けます。 \end_layout \begin_layout Itemize \family sans 上部キャプション \family default と \family sans 下部キャプション \family default は、ある要素の上部ないし下部にキャプションを配置する際、位置に応じて正しく余白取りを行う特別なキャプションです(組版規則に厳密に従うならば、表キャプションは、つ ねに表の上に置くべきでしょう)。また、クラスオプション \family typewriter tablecaptionsabove \family default を用いれば、キャプションを指定すると、表には \family sans 上部キャプション \family default が、図には \family sans 下部キャプション \family default が適用されるようになります。これを使用するためには、Koma-Script第2.8q版以上が必要です。 \end_layout \begin_layout Itemize \family sans 格言(dictum) \family default :これは、章頭などに警句を置くのに用いることができます。オプション引数( \family sans 挿入\SpecialChar menuseparator 短縮タイトル \family default )を用いれば、格言の作者を入れることができます。格言と作者の間は、線で区切られます。これを使用するためには、Koma-Script第2.8q版以上が必要です。 \family sans 格言(dictum) \family default は、 \emph on article (koma-script) \emph default には収録されていません。 \end_layout \begin_layout Standard 以下の各環境は、標準の \family sans タイトル \family default ・ \family sans 著者 \family default ・ \family sans 日付 \family default とともに文書のタイトル領域を形成します。これらは、最初の「通常の」段落よりも前に置かれる必要があります \begin_inset Foot status collapsed \begin_layout Plain Layout つまり、対応する\SpecialCharNoPassThru LaTeX コマンドが \family typewriter \backslash maketitle \family default コマンドよりも前に現れなくてはなりません。 \end_layout \end_inset 。これらの環境が2度以上使用された場合には、後に使用されたものが前のものを上書きします。つまり最後に使用したもののみが有効になります。しかしながら、 \family sans タイトル \family default や \family sans 著者 \family default 、 \family sans 日付 \family default のような異なる環境の順序を変更しても、生成された文書には何の効果も生じません。 \end_layout \begin_layout Itemize \family sans 主題 \family default :通常のタイトル部( \family sans タイトル \family default ・ \family sans 著者 \family default ・ \family sans 日付 \family default )の上に、文書の主題用の中央揃えの段落を生成します。 \end_layout \begin_layout Itemize \family sans 出版社 \family default :通常のタイトル部( \family sans タイトル \family default ・ \family sans 著者 \family default ・ \family sans 日付 \family default )の下に、出版社名用の中央揃えの段落を生成します。 \end_layout \begin_layout Itemize \family sans 献呈 \family default : \emph on report (koma-script) \emph default と \emph on book (koma-script) \emph default では、タイトル頁の次に、献辞用の中央揃えの段落を独立した頁として生成します。 \emph on article (koma-script) \emph default の場合は、通常のタイトル部( \family sans タイトル \family default ・ \family sans 著者 \family default ・ \family sans 日付 \family default )の下に献辞用の中央揃えの段落を生成します。 \end_layout \begin_layout Itemize \family sans タイトル頭書き \family default :通常のタイトル部( \family sans タイトル \family default ・ \family sans 著者 \family default ・ \family sans 日付 \family default )の上に、文書頭書き用の左揃えの段落を生成します。 \end_layout \begin_layout Itemize \family sans 扉裏上部 \family default : \emph on report (koma-script) \emph default や \emph on book (koma-script) \emph default の両面印刷において、扉裏上部に左揃え段落を生成します。片面印刷や、 \emph on article (koma-script) \emph default では何の効果も生じません。 \end_layout \begin_layout Itemize \family sans 扉裏下部 \family default : \emph on report (koma-script) \emph default や \emph on book (koma-script) \emph default の両面印刷において、扉裏下部に左揃え段落を生成します。片面印刷や、 \emph on article (koma-script) \emph default では何の効果も生じません。 \end_layout \begin_layout Itemize \family sans 追加タイトル \family default :実際の文書の前に、整形を行わない段落から成る、特殊な「汚い」ページを生成します。 \end_layout \begin_layout Standard 文書クラス \emph on article (koma-script) \emph default ・ \emph on report (koma-script) \emph default ・ \emph on book (koma-script) \emph default の 各レイアウトファイルは、 \family typewriter scrmacros.inc \family default ファイルを読み込みます。このファイルは、ユーザ環境を定義する場所として想定されています。s \family typewriter crmacros.inc \family default を、個人用レイアウトディレクトリにコピーして編集してください! \end_layout \begin_layout Subsection letter (koma-script) \end_layout \begin_layout Standard \noindent 文書クラス \emph on letter (koma-script) \emph default は、レイアウトファイル \family typewriter scrlettr.layout \family default で実装されています。このレイアウトファイルには、対応する標準文書クラス \emph on letter \emph default の全段落環境が、部分的に変更を加えた形で収録されていますが、\SpecialCharNoPassThru LyX 固有環境の \family sans \SpecialCharNoPassThru LyX コード \family default ・ \family sans コメント \family default ・ \family sans 箇条書き(一覧 \family default )は、新しく \family sans ラベリング \family default 環境に置き換えられています。それ以外にも、標準文書クラスとは異なり、標準環境の \family sans \SpecialCharNoPassThru LaTeX \family default ・ \family sans 引用(字下げあり) \family default ・ \family sans 引用(字下げなし) \family default ・ \family sans 詩句 \family default が収録されています。さらに、新しいletter固有環境がたくさん追加されています。 \end_layout \begin_layout Standard この文書クラスで作成した書簡の外観は、様々な\SpecialCharNoPassThru LaTeX コマンドを\SpecialCharNoPassThru LaTeX プリアンブルに置くことで制御することができます \begin_inset Foot status collapsed \begin_layout Plain Layout 例えば、名前と住所の入った書簡ヘッダの標準的外観は、きわめて頑固です。「普通の」へッダは、プリアンブル中に以下のようなコマンドを入れることで生成することができま す。 \end_layout \begin_layout LyX-Code \backslash firsthead{ \backslash parbox[b]{ \backslash textwidth} \end_layout \begin_layout LyX-Code { \backslash ignorespaces \backslash fromname \backslash \backslash \backslash ignorespaces \backslash fromaddress}} \end_layout \begin_layout LyX-Code \backslash nexthead{ \backslash parbox[b]{ \backslash textwidth} \end_layout \begin_layout LyX-Code { \backslash ignorespaces \backslash fromname \backslash hfill \backslash ignorespaces \backslash pagename \backslash \end_layout \begin_layout LyX-Code \backslash thepage}} \end_layout \end_inset 。これらの\SpecialCharNoPassThru LaTeX コマンドのドイツ語での詳細な説明は、Koma-Scriptの取扱説明書 \emph on scrguide \emph default にあります。この方法で、書簡の著者は、個人用書簡レイアウトを作ることができます。 \end_layout \begin_layout Standard \family sans 書簡 \family default 環境および \family sans 頭語 \family default 環境は、書簡の冒頭部を定義するもので、すべての書簡で使用しなくてはなりません。\SpecialCharNoPassThru LyX 文書クラスでは、これらの環境を強調するために、左余白にそれぞれ \shape italic L \shape default と \shape italic O \shape default という文字が表示されます。同一ファイル中には、複数の書簡を書くことができます。 \family sans 頭語 \family default 環境は、同じ受取人への書簡を新しく書き出すものであり、 \family sans 書簡 \family default 環境は、新しい受取人を生成するものです。 \family sans 結語 \family default ・ \family sans PS \family default ・ \family sans CC \family default ・ \family sans Encl \family default は、通常の段落環境なので、同一の書簡中でも何度も使用することができます。 \end_layout \begin_layout Itemize \family sans 書簡 \family default :受取人のための段落をつくり、暗黙に書簡の開始を定義します。 \end_layout \begin_layout Itemize \family sans 頭語 \family default :敬称のための段落をつくり、暗黙に新しい書簡を開始します。 \end_layout \begin_layout Itemize \family sans 結語 \family default :結語のための段落をつくります。 \end_layout \begin_layout Itemize \family sans PS \family default :追伸のための段落をつくります。 \end_layout \begin_layout Itemize \family sans CC \family default :同報一覧のための段落をつくります。 \end_layout \begin_layout Itemize \family sans Encl \family default :同封物のための段落をつくります。 \end_layout \begin_layout Standard \family sans 名前 \family default ・ \family sans 署名 \family default ・ \family sans 住所 \family default ・ \family sans 電話 \family default ・ \family sans 場所(Place \family default )・ \family sans 返送先住所 \family default ・ \family sans 配送手段(Specialmail) \family default ・ \family sans 場所 \family default ・ \family sans タイトル \family default ・ \family sans 主題 \family default は、情報入力を促すラベルの付いた入力環境で、文書クラスが適切な処理を行います \begin_inset Foot status collapsed \begin_layout Plain Layout 上述の \family sans 書簡 \family default や \family sans 頭語 \family default が、これらのような入力環境でないのは、矛盾しているように感じられるかもしれません。しかしながら、これら2つの環境は特別の意味を持っているために、これらは左余白に 一文字をマークした通常の段落環境として実装しました。さらに、 \family sans 頭語 \family default 環境と \family sans 結語 \family default 環境が著しく異なって見えると対称性が損なわれることになるのも理由の一つです。 \end_layout \end_inset 。これらの環境は、対応する \family sans 頭語 \family default 環境の前に置く必要があります。 \end_layout \begin_layout Standard 生成された書簡の実際の外観は、特定の環境の使い方だけではなく、他の要素にも依存するため、これらの環境をWYSIWYGとして実装することには、あまり意味がありませ ん。たとえば、 \family sans 署名 \family default 環境で入力した署名は、標準的な挙動では、同じ書簡に \family sans 結語 \family default 環境も使用されているときのみ、書簡の出力に現れます。 \family sans 電話 \family default 環境に入力された値は、標準的な挙動では、書簡の出力には全く表示されません。書簡のヘッダを自由にデザインできることは、前出の脚注で示してあります。 \end_layout \begin_layout Standard 入力環境は、空の段落として使うことができます。これは、たとえば \family sans 署名 \family default 環境の場合に有効です。 \family sans 署名 \family default 環境を全く使用しない場合は、標準的な挙動では、 \family sans 名前 \family default 環境の値が署名として使用されますが、空の \family sans 署名 \family default 環境を作成しておくと、署名の値は無定義となりません。 \end_layout \begin_layout Standard 入力環境を使用すると、個人データ(名前や住所など)が既に入力された入力環境と、後から入力するデータの入力環境を備えた、書簡のひな型を作成することができます。 \end_layout \begin_layout Itemize \family sans 名前 \family default :送り主の名前。標準的な挙動では、書簡のヘッダ部にスモールキャップ体の中央揃えの段落として表示されます。 \end_layout \begin_layout Itemize \family sans 署名 \family default :送り主の署名。標準的な挙動では、 \family sans 結語 \family default 環境の下に表示されます。 \family sans 署名 \family default 環境を使用しないと、代わりに \family sans 名前 \family default 環境の値が表示されます。 \end_layout \begin_layout Itemize \family sans 住所 \family default :送り主の住所。標準的な挙動では、書簡ヘッダの送り主の名前の下に中央揃えの段落として表示されます。 \end_layout \begin_layout Itemize \family sans 電話 \family default :送り主の電話番号。標準的な挙動では、\SpecialCharNoPassThru LaTeX 変数 \family typewriter \backslash telephonenum \family default を設定するだけです。 \end_layout \begin_layout Itemize \family sans 場所(Place) \family default :書簡を書いた場所。 \end_layout \begin_layout Itemize \family sans 日付 \family default :書簡を書いた日付。 \family sans 場所(Place) \family default と \family sans 日付 \family default は、標準的な挙動では、受取人フィールドの下に、単一の右揃え行として場所と日付を生成します。空の \family sans 日付 \family default 環境を作成しておくと、 \family sans 場所(Place) \family default の値如何に関わらず、場所も日付も表示されません。 \family sans 日付 \family default 環境を使用しない場合には、書簡を出力した日付が使用されます。 \end_layout \begin_layout Itemize \family sans 返送先住所 \family default :送り主の返送先住所。標準的な挙動では、受取人の上に小文字のサンセリフ体フォントで表示されます。 \end_layout \begin_layout Itemize \family sans 特別便 \family default :特別便の情報。標準的な挙動では、受取人フィールドの上かつ返送先住所の下に、下線付きで表示されます。 \end_layout \begin_layout Itemize \family sans 場所 \family default :追加情報。標準的な挙動では、受取人フィールドの下の右側に表示されます。 \end_layout \begin_layout Itemize \family sans タイトル \family default :書簡の題名。標準的な挙動では、主題の上に大きなボールド体サンセリフフォントで表示されます。 \end_layout \begin_layout Itemize \family sans 主題 \family default :書簡の主題。標準的な挙動では、 \family sans 頭語 \family default 環境の上にボールド体で表示されます。 \end_layout \begin_layout Standard \family sans Yourref・Yourmail・Myref・顧客・インボイス \family default といった環境は、 \family sans タイトル \family default 行の上に「Your ref.」・「Your letter of」・「Our ref.」・「Customer no.」・「Invoice no.」・「Date」といったフ ィールド行を持つ、ビジネス書簡を作成します。日付フィールドには、 \family sans 日付 \family default 環境の値が使用されます。しかしながら、これらの「ビジネス書簡環境」の一つを使用した場合には、 \family sans 場所(Place) \family default の値は書簡には表示されなくなり、\SpecialCharNoPassThru LaTeX 変数 \family typewriter \backslash fromplace \family default が設定させるだけになります。通常時に、受取人フィールドの下に右揃えで出力される場所と日付の出力は、抑制されます。これらのビジネス環境は、ラベル付きの入力環境とし て実装されており、対応する \family sans 頭語 \family default 環境よりも前に置く必要があります。 \end_layout \begin_layout Itemize \family sans Yourref \family default : Your ref. \end_layout \begin_layout Itemize \family sans Yourmail \family default : Your letter of. \end_layout \begin_layout Itemize \family sans Myref \family default : Our ref. \end_layout \begin_layout Itemize \family sans Customer \family default : Customer no. \end_layout \begin_layout Itemize \family sans Invoice \family default : Invoice no. \end_layout \begin_layout Subsection 新しいletterクラス:letter (koma-script v.2) \end_layout \begin_layout Standard by \noun on Jürgen Spitzmüller \begin_inset VSpace medskip \end_inset \end_layout \begin_layout Standard \noindent Koma-Script第2.8版では、新しいletterクラス \family typewriter scrlttr2 \family default が導入されたため、 \family typewriter scrlettr \family default は廃止されてサポート対象外となりました。これは—\SpecialCharNoPassThru LaTeX 側で—全く新しいインターフェイスを持っており、旧クラスとは互換性がありません。したがって、\SpecialCharNoPassThru LyX は両者 をサポートしていますが、新しい方のクラスを使用することを推奨します。 \end_layout \begin_layout Standard このクラスは、 \emph on letter (koma-script) \emph default と同一の機能に加えて、新しい機能をいくつかサポートしています。基本となる項目は、 \family sans 住所 \family default (受取人の住所、旧レイアウトの \family sans 書簡 \family default と同じ)・ \family sans 頭語 \family default ・ \family sans 結語 \family default です。 \family sans 次の住所 \family default は別の書簡を新しく開始します(つまり一文書あたり複数の書簡を書くことができます)。新しく付け加えられた項目は、送り主の \family sans 電子メール \family default ・ \family sans URL \family default ・ \family sans ファックス \family default ・ \family sans 銀行 \family default 、およびヘッダに( \family sans 挿入\SpecialChar menuseparator 図 \family default で) \family sans ロゴ \family default を入れることができるようになった点です。 \end_layout \begin_layout Standard しかしながら、もっとも大きな改善は、書簡のレイアウトを、ほとんどどんなニーズにも合わせて設定できるようになった点でしょう。これはプリアンブルか、クラスオプション として読み込まれる特別なスタイルファイル(「レタークラスオプション」、拡張子 \family typewriter *.lco \family default )によって設定することができます \begin_inset Foot status collapsed \begin_layout Plain Layout KOMAパッケージには、既定の \family typewriter *.lco \family default ファイルがいくつか収録されています。たとえば、ドイツの組版規則に則った \family typewriter DIN.lco \family default や、旧 \family typewriter scrlettr \family default クラスの既定レイアウトを提供する \family typewriter KOMAold.lco \family default などです。たとえば後者は、 \family sans 文書\SpecialChar menuseparator 設定\SpecialChar menuseparator 文書クラス\SpecialChar menuseparator クラスオプション \family default フィールドにクラスオプション \family typewriter KOMAold \family default を加えることで読み込むことができます。 \end_layout \end_inset 。用例としては、\SpecialCharNoPassThru LyX に収録されているひな型 \emph on koma-letter2 \emph default をご覧ください。詳細な解説は、Koma-Script取扱説明書( \emph on scrguide \emph default )にあります。 \end_layout \begin_layout Subsection 問題点 \end_layout \begin_layout Standard Koma-Script文書クラスを\SpecialCharNoPassThru LyX 上に表示する上で、\SpecialCharNoPassThru LyX の内部処理が若干の問題を生じめます。 \end_layout \begin_layout Itemize \family sans 章 \family default 環境の章番号は、章見出しと同じ行ではなく、その上に表示されます。これは、レイアウトファイル中の \family sans Counter_Chapter \family default ラベル型に対する\SpecialCharNoPassThru LyX の内部処理が原因です。 \end_layout \begin_layout Itemize \family sans 章(addchap) \family default と \family sans 節(addsec) \family default 環境の見出しは、「本当の」\SpecialCharNoPassThru LaTeX の目次には追加されますが、\SpecialCharNoPassThru LyX の目次( \family sans 移動 \family default メニュー)には追加されません。 \end_layout \begin_layout Itemize \emph on letter \emph default 文書クラスでの段落は、垂直スペースによる段落区切りで表示され、字下げはされません。これが標準的な挙動となっていて、特別な\SpecialCharNoPassThru LaTeX コマンドは必要ありません。しか し、 \family sans 文書\SpecialChar menuseparator 設定 \family default ダイアログでは、対応するラジオボタンは \family sans 字下げ \family default に設定されています。 \family sans 垂直スペース \family default は、隙間を空けるために、文書に\SpecialCharNoPassThru LaTeX コマンドをつねに追加するようになっていますが、この文書クラスの場合には、そのような挙動が望まれないためです。 \end_layout \begin_layout Section Memoir \end_layout \begin_layout Standard \noun on Jürgen Spitzmüller \noun default 文 \end_layout \begin_layout Subsection 概観 \end_layout \begin_layout Standard Memoirは、非常に強力で、着実に改良が加えられている文書クラスであり、フィクションとノンフィクションの文学作品用に設計されています。その目的は、ユーザーに、 文書の組版に関して最大限の裁量を得させることにあります。Memoirは、標準bookクラスに基づいていますが、articleクラスをエミュレートすることもできま す(以下参照)。 \end_layout \begin_layout Standard Memoir開発者であるPeter Wilsonは、\SpecialCharNoPassThru LaTeX の世界での、多くの便利なパッケージの作者として知られていますが、それらのほとんどは、Memoirに 統合されました。このため、章のデザインや、目次や付録などのレイアウトを、はるかに簡単に行うことができます。しかしながら、\SpecialCharNoPassThru LyX は、これらすべての素晴らしい機能を ネイティブでサポートしているわけではありません。これらのうちいくつかは、将来のリリースで追加されるかもしれませんが \begin_inset Foot status collapsed \begin_layout Plain Layout もし提案があれば、ぜひ \begin_inset Flex URL status collapsed \begin_layout Plain Layout lyx-devel@lists.lyx.org \end_layout \end_inset までお送り下さい。 \end_layout \end_inset 、\SpecialCharNoPassThru LyX のフレームワークが持つ制約のために、おそらく決して追加されることのないと考えられるものも多数あります。もちろん、ネイティブな\SpecialCharNoPassThru LaTeX コマンド(\SpecialCharNoPassThru TeX コ ード \begin_inset Foot status collapsed \begin_layout Plain Layout 【参考】詳細は、第 \begin_inset CommandInset ref LatexCommand ref reference "sec:LaTeXコードを挿入する" \end_inset 節参照。 \end_layout \end_inset )の助けを借りれば、全機能を使用できます。この節では、\SpecialCharNoPassThru LyX がネイティブにサポートしている機能についてのみ、列挙するものとします。詳細な説明(および他の機能)に ついては、Memoirクラスの詳しい取扱説明書 \begin_inset Foot status collapsed \begin_layout Plain Layout 【参考】 \begin_inset Flex URL status collapsed \begin_layout Plain Layout CTAN:/macros/latex/memoir/memman.pdf \end_layout \end_inset \end_layout \end_inset をご覧になることをお勧めします。この取扱説明書は、本クラスのユーザーの手引きであるのみに留まらず、良い組版に関する包括的な解説であり、それ自身が良い組版の傑出し た用例となっています。 \end_layout \begin_layout Subsection 基本的な機能と制約 \end_layout \begin_layout Standard Memoirは、基本的に、標準bookクラスの全機能をサポートしています。しかしながら、以下に示すような若干の違いがあります。 \end_layout \begin_layout Description フォント寸法: Memoirでは、9・10・11・12・14・17と、より広い範囲のフォント寸法が使用可能です。 \end_layout \begin_layout Description ページ様式: Memoirパッケージとfancyhdrパッケージとのコマンドの衝突のため(両パッケージは同じ名前のコマンドを定義しているため、\SpecialCharNoPassThru LaTeX が混乱さ せられます)、fancyページ様式は使用できません。その代わり、Memoirには、多くの独自のページ様式が付属してきます( \family sans 文書\SpecialChar menuseparator 設定\SpecialChar menuseparator ページレイアウト \family default 参照)。これらを章題ページに使用したい場合には、コマンド \family typewriter \backslash chapterstyle \family default を、本文またはプリアンブルに記述する必要があります(例えば、 \family typewriter \backslash chapterstyle{companion} \family default など)。 \end_layout \begin_layout Description 節分け: 標準クラスでは、節分けコマンド(章・節・小節等)は、非必須引数を一つ取ることができます。これを用いて、目次やヘッダ用に別のタイトルを指定することができ ます(たとえば、タイトルが長すぎる場合などに用います)。\SpecialCharNoPassThru LyX では、章や節の始めで \family sans 挿入\SpecialChar menuseparator 短縮タイトル \family default を使えば、これを指定することができます。一方、Memoirでは、第2の非必須引数を取ることができ、目次用のタイトルとヘッダ用のタイトルの指定を分離しています。こ れを使えば、本文用と目次用とヘッダ用のタイトルの3種類を指定することができます。この機能を使用したい場合には、2つの非必須引数を入力して、最初のものに目次用、次 のものにヘッダ用短縮タイトルを入れてください。 \end_layout \begin_layout Description 目次・図一覧・表一覧: 標準クラス(および他の多くのクラス)では、目次と図一覧および表一覧は、自動的に新規頁に置かれます。Memoirは、これとは別の方針を採り ます。改頁を行いたい場合は、手動で頁区切りを入れなくてはなりません。 \end_layout \begin_layout Description タイトル頁: 理由は不明ですが、Memoirはタイトルページに丁付けを行います(標準クラスでは、タイトルページは「empty」様式)。タイトル頁に丁付けを行いた くない場合には、プリアンブルに \family typewriter \backslash aliaspagestyle{title}{empty} \family default と入力してください。 \end_layout \begin_layout Description Article: クラスオプション \emph on article \emph default を用いる( \family sans 文書\SpecialChar menuseparator 設定\SpecialChar menuseparator クラスオプション \family default で入力)と、article様式をエミュレートできます。すなわち、(脚注・図・表等の)カウンタは、章毎にリセットされず、次の章は頁を改めず(ただし、「本物の」ar ticleクラスとは違って、頁を改めることも可)、部はbookクラスと同様に、独立の頁を使用します。 \end_layout \begin_layout Description Oldfontcommands: \SpecialCharNoPassThru LaTeX 旧2.09版で使用されていた旧いフォントコマンド( \family typewriter \backslash rm \family default や \family typewriter \backslash it \family default など)は、Memoirにおいては、既定では使用することができません。Memoirがこれらのコマンドを検知すると、エラーを発して\SpecialCharNoPassThru LaTeX を停止させます。しかし、 クラスオプション \emph on oldfontcommands \emph default を指定すると、これらのコマンドが容認され、エラーの代わりに警告を発するのみとなります(これによって、少なくとも\SpecialCharNoPassThru LaTeX は停止しなくなります)。まだ、多くのパッ ケージと、就中多くのBib\SpecialCharNoPassThru TeX スタイルファイルが、これらのコマンドを使用しているので、我々はこのオプションを既定で使うこととしました。 \end_layout \begin_layout Subsection 追加された機能 \end_layout \begin_layout Standard \SpecialCharNoPassThru LyX でサポートされる機能(今のところそれほど多くはありません)を簡単に説明しましょう。詳しくはMemoirの取扱説明書 \begin_inset Foot status collapsed \begin_layout Plain Layout \begin_inset Flex URL status collapsed \begin_layout Plain Layout CTAN:/macros/latex/memoir/memman.pdf \end_layout \end_inset 。 \end_layout \end_inset を見てください。 \end_layout \begin_layout Description 概要: 概要が、追加された機能として扱われているのを不思議に思われるかもしれませんが、bookクラスとしては追加された機能なのです。通常bookクラスには概要は ないのですが、memoirにはあります。これは、どこでも何回でも自由に使うことができます。 \end_layout \begin_layout Description 章要約: この古い組版様式はご覧になったことがあるかも知れません。章の内容が、見出しの下と目次に要約されているものです(たとえば、「我らが英雄がトロヤに到着する 。彼は友人を失うが、新たな友人を得る。」など)。章要約(chapterprecis)はこれを行います。したがって、章要約は章の下でのみ意味を持ちます。 \end_layout \begin_layout Description 題辞: 題辞(epigraph)は章頭の、気の利いた標語やモットーです。題辞環境は、そのような標語を組む洗練された方法を提供します。標語本体(本文)とその著者( 出典)は、短い線で区切られます。この環境には二つの引数(本文と出典)が必要なので、ここでも\SpecialCharNoPassThru LyX を少しだます必要があります。ここでは、2つの引数の間に、 \emph on <標語> \family typewriter \emph default }{ \family default \emph on <標語の著者> \emph default のように、(\SpecialCharNoPassThru TeX モードで)波括弧を入れなくてはなりません。 \end_layout \begin_layout Description 詩題: Memoirには(複雑で隠喩的なものも含めて)詩を組版するための多くの機能がありますが、\SpecialCharNoPassThru LyX は、そのうちいくつかしかサポートしていません。詩題はその一 つです。これは詩用の中央揃えタイトルで、目次にも表示されます(詩句が詩の標準環境です。Memoirには、詩句の拡張版もありますが、これらを使うためには\SpecialCharNoPassThru TeX コー ドを使用しなくてはなりません。これらの環境は通常の詩句環境の中に入れ子にしなくてはならないのですが、\SpecialCharNoPassThru LyX ではそれができないためです)。 \end_layout \begin_layout Description 詩題*: 目次に現れない他は詩題と同じです。 \end_layout \begin_layout Section Article (mwart)・book (mwbk)・report (mwrep) \begin_inset Argument status status collapsed \begin_layout Plain Layout The \family typewriter mw \family default Classes \end_layout \end_inset \end_layout \begin_layout Standard \noun on Tomasz Luczak \noun default 文 \end_layout \begin_layout Standard \SpecialCharNoPassThru LyX 文書クラス \emph on article (mwart) \emph default ・ \emph on report (mwrep)・book \emph default \emph on (mwbk) \emph default は、それぞれ\SpecialCharNoPassThru LaTeX 文書クラス \family typewriter mwart.cls \family default ・ \family typewriter mwrep.cls \family default ・ \family typewriter mwbk.cls \family default に対応しています。これらは、標準の \family typewriter article.cls \family default ・ \family typewriter report.cls \family default ・ \family typewriter book.cls \family default を代替するものであり、多くの点で、ポーランド語の組版慣習によく適合しています。 \end_layout \begin_layout Standard 基本的な違いは、次の点です。 \end_layout \begin_layout Itemize 付番のない見出し( \family sans 節* \family default などの星付き)も目次に加えられます。 \end_layout \begin_layout Itemize 以下のページスタイルの追加 \begin_inset Separator parbreak \end_inset \end_layout \begin_deeper \begin_layout Description uheadings 分離線付きヘッダ \end_layout \begin_layout Description myheadings \family typewriter \backslash markright \family default コマンドおよび \family typewriter \backslash markboth \family default コマンドで設定するカスタムヘッダ \end_layout \begin_layout Description myuheadings 分離線付きカスタムヘッダ \end_layout \begin_layout Description outer ページの外側にページ番号 \end_layout \end_deeper \begin_layout Itemize オプション \begin_inset Separator parbreak \end_inset \end_layout \begin_deeper \begin_layout Description rmheadings セリフ体見出し \threehyphens 既定 \end_layout \begin_layout Description sfheadings サンセリフ体見出し \end_layout \begin_layout Description authortitle タイトルページは、著者名・タイトルの順で配置 \threehyphens 既定 \end_layout \begin_layout Description titleauthor タイトルページは、タイトル・著者名の順で配置 \end_layout \begin_layout Description withmarginpar ページ上に余白のための場所を確保 \end_layout \end_deeper \begin_layout Section Paper \end_layout \begin_layout Standard \family sans paper \family default 文書クラスは標準 \family sans article \family default クラスの代替となるものです。これは \family sans 同様の \family default 機能を提供しますが、サンセリフ体の節見出し・ヘッディング等を持つこちらのレイアウトの方が気に入るかも知れません。 \end_layout \begin_layout Section Rev\SpecialCharNoPassThru TeX 4 \end_layout \begin_layout Standard by \noun on Amir Karger \end_layout \begin_layout Standard \begin_inset VSpace bigskip \end_inset \end_layout \begin_layout Standard \noindent \family sans Revtex \begin_inset space ~ \end_inset 4 \family default テキストクラスは、アメリカ物理学会のRev\SpecialCharNoPassThru TeX 4.0(1999年5月の \begin_inset Formula $\beta$ \end_inset リリース)クラスで動作します。 \end_layout \begin_layout Standard \SpecialCharNoPassThru LyX には、Rev\SpecialCharNoPassThru TeX 3.1で動作する \family sans Revtex \family default テキストクラスもあります。しかしながら、第3.1版は\SpecialCharNoPassThru LaTeX 2.09で動作するものであり、基本的に時代遅れなものになっています。\SpecialCharNoPassThru LyX は\SpecialCharNoPassThru LaTeX2e を必要とす ることから、第3.1版は\SpecialCharNoPassThru LyX とうまく協調しないことを意味しますが、動作するようには調整してあります。Rev\SpecialCharNoPassThru TeX 4.0は、\SpecialCharNoPassThru LaTeX2e で素直に動作するようにデ ザインされているので、\SpecialCharNoPassThru LyX と \family sans Rev\SpecialCharNoPassThru TeX \begin_inset space ~ \end_inset 4 \family default テキストクラスの組で使用するのは、たいへん簡単です。 \end_layout \begin_layout Standard この取扱説明書は、Rev\SpecialCharNoPassThru TeX 4.0の説明書の \emph on 補完 \emph default として使用されることを前提としています。したがって、ここではRev\SpecialCharNoPassThru TeX 固有マクロの説明はせず、必要な場合にはプリアンブルに何と書けば良いかを知っているものとし て説明します。 \end_layout \begin_layout Subsection 導入 \end_layout \begin_layout Standard Rev\SpecialCharNoPassThru TeX 4パッケージのREADMEファイルにあるとおり、ともかくRev\SpecialCharNoPassThru TeX 4を導入しなくてはなりません。パッケージは、The Rev\SpecialCharNoPassThru TeX 4 Web Site \begin_inset Flex URL status collapsed \begin_layout Plain Layout http://publish.aps.org/revtex4/ \end_layout \end_inset から入手することができます。これを\SpecialCharNoPassThru LaTeX が検出することのできる場所に導入してください。それから、適当に選んだディレクトリ(もといクラスファイルを導入したのと は異なるディレクトリ)で簡単なRev\SpecialCharNoPassThru TeX 4文書を \SpecialCharNoPassThru LaTeX でコンパイルできるかどうか確認してください。この後、\SpecialCharNoPassThru LyX を環境構成すると、クラスファイルを検出 し、Rev\SpecialCharNoPassThru TeX 4テキストクラスが使用できるようになるはずです。 \end_layout \begin_layout Standard 使い始めるには、 \family typewriter tex2lyx \family default を使ってRev\SpecialCharNoPassThru TeX 4文書を読み込むか、またはひな型ディレクトリにある \family sans Revtex \begin_inset space ~ \end_inset 4 \family default のひな型を使うのが、おそらく一番簡単な方法でしょう。 \end_layout \begin_layout Subsection プリアンブルに関すること \end_layout \begin_layout Standard \family typewriter \backslash documentclass \family default に与える「preprint」や「aps」のような非必須引数は、他のクラス同様、 \family sans 文書\SpecialChar menuseparator 設定\SpecialChar menuseparator 文書クラス \family default の \family sans クラスオプション \family default フィールドに入れます。Rev\SpecialCharNoPassThru TeX では、少なくとも一つの非必須引数が必要なことに注意してください。 \end_layout \begin_layout Standard \family typewriter \backslash draft \family default など他のプリアンブルは、他のクラス同様、 \family sans 文書\SpecialChar menuseparator 設定\SpecialChar menuseparator \SpecialCharNoPassThru LaTeX プリアンブル \family default に入れてください。 \end_layout \begin_layout Subsection レイアウト \end_layout \begin_layout Standard レイアウトは、基本的にRev\SpecialCharNoPassThru TeX 4.0のコマンドに対応しています。たとえば、Emailレイアウトは、 \family typewriter \backslash email{} \family default に対応しています。(少なくともRev\SpecialCharNoPassThru TeX 4.0 Beta現在では) \family sans 住所 \family default と \family sans 所属 \family default はまったく同じものなので、両方を使う必要はありません \begin_inset Foot status collapsed \begin_layout Plain Layout ついでながら、 \family typewriter tex2lyx \family default は両方とも対応しているので、 \family typewriter \backslash address \family default と \family typewriter \backslash affiliation \family default のどちらも翻訳することができます。 \end_layout \end_inset 。 \end_layout \begin_layout Subsection 重要な注意 \end_layout \begin_layout Standard Rev\SpecialCharNoPassThru TeX 4には、バグを引き起こしがちなために、気をつけなくてはならない特殊な面がいくつかあるため、\SpecialCharNoPassThru LyX ではさらに気をつけなくてはなりません。 \end_layout \begin_layout Standard Rev\SpecialCharNoPassThru TeX では、 \family typewriter \backslash thanks \family default コマンドは、 \family typewriter \backslash author \family default コマンドの \emph on 外側 \emph default に来なくてはなりません。\SpecialCharNoPassThru LyX では、独立した \family sans 感謝 \family default レイアウトがこの働きをします。直接 \family sans 、著者 \family default レイアウトに脚注を付けてしまうと、おかしなことが起こる可能性があります。詳細については、Rev\SpecialCharNoPassThru TeX 4の取扱説明書をご覧ください。 \end_layout \begin_layout Standard また、 \family sans 著者電子メール \family default ・ \family sans 著者URL・感謝(thanks) \family default レイアウトは、 \family sans 著者 \family default レイアウトと \family sans 住所( \family default または同等の \family sans 所属 \family default )レイアウトの間に置かなければなりません。 \family sans 感謝(thanks) \family default を \family sans 住所 \family default の後に置いてしまうと、\SpecialCharNoPassThru LaTeX はコンパイルに失敗します。 \end_layout \begin_layout Subsection 問題点 \end_layout \begin_layout Standard このレイアウトの主な問題点は、電子メールやタイトルのようなレイアウトに非必須引数を用いることができないことです(これはこのレイアウトだけの問題ではありません。例 えば、節レイアウトも非必須引数を使用することができません)。これは、たとえばページヘッダにヘッダ用タイトルを設定したい場合などには、ファイルを\SpecialCharNoPassThru LaTeX ファイル に変換した後に(これは最終的にAPSに原稿を送る際には行わなくてはなりません)、テキストエディタを使って\SpecialCharNoPassThru LaTeX ファイルを編集し、非必須引数を書き加えなくては ならないということです。これらのレイアウトがないと、 \family typewriter \backslash altaffiliation \family default (またそれと同等な \family typewriter \backslash altaddress \family default )は使えませんので、対応するレイアウトは存在せず、手動で書き加える必要があります \begin_inset Foot status collapsed \begin_layout Plain Layout \emph on JMarcからの註: \emph default 実は、\SpecialCharNoPassThru LyX 1.3.0 では非必須引数を一部サポートしているのですが、このレイアウトは、まだこの機能を使うようにはアップデートされていないのです。 \end_layout \end_inset 。 \end_layout \begin_layout Section Springer学術誌( \family sans svjour) \end_layout \begin_layout Standard \noun on Martin Vermeer \noun default 文 \end_layout \begin_layout Subsection 説明 \end_layout \begin_layout Standard これは、Springer Verlag社発行のいくつかの学術誌で使用されている書式のレイアウトファイルです。 \begin_inset Flex URL status collapsed \begin_layout Plain Layout http://www.springer.de/author/tex/help-journals.html \end_layout \end_inset に必要なクラスファイル(\SpecialCharNoPassThru LaTeX2e 用になりました)とそれに対応する学術誌の一覧があります。このレイアウトはモジュール式になっています。つまり、全ジャーナル共 通部分は \family typewriter svjour.inc \family default に実装されており、各誌個別のレイアウトファイル(たとえばJournal of Geodesy用の \family typewriter svjog.layout \family default など)から取り込むことができます。 \end_layout \begin_layout Standard このことは、上記の学術誌一覧にある他のSpringer誌のサポートを実装するためには、 \family typewriter svjog.layout \family default に書かれている指示に従って、自作の \family typewriter sv \family default <学術誌名> \family typewriter .layout \family default を書くだけで良いことを意味します。 \end_layout \begin_layout Standard このレイアウトは、Journal of Geodesyに対してのみ、充分な試験が為されています。 \family typewriter svjour \family default と \family typewriter svjog \family default は、標準\SpecialCharNoPassThru LyX 頒布版に収録済みです。関連するクラスファイルを(Springerからダウンロードして)適切なディレクトリに導入し、\SpecialCharNoPassThru LaTeX を再設定した後(teT eXの場合は、必要に応じてroot権限で \family typewriter texhash \family default を実行します)、\SpecialCharNoPassThru LyX を環境構成すれば、動作するはずです。 \end_layout \begin_layout Subsection 新スタイル \end_layout \begin_layout Standard 多くの定理環境 \threehyphens \family sans 主張 \family default ・ \family sans 推論 \family default ・\SpecialChar ldots ・ \family sans 定理 \family default 。 \end_layout \begin_layout Standard \family sans ヘッドノート \family default ・ \family sans 献呈 \family default ・ \family sans サブタイトル・ヘッダ用\SpecialCharNoPassThru LaTeX タイトル・ヘッダ用著者名・所属機関・メール・オフプリント・キーワード・謝辞(acknowledgements)・謝辞(ackno wledgement) \family default 。詳しくは Springerのクラスファイルの説明書を読んでください。 \end_layout \begin_layout Subsection サポートしているジャーナル \end_layout \begin_layout Itemize \emph on Journal of Geodesy \emph default : \family typewriter svjog.layout \family default \threehyphens Martin Vermeer \end_layout \begin_layout Itemize \emph on Probability Theory and Related Fields \emph default : \family typewriter svprobth.layout \family default \threehyphens Jean-Marc Lasgouttes \end_layout \begin_layout Standard あなた自身のレイアウトファイルをつくってください。難しくはありません。 \end_layout \begin_layout Subsection Credits \end_layout \begin_layout Standard これらのファイルは、以前の \family typewriter ejour2.layout \family default をもとにしています。 \family typewriter ejour2.layout \family default は Springerの\SpecialCharNoPassThru LaTeX 2.09用のスタイルファイルを使った素人細工のようなレイアウトファイルです。これらのファイルはすでにありません。Jean-Mar c Lasgouttesのおかげで \SpecialCharNoPassThru LyX のレイアウトファイルのメカニズムをよりよく理解することができました。 \end_layout \begin_layout Subsection バグ \end_layout \begin_layout Standard 多分あります。以前の \family typewriter ejour2 \family default よりは少なくなっているとは思いますが。 \end_layout \begin_layout Standard 制限事項:定理環境の環境の番号は表示されません。#が表示されるだけです。 \end_layout \begin_layout Section Slides (別名 \noun on Sli\SpecialCharNoPassThru TeX \noun default ) \begin_inset Foot status collapsed \begin_layout Plain Layout (訳註)この節の内容は、全般的に古くなっています。 \end_layout \end_inset \begin_inset CommandInset label LatexCommand label name "sec:slitex" \end_inset \end_layout \begin_layout Standard \noun on John Weiss \noun default 文 \end_layout \begin_layout Subsection はじめに \end_layout \begin_layout Standard 本節では、オーバーへッドプロジェクタ用のスライドをつくるのに、\SpecialCharNoPassThru LyX をどのように使えばよいかを説明します。これを行う文書クラスには、既定のslideクラスと \family sans Foil\SpecialCharNoPassThru TeX \family default スライドクラスの2つがあります。本節は前者について説明を行います。 \end_layout \begin_layout Standard 誤解のないように、正しく明確に、もう一度言っておきます。 \end_layout \begin_layout Standard \begin_inset VSpace bigskip \end_inset \end_layout \begin_layout Standard \align center \size large 本節は文書クラス \begin_inset Quotes eld \end_inset \family sans transparencies (slides) \family default \begin_inset Quotes erd \end_inset \emph on のみ \emph default を説明しています。 \end_layout \begin_layout Standard \begin_inset VSpace bigskip \end_inset \end_layout \begin_layout Standard \family sans 「slides (Foil\SpecialCharNoPassThru TeX ) \family default 」の説明をお探しならば、第 \begin_inset CommandInset ref LatexCommand ref reference "sec:foiltex" \end_inset 節をご覧ください。 \family sans foils \family default クラス「 \family sans slides (Foil\SpecialCharNoPassThru TeX ) \family default 」は、実際、本節で説明している既定 \family sans slides \family default クラスよりも良いようです \begin_inset Foot status collapsed \begin_layout Plain Layout \SpecialChar ldots と \family sans Foil\SpecialCharNoPassThru TeX \family default の支持者からは聞いています。けれども私は使ったことがないので、本当かどうか確かめようがありません。 \end_layout \end_inset 。 \end_layout \begin_layout Standard このクラスは、旧SLI\SpecialCharNoPassThru TeX パッケージを\SpecialCharNoPassThru LaTeX2e 用に改良したものです。\SpecialCharNoPassThru LaTeX2e 頒布版すべてが、このクラス(以下では単に「 \family sans slides \family default 」と述べることにします)を含んでいるので、あなたもお持ちのはずです。前述の \family sans foils \family default のように、同じくオーバーへッドプロジェクタ用のスライドを生成しながら、このクラスよりも良い仕事をするクラスもあります。しかしながら、オーバーレイを生成するなど、 他のクラスにはできないが \family sans slides \family default ならばできることもあります。詳しくは以下をお読みください。 \end_layout \begin_layout Subsection 使い始めるには \begin_inset CommandInset label LatexCommand label name "sec:slidesetup" \end_inset \end_layout \begin_layout Standard 当然ながら、この文書クラスを使用するには、 \family sans 文書\SpecialChar menuseparator 設定 \family default ダイアログのクラスリストから「 \family sans transparencies (slides) \family default 」を選択しなくてはなりません。このクラスについて、以下のように、特に知っておいた方が良いことがいくつかあります。 \end_layout \begin_layout Itemize \family sans 用紙方向 \family default と \family sans 二段組文書 \family default の各オプションは、あえて変更する必要はありません。これらのオプションは、 \family sans slides \family default クラスではサポートされていないので、効果がありません。 \end_layout \begin_layout Itemize \family sans ヘディング様式 \family default オプションは、このクラスでは少し異なった振る舞いをします。各選択肢とその機能は、以下の通りです。 \family default \begin_inset Separator parbreak \end_inset \end_layout \begin_deeper \begin_layout Description プレーン(plain) 最終出力の右下隅にページ番号が付きます。 \end_layout \begin_layout Description 設定(headings) \family sans プレーン(plain) \family default と同様ですが、それ以外にあなたが指定したタイムマーカーをすべて出力します。これが既定値です。 \end_layout \begin_layout Description 空 最終出力には、ページ番号もタイムマーカーも位置揃えマーカーも出力されません。 \end_layout \end_deeper \begin_layout Itemize \family sans slides \family default クラスには、もう一つ \family typewriter clock \family default というオプションがあります。これを使用するには、 \family sans クラスオプション \family default に「 \family typewriter clock \family default 」と入力してください。 \family default \begin_inset Separator parbreak \end_inset \end_layout \begin_deeper \begin_layout Standard このオプションを使うと、 \family sans 注釈 \family default にタイムマーカーを加えることができます。詳細は、第 \begin_inset CommandInset ref LatexCommand ref reference "sec:スライド注釈" \end_inset 節をご覧ください。 \end_layout \end_deeper \begin_layout Standard \family sans slides \family default クラスを用いた文書を自動的にセットアップするには、ひな型ファイル「 \family typewriter slides.lyx \family default 」を使用することもできます(新規ファイルを開く際に \family sans ファイル\SpecialChar menuseparator 新規(ひな型使用) \family default を使用してください)。ひな型ファイルには、このクラスが使用する特別な段落環境の用例も含まれています。これらについては、以下で説明します。 \end_layout \begin_layout Subsection 段落環境 \end_layout \begin_layout Subsubsection \family sans サポートされている環境 \end_layout \begin_layout Standard 新しく \family sans slides \family default 文書を開いたときにまず気付くのは、フォント寸法とフォント族の違いでしょう。ここでは、 \family sans サンセリフ体 \family default フォントの \family sans 極大 \family default 寸法が用いられており、出力でもこのフォントが使用されます。これは、現在スライドを作成中であることの「目印」だと考えてください。出力スライドは大きなフォントを使用 するため、書ける場所は少なくなります。もちろん、既定の大きな画面フォントはWYSIWYGではなく、スライドであることの目印に過ぎません。 \end_layout \begin_layout Standard 次に気付くのは、(ツールバー左端の)段落環境プルダウンボックスが変わっていることでしょう。通常見かける環境の多くがなくなって、代わりに5つの新しい環境が入ってい ます。これは、 \family sans slides \family default クラスが、標準段落環境のうち以下のものしかサポートしていないためです。 \end_layout \begin_layout Itemize \family sans 標準 \end_layout \begin_layout Itemize \family sans 箇条書き(記号) \end_layout \begin_layout Itemize \family sans 箇条書き(連番) \end_layout \begin_layout Itemize \family sans 箇条書き(記述) \end_layout \begin_layout Itemize \family sans 箇条書き(一覧) \end_layout \begin_layout Itemize \family sans 引用(字下げあり) \end_layout \begin_layout Itemize \family sans 引用(字下げなし) \end_layout \begin_layout Itemize \family sans 詩句 \end_layout \begin_layout Itemize \family sans キャプション \end_layout \begin_layout Itemize \family sans \SpecialCharNoPassThru LyX コード \end_layout \begin_layout Itemize \family sans コメント \end_layout \begin_layout Standard これ以外の標準的な環境、例えば節見出し用の環境などは \family sans slides \family default クラスでは使えません。 \end_layout \begin_layout Standard 一方、以下の新しい環境があります。 \end_layout \begin_layout Itemize \family sans スライド \end_layout \begin_layout Itemize \family sans オーバーレイ \end_layout \begin_layout Itemize \family sans 注釈 \end_layout \begin_layout Itemize \family sans 不可視文 \end_layout \begin_layout Itemize \family sans 可視文 \end_layout \begin_layout Standard これら5つの環境は、\SpecialCharNoPassThru LyX の「機能」のために使い方に癖があります。ご存じのように、\SpecialCharNoPassThru LyX では、空の段落環境に他の環境を入れることができません。それ自体は素晴らし いデザインなのですが、これは、スライドを平文以外では書き始めることができないことを意味します。これを取り扱うためには、ちょっとした「\SpecialCharNoPassThru LaTeX マジック」が必要に なります。 \end_layout \begin_layout Subsubsection 新環境の癖 \begin_inset CommandInset label LatexCommand label name "sec:スライドの癖" \end_inset \end_layout \begin_layout Standard 5つの新しい環境にはすべて、\SpecialCharNoPassThru LyX 現行版の制約に由来する癖があります。いま述べたように、\SpecialCharNoPassThru LyX では、環境を別の環境で開始することが禁止されています。これを回避す るために、 \family sans スライド \family default 環境は『 \emph on ユーザーの手引き \emph default 』で述べられているような段落環境ではなくなっています。 \end_layout \begin_layout Standard \family sans スライド \family default ・ \family sans オーバーレイ \family default ・ \family sans 注釈 \family default は「疑似環境」だとお考えください。これらは節見出しや「 \family sans キャプション \family default 」のように見えますが、実際には(必要なら前段落を終了して)新しい段落環境を開始します。同様に、 \family sans 不可視文 \family default と \family sans 可視文 \family default も「疑似コマンド」とお考えください。この2つは特定のアクションを行います。 \end_layout \begin_layout Standard \family sans スライド \family default ・ \family sans オーバーレイ \family default ・ \family sans 注釈 \family default ・ \family sans 不可視文 \family default ・ \family sans 可視文 \family default の5環境に共通しているのは、長めのラベルを持つことです。このラベルに続く文章—通常は段落環境の内容になるはずですが—は、 \family sans スライド \family default ・ \family sans オーバーレイ \family default ・ \family sans 注釈 \family default ・ \family sans 不可視文 \family default ・ \family sans 可視文 \family default では、まったく意味がなく、\SpecialCharNoPassThru LyX はこの部分を完全に無視します。これらの5つの環境の内容は、完全に空のままにしておいて構いません。 \end_layout \begin_layout Standard 長めのラベルの後に文章を入れる \emph on 必要は \emph default まったく \emph on ない \emph default とはいえ、何か書いておきたいこともあるかもしれません。たとえば、スライドの内容に関する短い説明などがそうでしょう。この場合、いつもどおり説明用のコメントを入力し て \family sans Return \family default を押してください。 \end_layout \begin_layout Standard 一方、説明文を入れたくない場合には、\SpecialCharNoPassThru LyX の制約に直面します。自然が真空を憎むように、\SpecialCharNoPassThru LyX では、古い環境に何かを置くまでは、その中に新しい環境を入れることがで きません。そこで以下のようにしてください。 \end_layout \begin_layout Itemize 新しい \family sans スライド \family default ・ \family sans オーバーレイ \family default ・ \family sans 注釈 \family default ・ \family sans 不可視文 \family default ・ \family sans 可視文 \family default の \emph on 中に入れる \emph default 文章を入力してください。 \end_layout \begin_layout Itemize 段落の先頭に移動します。 \end_layout \begin_layout Itemize 次に \family sans Return \family default を押します。 \end_layout \begin_layout Itemize 最後に、この新しい空の段落を \family sans スライド \family default ・ \family sans オーバーレイ \family default ・ \family sans 注釈 \family default ・ \family sans 不可視文 \family default ・ \family sans 可視文 \family default に変更します。 \end_layout \begin_layout Standard 将来の\SpecialCharNoPassThru LyX では、このような癖が解決されることを祈っています\SpecialChar ldots \begin_inset Foot status collapsed \begin_layout Plain Layout (訳註)ここの記述は古くなっています。 \end_layout \end_inset 。 \end_layout \begin_layout Subsection \family sans スライド \family default ・ \family sans オーバーレイ \family default ・ \family sans 注釈で発表用のスライドを作る \end_layout \begin_layout Subsubsection \family sans スライド \family default 環境を使う \end_layout \begin_layout Standard もし本節が、実際のプレゼンテーションの作り方を教えてくれるものと期待されているとすれば、大いにがっかりされるかもしれません。当然ながら、プレゼンテーション用の資 料を準備するうえで \family sans slides \family default クラスを役立てる方法を詳しく説明はしますが、内容をどうするかはあなた次第です(そしてこれも\SpecialCharNoPassThru LyX の哲学です)。 \end_layout \begin_layout Standard \family sans スライド \family default 環境を選択すれば(方法は第 \begin_inset CommandInset ref LatexCommand ref reference "sec:スライドの癖" \end_inset 節参照のこと)、\SpecialCharNoPassThru LyX は新規スライドを開始します。この環境ないし「疑似環境」のラベルは、鮮やかな青で「新規スライド:」と表示されます。この環境の後のテキスト環境 や段落環境は、すべて新規スライドに入ります。簡単ですよね。 \end_layout \begin_layout Standard Slidesは、おそらく\SpecialCharNoPassThru LyX の中で強制的に改頁をしなくてはならない唯一のクラスです(これは \family sans 段落レイアウト \family default ダイアログで指定できます)。実際、一つのスライドの内容を入力し終わったら、改頁したくなるはずです。仮に一つのスライドに物理的に入りきらない文章を入力したとすると 、入りきらない部分は、次の新規スライドにまわされます。しかしながら、入りきらない部分のスライドにはページ番号が付きませんので、こうするのはお勧めしません。その上 、一枚に収まらないスライドでは、 \family sans オーバーレイ \family default を使用すると干渉する恐れがあります。 \end_layout \begin_layout Standard \family sans オーバーレイ \family default 環境と \family sans 注釈 \family default 環境も、 \family sans スライド \family default 環境と同様の動作を示します。これらは、青の代わりに鮮やかなマゼンタで、それぞれ「 \noun on 新規オーバーレイ \noun default :」ないし「 \noun on 新規注釈: \noun default 」というラベルを表示します。ラベルのフォントも、3つの環境でそれぞれ異なるものが使用されます。 \end_layout \begin_layout Standard \family sans スライド \family default と同様に、 \family sans オーバーレイ \family default や \family sans 注釈 \family default の内容が、一つのスライドないしページに物理的に収まりきらない場合には、余分は新規スライドに回されます。この場合には、 \family sans 注釈 \family default や \family sans オーバーレイ \family default の本来の目的が達せられなくなりますので、ここでもこのような状態は避けるべきでしょう。 \end_layout \begin_layout Subsubsection \family sans スライドでオーバーレイを使用する \end_layout \begin_layout Standard \family sans オーバーレイ \family default の背後にある考え方は、別のスライドの上にスライドを載せようとするものです。メインの \family sans スライド \family default に図があるとき、関連した文章を表示する前に、図について議論を進めたいと思うことがあるかもしれません。これを行うひとつの方法は、 \family sans スライド \family default で後に表示したい部分に黒い紙の蓋を貼り付けてしまうことですが、この方法は、たとえばグラフを他のグラフに重ねたい場合などには、うまく行きません。この場合には、二つ のグラフを揃えるために、重ねる二つのスライドを、喋りながら手探りで揃えなくてはなりません。これらのような場合には、 \family sans オーバーレイ \family default 環境を使えば、もっと楽になります。 \end_layout \begin_layout Standard 各 \family sans オーバーレイ \family default は、「親」 \family sans スライド \family default のページ番号を引継ぎ、その後に「 \family typewriter -a \family default 」を付け加えます \begin_inset Foot status collapsed \begin_layout Plain Layout 想像できるように、複数のオーバーレイがあれば、「 \family typewriter -a \family default 」「 \family typewriter -b \family default 」「 \family typewriter -c \family default 」などが親スライドのページ番号に付け加えられます。 \end_layout \end_inset 。当然のことながら、 \family sans スライド \family default と \family sans オーバーレイ \family default の内容は両方とも、1枚のスライドに物理的に収まるようになっていなければなりません。 \family sans オーバーレイ \family default は \family sans スライド \family default の「一部」であると考えるのがよいでしょう。\SpecialCharNoPassThru LyX では、 \family sans オーバーレイ \family default のラベルを \family sans スライド \family default のラベルよりも下げることで、このことを視覚的に表しています。また、印刷可能な出力を生成すると、 \family sans オーバーレイ \family default と親 \family sans スライド \family default 両方の四隅に、揃えマーカーがあることに気づかれるはずです。これは、2枚のスライドを物理的に重ね合わせるための補助となるものです。 \end_layout \begin_layout Standard 2つのスライドをオーバーレイさせる際の大きな問題は、2枚のスライドの内容を揃えることです。2枚目のスライドのグラフには、どれだけの余白を残しておくべきなのでしょ うか?さらにややこしく、2枚目のスライドにグラフと文章を入れたいときに、その間に割り込んでしまうような文章がメインスライドにある場合には、どうでしょうか?正しい 寸法の垂直スペースを挿入してみることもできるでしょう。しかし、もっと良い方法として、 \family sans 不可視文 \family default と \family sans 可視文 \family default を使用する方法があります。 \end_layout \begin_layout Standard これらの名前が意味するとおり、 \family sans 不可視文 \family default と \family sans 可視文 \family default は、それぞれ続く文章すべてを見えなくしたり見えるようにしたりするコマンド型の段落環境です。しかしながら、第 \begin_inset CommandInset ref LatexCommand ref reference "sec:スライドの癖" \end_inset 節で述べたように、この2つの環境の \emph on 中 \emph default には何も置くことができません。 \family sans 不可視文 \family default を作成すると、「<以下不可視文>」と書かれた水色のラベルが、ページに中央揃えで表示されます。このラベルに続く段落は、それが置かれるべき \family sans スライド \family default (あるいは \family sans オーバーレイ \family default ;どちらでも同じことです)部分に、代わりに空白の部分が置かれます。 \end_layout \begin_layout Standard \family sans 可視文 \family default の場合には、中央揃えのラベルは、鮮やかな緑の「<以下可視文>」となります。このラベル以降の段落は、通常通りの挙動を示します。新規の \family sans スライド \family default ・ \family sans オーバーレイ \family default ・ \family sans 注釈 \family default を開始すると、 \family sans 不可視文 \family default は自動的に終了されることに注意してください。したがって、 \family sans スライド \family default の終わりでは、 \family sans 可視文 \family default を使用する必要はありません。 \end_layout \begin_layout Standard ここまでで、 \family sans スライド \family default や \family sans オーバーレイ \family default 上で \family sans 不可視文 \family default と \family sans 可視文 \family default を適切に使用して、スライドをオーバーレイさせる方法が明らかになったことと思います。 \end_layout \begin_layout Enumerate メインのスライドか \family sans オーバーレイ \family default かに関わらず、スライド上に現れるすべてを含んだ \family sans スライド \family default を作成します。 \end_layout \begin_layout Enumerate \family sans オーバーレイ \family default のみに表示するすべての図や段落の前に、 \family sans 不可視文 \family default 環境を挿入し、必要ならば、 \family sans オーバーレイ \family default のみの文章の後に \family sans 可視文 \family default 環境を挿入します。 \end_layout \begin_layout Enumerate \family sans スライド \family default の直後から、 \family sans オーバーレイ \family default を開始します。 \end_layout \begin_layout Enumerate この \family sans スライド \family default の内容を \family sans オーバーレイ \family default にコピーします。 \end_layout \begin_layout Enumerate \family sans オーバーレイ \family default 内部の \family sans 不可視文 \family default 行をすべて \family sans 不可視文 \family default に変更し、 \family sans 可視文 \family default は \family sans 不可視文 \family default に変更します。 \end_layout \begin_layout Standard これだけです。これで \family sans オーバーレイ \family default ができあがりました。 \end_layout \begin_layout Standard \SpecialCharNoPassThru LyX \family sans slides \family default クラスをデザインする上で、ひとつ残された問題があります。段落途中の文章を不可視にしたり、不可視段落の途中の文章を再度可視にしたりすることはできないのです。これを 実現するためには、\SpecialCharNoPassThru LaTeX コードを埋め込む必要があります \begin_inset Foot status collapsed \begin_layout Plain Layout このコマンドは、 \end_layout \begin_layout Itemize \family typewriter { \backslash invisible \SpecialChar ldots } \end_layout \begin_layout Itemize \family typewriter { \backslash visible \SpecialChar ldots } \end_layout \begin_layout Plain Layout \SpecialChar ldots のような形となり、\SpecialCharNoPassThru TeX としてマークする必要があります。「可視性」を変更したい文章は、波括弧のあいだ(そして \family typewriter \backslash invisible \family default ないし \family typewriter \backslash visible \family default コマンドの後ろ)に入れます。\SpecialCharNoPassThru TeX としてマークする方法がわからない場合は、 \emph on ユーザーの手引き \emph default をご参照ください。 \end_layout \end_inset 。 \end_layout \begin_layout Subsubsection \family sans スライドで注釈を使う \family default \begin_inset CommandInset label LatexCommand label name "sec:スライド注釈" \end_inset \end_layout \begin_layout Standard \family sans オーバーレイ \family default と同様、 \family sans 注釈 \family default も「親」 \family sans スライド \family default に関連付けられています。ここでも\SpecialCharNoPassThru LyX \family sans スライド \family default クラスは視覚的な効果を与えています。 \family sans 注釈 \family default のラベルは \family sans スライド \family default よりも短く(オーバーレイのラベルよりも長いですが)、 \family sans オーバーレイ \family default のラベルと同様、派手な赤紫色です。加えて、印刷した \family sans 注釈 \family default には、「親」スライドのページ番号に「 \family typewriter - \family default 1」「 \family typewriter - \family default 2」「 \family typewriter - \family default 3」等を付けたページ番号が付けられます。1つの \family sans スライド \family default には、複数の \family sans 注釈 \family default を関連付けることができるので、 \family sans スライド \family default と \family sans オーバーレイ \family default と同じように、長い注釈は、1枚の紙に収まるように分割したいと思われるに違いありません。 \end_layout \begin_layout Standard \family sans 注釈 \family default の目的は明らかです。 \family sans スライド \family default に関して付け加えたいことを書き留めておくことです。特定の \family sans スライド \family default についての覚書として使うこともできます。後者の場合には、タイムマーカを利用したいこともあるかもしれません。現在のところ、\SpecialCharNoPassThru LyX の \family sans スライド \family default クラスは、 \noun on Sli \noun default \SpecialCharNoPassThru TeX の機能であるタイムマーカを「ネイティブには」サポートしていません。したがって、\SpecialCharNoPassThru LaTeX コードを使用することに頼らなくてはなりません。 \end_layout \begin_layout Standard タイムマーカを使用するには、クラスオプション「 \family typewriter clock \family default 」を追加指定する必要があります(第 \begin_inset CommandInset ref LatexCommand ref reference "sec:slidesetup" \end_inset 節参照)。このオプションはタイムマーカ機能を有効にして、生成したすべての \family sans 注釈 \family default の左下にタイムマーカを表示します。タイムマーカに表示するものを設定するには、\SpecialCharNoPassThru LaTeX コマンド「 \family typewriter \backslash settime{} \family default 」および「 \family typewriter \backslash addtime{} \family default 」を使用します。両コマンドは、秒で測った時間を引数にとります。「 \family typewriter \backslash settime{} \family default 」は、タイムマーカを特定の時間に設定し、「 \family typewriter \backslash addtime{} \family default 」は、タイムマーカを指定した分だけ進めます。このようにタイムマーカと \family sans 注釈 \family default を用いれば、特定の \family sans スライド \family default にどれだけの時間をかけるのか忘れないでいられます。 \end_layout \begin_layout Standard 最後に、説明しておくべき機能がもう一つあります。当然ながら、 \family sans スライド \family default と \family sans オーバーレイ \family default はすべてスライドに、 \family sans 注釈 \family default はすべて普通の紙に印刷したいはずです。しかしながら、 \family sans 注釈 \family default は関連付けられた親スライドの直後に \emph on 来なくてはなりません \emph default 。ユーザーはどうしたら良いのでしょうか。 \end_layout \begin_layout Standard 幸いなことに、どれを印刷するか選択することを可能にする\SpecialCharNoPassThru LaTeX コマンドが、2種類あります。どちらも文書のプリアンブルに記述されなくてはなりません。コマンド「 \family typewriter \backslash onlyslides{ \backslash slides} \family default 」は、出力に \family sans スライド \family default と \family sans オーバーレイ \family default のみが含まれるようにするものです。同様に、「 \family typewriter \backslash onlynotes{ \backslash notes} \family default 」は \family sans 注釈 \family default 以外の出力をすべて抑制します。私のアドバイスとしては、両コマンドをプリアンブルに書いておいて、最初は両方ともコメントアウトしておくと良いでしょう。そうすれば、執 筆時にはプレゼンテーション全体をプレビューすることができます。いったん書き終えたならば、二つのうち一方のコメントを外して、印刷したい方を選ぶことができます。私な らば、まず \family typewriter \backslash onlyslides{ \backslash slides} \family default のコメントを外して、現ファイル名に「* \family typewriter -slides \family default 」を付けた新たなファイルに出力を行ない、今度はこの行をふたたびコメントアウトするとともに、「 \family typewriter \backslash onlynotes{ \backslash notes \family default }」のコメントを外して、これを「 \family typewriter *-notes.ps \family default 」というファイルに出力します。そうすれば、必要に応じて、スライドまたは通常の紙をプリンタにセットし、一方のファイルをプリンタに送ればよいのです。 \end_layout \begin_layout Standard 「 \family typewriter \backslash onlyslides{} \family default 」および「 \family typewriter \backslash onlynotes{} \family default 」コマンドには、他の引数を与えることもできます。詳しくは、\SpecialCharNoPassThru LaTeX の良書をご覧ください。 \end_layout \begin_layout Subsection \family sans slides \family default クラスのひな型ファイル \end_layout \begin_layout Standard \family sans slides \family default クラス用のひな型ファイルとして「 \family typewriter slides.lyx \family default 」が提供されています。これを使用するには、新しいプレゼンテーションを作り始める際に、 \family sans ファイル\SpecialChar menuseparator 新規(ひな型使用) \family default メニューを選択してください。すると新規ファイルには、 \family sans スライド \family default ― \family sans オーバーレイ \family default ― \family sans 注釈 \family default の組が、例として含まれており、 \family sans スライド \family default と \family sans オーバーレイ \family default には、さらに \family sans 不可視文 \family default と \family sans 可視文 \family default の使用例も含まれています。また、プリアンブルには、次のように書き込まれています。 \end_layout \begin_layout LyX-Code % Uncomment to print out only slides and overlays \end_layout \begin_layout LyX-Code % \end_layout \begin_layout LyX-Code % \backslash onlyslides{ \backslash slides} \begin_inset Newline newline \end_inset \end_layout \begin_layout LyX-Code % Uncomment to print out only notes \end_layout \begin_layout LyX-Code % \end_layout \begin_layout LyX-Code % \backslash onlynotes{ \backslash notes} \end_layout \begin_layout Standard 最後に、私はこの文書クラスを、\SpecialCharNoPassThru LaTeX2e の組み込みクラスである「 \noun on Sli\SpecialCharNoPassThru TeX \noun default エミュレーション」クラスをサポートする目的で作成しました。私も\SpecialCharNoPassThru LyX チームの他のメンバーも、この組み込みスライドクラスを使用することに賛成したり反対したりするも のではありません。これは単に、ユーザーがこれを使いたかったり必要としたりしたときのためにあるものです。プレゼンテーションを作成するためには、 \family sans Foils \family default クラス(第 \begin_inset CommandInset ref LatexCommand ref reference "sec:foiltex" \end_inset 節参照)や「 \family typewriter seminar \family default 」パッケージ(一部の\SpecialCharNoPassThru TeX 頒布版に含まれています)のように、他の\SpecialCharNoPassThru LaTeX2e クラスも存在します。私はこれらについては知らないのですが、他にどのようなことができ るのか試してみてください。 \end_layout \begin_layout Chapter ソフトウェアを追加する必要がある \SpecialCharNoPassThru LyX 機能 \end_layout \begin_layout Section \SpecialCharNoPassThru TeX のチェック \end_layout \begin_layout Standard \noun on Asger Alstrup \noun default 文 \end_layout \begin_layout Subsection はじめに \end_layout \begin_layout Standard \family typewriter chktex \family default プログラムが導入されていると \begin_inset Foot status collapsed \begin_layout Plain Layout \SpecialCharNoPassThru LaTeX 頒布版としてMiK\SpecialCharNoPassThru TeX を使用している場合には、 \family typewriter chktex \family default はまだ利用可能ではありません。 \end_layout \end_inset 、 \family sans ツール \family default メニューの下に、 \family sans \SpecialCharNoPassThru TeX 構文チェック \family default という項目が表示されます。 \family typewriter chktex \family default は、CTAN \begin_inset Newline newline \end_inset \begin_inset CommandInset href LatexCommand href target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html" \end_inset から入手することができます。 \end_layout \begin_layout Standard \family sans Chk\SpecialCharNoPassThru TeX \family default パッケージは、\SpecialCharNoPassThru LaTeX の構成物には直感的でないものもあり、すぐ忘れてしまいがちであるのに不満を感じた \begin_inset Flex Noun status collapsed \begin_layout Plain Layout Jens T. Berger Thielemann \end_layout \end_inset が書いたプログラムです。このプログラムは、\SpecialCharNoPassThru LaTeX ファイルを走査して、ファイルの整合性をチェックし、犯しがちな誤りを見つけ出します。別の技術用語では、LaTe Xにおける \family typewriter lint \family default であるとも言えます。 \end_layout \begin_layout Standard さて、\SpecialCharNoPassThru LyX はつねに正しい\SpecialCharNoPassThru LaTeX ファイルを生成するはずなのに、文法チェッカーは\SpecialCharNoPassThru LyX で何をするというのでしょうか。答えは簡単です。 \family typewriter lint \family default がC言語プログラムの \emph on 文法 \emph default をチェックするだけでなく、打ち間違いによる \emph on 意味上の \emph default チェックも行うように、 \family sans Chk\SpecialCharNoPassThru TeX \family default は、文法エラーの他に犯しがちな \emph on 写植上の \emph default 誤りも検出してくれるからです。 \family sans Chk\SpecialCharNoPassThru TeX \family default は、以下のような誤りを検出することができます。 \end_layout \begin_layout Itemize 省略記号の検出: \begin_inset Newline newline \end_inset ...ではなく\SpecialChar ldots を使わなくてはなりません \end_layout \begin_layout Itemize 括弧の前後にスペースを置かない: \begin_inset Newline newline \end_inset ( wrong spacing ):誤った空白 \end_layout \begin_layout Itemize よく使われる省略形の後ろは通常スペースにする: \begin_inset Newline newline \end_inset e. \begin_inset space \thinspace{} \end_inset g. \begin_inset space \space{} \end_inset is too wide spacing.:広すぎる空白 \end_layout \begin_layout Itemize 直前の文章が大文字で終わっているときに、文末スペースに直す: \begin_inset Newline newline \end_inset This is a TEST. And this is wrong spacing.:誤った空白 \end_layout \begin_layout Itemize ラベルや類似コマンドの前のスペース: \begin_inset Newline newline \end_inset ラベルが別のページに行ってしまわないように、ラベルは文章に接していなくてはなりません。 \begin_inset CommandInset label LatexCommand label name "sec:chktex" \end_inset \begin_inset Foot status collapsed \begin_layout Plain Layout この脚注は、正しくないページに行ってしまう恐れがあります。 \end_layout \end_inset このラベルは離れすぎです。 \end_layout \begin_layout Itemize 参照の前にハードスペースではなくスペース: \begin_inset Newline newline \end_inset 運が悪ければ、参照文字列と参照番号のあいだでちょうど改行されてしまい、残念な結果となります。第 \begin_inset CommandInset ref LatexCommand ref reference "sec:chktex" \end_inset 節をご覧ください。 \end_layout \begin_layout Itemize 数字のあいだで \begin_inset Formula $\times$ \end_inset ではなく「x」が使われている: \begin_inset Newline newline \end_inset 2x2は、 \begin_inset Formula $2\times2$ \end_inset よりも安っぽく見えます。 \end_layout \begin_layout Standard などなど\SpecialChar ldots \family sans Chk\SpecialCharNoPassThru TeX \family default は、印刷する前に文書を「仕上げる」上で、たいへん価値のあるツールです。必須のスペルチェックを終えた直後、組版の微調整をする前には、これを実行するべきです。 \end_layout \begin_layout Subsection 使いかた \end_layout \begin_layout Standard このプログラムを導入したならば、使うのは \family sans ツール\SpecialChar menuseparator \SpecialCharNoPassThru TeX 構文チェック \family default を選択するだけなので簡単です。こうすると、\SpecialCharNoPassThru LyX は使用中の文書の\SpecialCharNoPassThru LaTeX ファイルを生成して、 \family sans Chk\SpecialCharNoPassThru TeX \family default を起動し、当該ファイルを検査しますが、 \family sans Chk\SpecialCharNoPassThru TeX \family default から警告があった場合には、それを含んだ「エラーボックス」を\SpecialCharNoPassThru LyX 中に挿入します。警告は、誤りのある箇所のそばに置かれるので、メニュー項目の \family sans 移動\SpecialChar menuseparator エラー \family default を選択するか、既定の \family typewriter cua \family default \begin_inset Flex Ruby status collapsed \begin_layout Plain Layout 鍵 \begin_inset Argument post:1 status collapsed \begin_layout Plain Layout キー \end_layout \end_inset \end_layout \end_inset 設定ファイルならば \begin_inset Flex Ruby status collapsed \begin_layout Plain Layout \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none 捷径 \family default \series default \shape default \size default \emph default \bar default \noun default \color inherit \begin_inset Argument post:1 status collapsed \begin_layout Plain Layout ショートカット \end_layout \end_inset \end_layout \end_inset 鍵 \family sans C-g \family default を押せば、簡単に警告の箇所を見出すことができます。エラーボックスを開けるには、マウスでボックスをクリックするか、 \family typewriter cua \family default 鍵設定の場合には捷径鍵 \family sans C-i \family default 、 \family typewriter emacs \family default 鍵設定の場合は捷径鍵 \family sans C-o \family default を押します。警告を読み、それが誤りを示していれば修正します。警告が何を意味しているか理解しにくい場合には、無視しても問題はありません。画面上の文書と、 \family sans Chk\SpecialCharNoPassThru TeX \family default を起動する際に行なわれる実際の技術的な操作のあいだには、隠された層があり、この隔たりのせいで、一部の警告が不可解なものになったり、明らかに馬鹿げたものになる場合 があるのです。 \end_layout \begin_layout Standard 本文書自体、この機能を確認する良い材料になりますので、実行してみてください。すると、かなりの量の警告が出るはずです。これはコンピュータが敏感すぎるせいですので、 警告のほとんどは実際には警告に値しません。 \end_layout \begin_layout Subsection 微調整のしかた \end_layout \begin_layout Standard 場合によっては、 \family sans Chk\SpecialCharNoPassThru TeX \family default は、あなたが望むよりも煩すぎると思うかもしれません。そのような場合には、必要と思うまで \family sans Chk\SpecialCharNoPassThru TeX \family default を無効にするか、あなたにもう少し合うように \family sans Chk\SpecialCharNoPassThru TeX \family default を調整することができます。 \end_layout \begin_layout Standard \family sans Chk\SpecialCharNoPassThru TeX \family default は調整や拡張がひじょうに柔軟なのですが、\SpecialCharNoPassThru LyX における \family sans Chk\SpecialCharNoPassThru TeX \family default 関連の問題が、それですべて解決すると思うべきではありません。\SpecialCharNoPassThru LyX は、 \family sans Chk\SpecialCharNoPassThru TeX \family default 出力 \begin_inset Foot status collapsed \begin_layout Plain Layout \family sans chktex \family default の実際の出力は、 \family sans chktex \family default を実行した直後に \family sans 文書\SpecialChar menuseparator \SpecialCharNoPassThru LaTeX ログ \family default を使えば見ることができます。 \end_layout \end_inset から得た行番号と内部構造を一致させるため、やや特殊な\SpecialCharNoPassThru LaTeX ファイルを生成しなくてはならないので、警告の一部は正しく表示されていないように見えるでしょう。これ に対処するためには、以下の2つの方法があります。 \end_layout \begin_layout Itemize \family sans \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout \family sans ツール\SpecialChar menuseparator 設定\SpecialChar menuseparator 出力\SpecialChar menuseparator \SpecialCharNoPassThru LaTeX \SpecialChar menuseparator Check\SpecialCharNoPassThru TeX コマンド \end_layout \end_inset \family default 中の \family sans Chk\SpecialCharNoPassThru TeX \family default 起動コマンドラインを調整するか、グローバルな \family sans Chk\SpecialCharNoPassThru TeX \family default の設定ファイル(通常は \begin_inset Flex Code status collapsed \begin_layout Plain Layout chktexrc \end_layout \end_inset ファイル)を調整します。コマンドラインからどの警告を有効・無効にできるかは以下をご覧ください。 \end_layout \begin_layout Itemize \family sans ファイル\SpecialChar menuseparator 書き出し\SpecialChar menuseparator \SpecialCharNoPassThru LaTeX \family default を使って文書を\SpecialCharNoPassThru LaTeX ファイルに変換し、そのファイルに対して \family typewriter chktex \family default を手動で実行します。このようにすると、\SpecialCharNoPassThru LyX 文書中の対応箇所を見つけるのがやや面倒ですが、少し我慢すれば見つけることができます。 \end_layout \begin_layout Standard 以下は、 \family sans 設定 \family default で有効化・無効化できる警告メッセージです。警告を無効にするには \family typewriter -n# \family default 、有効にするには \family typewriter -w# \family default を用います。イタリック表示の項目は、既定で無効となっています。既定値は " \family typewriter chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38 \family default "です。 \end_layout \begin_layout Standard \SpecialCharNoPassThru LyX は、 \family typewriter chktex \family default と通信するために、他のコマンドラインパラメータを特定の方法で使用しているため、メッセージを有効化・無効化する以外のオプションを使うべきではありません。 \end_layout \begin_layout Enumerate \size small \emph on Command terminated with space. \end_layout \begin_layout Enumerate \size small Non-breaking space ( \begin_inset Quotes eld \end_inset \family typewriter ~ \family default \begin_inset Quotes erd \end_inset ) should have been used. \end_layout \begin_layout Enumerate \size small \emph on You should enclose the previous parenthesis with \begin_inset Quotes eld \end_inset \family typewriter {} \family default \begin_inset Quotes erd \end_inset . \end_layout \begin_layout Enumerate \size small Italic correction ( \begin_inset Quotes eld \end_inset \family typewriter \backslash / \family default \begin_inset Quotes erd \end_inset ) found in non-italic buffer. \end_layout \begin_layout Enumerate \size small Italic correction ( \begin_inset Quotes eld \end_inset \family typewriter \backslash / \family default \begin_inset Quotes erd \end_inset ) found more than once. \end_layout \begin_layout Enumerate \size small \emph on No italic correction ( \begin_inset Quotes eld \end_inset \family typewriter \backslash / \family default \begin_inset Quotes erd \end_inset ) found. \end_layout \begin_layout Enumerate \size small Accent command \begin_inset Quotes eld \end_inset \family typewriter cmd \family default \begin_inset Quotes erd \end_inset needs use of \begin_inset Quotes eld \end_inset \family typewriter cmd \family default \begin_inset Quotes erd \end_inset . \end_layout \begin_layout Enumerate \size small Wrong length of dash may have been used. \end_layout \begin_layout Enumerate \size small \emph on \begin_inset Quotes eld \end_inset \family typewriter %s \family default \begin_inset Quotes erd \end_inset expected, found \begin_inset Quotes eld \end_inset \family typewriter %s \family default \begin_inset Quotes erd \end_inset . \end_layout \begin_layout Enumerate \size small Solo \begin_inset Quotes eld \end_inset \family typewriter %s \family default \begin_inset Quotes erd \end_inset found. \end_layout \begin_layout Enumerate \size small You should use \begin_inset Quotes eld \end_inset \family typewriter %s \family default \begin_inset Quotes erd \end_inset to achieve an ellipsis. \end_layout \begin_layout Enumerate \size small Inter-word spacing ( \begin_inset Quotes eld \end_inset \family typewriter \backslash \family default \begin_inset Quotes eld \end_inset ) should perhaps be used. \end_layout \begin_layout Enumerate \size small Inter-sentence spacing ( \begin_inset Quotes eld \end_inset \family typewriter \backslash @ \family default \begin_inset Quotes erd \end_inset ) should perhaps be used. \end_layout \begin_layout Enumerate \size small Could not find argument for command. \end_layout \begin_layout Enumerate \size small No match found for \begin_inset Quotes eld \end_inset \family typewriter %s \family default \begin_inset Quotes erd \end_inset . \end_layout \begin_layout Enumerate \size small Math mode still on at end of \SpecialCharNoPassThru LaTeX file. \end_layout \begin_layout Enumerate \size small Number of \begin_inset Quotes eld \end_inset \family typewriter char \family default \begin_inset Quotes erd \end_inset doesn't match the number of \begin_inset Quotes eld \end_inset \family typewriter char \family default \begin_inset Quotes erd \end_inset . \end_layout \begin_layout Enumerate \size small You should use either \family typewriter \begin_inset Quotes eld \end_inset \family default or \family typewriter \begin_inset Quotes erd \end_inset \family default as an alternative to \begin_inset Quotes eld \end_inset \family typewriter " \family default \begin_inset Quotes erd \end_inset . \end_layout \begin_layout Enumerate \size small You should use " \family typewriter ' \family default " (ASCII 39) instead of "" (ASCII 180). \end_layout \begin_layout Enumerate \size small User-specified pattern found. \end_layout \begin_layout Enumerate \size small This command might not be intended. \end_layout \begin_layout Enumerate \size small \emph on Comment displayed. \end_layout \begin_layout Enumerate \size small Either \family typewriter '' \backslash ,' \family default or \family typewriter ' \backslash ,'' \family default will look better. \end_layout \begin_layout Enumerate \size small Delete this space to maintain correct page references. \end_layout \begin_layout Enumerate \size small \emph on You might wish to put this between a pair of \begin_inset Quotes eld \end_inset \family typewriter {} \family default \begin_inset Quotes erd \end_inset . \end_layout \begin_layout Enumerate \size small You ought to remove spaces in front of punctuation. \end_layout \begin_layout Enumerate \size small Could not execute \SpecialCharNoPassThru LaTeX command. \end_layout \begin_layout Enumerate \size small Don't use \family typewriter \backslash / \family default in front of small punctuation. \end_layout \begin_layout Enumerate \family typewriter \size small $ \backslash times$ \family default may look prettier here. \end_layout \begin_layout Enumerate \size small \emph on Multiple spaces detected in output. \end_layout \begin_layout Enumerate \size small This text may be ignored. \end_layout \begin_layout Enumerate \size small Use \family typewriter \begin_inset Quotes eld \end_inset \family default to begin quotation, not \family typewriter ' \family default . \end_layout \begin_layout Enumerate \size small Use \family typewriter ' \family default to end quotation, not \family typewriter \begin_inset Quotes eld \end_inset \family default . \end_layout \begin_layout Enumerate \size small Don't mix quotes. \end_layout \begin_layout Enumerate \size small You should perhaps use \begin_inset Quotes eld \end_inset \family typewriter cmd \family default \begin_inset Quotes erd \end_inset instead. \end_layout \begin_layout Enumerate \size small You should put a space in front of/after parenthesis. \end_layout \begin_layout Enumerate \size small You should avoid spaces in front of/after parenthesis. \end_layout \begin_layout Enumerate \size small \emph on You should not use punctuation in front of/after quotes. \end_layout \begin_layout Enumerate \size small Double space found. \end_layout \begin_layout Enumerate \size small You should put punctuation outside inner/inside display math mode. \end_layout \begin_layout Enumerate \size small You ought to not use primitive \SpecialCharNoPassThru TeX in \SpecialCharNoPassThru LaTeX code. \end_layout \begin_layout Enumerate \size small You should remove spaces in front of \begin_inset Quotes eld \end_inset \family typewriter %s \family default \begin_inset Quotes erd \end_inset \end_layout \begin_layout Enumerate \size small \begin_inset Quotes eld \end_inset \family typewriter %s \family default \begin_inset Quotes erd \end_inset is normally not followed by \begin_inset Quotes eld \end_inset \family typewriter %c \family default \begin_inset Quotes erd \end_inset . \end_layout \begin_layout Standard \SpecialCharNoPassThru LyX の将来の版では、このツール(およびその縮小版 \family typewriter lacheck \family default )の力を最大限引き出すように、より完備したインターフェイスを提供できればと考えています。しかし、現状でも十分に役立つものとなっています。ある程度長さがある既存文 書に使用してみていただければ、きっと驚かれることでしょう。 \end_layout \begin_layout Section \SpecialCharNoPassThru LyX でのバージョン管理 \end_layout \begin_layout Standard \noun on Lars Bullik Bjønnes \noun default および \noun on Pavel Sanda \noun default 文 \end_layout \begin_layout Subsection はじめに \end_layout \begin_layout Standard \SpecialCharNoPassThru LyX は、今ではもっとも基本的なRCS/CVS/SVN/GITコマンドをサポートしています。もしもっと洗練されたことを行いたい場合には、ターミナル上から手動で行 う必要があります。 \end_layout \begin_layout Standard また、CVSのサポートは、subversionのサポートほど良くないので、CVSよりもSVNを使うことをお勧めします。Subversionを学び始めるには、SV N Book \begin_inset Foot status open \begin_layout Plain Layout \begin_inset CommandInset href LatexCommand href target "http://svnbook.red-bean.com/" \end_inset \end_layout \end_inset が良いでしょう。RCSの場合は、「rsintro」をお読みください(これはmanファイルです。 \family typewriter man rcsintro \family default で読めます)。このファイルは、RCSの基本機能のすべてを説明しています。特に、RCSディレクトリに関するコメントと、マスターRCSファイル( \family typewriter ,v \family default で終わるファイルです)の概念に注意を払ってください。 \end_layout \begin_layout Standard \SpecialCharNoPassThru LyX で実際にバージョン管理機能を使い始める前に、RCS/CVS/SVN/GITの使用法に習熟しておかなくてはなりません。\SpecialCharNoPassThru LyX で\SpecialCharNoPassThru LyX への実装においては、GN U RCSまたはCVS/SVNパッケージの最新版を仮定しています。旧版への保証はありません。ログメッセージのほとんどは、現在のところ操作後には表示されません。確 認したい場合には、メッセージ面で確かめてください。バージョン管理を常用するユーザーには、VCツールバーが便利でしょう。これは \family sans 表示\SpecialChar menuseparator ツールバー\SpecialChar menuseparator バージョン管理 \family default で有効にできます。 \end_layout \begin_layout Standard 自製の外部コマンドを導入したい場合には、\SpecialCharNoPassThru LyX 関数説明書のvcコマンドを確認してください。 \end_layout \begin_layout Subsection \SpecialCharNoPassThru LyX におけるRCSコマンド \end_layout \begin_layout Standard 以下の節では\SpecialCharNoPassThru LyX でサポートされているRCSコマンドを説明します。それらのコマンドは \family sans ファイル\SpecialChar menuseparator バージョン管理 \family default のサブメニューにあります。\SpecialCharNoPassThru LyX は、RCS 5.7/5.8に対して試験されています。 \begin_inset Foot status open \begin_layout Plain Layout 古いDOS / MS Windowsビルド(5.7)では、\SpecialCharNoPassThru LyX で適切に動作させるためには、環境変数を設定する必要があります。とくに、標準時間帯(TZ)を設定し、 さらに大事なことは、アーカイブの既定位置を変更する場合には、RCSINITを設定しなくてはなりません("SET RCSINIT=-x,v/")。\threehyphens \SpecialCharNoPassThru LyX は、文書のあるディレクトリのfile.lyx,vに、アーカイブがあるものと期待します。Windows RCSバイナリ付属のREADMEもご覧ください。 \end_layout \end_inset \end_layout \begin_layout Subsubsection \family sans 登録 \end_layout \begin_layout Standard 文書がバージョン管理の下にない場合には、これがメニューにあらわれる唯一の項目です。文書がバージョン管理下にあれば、項目 \family sans 登録 \family default は不可視になります。 \end_layout \begin_layout Standard このコマンドは、文書をRCSに登録します(CVSが管理しているディレクトリ下にない場合)。すると対話的に、文書の最初の説明を入力するように尋ねられます。すると文 書は読み込み専用モードになるので、変更を加えるためには \family sans チェックアウトして編集 \family default を実行する必要があります。バージョン管理下にある文書は、ミニバッファのファイル名の後ろに「 [RCS:<バージョン> <ロック>]」という項目が表示されます。 \end_layout \begin_layout Standard 実行されるRCSコマンドは: \family typewriter \begin_inset Newline newline \end_inset ci -q -u -i -t-"<初期説明文>" <ファイル名> \end_layout \begin_layout Standard スイッチについて知りたい場合は、 \family typewriter man ci \family default を読んでください。 \end_layout \begin_layout Subsubsection \family sans 変更をチェックインする \end_layout \begin_layout Standard ファイルの編集が終わると、その変更をチェックインします。このとき、変更についての説明文を求められます。これは履歴ログに記録されます。バージョン番号は繰り上がり、 変更がマスターRCSファイルに適用され、文書がアンロックされて読み込み専用モードになります。 \end_layout \begin_layout Standard RCSコマンド: \family typewriter ci -q -u -m"<説明文>" <ファイル名> \end_layout \begin_layout Subsubsection \family sans チェックアウトして編集 \end_layout \begin_layout Standard これは、文書をロックして編集できるようにします。そしてあなただけが文書を読み書きできるようにします。通常は、しばらくの間、文書を編集し、それが終わると変更をチェ ックインします。あなたがファイルをロックしたことを反映して、ステータスラインが変わります。 \end_layout \begin_layout Standard RCSコマンド: \family typewriter co -q -l <ファイル名> \end_layout \begin_layout Subsubsection \family sans リポジトリのバージョンに戻す \end_layout \begin_layout Standard これは、最終チェックイン以降、文書に加えられた変更をすべて破棄します。変更が破棄される前に、警告が発せられます。 \end_layout \begin_layout Standard RCSコマンド: \family typewriter co -f -u<バージョン> <ファイル名> \end_layout \begin_layout Subsubsection \family sans コピー \end_layout \begin_layout Standard これは、現行文書のコピーを生成します。RCSは、コピー操作を自前ではサポートしませんので、バージョン履歴には保存されず、新コピーは新規ファイルとして追加されます 。最後のチェックイン以降、変更が加えられていないサラの文書であることが要求されます。ファイル名とコピー操作の説明を入力するように促され、その後、新コピーがローカ ルとリポジトリの両方に生成されます。コピーされた文書と元の文書の親ディレクトリが異なる場合には、コピーにインクルードされたファイルの相対パスは、( \family sans ファイル\SpecialChar menuseparator 名前をつけて保存\SpecialChar ldots \family default と同様に)全て調整されます。最後に、元の文書の代わりに、コピーされたファイルが読み込まれます。 \end_layout \begin_layout Labeling \labelwidthstring 00.00.0000 RCSコマンド: \begin_inset Flex Code status collapsed \begin_layout Plain Layout "ファイル名" \end_layout \end_inset を \family typewriter "新ファイル名" \family default にコピーする場合 \end_layout \begin_layout Labeling \labelwidthstring 00.00.0000 \begin_inset Flex Code status collapsed \begin_layout Plain Layout ci -q -u -i "<新ファイル名>" \end_layout \end_inset \end_layout \begin_layout Subsubsection \family sans 最後のチェックインを取り消す \end_layout \begin_layout Standard これは、最後のチェックインがあたかも為されなかったかのようにします。\SpecialCharNoPassThru LyX に読み込まれた文書に変更は加えられませんが、マスターRCSファイルから最後のバージョン が削除されます。 \end_layout \begin_layout Standard RCSコマンド: \family typewriter rcs -o<バージョン> <ファイル名> \end_layout \begin_layout Subsubsection \family sans 履歴を表示 \end_layout \begin_layout Standard RCS文書の完全な履歴を表示します。ブラウザ中に、 \family typewriter rlog <ファイル名> \family default の出力が表示されます。詳細は \family typewriter man rlog \family default をご覧ください。 \end_layout \begin_layout Subsubsection 改訂情報 \end_layout \begin_layout Standard \SpecialCharNoPassThru LyX は、RCSバージョン番号情報(のみ)をサポートしています。詳細については、 \begin_inset CommandInset ref LatexCommand ref reference "subsec:VCS改訂情報" \end_inset を参照。 \end_layout \begin_layout Subsection \SpecialCharNoPassThru LyX におけるCVSコマンド \end_layout \begin_layout Standard \SpecialCharNoPassThru LyX は、現在CVSを一部サポートしています。そのコマンドは、 \family sans ファイル\SpecialChar menuseparator バージョン管理 \family default サブメニューにあります。バージョン管理システムSVNの方が強力なので、可能ならばCVSではなく、SVNを使用してください。 \end_layout \begin_layout Subsubsection CVSの一般的な利用法 \end_layout \begin_layout Standard CVSを初めて使いたい場合には、外部ツールを使用して自分のレポジトリを作成し、作業コピーをチェックアウトする必要があります。クライアント=サーバーモデルを使用し ている場合には、最初のレポジトリチェックアウトを行う前にログインする必要があるかもしれません。 \end_layout \begin_layout Standard 改訂管理下にある文書のレポジトリを他人も利用している場合に、同一文書の同一箇所に別々の変更を加えてしまうと問題が発生します。標準的なCVSレポジトリは、ファイル ロッキング機構を有しません。これは驚くべきことかもしれませんが、コンフリクトは、文書の同じ箇所の特定の内容について、人々が意見を異にしている場合にのみ発生します 。したがって、共著者同士がコンスタントにコミュニケーションを交わしていれば、このようなコンフリクトは滅多に発生しません。もしコミュニケーションがなければ、いずれ にしても根本的な問題があるわけです。それにもかかわらず、いわゆる「予備付きチェックアウト」を使用したいと思う人々もいます。この場合、最初にチェックアウトした際に 、全ファイルの作業コピーは読み込み専用にされ、ユーザーは、作業コピーを書き込み可能にする特別なコマンドを使用した後、編集を開始することになります。変更をチェック インすると、作業コピーは読み込み専用状態に戻ります。\SpecialCharNoPassThru LyX で予備付きチェックアウトを利用したい場合には、 \begin_inset Flex Code status collapsed \begin_layout Plain Layout .cvsrc \end_layout \end_inset ファイルを編集して、 \begin_inset Flex Code status collapsed \begin_layout Plain Layout cvs -r \end_layout \end_inset という行を書き加える必要があります。この方法の利点は、文書のうち、書き込み可能コピーを誰が使用しているかを見ることができることです。ただし、一人のユーザーだけが コピーを書き込み可能にしているとは限りません。 \end_layout \begin_layout Standard \SpecialCharNoPassThru LyX は、あなたが予備付きチェックアウトを使用しているか、予備なしチェックアウトを利用しているか、推測しようと試みます。使用中の作業コピーが読み込み専用になって いるか、あるいはそれが書き込み可能であって、CVS/Baseサブディレクトリに使用中文書のコピーが存在している場合には、予備付きチェックアウトを使用しているもの と仮定し、そうでない場合には予備なしチェックアウトを使用しているものと仮定します。予備付きチェックアウトが検出された場合には、作業コピーが読み込み専用の場合に書 き込み可能にするためには、 \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout チェックアウト \end_layout \end_inset メニューを使用しなくてはなりません。その後、 \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout チェックイン \end_layout \end_inset メニューが利用可能になるので、自分が加えた変更をリポジトリに移した後、作業コピーを再び読み込み専用にする際には、これを使用します。 \end_layout \begin_layout Standard CVSの詳細な情報は、 \begin_inset Flex URL status collapsed \begin_layout Plain Layout http://www.nongnu.org/cvs \end_layout \end_inset と \begin_inset Flex URL status collapsed \begin_layout Plain Layout http://ximbiot.com/cvs \end_layout \end_inset にあります。 \end_layout \begin_layout Standard 以下に言及するサブコマンドとスイッチを理解するには、 \family typewriter man cvs \family default をお読みください。 \end_layout \begin_layout Subsubsection 登録 \end_layout \begin_layout Standard お使いの文書が改訂管理下に置かれていなければ、メニューにはこの項目だけが表示されます。もし改訂管理が有効ならば、 \family sans 登録 \family default 項目は表示されません。 \end_layout \begin_layout Standard 本コマンドは、既に文書ディレクトリをCVS管理下に置いている場合に \series bold \emph on のみ \series default \emph default (すなわち \begin_inset Flex Code status collapsed \begin_layout Plain Layout CVS/Entries \end_layout \end_inset ファイルが存在する場合にのみ)、お使いの文書をCVSに登録します。つまり、外部ツールを使用して、アーカイブを自分で作成ないしチェックアウトしなくてはならないこと を意味します(このステップを忘れてしまうと、\SpecialCharNoPassThru LyX は文書をRCSに登録します)。 \end_layout \begin_layout Standard すると、文書の最初の説明文を入力するように促されます。登録したファイルは、まだチェックインされたわけではないことに注意してください。 \end_layout \begin_layout Standard 実行されるCVSコマンドは、 \family typewriter cvs -q add -m"<入力した説明文>" "<ファイル名>" \family default です。 \end_layout \begin_layout Standard 上記および他のすべてのCVSコマンドにおける \family typewriter "<ファイル名>" \family default は、「カレント作業ディレクトリをファイルの場所に移動し、パスコンポーネントを除いたファイル名を引数として使用する」という意味になります。 \end_layout \begin_layout Subsubsection 変更のチェックイン \end_layout \begin_layout Standard ファイルの編集を終えたら、変更をコミットします。このとき、文書に変更が加えられていれば、変更の説明文を入れるよう促されます。その後、変更がレポジトリに書き込まれ ます。文書を変更せず、予備付きチェックアウトが検出された場合、 \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout チェックアウト \end_layout \end_inset で作られた予備は取り消されます。 \end_layout \begin_layout Labeling \labelwidthstring 00.00.0000 CVSコマンド: \begin_inset space ~ \end_inset \begin_inset Newline newline \end_inset \begin_inset Flex Code status collapsed \begin_layout Plain Layout cvs -q commit -m"<入力した説明文>" "<ファイル名>" \end_layout \end_inset あるいは \begin_inset Newline newline \end_inset \begin_inset Flex Code status collapsed \begin_layout Plain Layout cvs -q unedit "<ファイル名>" \end_layout \end_inset \end_layout \begin_layout Subsubsection 変更のチェックアウト \end_layout \begin_layout Standard レポジトリを他人と共有している場合、他人の加えた変更を自らの作業コピーに取り込まなくてはならないことがあります。 \end_layout \begin_layout Standard CVSコマンド: \family typewriter cvs -q update "<ファイル名>" \end_layout \begin_layout Standard 読み込み専用チェックアウトが検出された場合、作業コピーを書き込み可能にし予備を作成します。 \end_layout \begin_layout Standard CVSコマンド: \family typewriter cvs -q edit "<ファイル名>" \end_layout \begin_layout Subsubsection レポジトリ版に戻す \end_layout \begin_layout Standard これは、最後のチェックイン以降、文書に加えられた変更をすべて廃棄します。変更が廃棄される前に警告が表示されます。最初にファイルが削除され、次にCVS更新コマンド が実行されます。 \end_layout \begin_layout Standard CVSコマンド: \family typewriter cvs -q update "<ファイル名>" \end_layout \begin_layout Standard 予備付きチェックアウトが検出され、作業コピーに変更がない場合、予備のみが取り消されます。 \end_layout \begin_layout Standard CVSコマンド: \family typewriter cvs -q unedit "<ファイル名>" \end_layout \begin_layout Subsubsection \family sans コピー \end_layout \begin_layout Standard これは、現行文書のコピーを生成します。CVSは、コピー操作を自前ではサポートしませんので、バージョン履歴には保存されず、新コピーは新規ファイルとして追加されます 。最後のチェックイン以降、変更が加えられていないサラの文書であることが要求されます。ファイル名とコピー操作の説明を入力するように促され、その後、新コピーがローカ ルとリポジトリの両方に生成されます。コピーされた文書と元の文書の親ディレクトリが異なる場合には、コピーにインクルードされたファイルの相対パスは、( \family sans ファイル\SpecialChar menuseparator 名前をつけて保存\SpecialChar ldots \family default と同様に)全て調整されます。最後に、元の文書の代わりに、コピーされたファイルが読み込まれます。 \end_layout \begin_layout Labeling \labelwidthstring 00.00.0000 CVSコマンド: \end_layout \begin_layout Labeling \labelwidthstring 00.00.0000 \begin_inset Flex Code status collapsed \begin_layout Plain Layout "ファイル名" \end_layout \end_inset を \begin_inset Flex Code status collapsed \begin_layout Plain Layout "新ファイル名" \end_layout \end_inset にコピーする場合 \end_layout \begin_layout Labeling \labelwidthstring 00.00.0000 \begin_inset Flex Code status collapsed \begin_layout Plain Layout cvs -q add "<新ファイル名>" \end_layout \end_inset \end_layout \begin_layout Subsubsection ファイル名変更 \end_layout \begin_layout Standard これは、現行文書のファイル名を変更します。CVSは、ファイル名変更操作を自前ではサポートしませんので、バージョン履歴には保存されず、名称変更後のファイルは、新規 ファイルとして追加されます。最後のチェックイン以降、変更が加えられていないサラの文書であることが要求されます。ファイル名とコピー操作の説明を入力するように促され 、その後、ローカルとリポジトリの両方でファイル名が変更されます。新旧ファイル名の文書の親ディレクトリが異なる場合には、コピーにインクルードされたファイルの相対パ スは、( \family sans ファイル\SpecialChar menuseparator 名前をつけて保存\SpecialChar ldots \family default と同様に)全て調整されます。最後に、新ファイル名を使ってファイルが再度読み込まれます。 \end_layout \begin_layout Labeling \labelwidthstring 00.00.0000 CVSコマンド: \end_layout \begin_layout Labeling \labelwidthstring 00.00.0000 \begin_inset Flex Code status collapsed \begin_layout Plain Layout "ファイル名" \end_layout \end_inset を \begin_inset Flex Code status collapsed \begin_layout Plain Layout "新ファイル名" \end_layout \end_inset に変更する場合 \end_layout \begin_layout Labeling \labelwidthstring 00.00.0000 \begin_inset Flex Code status collapsed \begin_layout Plain Layout cvs -q add "<新ファイル名>" \end_layout \end_inset \end_layout \begin_layout Labeling \labelwidthstring 00.00.0000 \begin_inset Flex Code status collapsed \begin_layout Plain Layout cvs -q remove "<ファイル名>" \end_layout \end_inset \end_layout \begin_layout Subsubsection ローカルディレクトリチェックアウトのレポジトリからの更新 \end_layout \begin_layout Standard 子文書や図を含んだり、外部 \begin_inset Flex Code status collapsed \begin_layout Plain Layout .tex \end_layout \end_inset ファイルを取り込むなど、文書が複雑になるにつれ、バージョン管理の利用は複雑になります。\SpecialCharNoPassThru LyX は、文書が存在するツリー全体の更新をサポートします。これは、CVSの 使用法について詳しい知識のない人々や、レポジトリに追加素材をコミットする野望のない人々と共同作業をするような場合に、特に便利です。ファイル構造は、すべての外部フ ァイルが、文書と同じディレクトリかそのサブディレクトリに来るように組織する必要があります。いずれにしても、複合文書を新しいディレクトリを建てて収容するのは、望ま しい習慣です。 \end_layout \begin_layout Standard コマンド \begin_inset Flex Code status collapsed \begin_layout Plain Layout レポジトリを使ってローカル辞書を更新 \end_layout \end_inset は、ディレクトリ全体を更新します。ローカルの変更が検出された場合には、更新を開始する前にユーザーに警告が発せられます。マージコンフリクトが発生した場合には、コン フリクトを起こしている部分の新旧バージョンが、両方とも最終文書に置かれますので、マージの結果を見直し、修正する必要があります。コンフリクトは、 \begin_inset Flex Code status collapsed \begin_layout Plain Layout <<<<<<< \end_layout \end_inset と \begin_inset Flex Code status collapsed \begin_layout Plain Layout >>>>>>> \end_layout \end_inset の対に囲まれ、 \begin_inset Flex Code status collapsed \begin_layout Plain Layout ======= \end_layout \end_inset で区切られて表示されます。最初の部分は、文書名に続いて、更新操作前のバージョンが置かれています。第2の部分は、 \begin_inset Flex Code status collapsed \begin_layout Plain Layout > \end_layout \end_inset 記号列の後にバージョン番号に続いて、レポジトリ版が置かれます。 \end_layout \begin_layout Labeling \labelwidthstring 00.00.0000 CVSコマンド: \begin_inset space ~ \end_inset \begin_inset Newline newline \end_inset \begin_inset Flex Code status collapsed \begin_layout Plain Layout cd $path; cvs diff "." \end_layout \end_inset (変更が検出された場合には知らせる) \begin_inset Newline newline \end_inset \begin_inset Flex Code status collapsed \begin_layout Plain Layout cd $path; cvs -q update "." \end_layout \end_inset \end_layout \begin_layout Standard ここで \begin_inset Flex Code status collapsed \begin_layout Plain Layout $path \end_layout \end_inset は文書パスを表します。 \end_layout \begin_layout Subsubsection 履歴を表示 \end_layout \begin_layout Standard これは、CVS文書の全履歴を表示します。 \begin_inset Flex Code status collapsed \begin_layout Plain Layout cvs log \begin_inset Quotes eld \end_inset <ファイル名> \begin_inset Quotes erd \end_inset \end_layout \end_inset の出力がブラウザに表示されます。 \end_layout \begin_layout Subsubsection 改訂情報 \end_layout \begin_layout Standard \SpecialCharNoPassThru LyX は、CVS版数・著者名・最終コミットの日時をサポートします。これらの情報は、すべて \family typewriter cvs log -r <ファイル名> \family default によって抽出されます。詳細については、第 \begin_inset CommandInset ref LatexCommand ref reference "subsec:VCS改訂情報" \end_inset 節を参照してください。 \end_layout \begin_layout Subsection \SpecialCharNoPassThru LyX におけるSVNコマンド \end_layout \begin_layout Standard \SpecialCharNoPassThru LyX は、現在SVNを一部サポートしています。そのコマンドは、 \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout ファイル\SpecialChar menuseparator バージョン管理 \end_layout \end_inset メニューにあります。レポジトリへのアクセスに、ssh経由のパスワード保護アクセスを使用している場合には、端末ウィンドウでの入力を促されます。\SpecialCharNoPassThru LyX は、SVN 1.5および1.6に対して試験されています。 \end_layout \begin_layout Subsubsection 登録 \end_layout \begin_layout Standard お使いの文書が改訂管理下に置かれていなければ、メニューにはこの項目だけが表示されます。もし改訂管理が有効ならば、 \family sans 登録 \family default 項目は表示されません。 \end_layout \begin_layout Standard 本コマンドは、既に文書のあるディレクトリをSVN管理下に置いている場合に \emph on のみ \emph default (すなわち \begin_inset Flex Code status collapsed \begin_layout Plain Layout .svn/entries \end_layout \end_inset ファイルが存在する場合にのみ)、お使いの文書をSVNに登録します。つまり、アーカイブはご自分でチェックアウトしなくてはなりません。 \end_layout \begin_layout Standard すると、文書の最初の説明文を入力するように促されます。登録したファイルは、まだコミットされたわけではないことに注意してください。 \end_layout \begin_layout Standard 実行されるSVNコマンドは、 \begin_inset Flex Code status collapsed \begin_layout Plain Layout svn add -q \begin_inset Quotes eld \end_inset <ファイル名> \begin_inset Quotes erd \end_inset \end_layout \end_inset です。 \end_layout \begin_layout Standard スイッチの説明は \begin_inset Flex Code status collapsed \begin_layout Plain Layout man svn \end_layout \end_inset をお読みください。 \end_layout \begin_layout Subsubsection 変更をチェックイン \end_layout \begin_layout Standard ファイルの編集を終えたら、変更をコミットします。このとき、変更の説明文を入れるよう促されます。その後、変更がコミットされます。 \end_layout \begin_layout Standard SVNコマンド \begin_inset Foot status collapsed \begin_layout Plain Layout ロックが有効になっていない場合です。第 \begin_inset CommandInset ref LatexCommand ref reference "subsec:SVNファイルロック" \end_inset 節をご覧ください。 \end_layout \end_inset : \begin_inset Flex Code status collapsed \begin_layout Plain Layout svn commit -q -m \begin_inset Quotes erd \end_inset <入力した説明文> \begin_inset Quotes erd \end_inset \begin_inset Quotes eld \end_inset <ファイル名> \begin_inset Quotes erd \end_inset \end_layout \end_inset \end_layout \begin_layout Subsubsection チェックアウトして編集 \end_layout \begin_layout Standard このファイルの変更点をレポジトリから取得して更新します。すべての干渉点は、手動で解決しなくてはならないので、この機能を使う前にSVNのマージ法と干渉解決法を理解 しておくようにしてください。 \end_layout \begin_layout Standard SVNコマンド \begin_inset Foot status collapsed \begin_layout Plain Layout 同上。 \end_layout \end_inset : \begin_inset Flex Code status collapsed \begin_layout Plain Layout svn update \twohyphens non-interactive \begin_inset Quotes eld \end_inset <ファイル名> \begin_inset Quotes erd \end_inset \end_layout \end_inset \end_layout \begin_layout Subsubsection リポジトリ版に戻す \end_layout \begin_layout Standard これは、最後のチェックイン以降、文書に加えられた変更をすべて廃棄します。変更が廃棄される前に警告が表示されます。 \end_layout \begin_layout Standard SVNコマンド: \begin_inset Flex Code status collapsed \begin_layout Plain Layout svn revert -q \begin_inset Quotes eld \end_inset <ファイル名> \begin_inset Quotes erd \end_inset \end_layout \end_inset \end_layout \begin_layout Subsubsection \family sans コピー \end_layout \begin_layout Standard これは、現行文書のコピーを生成します。最後のチェックイン以降、変更が加えられていないサラの文書であることが要求されます。ファイル名とコピー操作の説明を入力するよ うに促され、その後、新コピーがローカルとリポジトリの両方に生成されます。コピーされた文書と元の文書の親ディレクトリが異なる場合には、コピーにインクルードされたフ ァイルの相対パスは、( \family sans ファイル\SpecialChar menuseparator 名前をつけて保存\SpecialChar ldots \family default と同様に)全て調整されます。最後に、元の文書の代わりに、コピーされたファイルが読み込まれます。 \end_layout \begin_layout Labeling \labelwidthstring 00.00.0000 SVNコマンド: \end_layout \begin_layout Labeling \labelwidthstring 00.00.0000 \begin_inset Flex Code status collapsed \begin_layout Plain Layout svn copy -q "<ファイル名>" "<新ファイル名>" \end_layout \end_inset \end_layout \begin_layout Labeling \labelwidthstring 00.00.0000 \begin_inset Flex Code status collapsed \begin_layout Plain Layout svn commit \end_layout \end_inset \end_layout \begin_layout Subsubsection ファイル名変更 \end_layout \begin_layout Standard これは、現行文書のファイル名を変更します。最後のチェックイン以降、変更が加えられていないサラの文書であることが要求されます。ファイル名とコピー操作の説明を入力す るように促され、その後、ローカルとリポジトリの両方でファイル名が変更されます。新旧ファイル名の文書の親ディレクトリが異なる場合には、コピーにインクルードされたフ ァイルの相対パスは、( \family sans ファイル\SpecialChar menuseparator 名前をつけて保存\SpecialChar ldots \family default と同様に)全て調整されます。最後に、新ファイル名を使ってファイルが再度読み込まれます。 \end_layout \begin_layout Labeling \labelwidthstring 00.00.0000 SVNコマンド: \end_layout \begin_layout Labeling \labelwidthstring 00.00.0000 \begin_inset Flex Code status collapsed \begin_layout Plain Layout svn move -q add "<ファイル名>" "<新ファイル名>" \end_layout \end_inset \end_layout \begin_layout Labeling \labelwidthstring 00.00.0000 \begin_inset Flex Code status collapsed \begin_layout Plain Layout svn commit \end_layout \end_inset \end_layout \begin_layout Subsubsection \begin_inset CommandInset label LatexCommand label name "subsec:レポジトリからSVN同期" \end_inset レポジトリを使ったローカルディレクトリの同期 \begin_inset Foot status collapsed \begin_layout Plain Layout このコマンドは、subversion \begin_inset Formula $\geqq1.5$ \end_inset でのみ動作することに注意してください。 \end_layout \end_inset \end_layout \begin_layout Standard 上記の各コマンドはすべて、共通の短所を持っています。すなわち、これらのコマンドは現在の文書しか取り扱わないのです。もし、作業中の文書に図を含めたり、外部 \begin_inset Flex Code status collapsed \begin_layout Plain Layout .tex \end_layout \end_inset ファイルを取り込んだりすれば、管理はずっと複雑になります。そこで\SpecialCharNoPassThru LyX は、文書のおいてあるツリー全体の更新をサポートします \begin_inset Foot status collapsed \begin_layout Plain Layout すべての外部ファイルが、文書と同じディレクトリかそれ以下のサブディレクトリに来るようにファイル構造を構成する必要があります。 \end_layout \end_inset 。これは、subversion管理を知らなかったりレポジトリに新しい素材をコミットする勇気のない人たちと共同作業をする羽目になったときに、ひじょうに役に立ちます 。 \end_layout \begin_layout Standard \begin_inset Flex Code status collapsed \begin_layout Plain Layout ローカル辞書をレポジトリを使って更新 \end_layout \end_inset コマンドは、ディレクトリ全体を更新し、マージに衝突が発生した場合には、ローカル版は保存されるので、意図しないデータロスが発生しません。ローカルな変更が発見された 場合には、更新が開始される前にユーザに警告が与えられます。 \end_layout \begin_layout Labeling \labelwidthstring 00.00.0000 SVNコマンド: \begin_inset space ~ \end_inset \begin_inset Newline newline \end_inset \begin_inset Flex Code status collapsed \begin_layout Plain Layout svn diff $path(変更が発見された場合には通知します) \begin_inset Newline newline \end_inset svn update \twohyphens accept mine-full $path \end_layout \end_inset \end_layout \begin_layout Standard ここで \begin_inset Flex Code status collapsed \begin_layout Plain Layout $path \end_layout \end_inset は文書のパスを示します。 \end_layout \begin_layout Subsubsection 履歴を表示 \end_layout \begin_layout Standard これは、SVN文書の全履歴を表示します。 \begin_inset Flex Code status collapsed \begin_layout Plain Layout svn log \begin_inset Quotes eld \end_inset <ファイル名> \begin_inset Quotes erd \end_inset \end_layout \end_inset の出力がブラウザに表示されます。 \end_layout \begin_layout Subsubsection ファイルロック \begin_inset CommandInset label LatexCommand label name "subsec:SVNファイルロック" \end_inset \end_layout \begin_layout Standard 別々の改訂管理システム間でファイルを交換しようとすると、二人のユーザが同じ文書(の一部)を編集している場合、マージが衝突する問題を引き起こします。そのような衝突 が発生した場合、手動で解決しなくてはならなくなりますが、その合理的な解決法としては、与えられた時間に一人のユーザだけがファイルを編集することが許されるように保証 するための、何らかのロック機構を導入することが考えられます。 \end_layout \begin_layout Standard SVNには、このように相互に排他的なファイルアクセスを提供する機構が二つあります。ロックと、 \begin_inset Flex Code status collapsed \begin_layout Plain Layout svn:needs-lock \end_layout \end_inset svnファイル特性に依拠した書き込み権限の自動設定(第 \begin_inset CommandInset ref LatexCommand ref reference "subsec:自動ロック特性" \end_inset 節を参照)です \begin_inset Foot status open \begin_layout Plain Layout http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html \end_layout \end_inset 。ある文書について、この特性が検出されたときには、\SpecialCharNoPassThru LyX は自動的に文書編集にSVNロックを使用するようになり、チェックイン・チェックアウト機構はRCSと同じ枠組 みに切り替わります。これは特に、\SpecialCharNoPassThru LyX でのファイルの使われ方に以下の二つのモードがあることを意味します。 \end_layout \begin_layout Itemize 非ロック状態。読み込まれたファイルは、読み込み専用モードになります。編集するためには、チェックアウトする必要があります。 \emph on チェックアウト \emph default を行うと、レポジトリからの更新と、書き込みロックの獲得が行われます。ロックの獲得ができないと、非ロック状態から出ることができません。 \end_layout \begin_layout Itemize ロック状態。読み込まれたファイルは、「通常の」編集モードになります。他のユーザには、このファイルを編集する許可が与えられません。 \emph on チェックイン \emph default を行うと、変更のコミットと書き込みロックの解放が行われます。文書に変更が加えられなかった場合には、コミットは実行されず \begin_inset Foot status collapsed \begin_layout Plain Layout コミットは実行されないのに、コミットメッセージを入力するよう促されますが、驚かないでください。 \end_layout \end_inset 、書き込みロックの解放のみが行われます。 \end_layout \begin_layout Standard SVNコマンド: \end_layout \begin_layout Labeling \labelwidthstring 00.00.0000 チェックイン: \begin_inset Flex Code status collapsed \begin_layout Plain Layout svn commit -q -m \begin_inset Quotes erd \end_inset <説明> \begin_inset Quotes erd \end_inset \begin_inset Quotes eld \end_inset <ファイル名> \begin_inset Quotes erd \end_inset \end_layout \end_inset \begin_inset Newline newline \end_inset \begin_inset Flex Code status collapsed \begin_layout Plain Layout svn unlock \begin_inset Quotes eld \end_inset <ファイル名> \begin_inset Quotes erd \end_inset \end_layout \end_inset \end_layout \begin_layout Labeling \labelwidthstring 00.00.0000 チェックアウト: \begin_inset Flex Code status collapsed \begin_layout Plain Layout svn update \begin_inset Quotes eld \end_inset <ファイル名> \begin_inset Quotes erd \end_inset \end_layout \end_inset \begin_inset Newline newline \end_inset \begin_inset Flex Code status collapsed \begin_layout Plain Layout svn unlock \begin_inset Quotes eld \end_inset <ファイル名> \begin_inset Quotes erd \end_inset \end_layout \end_inset \end_layout \begin_layout Subsubsection 自動ロック特性 \begin_inset CommandInset label LatexCommand label name "subsec:自動ロック特性" \end_inset \end_layout \begin_layout Standard 上述したような \begin_inset Flex Code status collapsed \begin_layout Plain Layout .lyx \end_layout \end_inset ファイルに対する書き込み権限の自動設定は、 \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout ファイル\SpecialChar menuseparator バージョン管理\SpecialChar menuseparator ロック特性を使用 \end_layout \end_inset で行うことができます。このコマンドは、SVNサーバでファイルがロックされていないときのみ使用可能状態になります(つまり、使用するにはチェックアウトが必要です)。 \end_layout \begin_layout Standard SVNコマンド: \end_layout \begin_layout Labeling \labelwidthstring 00.00.0000 チェックイン: \begin_inset Flex Code status collapsed \begin_layout Plain Layout svn propset svn:needs-lock ON \begin_inset Quotes eld \end_inset <ファイル名> \begin_inset Quotes erd \end_inset \end_layout \end_inset \end_layout \begin_layout Labeling \labelwidthstring 00.00.0000 チェックアウト: \begin_inset Flex Code status collapsed \begin_layout Plain Layout svn propdel svn:needs-lock \begin_inset Quotes eld \end_inset <ファイル名> \begin_inset Quotes erd \end_inset \end_layout \end_inset \end_layout \begin_layout Subsubsection \begin_inset CommandInset label LatexCommand label name "subsec:VCS改訂情報" \end_inset 文書の改訂情報 \end_layout \begin_layout Standard 文書中で改訂情報を有効化するにはいくつかの方法があります。 \end_layout \begin_layout Itemize \SpecialCharNoPassThru LyX による直接サポート \begin_inset Separator parbreak \end_inset \end_layout \begin_deeper \begin_layout Itemize ツリー改訂情報( \begin_inset Flex Code status collapsed \begin_layout Plain Layout vcs-tree-revision \end_layout \end_inset )。 \begin_inset Flex Code status collapsed \begin_layout Plain Layout svnversion \end_layout \end_inset コマンドの出力を返します。下記の表が、結果の読み方のヒントを与えるでしょう。 \end_layout \begin_layout Standard \align center \begin_inset Tabular \begin_inset Text \begin_layout Plain Layout 出力 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 意味 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 4123:4168 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 改訂版の混合した作業コピー \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 4168M \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 修正された作業コピー \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 4123S \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout スイッチされた作業コピー \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 4123P \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout チェックアウト頻度が低かったことによる不完全な作業コピー \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 4123:4168MS \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 改訂版が混合し、修正され、スイッチされた作業コピー \end_layout \end_inset \end_inset \end_layout \begin_layout Itemize ファイル改訂情報。 \begin_inset Flex Code status collapsed \begin_layout Plain Layout svn \begin_inset space ~ \end_inset info \begin_inset space ~ \end_inset \twohyphens xml \begin_inset space ~ \end_inset file.lyx \end_layout \end_inset の出力を解析したものが返されます。サポートされるフラグは \begin_inset Separator parbreak \end_inset \end_layout \begin_deeper \begin_layout Itemize 最終コミットのバージョン番号( \begin_inset Flex Code status collapsed \begin_layout Plain Layout vcs-revision \end_layout \end_inset ) \end_layout \begin_layout Itemize 最終コミットの著者( \begin_inset Flex Code status collapsed \begin_layout Plain Layout vcs-author \end_layout \end_inset ) \end_layout \begin_layout Itemize 最終コミットの日付( \begin_inset Flex Code status collapsed \begin_layout Plain Layout vcs-date \end_layout \end_inset ) \end_layout \begin_layout Itemize 最終コミットの時間( \begin_inset Flex Code status collapsed \begin_layout Plain Layout vcs-time \end_layout \end_inset ) \end_layout \end_deeper \begin_layout Standard これらの情報は、情報差込枠で得ることができます(例: \begin_inset Flex Code status collapsed \begin_layout Plain Layout info-insert buffer vcs-date \end_layout \end_inset )。これらの情報は、ファイルをsvn管理下に置いたときのみ(すなわち使用中文書の \begin_inset Flex Code status collapsed \begin_layout Plain Layout .svn \end_layout \end_inset ディレクトリがあるときのみ)利用可能です。 \end_layout \end_deeper \begin_layout Itemize もう一つの\threehyphens ハッカー的な\threehyphens 方法は、SVNキーワードを使用する方法です \begin_inset Foot status collapsed \begin_layout Plain Layout http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html \end_layout \end_inset 。簡単に言えば、ファイルキーワード特性を設定して(例: \family sans svn propset svn:keywords 'Rev' file.lyx \family default )、文書中にキーワード\SpecialCharNoPassThru TeX コード \begin_inset Foot status collapsed \begin_layout Plain Layout これは、\SpecialCharNoPassThru LyX がキーワードタグの途中で改行してしまわないことを確実にするための、簡単な方法です。 \end_layout \end_inset タグ(例: \begin_inset ERT status open \begin_layout Plain Layout $Rev$ \end_layout \end_inset )を貼り付けるのです。このようにして、SVNクライアントは、各更新やコミットの後に自動的に改訂番号を代入することができるのです(例 \begin_inset ERT status open \begin_layout Plain Layout $Rev: 59 $ \end_layout \end_inset )。このアプローチにはいくつか問題があります。第一に、\SpecialCharNoPassThru TeX の世界では「$」文字は数式を表すのに使われるので、\SpecialCharNoPassThru LyX 中の \begin_inset Formula $Rev$ \end_inset という数式表現が、すべて \begin_inset Formula $Rev:59$ \end_inset になってしまいます。その他のId・Date・Authorなどといったキーワードも同様です。第二に、SVN出力は使用中のロケールに依存するので、Dateが用いられ ると、SVNは、問題を引き起こすような文字列を容易に生成してしまいます。第三に、文書中には、番号だけでなく「Rev:59」という文字列全体が表示されてしまいます 。Subversionがユーザ定義のキーワードを実装するまでは、このアプローチを信頼性を持って使用したり、\SpecialCharNoPassThru LyX がこれを直接サポートすることは、難しそうです。 \end_layout \begin_layout Subsection SVNとWindows環境 \end_layout \begin_layout Quote ユーザが、かなり早いうちに自分自身でコマンドライン操作を理解できないのであれば、TortoiseSVNを使った方が賢明でしょう。\threehyphens P. A. ルービン \end_layout \begin_layout Subsubsection 準備 \end_layout \begin_layout Standard \SpecialCharNoPassThru LyX を導入して、Subversionレポジトリへのアクセス権を持っている他に、ユーザはSubversionクライアントプログラムを導入する必要があります。クラ イアントプログラムのWindows用インストーラは \begin_inset CommandInset href LatexCommand href name "CollabNet" target "http://www.collab.net/nonav/downloads/subversion/" \end_inset にあります。ユーザは \begin_inset CommandInset href LatexCommand href name "TortoiseSVN" target "http://tortoisesvn.tigris.org/" \end_inset も導入することを考えるでしょう。これはSubversionの操作をWindows Explorerのコンテクスト(右クリック)メニューに統合します。\SpecialCharNoPassThru LyX 外部で 行う操作は、一般的にExplorerコンテクストメニューを使った方が便利です。TortoiseSVNは、\SpecialCharNoPassThru LyX 自身が使用するクライアントプログラムの代わりとは成 りませんので、注意してください。 \end_layout \begin_layout Subsubsection 文書をSubversion管理下に置くには \end_layout \begin_layout Standard \SpecialCharNoPassThru LyX 文書をSubversionのバージョン管理下に置く前に、その親ディレクトリをバージョン管理下に置かなくてはなりません。文書を、既にレポジトリに存在するプロ ジェクトに追加する際には、新規文書が置かれることになるディレクトリへ、プロジェクトをチェックアウトすることによって実現します。プロジェクト自体がバージョン管理下 にない場合(たとえばこの文書が新規プロジェクトの最初のファイルである場合)には、このディレクトリをレポジトリにインポートしなくてはなりません。これは、\SpecialCharNoPassThru LyX の外 部で行います。インポートもチェックアウトも共に、TortoiseSVNを使えば、Explorerのコンテクストメニューから簡単に終えることができます。あるいは、 DOSプロンプトでコマンドライン・クライアントを使って成し遂げることもできます。TortoiseSVNを使ったプロジェクトのインポート手続きを下記で説明します。 レポジトリは既に存在し、新規プロジェクトを \begin_inset Flex Code status collapsed \begin_layout Plain Layout C: \backslash new project \end_layout \end_inset で開始するものとします。Subversionクライアントプログラムを使うための情報を得るには、DOSシェルで \begin_inset Flex Code status collapsed \begin_layout Plain Layout svn \twohyphens help \end_layout \end_inset を実行してください。 \end_layout \begin_layout Enumerate Windows Explorerで \begin_inset Flex Code status collapsed \begin_layout Plain Layout C: \backslash new project \end_layout \end_inset を見つけ出して右クリックし、 \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout TortoiseSVN\SpecialChar menuseparator Repo-browser \end_layout \end_inset を選択してください。必要であれば、レポジトリのURLを調整し、OKをクリックしてください。 \end_layout \begin_layout Enumerate 新規プロジェクトフォルダを置くレポジトリレベル(多くの場合最上位レベル)を右クリックし、 \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout Create folder\SpecialChar ldots \end_layout \end_inset をクリックしてください。プロジェクトフォルダの名称を入力してOKをクリックしてください。必要であればログファイル用のメッセージを入力し、再びOKをクリックしてく ださい。新規プロジェクトフォルダがレポジトリに現れるはずです。最後にOKを再度クリックして、レポジトリブラウザを終了してください。 \end_layout \begin_layout Enumerate 再度 \begin_inset Flex Code status collapsed \begin_layout Plain Layout C: \backslash new project \end_layout \end_inset を右クリックし、今度は \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout SVN Checkout\SpecialChar ldots \end_layout \end_inset を選択してください。レポジトリにたった今作成した、プロジェクトフォルダのURLを選択し、チェックアウトディレクトリを \begin_inset Flex Code status collapsed \begin_layout Plain Layout C: \backslash new project \end_layout \end_inset に設定してから、OKをクリックしてください。フォルダが空でないことを警告されますが、OKをクリックして進んでください。すると、 \begin_inset Flex Code status collapsed \begin_layout Plain Layout C: \backslash new project \end_layout \end_inset の下に \begin_inset Flex Code status collapsed \begin_layout Plain Layout .svn \end_layout \end_inset ディレクトリが作成されます。 \end_layout \begin_layout Enumerate \SpecialCharNoPassThru LyX で文書を新規作成するか開くかして、 \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout ファイル\SpecialChar menuseparator バージョン管理\SpecialChar menuseparator 登録 \end_layout \end_inset をクリックします。ログメッセージを入力してOKをクリックし、文書をバージョン管理にコミットしてください。 \end_layout \begin_layout Standard 爾後、 \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout ファイル\SpecialChar menuseparator バージョン管理 \end_layout \end_inset メニューのすべての機能が使用できるようになります。Windows ExplorerのTortoiseSVNコンテクストメニューか、コマンドプロンプトでのSubv ersionクライアントプログラムを使用して、文書をチェックイン・チェックアウトしたり、履歴を見たりといったことができるようになります。 \end_layout \begin_layout Subsubsection Windows下でSVNと共にSSHトンネルを使うには \end_layout \begin_layout Standard Linuxに較べて、WindowsでSVNクライアントをSSH経由で通信するようにさせるのは、かなり厄介な仕事です。どのようにクライアント側を設定すればよいか、 少なくとも幾分かのヒントをお示しするつもりですが、sshとWindowsコマンドラインの知識が前もって必要であり、それと共にかなりの量のフラストレーションが溜ま ることを覚悟しておいてください。 \end_layout \begin_layout Enumerate 前節で述べたように、Windows用のSVNクライアントを入手してください。これが新規の導入である場合には、何らかのSVNコマンド(たとえば \begin_inset Flex Code status collapsed \begin_layout Plain Layout svn \twohyphens version \end_layout \end_inset )を実行して、configファイル群を生成させてください。これらは後で変更を加える必要があります。 \end_layout \begin_layout Enumerate Windows用のsshクライアントを選んでください。選択肢はたくさんありますが、ここではPutty tools \begin_inset Foot status open \begin_layout Plain Layout \begin_inset Flex URL status collapsed \begin_layout Plain Layout http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html \end_layout \end_inset \end_layout \end_inset のものを使用することとしましょう。クライアントが接続の度にパスワードを訊いてこないように、接続を自動化する必要があります。簡単にするために、追加的なパスワード保 護などを加えない \begin_inset Flex Ruby status collapsed \begin_layout Plain Layout 鍵 \begin_inset Argument post:1 status collapsed \begin_layout Plain Layout キー \end_layout \end_inset \end_layout \end_inset のみを使用することとします。 \begin_inset Separator parbreak \end_inset \end_layout \begin_deeper \begin_layout Enumerate \begin_inset Flex Code status collapsed \begin_layout Plain Layout puttygen \end_layout \end_inset を使って鍵を生成します。.ppkプライベート鍵ファイルを保存し、パブリック鍵ファイルはサーバ側に置きます。SVNサーバがLinuxで走っている場合、このパブリック 鍵の書式はLinuxのopensshと互換性がないために、「Public key for pasting into OpenSSH authorized_key s file:」編集フィールドから、直接サーバの \begin_inset Flex Code status collapsed \begin_layout Plain Layout ~/.ssh/authorized_keys \end_layout \end_inset または \begin_inset Flex Code status collapsed \begin_layout Plain Layout authorized_keys2 \end_layout \end_inset ファイルにコピー&ペーストを行わなくてはならないことに注意してください。 \end_layout \begin_layout Enumerate Puttyのplinkを入手してください。SVNのconfigファイル \begin_inset Foot status collapsed \begin_layout Plain Layout 正確なパスはWindowsのバージョンに依りますが、通常は \begin_inset Flex Code status collapsed \begin_layout Plain Layout c: \backslash Documents and Settings \backslash user \backslash Application Data \backslash Subversion \backslash config \end_layout \end_inset や \begin_inset Flex Code status collapsed \begin_layout Plain Layout AppData \backslash Roaming \backslash Subversion \end_layout \end_inset 辺りにあります。 \end_layout \end_inset 中の \begin_inset Flex Code status collapsed \begin_layout Plain Layout [tunnels] \end_layout \end_inset セクションにsshコマンドを設定してください。例: \begin_inset Flex Code status collapsed \begin_layout Plain Layout ssh=c:/path/plink.exe -i c:/path/private_key.ppk \end_layout \end_inset \begin_inset Foot status collapsed \begin_layout Plain Layout 通常、正確なコマンドを機能させるには長い時間がかかり、それは多くの物事に依存します。たとえば、リモートサーバがPuttyなどの既定セッションとして保存されないよ うにしてください。うまく行かない場合には、まずSVNなしでplink経由の接続を試してください。 \end_layout \end_inset \end_layout \end_deeper \begin_layout Enumerate SVNアーカイブをチェックアウトしてください。例: \begin_inset Newline newline \end_inset \begin_inset Flex Code status collapsed \begin_layout Plain Layout svn co svn+ssh://user@server/repository_path \end_layout \end_inset \end_layout \begin_layout Subsubsection 行末変換 \end_layout \begin_layout Standard 共著者同士がLinuxとWindowsを混在させているとき、\SpecialCharNoPassThru LyX は.lyxファイル中で異なった行末記号を使用することになります。これは、\SpecialCharNoPassThru LyX の機能に関する限り 問題になりませんが、コミット差分は巨大になり、マージではコンフリクトを引き起こしがちです。幸いにして、SVNは、.lyxファイルを \begin_inset Flex Code status collapsed \begin_layout Plain Layout native \end_layout \end_inset モードに切り替える際 \begin_inset Foot status collapsed \begin_layout Plain Layout 手短には \begin_inset Flex Code status collapsed \begin_layout Plain Layout svn propset svn:eol-style native FILE_NAME \end_layout \end_inset \end_layout \end_inset 、CR/LF問題をどのように取り扱えばいいかを知っているので大丈夫です \begin_inset Foot status collapsed \begin_layout Plain Layout \begin_inset Flex URL status collapsed \begin_layout Plain Layout http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html \end_layout \end_inset \end_layout \end_inset 。 \end_layout \begin_layout Subsection \SpecialCharNoPassThru LyX におけるGITコマンド \end_layout \begin_layout Standard \SpecialCharNoPassThru LyX で、最小限のGITコマンドがサポートされるようになりました。これらのコマンドは、 \family sans ファイル\SpecialChar menuseparator バージョン管理 \family default にあります。リポジトリのアクセスに、パスワード保護されたsshを使用している場合には、ターミナルウィンドウでの操作をするように促されます。\SpecialCharNoPassThru LyX は、GIT 1.7に対して試験を行っています。 \end_layout \begin_layout Standard GITと他のバージョン管理システムとの大きな相違点は、GITの配布形態にあります。伝統的なバージョン管理システムでは、リポジトリをホストする、中心となるサーバー があります。ユーザーは変更点をサーバーにコミットし、他のユーザーが行った更新分をサーバーから受け取ります。一方、GITでは、ユーザーは、ローカルのリポジトリにコ ミットを行います。ローカルリポジトリは、GITコマンドの \begin_inset Flex Code status open \begin_layout Plain Layout pull \end_layout \end_inset または \begin_inset Flex Code status open \begin_layout Plain Layout push \end_layout \end_inset を使って、1つ以上のリモートリポジトリと同期されます。\SpecialCharNoPassThru LyX は、リモートのGITリポジトリとは、一切関わりません。CVSやSVNの集権的リポジトリに対して行うの と同じことを、ローカルのリポジトリに対してのみ行います。リモートのGITリポジトリを使用している場合には、お好みのGITクライアントを使用して、 \begin_inset Flex Code status open \begin_layout Plain Layout pull \end_layout \end_inset または \begin_inset Flex Code status open \begin_layout Plain Layout push \end_layout \end_inset の操作を行う必要があります。 \end_layout \begin_layout Subsubsection 登録 \end_layout \begin_layout Standard お使いの文書が改訂管理下に置かれていなければ、メニューにはこの項目だけが表示されます。もし改訂管理が有効ならば、 \family sans 登録 \family default 項目は表示されません。 \end_layout \begin_layout Standard 本コマンドは、既に文書のあるディレクトリをGIT管理下に置いている場合に \emph on のみ \emph default (すなわち \begin_inset Flex Code status collapsed \begin_layout Plain Layout .git/index \end_layout \end_inset ファイルが存在する場合にのみ)、お使いの文書をGITに登録します。つまり、アーカイブはご自分でチェックアウトしなくてはなりません。 \end_layout \begin_layout Standard すると、文書の最初の説明文を入力するように促されます。登録したファイルは、まだコミットされたわけではないことに注意してください。 \end_layout \begin_layout Standard 実行されるGITコマンドは、 \begin_inset Flex Code status collapsed \begin_layout Plain Layout git add "<ファイル名>" \end_layout \end_inset です。 \end_layout \begin_layout Standard スイッチの説明は \begin_inset Flex Code status collapsed \begin_layout Plain Layout man git \end_layout \end_inset をお読みください。 \end_layout \begin_layout Subsubsection 変更をチェックイン \end_layout \begin_layout Standard ファイルの編集を終えたら、変更をコミットします。このとき、変更の説明文を入れるよう促されます。その後、変更がコミットされます。 \end_layout \begin_layout Standard GITコマンド: \begin_inset Flex Code status collapsed \begin_layout Plain Layout git commit -q -m \begin_inset Quotes erd \end_inset <入力した説明文> \begin_inset Quotes erd \end_inset "<ファイル名>" \end_layout \end_inset \end_layout \begin_layout Subsubsection リポジトリ版に戻す \end_layout \begin_layout Standard これは、最後のチェックイン以降、文書に加えられた変更をすべて廃棄します。変更が廃棄される前に警告が表示されます。 \end_layout \begin_layout Standard GITコマンド: \begin_inset Flex Code status collapsed \begin_layout Plain Layout git checkout -q \begin_inset Quotes eld \end_inset <ファイル名> \begin_inset Quotes erd \end_inset \end_layout \end_inset \end_layout \begin_layout Subsubsection ファイル名変更 \end_layout \begin_layout Standard これは、現行文書のファイル名を変更します。最後のチェックイン以降、変更が加えられていないサラの文書であることが要求されます。ファイル名とコピー操作の説明を入力す るように促され、その後、ローカルとリポジトリの両方でファイル名が変更されます。新旧ファイル名の文書の親ディレクトリが異なる場合には、コピーにインクルードされたフ ァイルの相対パスは、( \family sans ファイル\SpecialChar menuseparator 名前をつけて保存\SpecialChar ldots \family default と同様に)全て調整されます。最後に、新ファイル名を使ってファイルが再度読み込まれます。 \end_layout \begin_layout Labeling \labelwidthstring 00.00.0000 GITコマンド: \end_layout \begin_layout Labeling \labelwidthstring 00.00.0000 \begin_inset Flex Code status collapsed \begin_layout Plain Layout git mv "<ファイル名>" "<新ファイル名>" \end_layout \end_inset \end_layout \begin_layout Labeling \labelwidthstring 00.00.0000 \begin_inset Flex Code status collapsed \begin_layout Plain Layout git commit \end_layout \end_inset \end_layout \begin_layout Subsubsection 履歴を表示 \end_layout \begin_layout Standard これは、GIT文書の全履歴を表示します。 \begin_inset Flex Code status collapsed \begin_layout Plain Layout git log \begin_inset Quotes eld \end_inset <ファイル名> \begin_inset Quotes erd \end_inset \end_layout \end_inset の出力がブラウザに表示されます。 \end_layout \begin_layout Subsubsection 改訂情報 \end_layout \begin_layout Standard \SpecialCharNoPassThru LyX は、ファイルの最終コミットのGITハッシュ番号・著者名・最終コミットの日時をサポートします。これらの情報は、すべて \family typewriter git log -n 1 \twohyphens pretty=format:%H%n%an%n%ai \family default によって抽出されます。ツリーバージョン情報は、 \family typewriter git describe \twohyphens abbrev \twohyphens dirty \twohyphens long \family default で取得されます。詳細については、第 \begin_inset CommandInset ref LatexCommand ref reference "subsec:VCS改訂情報" \end_inset 節を参照してください。 \end_layout \begin_layout Subsection さらなる調整 \end_layout \begin_layout Standard vcコマンド機構が最近になって付け加えられたおかげで、\SpecialCharNoPassThru LyX のパワーユーザは、改訂管理のための自製コマンドを作ることができるようになりました。 \end_layout \begin_layout Standard たとえば、以下のようにして、二つのTortoiseSVNコマンドを直接統合することができます。 \end_layout \begin_layout Description コミット: \begin_inset Flex Code status collapsed \begin_layout Plain Layout vc-command DR "." "TortoiseProc /command:commit /path:$$p" \end_layout \end_inset \end_layout \begin_layout Description 元に戻す: \begin_inset Flex Code status collapsed \begin_layout Plain Layout vc-command DR "." "TortoiseProc /command:revert /path:$$p" \end_layout \end_inset \end_layout \begin_layout Subsection バージョン管理と文書比較 \end_layout \begin_layout Standard バージョン管理は、通常 \begin_inset Flex Code status collapsed \begin_layout Plain Layout diff \end_layout \end_inset ダンプを生成することによって、改訂版の間の変更点を検査するのが、典型的な使用法です。これは平文ファイルには有効なのですが、複雑な構造を持つ\SpecialCharNoPassThru LyX ファイルの場合に は、あまり便利ではありません。そこで、\SpecialCharNoPassThru LyX は独自の文書比較機能を提供しています。この機能を呼び出すには2つの方法があります。1つは、\SpecialCharNoPassThru LyX の \begin_inset Flex Code status collapsed \begin_layout Plain Layout VC_COMPARE \end_layout \end_inset 関数を直接呼び出す方法であり(詳細は\SpecialCharNoPassThru LyX 関数説明書を参照)、もう1つは \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout 旧改訂と比較\SpecialChar ldots \end_layout \end_inset メニューないしアイコンを使用する方法です。当該文書のうち、任意の2つの改訂版を比較することもできますし、編集中の現行版を古い改訂版と比較することもできます(この とき改訂版遡及数「 \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout 0 \end_layout \end_inset 」は、編集中のファイルと最後にコミットした改訂版との比較を意味します)。 \end_layout \begin_layout Standard この機能は、SVNとRCSでサポートされていますが、RCSは、より複雑なバージョン付けスキームを持っているため、制約があります。ダイアログ中で改訂版を指定する際 の数字は、つねにRCS改訂番号の最後の数を指し示します(例:「1.2.35」版のときには「35」)。現在のところ、改訂のGIT表記はサポートされておらず、HEAD~ Xの形で表記されるXステップ前の改訂版を、編集中文書と比較することのみが可能です。 \end_layout \begin_layout Section 文芸プログラミング \end_layout \begin_layout Standard \noun on Kayvan Sylvan \noun default (kayvan@sylvan.com)改訂  \noun on Edmar Wienskoski Jr. \noun default (edmar-w-jr@technologist.com)原文 \end_layout \begin_layout Subsection はじめに \end_layout \begin_layout Standard この節の主な目的は、文芸的プログラミング(literate programming)のために、\SpecialCharNoPassThru LyX をどう使えばよいかをお見せすることです。ここでは、あなたがこ のプログラミング技術をよくご存じで、「tangling」や「weaving」の意味するところを知っているものとして説明します。そうでない場合には、以下の各節にあ るウェブリンクをたどってください。そこには、かつての開発の歴史から最新のツールチップまで、たくさんの良質なドキュメンテーションがあります。 \end_layout \begin_layout Standard また、あなたが、\SpecialCharNoPassThru LyX の設定を変更することを厭わない程度まで\SpecialCharNoPassThru LyX に習熟しており、Xリソースファイルにも親しんでいることを前提にしています。そうでない場合は、あ なたの必要とするトピックを扱っている、\SpecialCharNoPassThru LyX の他の説明書で調べてください。 \end_layout \begin_layout Subsection 文芸プログラミング \end_layout \begin_layout Standard 以下は、文芸プログラミング FAQからの抜粋です。 \end_layout \begin_layout Quotation 文芸プログラミングは、人間が読むのに適した形でのドキュメンテーションとソースの組合わせです。実際、文芸的プログラムは楽しい読み物であるべきであり、さらには参加し たいとさえ思わせるべきなのです!(ボブ、ごめん。言わずにはいれなかった。)一般的に、文芸プログラムは、ソースとドキュメンテーションを同一ファイル上に結合したもの です。そして、文芸プログラミングツールは、ファイルを解析して、読むことのできるドキュメンテーションか、あるいはコンパイル可能なソースを生成します。文芸プログラミ ングのWEBスタイルは、D. \begin_inset space \thinspace{} \end_inset E. Knuthが、\SpecialCharNoPassThru TeX 組版ソフトウエアを開発中に作り出したものです。 \end_layout \begin_layout Standard 他のエキスパートの発言です。 \end_layout \begin_layout Quotation \emph on 文芸プログラミングは、冗長なコメント付けと何が違いますか? \end_layout \begin_layout Quotation 3つの際立った特徴があります。重要な順に列挙すれば、 \begin_inset Separator parbreak \end_inset \end_layout \begin_deeper \begin_layout Itemize 推敲の順序が柔軟 \end_layout \begin_layout Itemize ブラウジングの自動サポート \end_layout \begin_layout Itemize 特に図式と数式を含んだドキュメンテーションの組版 \end_layout \end_deeper \begin_layout Quotation などがあります。 \end_layout \begin_layout Standard あなたの興味に火を付けたところで書誌情報を見てみましょう。 \end_layout \begin_layout Subsubsection 書誌情報 \end_layout \begin_layout Standard 完全な文芸プログラミング FAQは \end_layout \begin_layout Quote Literate Programming FAQ \begin_inset Flex URL status collapsed \begin_layout Plain Layout http://www.xmarks.com/site/shelob.ce.ttu.edu/daves/lpfaq/faq.html \end_layout \end_inset \end_layout \begin_layout Standard にあります。 \end_layout \begin_layout Standard このFAQには、23(二十三です!)の文芸プログラミング用ツールが列挙されています。一部のツールは、特定のプログラミング言語用に特化したものですが、一般的な対象 を持つものもあります。私は自分で使うのに、いくつかの理由から \noun on Noweb \noun default を選びました。 \end_layout \begin_layout Itemize 説明文書を\SpecialCharNoPassThru LaTeX でもHTMLでも出力できる。 \end_layout \begin_layout Itemize 開放的なアーキテクチャに持っているので、新しいフィルタをプラグインとして加えたり、自分が必要な特別な処理を実行することが容易である。 \end_layout \begin_layout Itemize すでに利用可能となっているフィルタの良質なコレクションがある(HTMLはその一つです)。 \end_layout \begin_layout Itemize 無料である。 \end_layout \begin_layout Standard Nowebのウェブページは \end_layout \begin_layout Quote Nowebホームページ \begin_inset Flex URL status collapsed \begin_layout Plain Layout http://www.cs.virginia.edu/~nr/noweb/ \end_layout \end_inset \end_layout \begin_layout Standard にあります。ここから始めれば、たくさんの興味深いリンクや、文芸プログラミングの用例にたどり着くことができます。 \end_layout \begin_layout Subsection \SpecialCharNoPassThru LyX とNowebを使った文芸プログラミング \end_layout \begin_layout Standard \SpecialCharNoPassThru LyX における文芸プログラミングのサポートは、\SpecialCharNoPassThru LyX の汎用変換機構を使用して実現しています。このサポートは「Noweb非依存」的な方法で提供されているので、Ly Xの設定を変更するだけで、自分の好きな他の文芸プログラミングツールを使って、この新しい\SpecialCharNoPassThru LyX の機能を利用することができます。 \end_layout \begin_layout Subsubsection ドキュメントとコードの生成(weavingおよびtangling) \end_layout \begin_layout Paragraph nowebモジュールの使用 \end_layout \begin_layout Standard Nowebと\SpecialCharNoPassThru LyX の導入に成功したならば、新規文書を開いたときにはいつも、文書クラスを選択した後、 \family sans 文書\SpecialChar menuseparator 設定 \family default メニューで「noweb」モジュールを追加するようにしてください。Nowebが正しく導入されていれば、「モジュール」リンクをクリックした際、利用可能リストに「no web」モジュールが表示され、文書に追加できるようになっています。 \end_layout \begin_layout Paragraph コードの入力 \end_layout \begin_layout Standard \SpecialCharNoPassThru LyX では、 \begin_inset Flex Noun status collapsed \begin_layout Plain Layout Chunk \end_layout \end_inset という名前のレイアウトを使えば、コードを入力することができます。Nowebは次のようにchunks を区切ります。 \end_layout \begin_layout LyX-Code <>= \end_layout \begin_layout LyX-Code code \end_layout \begin_layout LyX-Code more code \end_layout \begin_layout LyX-Code even more code \end_layout \begin_layout LyX-Code @ \end_layout \begin_layout Standard 問題は<<と@の間にあるものを完全にそのままの形で扱わなければならないことです。つまり、\SpecialCharNoPassThru LyX は、この間に書かれたものを特別に解釈することは決してあってはなりま せん。これも \begin_inset Flex Noun status collapsed \begin_layout Plain Layout Chunk \end_layout \end_inset によって取り扱われ、通常の段落のように見えますが、自由に空白を入れることができます。 \end_layout \begin_layout Standard 特殊な注釈として、chunk内でNowebの「%def」を使えば、Nowebのidentifierの相互参照に項目を加えることができます。次の例を見てください。 \end_layout \begin_layout LyX-Code <>= \end_layout \begin_layout LyX-Code def some_function(args): \end_layout \begin_layout LyX-Code "This is the doc string for this function." \end_layout \begin_layout LyX-Code print "My args: ", args \end_layout \begin_layout LyX-Code @ %def some_function \end_layout \begin_layout Standard これをどのように使って、その結果相互参照がどうなるかは \emph on LIBDIR/examples/listerrors.lyx \emph default の中の文芸pythonプログラムを見るとよくわかります。 \end_layout \begin_layout Paragraph 説明文書の生成 \end_layout \begin_layout Standard この時点で、適切な文書クラスを持ち、いくつかのコードとテキストが入った新規文書ファイルが作成されているはずです。これをどうやって印刷したらいいのでしょう。答えは 簡単で、通常の文書で行うように \family sans 文書\SpecialChar menuseparator 表示 \family default 等を選ぶだけです。特別な手続きは必要ありません。 \end_layout \begin_layout Standard 理解を助けるために、\SpecialCharNoPassThru LyX の内部で何が起っているかを説明しておきましょう。 \end_layout \begin_layout Enumerate \family sans 文書\SpecialChar menuseparator 更新 \family default が選択されると、\SpecialCharNoPassThru LaTeX ファイルがつくられます。 \family default \begin_inset Separator parbreak \end_inset \end_layout \begin_deeper \begin_layout Standard 文書が文芸プログラミング用のクラスであった場合には、拡張子に( \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout 設定 \end_layout \end_inset パネルで設定した)文芸プログラム用のものがつけられます。それ以外は .texが拡張子に使われます。 \end_layout \end_deeper \begin_layout Enumerate 違いがファイル名だけなのに注意してください。\SpecialCharNoPassThru LyX による特別な処理は必要ありません。 \begin_inset Flex Noun status collapsed \begin_layout Plain Layout Chunk \end_layout \end_inset 環境でコードを入力するのだけがポイントです。 \end_layout \begin_layout Enumerate 文書が何らかの文芸プログラムクラスなら、\SpecialCharNoPassThru LyX は、\SpecialCharNoPassThru LyX からNowebへの内部変換子を用い、それからNowebから\SpecialCharNoPassThru LaTeX への変換子 \begin_inset Foot status collapsed \begin_layout Plain Layout これらの変換子は、 \family sans ツール\SpecialChar menuseparator 設定 \family default パネルの変換子タブに定義されています。変換子の一般的な情報については、取扱説明書『 \emph on カスタマイズ篇 \emph default 』の「 \emph on 変換子 \emph default 」の節をご覧ください。 \end_layout \end_inset を使って\SpecialCharNoPassThru LaTeX ファイルを生成します。 \family default \begin_inset Separator parbreak \end_inset \end_layout \begin_deeper \begin_layout Standard それ以外の場合はこのステップを飛ばします。 \end_layout \end_deeper \begin_layout Enumerate 最後に\SpecialCharNoPassThru LaTeX が実行され、通常の文書と同じ後処理が行われます。 \end_layout \begin_layout Standard 様々な変換子が実行するコマンドを変更すれば、簡単に、特定の「文芸プログラムツール」から変更することができます。 \end_layout \begin_layout Paragraph コードの生成 \end_layout \begin_layout Standard ビルドメニューが選ばれた場合や、それに対応するツールバーのボタンが押された場合、上のステップ1と同様に\SpecialCharNoPassThru LaTeX ファイルが生成されます。それから\SpecialCharNoPassThru LyX は \family typewriter Noweb->Program \family default のコンバータを起動します。通常は、このコンバータは(他のコンバータと同じように)2つの部分からできています。 \end_layout \begin_layout Enumerate 変換プログラム。このプログラムは、一つのフォーマットから他のフォーマットへの変換を行います(この場合は、Nowebフォーマットからプログラムの疑似フォーマットへ 変換します)。 \end_layout \begin_layout Enumerate エラーログ解析子。これはエラーメッセージを\SpecialCharNoPassThru LyX が理解できる形へ書き直します。これによって、\SpecialCharNoPassThru LyX はファイルバッファの正しい位置へエラーボックスを配置することが できます。 \end_layout \begin_layout Standard 冒頭部、「変換子」設定は \begin_inset Newline newline \end_inset \begin_inset Quotes eld \end_inset \family typewriter build-script $$i $$r \family default \begin_inset Quotes erd \end_inset \begin_inset Newline newline \end_inset と指定します。これは基本的に、\SpecialCharNoPassThru LyX が \begin_inset Quotes erd \end_inset \family typewriter build-script \family default \begin_inset Quotes erd \end_inset (プログラムかスクリプト名)を(一般には\SpecialCharNoPassThru LyX の一時ファイル用のディレクトリにつくられる)、Nowebファイルの名前と元の\SpecialCharNoPassThru LyX ファイルのディレクトリパスを使っ て呼び出すことを意味しています。 \end_layout \begin_layout Standard 以下に「build-script」の一例を書いておきます。パスが通っているディレクトリに置いて使います。 \end_layout \begin_layout Standard \begin_inset VSpace defskip \end_inset \begin_inset Newpage pagebreak \end_inset \end_layout \begin_layout Standard \family sans #!/bin/sh \end_layout \begin_layout Standard \family sans # \end_layout \begin_layout Standard \family sans notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 NOWEB_OUTPUT_DIR=$2 sh \end_layout \begin_layout Standard \begin_inset VSpace defskip \end_inset \end_layout \begin_layout Standard 変換子設定の次の部分は「フラグ」で、これは \begin_inset Quotes erd \end_inset \family typewriter parselog=$$s/scripts/listerrors \family default \begin_inset Quotes erd \end_inset に設定されます。 \begin_inset Newline newline \end_inset これは、 \begin_inset Quotes erd \end_inset build-script \begin_inset Quotes erd \end_inset プロセスが生成したエラーを \begin_inset Quotes erd \end_inset listerrors \begin_inset Quotes erd \end_inset プログラムを介して処理するものです。 \end_layout \begin_layout Standard ビルドは、通常\SpecialCharNoPassThru LyX の一時ディレクトリで行われるので、変換によって生成されたファイルはそのディレクトリに置かれます。\SpecialCharNoPassThru LyX は、主要ファイルとみなされるものをコピ ーして取り出しますが、 \family typewriter Noweb→プログラム \family default 変換は複数のファイルを生成することがあるので、\SpecialCharNoPassThru LyX を閉じる際に大半が削除される可能性があります。これが、NOWEB_OUTPUT_DIR環境変数を渡して、bu ild-script chunkが生成したファイルをその場所に置かれるようにする理由です。 \end_layout \begin_layout Paragraph 文章中でのプログラムの構築操作の説明 \end_layout \begin_layout Standard \SpecialCharNoPassThru LyX とNowebの統合の最後の部分は、 \begin_inset Quotes eld \end_inset build-script \begin_inset Quotes erd \end_inset chunkです。一般に、あなたのプログラムの構築操作の説明それ自身をchunkに入れて文章中に含めなければなりません。上の例のnoweb用のbuild-scr iptでは、chunkを見つけるのにnotangleコマンドを使い、shを使って起動します。 \end_layout \begin_layout Standard 以下に典型的なchunkがどのようなものかを書いておきます。 \end_layout \begin_layout LyX-Code <>= \begin_inset Newline newline \end_inset \end_layout \begin_layout LyX-Code #!/bin/sh \begin_inset Newline newline \end_inset \begin_inset Newline newline \end_inset if [ -z "${NOWEB_SOURCE}" ] \begin_inset Newline newline \end_inset then \end_layout \begin_layout LyX-Code NOWEB_SOURCE=myfile.nw \begin_inset Newline newline \end_inset fi \begin_inset Newline newline \end_inset [... code to extract files ... use NOWEB_OUTPUT_DIR here ...] \begin_inset Newline newline \end_inset [... code to compile files ...] \begin_inset Newline newline \end_inset @ \end_layout \begin_layout Standard \emph on LIBDIR/examples/listerrors.lyx \emph default と \emph on LIBDIR/examples/Literate.lyx \emph default を見てください。この2つのファイルには異なる実装のlisterrorsプログラムが含まれていて、これまで説明してきた各々の部分が全体としてどのようになるかをわか ってもらうための例です。また、 \emph on LIBDIR/examples/noweb2lyx.lyx \emph default も見てください。面白いことに、これらの3つのファイルは、Python、C、Perlが各々使われていて、\SpecialCharNoPassThru LyX の文芸プログラミングのサポートがプログラム言語に依存 しないことを示しています。 \end_layout \begin_layout Subsubsection \SpecialCharNoPassThru LyX の設定 \end_layout \begin_layout Standard すべての文芸プログラムのための設定は、 \family sans ツール\SpecialChar menuseparator 設定 \family default パネルの「ファイル処理」タブですることができます。重要な部分を見ておきましょう。 \end_layout \begin_layout Description 「NoWeb」形式 ファイル形式タブで設定します。ここで、Noweb特有の設定を行います。 \family sans GUI名 \family default を \family typewriter NoWeb \family default に、拡張子を \family typewriter .nw \family default に設定してください。これによって、\SpecialCharNoPassThru LyX に変換プロセスの第一段階でつくられるファイルに \family typewriter .nw \family default という拡張子をつけることを指示します。 \end_layout \begin_layout Description プログラム形式 これは、変換の終着点を示すためだけの、空の形式です(これがあることで、変換子を作ることができます)。 \end_layout \begin_layout Description \family sans NoWeb \family default -> \family sans \SpecialCharNoPassThru LaTeX \family default この変換子は、文芸的文書の「weaving」を行います。Nowebの場合、「 \family typewriter noweave -delay -index $$i > $$o \family default 」に設定されます。 \end_layout \begin_layout Description \family sans NoWeb \family default -> \family sans Program \family default これは「tangling」を行います。上述のように、変換子は「 \family typewriter build-script $$i $$r \family default 」、フラグは「 \family typewriter parselog=$$s/scripts/listerrors \family default 」となります。 \end_layout \begin_layout Subsubsection デバッグ機能拡張 \end_layout \begin_layout Standard ddd/gdbまたは他のデバッガで使える「server-goto-file-row」関数が新たに\SpecialCharNoPassThru LyX サーバに実装されました。 \end_layout \begin_layout Standard ddd/gdbでデバッグしているとき、一つの \begin_inset Flex Ruby status collapsed \begin_layout Plain Layout 鍵 \begin_inset Argument post:1 status collapsed \begin_layout Plain Layout キー \end_layout \end_inset \end_layout \end_inset ストロークで現在実行している位置でテキストエディタを起動できます。既定のdddの設定ではShift-Ctrl-Vになっています。この設定はdddで \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout ツール\SpecialChar menuseparator 設定\SpecialChar menuseparator ファイル書式 \end_layout \end_inset ウインドウを表示して、 \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout 編集プログラム \end_layout \end_inset エントリを変えると変えることができます。 \end_layout \begin_layout Standard 新しい\SpecialCharNoPassThru LyX サーバの関数と、このdddの機能を使うために \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout 編集プログラム \end_layout \end_inset を次のように設定してください。 \end_layout \begin_layout Standard \begin_inset VSpace defskip \end_inset \end_layout \begin_layout Standard \family sans echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in \end_layout \begin_layout Standard \begin_inset VSpace defskip \end_inset \end_layout \begin_layout Standard こうしておくとdddを使っていてプログラムの編集したい場所があったとき、(dddのウインドウで)Shift-Ctrl-Vを押すだけでdddは\SpecialCharNoPassThru LyX サーバに情報を 送り、\SpecialCharNoPassThru LyX は同じファイルを表示し、カーソルはdddが示した場所へあらわれます。これでもうデバッグの最中に推測しながらスクロールして場所を探す必要がなくなります 。 \end_layout \begin_layout Standard この機能が動くには\SpecialCharNoPassThru LyX サーバが利用可能でなければなりません(既定では\SpecialCharNoPassThru LyX サーバーは使えないようになっています)。\SpecialCharNoPassThru LyX サーバを使えるようにするには、 \family sans \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout \family sans 設定 \end_layout \end_inset \family default ( \family sans \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout \family sans パス \end_layout \end_inset \family default タブ)の \family sans \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout \family sans \SpecialCharNoPassThru LyX サーバーパイプ \family default に \end_layout \end_inset \family default \begin_inset Quotes eld \end_inset \family typewriter /home//.lyx/lyxpipe \family default \begin_inset Quotes erd \end_inset のようにパスを指定してください。 \end_layout \begin_layout Standard 詳しくは第 \begin_inset CommandInset ref LatexCommand ref reference "chap:LyXサーバー" \end_inset 章を読んでください。 \end_layout \begin_layout Subsubsection ツールバー拡張 \end_layout \begin_layout Standard ツールバーに加えることのできる6つの新しいボタンがあります。そのうちの5つのボタンは段落環境へのショートカットです。 \family sans 標準 \family default ・節・ \family sans \SpecialCharNoPassThru LaTeX \family default ・ \family sans \SpecialCharNoPassThru LyX コード \family default ・ \family sans Chunk \family default 環境用のボタンを用意しています。最後の一つはファイルメニュー項目の「Build Program」への \begin_inset Flex Ruby status collapsed \begin_layout Plain Layout \family roman \series medium \shape up \size normal \emph off \bar no \noun off \color none 捷径 \family default \series default \shape default \size default \emph default \bar default \noun default \color inherit \begin_inset Argument post:1 status collapsed \begin_layout Plain Layout ショートカット \end_layout \end_inset \end_layout \end_inset です。 \end_layout \begin_layout Standard \SpecialCharNoPassThru LyX はツールバーで使うためのいくつものボタンを用意しています。私のツールバーはこの6つのショートカットに \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout 文書\SpecialChar menuseparator 更新\SpecialChar menuseparator DVI \end_layout \end_inset と \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout 文書\SpecialChar menuseparator 表示\SpecialChar menuseparator DVI \end_layout \end_inset を組み合わせたものになっています。 \end_layout \begin_layout LyX-Code Toolbar \end_layout \begin_layout LyX-Code Layouts \end_layout \begin_layout LyX-Code Icon "layout Standard" \end_layout \begin_layout LyX-Code Icon "layout Section" \end_layout \begin_layout LyX-Code Icon "layout \SpecialCharNoPassThru LaTeX " \end_layout \begin_layout LyX-Code Icon "layout \SpecialCharNoPassThru LyX -Code" \end_layout \begin_layout LyX-Code Icon "layout Chunk" \end_layout \begin_layout LyX-Code Separator \end_layout \begin_layout LyX-Code Icon "buffer-view" \end_layout \begin_layout LyX-Code Icon "buffer-typeset" \end_layout \begin_layout LyX-Code Icon "build-program" \end_layout \begin_layout LyX-Code Separator \end_layout \begin_layout LyX-Code . \end_layout \begin_layout LyX-Code . \end_layout \begin_layout LyX-Code . \end_layout \begin_layout LyX-Code End \end_layout \begin_layout Subsubsection 色の変更 \end_layout \begin_layout Standard \SpecialCharNoPassThru LyX ではいくつもの色を \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout 設定 \end_layout \end_inset で変えることができます。人々が困りがちなのは、\SpecialCharNoPassThru LaTeX フォント色でしょう。これは、既定では赤になっていますが、chunkは\SpecialCharNoPassThru LaTeX フォントを使うことになって いて、文芸プログラミング文書には多くのchunkが現れるために、すべて赤で見ていると疲れてしまうかもしれません。これは、 \begin_inset Flex MenuItem status collapsed \begin_layout Plain Layout 操作性\SpecialChar menuseparator 色 \end_layout \end_inset タブで変更することができます。 \end_layout \begin_layout Standard もう一つは、改行文字が画面に表示されていることでしょう。改行文字の色を背景の色と同じにすることで改行文字を見えなくできます。私は改行文字を背景の色に似ているが少 し違う色にすることを勧めます。こうすると、改行文字があるのはわかりますが、じゃまにならないでしょう。 \end_layout \begin_layout Subsection \SpecialCharNoPassThru LyX とknitr/Sweave \end_layout \begin_layout Standard knitrとSweaveへのサポートについては、用例ファイル \emph on knitr.lyx \emph default とSweave取扱説明書( \family sans ヘルプ\SpecialChar menuseparator 用途別説明書 \family default メニュー)に説明があります。 \end_layout \begin_layout Chapter 特殊機能 \begin_inset CommandInset label LatexCommand label name "chap:Special-features" \end_inset \end_layout \begin_layout Standard \SpecialCharNoPassThru LyX では、\SpecialCharNoPassThru LaTeX で可能なことは何でも出来ます。すべての\SpecialCharNoPassThru LaTeX の機能を直接サポートできるわけではありませんが、どんな場合でも\SpecialCharNoPassThru TeX コードを使用することは できます。本章は、ユーザの興味が有りそうな特別な機能について、若干取り上げます。図表やフロート、ボックス、注釈に関する特別な機能については、取扱説明書『 \emph on 埋込オブジェクト篇 \emph default 』をご参照ください。 \end_layout \begin_layout Section 多段組 \end_layout \begin_layout Standard この機能は、文書設定の \family sans 本文レイアウト \family default にある \family sans 二段組文書 \family default とは別の機能です。文書全体に二段組を行いたい場合には、 \family sans 二段組文書 \family default オプションを利用することをお勧めします。その他の場合には、本機能をご使用ください。 \end_layout \begin_layout Standard 文書中で多段組を行うには、\SpecialCharNoPassThru LaTeX パッケージ \series bold multicol \series default \begin_inset Index idx status collapsed \begin_layout Plain Layout \SpecialCharNoPassThru LaTeX ぱっけーじ @ \SpecialCharNoPassThru LaTeX パッケージ ! multicol \end_layout \end_inset を導入した上で、( \family sans 文書\SpecialChar menuseparator 設定\SpecialChar menuseparator モジュール \family default メニューから) \family sans 多段組 \family default モジュールを読み込んでください。 \end_layout \begin_layout Standard 多段組中の脚注は、ページ下部に置かれ、各段の下ごとには置かれません。各段においては、フロートに \family sans 段をまたぐ \family default オプションを使用する必要があるほかは、通常通りの使用をすることができます。 \end_layout \begin_layout Subsection 基本 \end_layout \begin_layout Standard 文章中で二段組を使用したい場合には、段組を始める場所で \family sans 挿入\SpecialChar menuseparator 任意設定差込枠\SpecialChar menuseparator 多段組 \family default メニューを使用して、多段組差込枠を挿入してください。二段組で印字されるべき文章は、全てこの差込枠の中に書いてください。 \end_layout \begin_layout Standard 下記はその用例です。 \end_layout \begin_layout Standard \noindent \begin_inset Flex Multiple Columns status open \begin_layout Plain Layout \noindent \series bold \size small The Adventure of the Empty House \series default \begin_inset Newline newline \end_inset by Sir Arthur Conan Doyle \end_layout \begin_layout Plain Layout \size small It was in the spring of the year 1894 that all London was interested, and the fashionable world dismayed, by the murder of the Honourable Ronald Adair under most unusual and inexplicable circumstances. The public has already learned those particulars of the crime which came out in the police investigation, but a good deal was suppressed upon that occasion, since the case for the prosecution was so overwhelmingly strong that it was not necessary to bring forward all the facts. Only now, at the end of nearly ten years, am I allowed to supply those missing links which make up the whole of that remarkable chain. The crime was of interest in itself, but that interest was as nothing to me compared to the inconceivable sequel, which afforded me the greatest shock and surprise of any event in my adventurous life. Even now, after this long interval, I find myself thrilling as I think of it, and feeling once more that sudden flood of joy, amazement, and increduli ty which utterly submerged my mind. Let me say to that public, which has shown some interest in those glimpses which I have occasionally given them of the thoughts and actions of a very remarkable man, that they are not to blame me if I have not shared my knowledge with them, for I should have considered it my first duty to do so, had I not been barred by a positive prohibition from his own lips, which was only withdrawn upon the third of last month. \end_layout \end_inset \end_layout \begin_layout Standard 三段以上にするには、カーソルを多段組差込枠の内部において、挿入\SpecialChar menuseparator 段数メニューを使用してください。この差込枠の中に、欲しい段数を書き入れます(三段組の場合には「3」 と書きます)。 \begin_inset Newline newline \end_inset 下記は三段組の例です。 \end_layout \begin_layout Standard \begin_inset Flex Multiple Columns status open \begin_layout Plain Layout \size footnotesize \begin_inset Argument 1 status open \begin_layout Plain Layout 3 \end_layout \end_inset It can be imagined that my close intimacy with Sherlock Holmes had interested me deeply in crime, and that after his disappearance I never failed to read with care the various problems which came before the public. And I even attempted, more than once, for my own private satisfaction, to employ his methods in their solution, though with indifferent success. There was none, however, which appealed to me like this tragedy of Ronald Adair. As I read the evidence at the inquest, which led up to a verdict of willful murder against some person or persons unknown, I realized more clearly than I had ever done the loss which the community had sustained by the death of Sherlock Holmes. There were points about this strange business which would, I was sure, have specially appealed to him, and the efforts of the police would have been supplemented, or more probably anticipated, by the trained observation and the alert mind of the first criminal agent in Europe. All day, as I drove upon my round, I turned over the case in my mind and found no explanation which appeared to me to be adequate. At the risk of telling a twice-told tale, I will recapitulate the facts as they were known to the public at the conclusion of the inquest. \end_layout \end_inset \end_layout \begin_layout Standard お望みならば10段組まで組むことができますが、文書の読者にとっては、あまり気持ちのいいものではないでしょう。 \end_layout \begin_layout Standard \begin_inset Newpage newpage \end_inset \end_layout \begin_layout Subsection 段組中の段組 \end_layout \begin_layout Standard また、段中に段を組むこともできます。 \end_layout \begin_layout Standard \begin_inset Flex Multiple Columns status open \begin_layout Plain Layout \size footnotesize The Honourable Ronald Adair was the second son of the Earl of Maynooth, at that time governor of one of the Australian colonies. Adair's mother had returned from Australia to undergo the operation for cataract, and she, her son Ronald, and her daughter Hilda were living together at 427 Park Lane. \end_layout \begin_layout Plain Layout \begin_inset Flex Multiple Columns status open \begin_layout Plain Layout \size footnotesize The youth moved in the best society–had, so far as was known, no enemies and no particular vices. He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement had been broken off by mutual consent some months before, and there was no sign that it had left any very profound feeling behind it. For the rest {sic} the man's life moved in a narrow and conventional circle, for his habits were quiet and his nature unemotional. Yet it was upon this easy-going young aristocrat that death came, in most strange and unexpected form, between the hours of ten and eleven-twenty on the night of March 30, 1894. \end_layout \end_inset \end_layout \begin_layout Plain Layout \size footnotesize Ronald Adair was fond of cards–playing continually, but never for such stakes as would hurt him. He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs. It was shown that, after dinner on the day of his death, he had played a rubber of whist at the latter club. He had also played there in the afternoon. \size default \size footnotesize The evidence of those who had played with him– Mr. Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist, and that there was a fairly equal fall of the cards. Adair might have lost five pounds, but not more. His fortune was a considerable one, and such a loss could not in any way affect him. He had played nearly every day at one club or other, but he was a cautious player, and usually rose a winner. It came out in evidence that, in partnership with Colonel Moran, he had actually won as much as four hundred and twenty pounds in a sitting, some weeks before, from Godfrey Milner and Lord Balmoral. So much for his recent history as it came out at the inquest. \end_layout \end_inset \end_layout \begin_layout Subsection 応用例 \end_layout \begin_layout Standard 本節の用例は、多段組のさらに特別な機能を示すためのものです。 \end_layout \begin_layout Standard 多段組機能についてさらに知りたい場合には、\SpecialCharNoPassThru LaTeX パッケージ \series bold multicol \series default , \begin_inset CommandInset citation LatexCommand cite key "multicol" \end_inset の取扱説明書をご覧ください。 \end_layout \begin_layout Subsubsection 序文 \end_layout \begin_layout Standard 多段組に序文を追記するには、カーソルを多段組差込枠内部に置き、 \family sans 挿入\SpecialChar menuseparator 序文 \family default メニューを使用してください。序文は、この差込枠内に書いてください。 \begin_inset Newline newline \end_inset 序文のある文章の例を掲げます。 \end_layout \begin_layout Standard \begin_inset VSpace bigskip \end_inset \end_layout \begin_layout Standard \begin_inset Flex Multiple Columns status open \begin_layout Plain Layout \begin_inset Argument 2 status open \begin_layout Plain Layout And the story continues and continues and continues and continues\SpecialChar ldots \end_layout \end_inset \size small On the evening of the crime, he returned from the club exactly at ten. His mother and sister were out spending the evening with a relation. The servant deposed that she heard him enter the front room on the second floor, generally used as his sitting-room. She had lit a fire there, and as it smoked she had opened the window. No sound was heard from the room until eleven-twenty, the hour of the return of Lady Maynooth and her daughter. Desiring to say good-night, she attempted to enter her son's room. The door was locked on the inside, and no answer could be got to their cries and knocking. Help was obtained, and the door forced. The unfortunate young man was found lying near the table. His head had been horribly mutilated by an expanding revolver bullet, but no weapon of any sort was to be found in the room. \end_layout \end_inset \end_layout \begin_layout Standard 最初の\SpecialCharNoPassThru TeX コードの後に、節宣言コマンドを\SpecialCharNoPassThru TeX コードとして使用すれば、節見出しを前書きとして使用することができます。例えば、 \end_layout \begin_layout Standard \series bold \backslash subsection{小節見出し} \end_layout \begin_layout Standard というコマンドは、小節を生成します。以下の例では、前書きが小々節になっています。 \end_layout \begin_layout Standard \begin_inset Flex Multiple Columns status open \begin_layout Plain Layout \begin_inset Argument 2 status open \begin_layout Plain Layout \begin_inset ERT status collapsed \begin_layout Plain Layout \backslash subsubsection{ \end_layout \end_inset これは序文の小々節見出しです \begin_inset ERT status collapsed \begin_layout Plain Layout } \end_layout \end_inset \end_layout \end_inset \size small A minute examination of the circumstances served only to make the case more complex. In the first place, no reason could be given why the young man should have fastened the door upon the inside. There was the possibility that the murderer had done this, and had afterwards escaped by the window. The drop was at least twenty feet, however, and a bed of crocuses in full bloom lay beneath. Neither the flowers nor the earth showed any sign of having been disturbed, nor were there any marks upon the narrow strip of grass which separated the house from the road. Apparently, therefore, it was the young man himself who had fastened the door. But how did he come by his death? No one could have climbed up to the window without leaving traces. Suppose a man had fired through the window, he would indeed be a remarkable shot who could with a revolver inflict so deadly a wound. Again, Park Lane is a frequented thoroughfare; there is a cab stand within a hundred yards of the house. No one had heard a shot. \end_layout \end_inset \end_layout \begin_layout Standard 多段組を開始する部分に、必要とされる6行を確保出来るだけの垂直スペースがページに残されていない場合、多段組の前に改行が挿入されます。前書きの行数如何では、この必 要行数を変更したいかもしれません。これは、カーソルを多段組差込枠内部の(もしあれば)序文の後に置き、 \family sans 挿入\SpecialChar menuseparator 改頁前の余白 \family default メニューを使用することで設定できます。この差込枠に、余白の大きさを「5cm」などと書き込んでください。 \end_layout \begin_layout Standard 以下の例では、「7 \backslash baselineskip」を用いて、必要行数を7行に指定しています(コマンド \series bold \backslash baselineskip \series default は\SpecialCharNoPassThru TeX コードとして入力する必要があります)。 \end_layout \begin_layout Standard \begin_inset Flex Multiple Columns status open \begin_layout Plain Layout \begin_inset Argument 3 status open \begin_layout Plain Layout 7 \begin_inset ERT status collapsed \begin_layout Plain Layout \backslash baselineskip \end_layout \end_inset \end_layout \end_inset \size small On the evening of the crime, he returned from the club exactly at ten. His mother and sister were out spending the evening with a relation. The servant deposed that she heard him enter the front room on the second floor, generally used as his sitting-room. She had lit a fire there, and as it smoked she had opened the window. No sound was heard from the room until eleven-twenty, the hour of the return of Lady Maynooth and her daughter. Desiring to say good-night, she attempted to enter her son's room. The door was locked on the inside, and no answer could be got to their cries and knocking. Help was obtained, and the door forced. The unfortunate young man was found lying near the table. His head had been horribly mutilated by an expanding revolver bullet, but no weapon of any sort was to be found in the room. \end_layout \end_inset \end_layout \begin_layout Subsubsection 周囲の余白 \end_layout \begin_layout Standard 多段組の前後の余白は、長さ \series bold \backslash multicolsep \series default を変えることで変更することができます。例えば、\SpecialCharNoPassThru TeX コードで書かれたコマンド \end_layout \begin_layout Standard \series bold \backslash setlength{ \backslash multicolsep}{3cm} \end_layout \begin_layout Standard は、その値を3 \begin_inset space \thinspace{} \end_inset cmに変更します。この変更は、多段組が始まる前に指定しなくてはなりません。既定値は13 \begin_inset space \thinspace{} \end_inset ptです。 \end_layout \begin_layout Standard 以下の例では、 \series bold \backslash multicolsep \series default は2.5 \begin_inset space \thinspace{} \end_inset cmに指定されています。 \end_layout \begin_layout Standard \begin_inset ERT status open \begin_layout Plain Layout \backslash setlength{ \backslash multicolsep}{2.5cm} \end_layout \end_inset \end_layout \begin_layout Standard \begin_inset Flex Multiple Columns status open \begin_layout Plain Layout \size small All day I turned these facts over in my mind, endeavouring to hit upon some theory which could reconcile them all, and to find that line of least resistanc e which my poor friend had declared to be the starting-point of every investigat ion. I confess that I made little progress. In the evening I strolled across the Park, and found myself about six o'clock at the Oxford Street end of Park Lane. A group of loafers upon the pavements, all staring up at a particular window, directed me to the house which I had come to see. A tall, thin man with coloured glasses, whom I strongly suspected of being a plain-clothes detective, was pointing out some theory of his own, while the others crowded round to listen to what he said. I got as near him as I could, but his observations seemed to me to be absurd, so I withdrew again in some disgust. As I did so I struck against an elderly, deformed man, who had been behind me, and I knocked down several books which he was carrying. \end_layout \end_inset \end_layout \begin_layout Standard \begin_inset Note Greyedout status open \begin_layout Plain Layout \series bold 【註】 \backslash setlength \series default で指定した値は、再度変更されるまでは、以降のすべての多段組で使用されます。 \end_layout \end_inset \end_layout \begin_layout Standard \begin_inset ERT status collapsed \begin_layout Plain Layout \backslash setlength{ \backslash multicolsep}{13pt} \end_layout \end_inset \begin_inset Note Note status collapsed \begin_layout Plain Layout \lang english go back to the default \end_layout \end_inset \end_layout \begin_layout Standard \begin_inset Newpage newpage \end_inset \end_layout \begin_layout Subsubsection 改段 \end_layout \begin_layout Standard 改段は、文章中の階段を行いたい位置に、\SpecialCharNoPassThru TeX コードで、コマンド \series bold \backslash columnbreak{} \series default を挿入すれば、強制的に行うことができます。ただし、多くの場合、文章中に空白が挿入されることに注意してください。 \begin_inset Newline newline \end_inset 以下が用例です。 \end_layout \begin_layout Standard \begin_inset Flex Multiple Columns status open \begin_layout Plain Layout \size small \begin_inset Quotes eld \end_inset You're surprised to see me, sir, \begin_inset Quotes erd \end_inset said he, in a strange, croaking voice. \end_layout \begin_layout Plain Layout \size small I acknowledged that I was. \end_layout \begin_layout Plain Layout \size small \begin_inset Quotes eld \end_inset Well, I've a conscience, sir, and when I chanced to see you go into this house, as I came hobbling after you, I thought to myself, I'll just step in and see that kind gentleman, and tell him that if I was a bit gruff in my manner there was not any harm meant, and that I am much obliged to him for picking up my books. \begin_inset Quotes erd \end_inset \end_layout \begin_layout Plain Layout \size small \begin_inset Quotes eld \end_inset You make too much of a trifle, \begin_inset Quotes erd \end_inset said I. \begin_inset Quotes eld \end_inset May I ask how you knew who I was? \begin_inset Quotes erd \end_inset AFTER THIS SENTENCE THE COLUMN BREAK IS FORCED. \begin_inset ERT status collapsed \begin_layout Plain Layout \backslash columnbreak{} \end_layout \end_inset \end_layout \begin_layout Plain Layout \size small \begin_inset Quotes eld \end_inset Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for you'll find my little bookshop at the corner of Church Street, and very happy to see you, I am sure. Maybe you collect yourself, sir. Here's \noun on British \begin_inset space ~ \end_inset Birds \noun default , and \noun on Catullus \noun default , and \noun on The Holy War \noun default \twohyphens a bargain, every one of them. With five volumes you could just fill that gap on that second shelf. It looks untidy, does it not, sir? \begin_inset Quotes erd \end_inset \end_layout \end_inset \end_layout \begin_layout Subsubsection 段間隔 \end_layout \begin_layout Standard 段幅は自動的に計算されますが、段の間の余白は指定することができます。これは、長さ \series bold \backslash columnsep \series default を変更することで実現できます。既定値は10 \begin_inset space \thinspace{} \end_inset ptです。以下は \series bold \backslash columnsep \series default を3 \begin_inset space \thinspace{} \end_inset cmに設定した例です。 \end_layout \begin_layout Standard \begin_inset ERT status open \begin_layout Plain Layout \backslash setlength{ \backslash columnsep}{3cm} \end_layout \end_inset \end_layout \begin_layout Standard \begin_inset Flex Multiple Columns status open \begin_layout Plain Layout \size small My observations of No. \begin_inset space \space{} \end_inset 427 Park Lane did little to clear up the problem in which I was interested. The house was separated from the street by a low wall and railing, the whole not more than five feet high. It was perfectly easy, therefore, for anyone to get into the garden, but the window was entirely inaccessible, since there was no water pipe or anything which could help the most active man to climb it. More puzzled than ever, I retraced my steps to Kensington. I had not been in my study five minutes when the maid entered to say that a person desired to see me. To my astonishment it was none other than my strange old book collector, his sharp, wizened face peering out from a frame of white hair, and his precious volumes, a dozen of them at least, wedged under his right arm. \end_layout \end_inset \end_layout \begin_layout Standard \begin_inset ERT status collapsed \begin_layout Plain Layout \backslash setlength{ \backslash columnsep}{10pt} \end_layout \end_inset \begin_inset Note Note status collapsed \begin_layout Plain Layout \lang english go back to the default \end_layout \end_inset \end_layout \begin_layout Subsubsection 垂直線 \end_layout \begin_layout Standard 段間には、長さ \series bold \backslash columnseprule \series default の幅を持つ罫線が描かれます。罫線幅を0 \begin_inset space \thinspace{} \end_inset ptにすると(これが既定値です)、罫線は出力されません。以下の例では、段を分かつ線は2 \begin_inset space \thinspace{} \end_inset pt幅に設定されています。 \end_layout \begin_layout Standard \begin_inset ERT status open \begin_layout Plain Layout \backslash setlength{ \backslash columnseprule}{2pt} \end_layout \end_inset \end_layout \begin_layout Standard \begin_inset Flex Multiple Columns status open \begin_layout Plain Layout \size small \begin_inset Quotes eld \end_inset You're surprised to see me, sir, \begin_inset Quotes erd \end_inset said he, in a strange, croaking voice. \end_layout \begin_layout Plain Layout \size small I acknowledged that I was. \end_layout \begin_layout Plain Layout \size small \begin_inset Quotes eld \end_inset Well, I've a conscience, sir, and when I chanced to see you go into this house, as I came hobbling after you, I thought to myself, I'll just step in and see that kind gentleman, and tell him that if I was a bit gruff in my manner there was not any harm meant, and that I am much obliged to him for picking up my books. \begin_inset Quotes erd \end_inset \end_layout \begin_layout Plain Layout \size small \begin_inset Quotes eld \end_inset You make too much of a trifle, \begin_inset Quotes erd \end_inset said I. \begin_inset Quotes eld \end_inset May I ask how you knew who I was? \begin_inset Quotes erd \end_inset \end_layout \begin_layout Plain Layout \size small \begin_inset Quotes eld \end_inset Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for you'll find my little bookshop at the corner of Church Street, and very happy to see you, I am sure. Maybe you collect yourself, sir. Here's \noun on British \begin_inset space ~ \end_inset Birds \noun default , and \noun on Catullus \noun default , and \noun on The Holy War \noun default \twohyphens a bargain, every one of them. With five volumes you could just fill that gap on that second shelf. It looks untidy, does it not, sir? \begin_inset Quotes erd \end_inset \end_layout \end_inset \end_layout \begin_layout Standard \begin_inset VSpace defskip \end_inset \end_layout \begin_layout Standard 罫線は、コマンド \series bold \backslash columnseprulecolor \series default を再定義すれば、着色することができます。これは、多段組差込枠の前に\SpecialCharNoPassThru TeX コードで以下のコマンドを挿入すれば、実現できます。 \begin_inset Newline newline \end_inset \series bold \backslash renewcommand{ \backslash columnseprulecolor}{ \backslash color{red}} \series default \begin_inset Newline newline \end_inset このコマンド中の \series bold red \series default をお好みの色に変更してください。既定色とユーザー定義色の全てを使用することができます。既定色とユーザー定義色についての詳細な情報は、取扱説明書『 \emph on 埋込オブジェクト篇 \emph default 』の「 \emph on 色付き表 \emph default 」の節をご覧ください。既定色に戻すには、以下のコマンドを挿入してください。 \begin_inset Newline newline \end_inset \series bold \backslash renewcommand{ \backslash columnseprulecolor}{ \backslash normalcolor} \series default \begin_inset Newline newline \end_inset 以下は、シアン色の罫線と1 \begin_inset space \thinspace{} \end_inset cmの段間隔を持つ例です。 \end_layout \begin_layout Standard \begin_inset ERT status open \begin_layout Plain Layout \backslash setlength{ \backslash columnsep}{1cm} \end_layout \begin_layout Plain Layout \backslash renewcommand{ \backslash columnseprulecolor}{ \backslash color{cyan}} \end_layout \end_inset \end_layout \begin_layout Standard \begin_inset Flex Multiple Columns status open \begin_layout Plain Layout \size small \begin_inset Quotes eld \end_inset You're surprised to see me, sir, \begin_inset Quotes erd \end_inset said he, in a strange, croaking voice. \end_layout \begin_layout Plain Layout \size small I acknowledged that I was. \end_layout \begin_layout Plain Layout \size small \begin_inset Quotes eld \end_inset Well, I've a conscience, sir, and when I chanced to see you go into this house, as I came hobbling after you, I thought to myself, I'll just step in and see that kind gentleman, and tell him that if I was a bit gruff in my manner there was not any harm meant, and that I am much obliged to him for picking up my books. \begin_inset Quotes erd \end_inset \end_layout \begin_layout Plain Layout \size small \begin_inset Quotes eld \end_inset You make too much of a trifle, \begin_inset Quotes erd \end_inset said I. \begin_inset Quotes eld \end_inset May I ask how you knew who I was? \begin_inset Quotes erd \end_inset \end_layout \begin_layout Plain Layout \size small \begin_inset Quotes eld \end_inset Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for you'll find my little bookshop at the corner of Church Street, and very happy to see you, I am sure. Maybe you collect yourself, sir. Here's \noun on British \begin_inset space ~ \end_inset Birds \noun default , and \noun on Catullus \noun default , and \noun on The Holy War \noun default \twohyphens a bargain, every one of them. With five volumes you could just fill that gap on that second shelf. It looks untidy, does it not, sir? \begin_inset Quotes erd \end_inset \end_layout \end_inset \end_layout \begin_layout Standard \begin_inset ERT status collapsed \begin_layout Plain Layout \backslash setlength{ \backslash columnseprule}{0pt} \end_layout \begin_layout Plain Layout \backslash renewcommand{ \backslash columnseprulecolor}{ \backslash normalcolor} \end_layout \end_inset \begin_inset Note Note status collapsed \begin_layout Plain Layout \lang english go back to the default \end_layout \end_inset \end_layout \begin_layout Standard \begin_inset Newpage newpage \end_inset \end_layout \begin_layout Section 標準的でない形の段落 \end_layout \begin_layout Standard \noindent \SpecialCharNoPassThru LaTeX は、他のテキストプロセッサと同様に、既定で長方形の段落を使用します。しかし、例えば、ポスターや招待状、詩などの特殊な場合には、段落の形を好きなように変 えることができます。これは、文書設定で \family sans 任意設定の段落形 \family default モジュールを読み込んで、\SpecialCharNoPassThru LaTeX パッケージ \series bold shapepar \series default を使用させるようにすれば、実現できます。 \end_layout \begin_layout Subsection 既定の形 \end_layout \begin_layout Standard \series bold shapepar \series default は、以下の形を提供しています。 \end_layout \begin_layout Standard \begin_inset Tabular \begin_inset Text \begin_layout Plain Layout 名称 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 説明 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 備考 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout CDlabel \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 丸い穴の開いたドーナツ型(CD/DVD大) \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 伸縮不可。多くの文字を入れられないことに注意。 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout Circle \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 円 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 脆弱。計算に失敗することも。 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout Diamond \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 菱形(シンボル的に \begin_inset Quotes eld \end_inset diamond \begin_inset Quotes erd \end_inset と表記) \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout - \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout Heart \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout ハート型 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout - \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout Hexagon \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 六角形 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout - \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout Nut \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout ナット型(丸い穴の開いた六角形) \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout - \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout Square \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 正方形 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout - \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout Star \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 五芒星 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout - \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout Candle \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 燃えるろうそく \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout - \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout Drop down/up \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 雫型/逆雫型 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 脆弱。計算に失敗することも。 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \SpecialCharNoPassThru TeX \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout \SpecialCharNoPassThru TeX ロゴ \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout - \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout Triangle up/down/ \begin_inset Newline newline \end_inset left/right \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout 各方向の三角形 \end_layout \end_inset \begin_inset Text \begin_layout Plain Layout - \end_layout \end_inset \end_inset \end_layout \begin_layout Standard 段落に形を適用するには、\SpecialCharNoPassThru LyX ツールバー中の環境プルダウンボックスから形を選んでください。 \end_layout \begin_layout Standard \begin_inset Newpage newpage \end_inset \end_layout \begin_layout Standard 以下は、ナット型の段落の例です。 \end_layout \begin_layout Standard \begin_inset VSpace bigskip \end_inset \end_layout \begin_layout Nut \lang latin Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. \end_layout \begin_layout Standard \begin_inset VSpace bigskip \end_inset \end_layout \begin_layout Standard \begin_inset Note Greyedout status open \begin_layout Plain Layout \series bold 【註】 \series default shapepar段落は改頁にまたがることはできません。 \end_layout \end_inset \end_layout \begin_layout Standard \begin_inset VSpace bigskip \end_inset \end_layout \begin_layout Standard \series bold shapepar \series default は、段落中にどれだけ文章が含まれようとも、常に形を維持しようとします。したがって、段落の大きさは、含まれている文章量によって変化しますので、段落の大きさがページ 余白にはみ出してしまうことがあります。寸法が伸縮することを示すために、文章量を二倍にした例を見てみましょう。 \end_layout \begin_layout Standard \begin_inset Newpage newpage \end_inset \end_layout \begin_layout Nut \lang latin Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. \end_layout \begin_layout Standard \begin_inset VSpace bigskip \end_inset \end_layout \begin_layout Standard ただし、 \family sans CDlabel \family default 形は例外です。これは、CD/DVDの寸法に収まらなくてはならないので、伸縮しません。したがって、形に収まる文章量は限られています。 \begin_inset Newline newline \end_inset \family sans drop \family default 形と \family sans circle \family default 形は脆弱で、文章量によっては寸法計算が失敗する可能性があります。この場合、 \begin_inset Quotes eld \end_inset Arithmetic overflow \begin_inset Quotes erd \end_inset という\SpecialCharNoPassThru LaTeX エラーが発生します。この時は、文章の一部を追加したり削除したりするか、どれもうまくいかなければ別の形を使用してください。 \end_layout \begin_layout Standard \begin_inset VSpace bigskip \end_inset \end_layout \begin_layout Standard 先端のある形では、先端部の文字列で、\SpecialCharNoPassThru LaTeX のハイフネーションルーチンが失敗することがあります。したがって、この部分の文章には、ハイフネーション位置 \family sans ( \begin_inset Info type "shortcut" arg "specialchar-insert hyphenation" \end_inset \family default )を指定することが往々にして必要になります。 \end_layout \begin_layout Standard \begin_inset VSpace bigskip \end_inset \end_layout \begin_layout Standard Shapepar段落は、常に中央揃えか、左の縁が左ページ余白に接するように配置されます。したがって、これらの段落を揃えるのに段落ダイアログを使用することはできま せん。解決方法としては、段落をミニページかparboxの中において、このボックスを揃えることです。ここでの問題は、ボックスの正しい幅を見出すことです。もしボック スの幅が広すぎれば、ボックスを中央揃えにしたとしても、ボックスの左側が付いてしまうので中央揃えになりません。そこで、正しい幅を見出すまでは、若干試行錯誤しなくて はならないかもしれません。以下は、二つのハート形の段落です。一つ目は揃え指定がなく、二つ目は右揃えにしてあります。 \end_layout \begin_layout Standard \begin_inset Newpage newpage \end_inset \end_layout \begin_layout Heart \noindent \lang latin Lo\SpecialChar softhyphen rem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. \end_layout \begin_layout Standard \begin_inset VSpace bigskip \end_inset \end_layout \begin_layout Standard \noindent \align right \begin_inset Box Frameless position "t" hor_pos "c" has_inner_box 1 inner_pos "t" use_parbox 1 use_makebox 0 width "42col%" special "none" height "1in" height_special "totalheight" thickness "0.4pt" separation "3pt" shadowsize "4pt" framecolor "black" backgroundcolor "none" status open \begin_layout Heart \noindent \lang latin Lo\SpecialChar softhyphen rem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. \end_layout \end_inset \end_layout \begin_layout Subsection 任意の形 \end_layout \begin_layout Standard ユーザーは、どのような形であれ、定義することができます。これを手動で行うのは、全ての座標を指定しなくてはならないので、かなりの労力を必要とします。しかし、以下の ように、コンピューターに座標を計算させる方法もあります。 \end_layout \begin_layout Enumerate プログラム \begin_inset CommandInset href LatexCommand href name "Jpgfdraw" target "http://www.ctan.org/tex-archive/graphics/jpgfdraw" \end_inset を導入します。 \end_layout \begin_layout Enumerate \family sans Jpgfdraw \family default 内で、メニュー \family sans Te \begin_inset ERT status collapsed \begin_layout Plain Layout {} \end_layout \end_inset X/LaT \begin_inset ERT status collapsed \begin_layout Plain Layout {} \end_layout \end_inset eX\SpecialChar menuseparator Settings\SpecialChar menuseparator Set Normal Size \family default で文書中で使用しているフォント寸を選択します。例えば、この文書は12 \begin_inset space \thinspace{} \end_inset pt寸を使用しています。 \end_layout \begin_layout Enumerate 形を描きます。 \end_layout \begin_layout Enumerate メニュー \family sans Te \begin_inset ERT status collapsed \begin_layout Plain Layout {} \end_layout \end_inset X/LaT \begin_inset ERT status collapsed \begin_layout Plain Layout {} \end_layout \end_inset eX\SpecialChar menuseparator Shapepar \family default を使用して、形の座標をエクスポートします。現れるダイアログで、形の外枠を座標に使うか、パス自体を使うかを指定します。 \begin_inset Foot status collapsed \begin_layout Plain Layout 詳細については、 \begin_inset CommandInset href LatexCommand href target "http://www.dickimaw-books.com/apps/jpgfdraw/manual/shapepar.html" \end_inset を参照してください。 \end_layout \end_inset \end_layout \begin_layout Standard 座標は\SpecialCharNoPassThru TeX ファイルに書き込まれます。これを\SpecialCharNoPassThru LyX 文書で使用するには、 \end_layout \begin_layout Enumerate 段落の最初の文字の前(もしくは空の段落内)にカーソルを置きます。 \end_layout \begin_layout Enumerate \SpecialCharNoPassThru LyX の \family sans 挿入\SpecialChar menuseparator ファイル\SpecialChar menuseparator 子文書 \family default メニューでファイルを選択し、 \family sans 取り込みの型 \family default として \family sans Input \family default を選択してください。 \end_layout \begin_layout Standard \begin_inset VSpace defskip \end_inset \end_layout \begin_layout Standard \begin_inset Note Greyedout status open \begin_layout Plain Layout \series bold 【註】 \series default 変更した形は、現在の段落にのみ適用されます。次の段落では全て通常に戻ります。したがって、段落定義ファイルは、形を変えたい段落全てで読み込まれなくてはなりません。 \end_layout \end_inset \end_layout \begin_layout Standard \begin_inset VSpace bigskip \end_inset \end_layout \begin_layout Standard 以下の用例をご覧ください。 \end_layout \begin_layout Standard \begin_inset VSpace bigskip \end_inset \end_layout \begin_layout Standard \begin_inset CommandInset include LatexCommand input filename "../SpecialParagraphShape.tex" \end_inset \lang latin Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. \end_layout \begin_layout Standard \begin_inset VSpace bigskip \end_inset \end_layout \begin_layout Standard \series bold 【ヒント】 \family sans \series default Jpgfdraw \family default で複雑な形を描く場合、まず形を好きなプログラムで描き、出来上がった画像を \family sans Jpgfdraw \family default に読み込む方法があります。この場合、画像の外枠に沿って、直線またはスプラインを描くだけですみます。 \end_layout \begin_layout Standard \begin_inset VSpace bigskip \end_inset \end_layout \begin_layout Standard \family sans 任意の段落形 \family default モジュールは、 \family sans shapepar \family default と \family sans Shapepar \family default の二つのコマンドも提供していて、任意の形を座標毎に定義するのに使用することができます。 \begin_inset Foot status collapsed \begin_layout Plain Layout これらのコマンドは、上述の全ての形で内部的に使用されています。 \end_layout \end_inset これらのスタイルがどのように使われていて、どのような設定ができるのかについての詳しい情報は、 \series bold shapepar \series default パッケージの取扱説明書 \begin_inset CommandInset citation LatexCommand cite key "shapepar" \end_inset をご覧ください。 \end_layout \begin_layout Bibliography \begin_inset CommandInset bibitem LatexCommand bibitem key "multicol" \end_inset \SpecialCharNoPassThru LaTeX パッケージ \begin_inset CommandInset href LatexCommand href name "multicol" target "http://mirror.ctan.org/macros/latex/required/tools/multicol.pdf" \end_inset の取扱説明書 \end_layout \begin_layout Bibliography \begin_inset CommandInset bibitem LatexCommand bibitem key "shapepar" \end_inset \SpecialCharNoPassThru LaTeX パッケージ \begin_inset CommandInset href LatexCommand href name "shapepar" target "http://mirrors.ctan.org/macros/latex/contrib/shapepar/shapepar.pdf" \end_inset の取扱説明書 \end_layout \end_body \end_document