yatex

changeset 341:0f6c76dc7a23 dev

Fix \includegraphics and add \wrapfigure
author HIROSE Yuuji <yuuji@gentei.org>
date Thu, 18 Dec 2014 20:51:15 +0900
parents 3206061867ae
children 90bdb4173c97
files help/YATEXHLP.eng help/YATEXHLP.jp
diffstat 2 files changed, 62 insertions(+), 2 deletions(-) [+]
line diff
     1.1 --- a/help/YATEXHLP.eng	Thu Dec 18 17:57:46 2014 +0900
     1.2 +++ b/help/YATEXHLP.eng	Thu Dec 18 20:51:15 2014 +0900
     1.3 @@ -1722,8 +1722,9 @@
     1.4  \end{figure*}
     1.5  
     1.6  includegraphics
     1.7 -\usepackage{graphicx}  ... \includegraphics[Options]{graphicfile.eps}
     1.8 +\usepackage[DRIVER]{graphicx}  ... \includegraphics[Options]{graphicfile.eps}
     1.9  Include graphics$B!#(BRequires `graphicx' package.
    1.10 +Typical [DRIVER] is [dvipdfmx].
    1.11  Possible [Options] are as follows.
    1.12  scale=X
    1.13  width=W
    1.14 @@ -1735,6 +1736,36 @@
    1.15  viewport=llx lly urx ury  (Rerative to BoundingBox)
    1.16  trim=left bottom right top
    1.17  
    1.18 +[Example]
    1.19 +% Preamble
    1.20 +\usepackage[dvipdfmx]{graphicx}
    1.21 +% document body
    1.22 +\begin{figure}[h]\centering
    1.23 + \includegraphics[width=0.4\columnwidth,bb=0 0 400 300]{foo.jpg}
    1.24 + \caption{foo image}\label{foo-fig}
    1.25 +\end{figure}
    1.26 +Figure \ref{foo-fig} says that foo is foo.
    1.27 +% YaTeX automatically inserts `bb=' line when you input \includegraphics{}
    1.28 +% with completion.
    1.29 +
    1.30 +wrapfigure
    1.31 +\begin{wrapfigure}[LINES]{POS}[OVH]{WIDTH} ...Images... \end{wrapfigure}
    1.32 +LINES(Optional)	Number of narrow lines
    1.33 +POS		One of `r l i o' (Right, Left, Inside, Outside)
    1.34 +		R L I O for float
    1.35 +OVH(Optional)	Overhangs for margin
    1.36 +WIDTH		Width of figure
    1.37 +
    1.38 +[Example]
    1.39 +% Preamble
    1.40 +\usepackage{wrapfig}
    1.41 +% body of document
    1.42 +\begin{wrapfigure}{r}{4cm}
    1.43 + \includegraphics[width=3cm,bb=0 0 640 480,clip]{foo.jpg}
    1.44 + \caption{foo image}\label{foo-jpg}
    1.45 +\end{wrapfigure}
    1.46 +
    1.47 +
    1.48  abstract
    1.49  \begin{abstract} ... \end{abstract}
    1.50  Output abstract
     2.1 --- a/help/YATEXHLP.jp	Thu Dec 18 17:57:46 2014 +0900
     2.2 +++ b/help/YATEXHLP.jp	Thu Dec 18 20:51:15 2014 +0900
     2.3 @@ -1738,8 +1738,9 @@
     2.4  \end{figure*}
     2.5  
     2.6  includegraphics
     2.7 -\usepackage{graphicx}  ... \includegraphics[オプション]{graphicfile.eps}
     2.8 +\usepackage[ドライバ]{graphicx}  ... \includegraphics[オプション]{IMG.eps}
     2.9  画像を取り込む。要 graphicx パッケージ。
    2.10 +「ドライバ」は dvipdfmx 等。
    2.11  「オプション」は以下のものが指定可能。
    2.12  scale=拡大率
    2.13  width=幅
    2.14 @@ -1751,6 +1752,34 @@
    2.15  viewport=llx lly urx ury  (BoundingBox内の相対的座標で切り取る)
    2.16  trim=left bottom right top  (指定した幅を切り取る)
    2.17  
    2.18 +【使用例】
    2.19 +% プリアンブル
    2.20 +\usepackage[dvipdfmx]{graphicx}
    2.21 +% 本文
    2.22 +\begin{figure}[h]\centering
    2.23 + \includegraphics[width=0.4\columnwidth,bb=0 0 400 300]{hoge.jpg}
    2.24 + \caption{hogeの仕組}\label{hoge-fig}
    2.25 +\end{figure}
    2.26 +図\ref{hoge-fig}にあるとおり、ほげはほげなのだ。
    2.27 +% \includegraphics{} を補完入力するとbb=行はyatexが勝手に調べて入れる。
    2.28 +
    2.29 +wrapfigure
    2.30 +\begin{wrapfigure}[LINES]{POS}[OVH]{WIDTH} ...画像... \end{wrapfigure}
    2.31 +LINES(省略可)	回り込みする行数(デフォルトは画像の高さ分)
    2.32 +POS		r l i o のどれか(右、左、見開き内側、外側)
    2.33 +		大文字 R L I O は画像フロート
    2.34 +OVH(省略可)	画像の張り出しマージン(\wrapoverhang 通常0)
    2.35 +WIDTH		回り込みする(画像込みの)幅
    2.36 +
    2.37 +【使用例】
    2.38 +% プリアンブル
    2.39 +\usepackage{wrapfig}
    2.40 +% 本文
    2.41 +\begin{wrapfigure}{r}{4cm}
    2.42 + \includegraphics[width=3cm,bb=0 0 640 480,clip]{hoge.jpg}
    2.43 + \caption{ほげほげ}\label{hoge-jpg}
    2.44 +\end{wrapfigure}
    2.45 +
    2.46  abstract
    2.47  \begin{abstract} ... \end{abstract}
    2.48  抄録(アブストラクト)を出力する。