| 1 |
% \iffalse |
| 2 |
%% File: nidanfloat.dtx |
| 3 |
% |
| 4 |
% Copyright 1994 ASCII Co. |
| 5 |
% Copyright (c) 2010 ASCII MEDIA WORKS |
| 6 |
% Copyright (c) 2016-2018 Japanese TeX Development Community |
| 7 |
% |
| 8 |
% This file is part of the pLaTeX2e system (community edition). |
| 9 |
% ------------------------------------------------------------- |
| 10 |
% |
| 11 |
% \fi |
| 12 |
% |
| 13 |
% \iffalse |
| 14 |
%<*driver> |
| 15 |
\ifx\JAPANESEtrue\undefined |
| 16 |
\expandafter\newif\csname ifJAPANESE\endcsname |
| 17 |
\JAPANESEtrue |
| 18 |
\fi |
| 19 |
\def\eTeX{$\varepsilon$-\TeX} |
| 20 |
\def\pTeX{p\kern-.15em\TeX} |
| 21 |
\def\epTeX{$\varepsilon$-\pTeX} |
| 22 |
\def\pLaTeX{p\kern-.05em\LaTeX} |
| 23 |
\def\pLaTeXe{p\kern-.05em\LaTeXe} |
| 24 |
%</driver> |
| 25 |
% \fi |
| 26 |
% |
| 27 |
% \setcounter{StandardModuleDepth}{1} |
| 28 |
% |
| 29 |
% \StopEventually{} |
| 30 |
% |
| 31 |
% \iffalse |
| 32 |
% \changes{v1.10}{1994/04/07}{platex2.09用} |
| 33 |
% \changes{v2.2}{1997/10/22}{platex2e用に修正} |
| 34 |
% \changes{v2.3}{2000/12/20}{一段抜きのフロートを混ぜるとエラーに |
| 35 |
% なるのを修正(ありがとう、倉沢@QUIPUさん)} |
| 36 |
% \changes{v2.4}{2001/02/19}{最終ページで左右の行間が揃わない部分を修正} |
| 37 |
% \changes{v2.4}{2001/02/19}{柱が出ないのを修正} |
| 38 |
% \changes{v2.4}{2001/07/23}{ページの大きさが小さくなるのを修正} |
| 39 |
% \changes{v2.5}{2001/09/14}{パッケージオプション(balance,nobalance)を追加} |
| 40 |
% \changes{v2.6}{2003/05/15}{\cs{@fstype}を\cs{@fstyle}とタイプミスしていた |
| 41 |
% のを修正(ありがとう、川上@航空宇宙研究所さん)} |
| 42 |
% \changes{v2.7}{2005/12/09}{必須フォーマットファイルをpLaTeX2eからLaTeX2eへ変更} |
| 43 |
% \changes{v2.8}{2017/05/01}{\cs{@rightfixht}を追加} |
| 44 |
% \changes{v2.8}{2017/05/01}{\cs{@outputbox}を作るときの |
| 45 |
% \texttt{to \cs{@fixht}}の高さ指定をやめた} |
| 46 |
% \changes{v2.8}{2017/05/01}{\cs{vss}の位置を移動} |
| 47 |
% \changes{v2.8}{2017/05/01}{右カラム用の処理を丸ごと追加} |
| 48 |
% \changes{v2.8}{2017/05/01}{右カラムでは\cs{@rightfixht}の高さで |
| 49 |
% 組み立て、\cs{@colht}も更新するようにした} |
| 50 |
% \changes{v2.9}{2018/07/28}{Add English documentation |
| 51 |
% (no code change; thanks David Carlisle)} |
| 52 |
% \fi |
| 53 |
% |
| 54 |
% \iffalse |
| 55 |
\NeedsTeXFormat{LaTeX2e} |
| 56 |
%<*driver> |
| 57 |
\NeedsTeXFormat{pLaTeX2e} |
| 58 |
\ProvidesFile{nidanfloat.dtx} |
| 59 |
%</driver> |
| 60 |
%<core>\ProvidesPackage{nidanfloat}% |
| 61 |
[2018/07/28 v2.9 Put double-floats at top/bottom within twocolumn mode] |
| 62 |
% |
| 63 |
%<*driver> |
| 64 |
\documentclass{jltxdoc} |
| 65 |
\GetFileInfo{nidanfloat.dtx} |
| 66 |
\ifJAPANESE |
| 67 |
\title{TOP, BOTTOM指定が可能な2段抜きフロート\\ |
| 68 |
バージョン \space\fileversion} |
| 69 |
\date{作成日:\filedate} |
| 70 |
\author{中野 賢\footnote{株式会社 アスキー 出版技術部 |
| 71 |
(メールアドレス:ken-na at ascii.co.jp)}} |
| 72 |
\else |
| 73 |
\title{TOP, BOTTOM specifiable 2 column floats\\ |
| 74 |
Version \fileversion} |
| 75 |
\date{Date:\filedate} |
| 76 |
\author{Ken Nakano\footnote{% |
| 77 |
Publishing Engineering Department, ASCII Corporation |
| 78 |
(email: ken-na at ascii.co.jp)}} |
| 79 |
\fi |
| 80 |
\begin{document} |
| 81 |
\maketitle |
| 82 |
\DocInput{\filename} |
| 83 |
\end{document} |
| 84 |
%</driver> |
| 85 |
% \fi |
| 86 |
% |
| 87 |
%\ifJAPANESE |
| 88 |
% \file{nidanfloat}パッケージは、二段組時に段抜きのフロートをページ下部にも |
| 89 |
% 配置可能にする。もともとp\LaTeX{}の一部として配布されていましたが、 |
| 90 |
% 全てのフォーマットをサポートできることから、 |
| 91 |
% 2018年以降は独立して配布することにしました。 |
| 92 |
% |
| 93 |
% English documentation is available as ``nidanfloat-en.pdf'' |
| 94 |
% (thanks David Carlisle). |
| 95 |
%\else |
| 96 |
% The package \textsf{nidanfloat} enables bottom (|b|) placement option |
| 97 |
% for double float in two column mode (\emph{nidan-kumi}). |
| 98 |
% This package was originally part of Japanese \pLaTeX, |
| 99 |
% and now is distributed as a separate package because |
| 100 |
% it supports all \LaTeX\ formats. |
| 101 |
% |
| 102 |
% 日本語版ドキュメントは``nidanfloat.pdf``です。 |
| 103 |
%\fi |
| 104 |
% |
| 105 |
% [TODO] This package needs adjustment for \LaTeXe\ 2015/01/01 changes |
| 106 |
% of the float order in two column mode! |
| 107 |
% |
| 108 |
%\ifJAPANESE |
| 109 |
% \section{コード} |
| 110 |
%\else |
| 111 |
% \section{Code} |
| 112 |
%\fi |
| 113 |
% |
| 114 |
%\ifJAPANESE |
| 115 |
% \subsection{パッケージオプション} |
| 116 |
%\else |
| 117 |
% \subsection{Package Options} |
| 118 |
%\fi |
| 119 |
% |
| 120 |
%\ifJAPANESE |
| 121 |
% \changes{v2.5}{2001/09/14}{パッケージオプションを追加} |
| 122 |
% \file{nidanfloat}パッケージでは、最終ページの左右カラムの高さを |
| 123 |
% 均一に振り分けるようにしている。しかし、この機能の影響により、 |
| 124 |
% 最終ページでの|\newpage|と|\clearpage|コマンドが正しく動作しない。 |
| 125 |
% そこで、この機能を使うかどうかを指定するオプションを導入した。 |
| 126 |
% パッケージ指定時にオプション``balance''を指定すると、 |
| 127 |
% 最終ページの自動調整を行なうようになる。デフォルトでは行なわない。 |
| 128 |
%\else |
| 129 |
% In the \file{nidanfloat} package, the height of the left and right columns |
| 130 |
% of the last page set is designed to be equalised. |
| 131 |
% However, due to the effect of this function, the |
| 132 |
% |\newpage| and |\clearpage| commands on last page do not work properly. |
| 133 |
% We introduced an option to specify whether or not to use this function. |
| 134 |
% If you specify the option `` balance'' when specifying a package, |
| 135 |
% automatic adjustment of last page will be done. It is not done by default. |
| 136 |
%\fi |
| 137 |
% \begin{macrocode} |
| 138 |
%<*core> |
| 139 |
\DeclareOption{balance}{\AtEndDocument{\let\clearpage\balanceclearpage}} |
| 140 |
\DeclareOption{nobalance}{\relax} |
| 141 |
\ExecuteOptions{nobalance} |
| 142 |
\ProcessOptions |
| 143 |
% \end{macrocode} |
| 144 |
% |
| 145 |
%\ifJAPANESE |
| 146 |
% \subsection{フロートパラメータ} |
| 147 |
% ここでは、段抜きのフロートをページ下部に置くために作成したパラメータに |
| 148 |
% ついて説明をする。 |
| 149 |
%\else |
| 150 |
% \subsection{Float parameters} |
| 151 |
% Here, we explain the parameters created to place a floating float |
| 152 |
% at the bottom of the page. |
| 153 |
%\fi |
| 154 |
% |
| 155 |
% \begin{macro}{\dblbotfraction} |
| 156 |
%\ifJAPANESE |
| 157 |
% 2段組時にページ下部に占めることのできる、二段抜きフロートの割合。 |
| 158 |
% デフォルトは0.5、すなわちページ半分を占めることができるようにしている。 |
| 159 |
%\else |
| 160 |
% Percentage of a page that may be occupied by a two-column float. |
| 161 |
% The default is 0.5, which means that it can occupy half of the page. |
| 162 |
%\fi |
| 163 |
% \begin{macrocode} |
| 164 |
\newcommand\dblbotfraction{0.5} |
| 165 |
% \end{macrocode} |
| 166 |
% \end{macro} |
| 167 |
% |
| 168 |
% \begin{macro}{\c@dblbotnumber} |
| 169 |
%\ifJAPANESE |
| 170 |
% ページ下部に入れることのできる、二段抜きフロートの数。 |
| 171 |
% デフォルトでは、二つの図を置くことができるようにしている。 |
| 172 |
% |\c@dblbotnumber|はカウンタ|dblnumber|の内部形式。 |
| 173 |
%\else |
| 174 |
% Number of two-column floats that can be placed at the bottom of the page. |
| 175 |
% By default this is set to 2. |
| 176 |
% |\c@dblbotnumber| is the internal format of the counter |dblnumber|. |
| 177 |
%\fi |
| 178 |
% \begin{macrocode} |
| 179 |
\newcount\c@dblbotnumber |
| 180 |
\setcounter{dblbotnumber}{2} |
| 181 |
% \end{macrocode} |
| 182 |
% \end{macro} |
| 183 |
% |
| 184 |
% \begin{macro}{\@dblbotroom} |
| 185 |
% \begin{macro}{\@dblbotnum} |
| 186 |
%\ifJAPANESE |
| 187 |
% |\@dblbotroom|は、ページ下部に占めることのできる、 |
| 188 |
% 二段抜きフロートの割合を示す長さ変数。 |
| 189 |
% |\@dblbotnum|は、ページ下部に入れることのできる、 |
| 190 |
% 二段抜きフロートの数を保持するカウンタ。 |
| 191 |
%\else |
| 192 |
% |\@dblbotroom|: Length variable indicating the percentage |
| 193 |
% of the page a two-column float can occupy at the bottom of the page. |
| 194 |
% |\@dblbotnum|: Counter that holds the number of two-column floats |
| 195 |
% that can be placed at the bottom of the page. |
| 196 |
%\fi |
| 197 |
% \begin{macrocode} |
| 198 |
\newdimen\@dblbotroom |
| 199 |
\newcount\@dblbotnum |
| 200 |
% \end{macrocode} |
| 201 |
% \end{macro} |
| 202 |
% \end{macro} |
| 203 |
% |
| 204 |
% \begin{macro}{\@dblfloatplacement} |
| 205 |
%\ifJAPANESE |
| 206 |
% 二段組用のフロートパラメータを設定するマクロを、新たに追加したパラメータ |
| 207 |
% も設定するように再定義する。 |
| 208 |
%\else |
| 209 |
% Redefine this macro to set the newly added parameters. |
| 210 |
%\fi |
| 211 |
% \begin{macrocode} |
| 212 |
\def\@dblfloatplacement{% |
| 213 |
\global\@dbltopnum\c@dbltopnumber |
| 214 |
\global\@dblbotnum\c@dblbotnumber % added |
| 215 |
\global\@dbltoproom\dbltopfraction\@colht |
| 216 |
\global\@dblbotroom\dblbotfraction\@colht % added |
| 217 |
\@textmin\@colht |
| 218 |
\advance\@textmin-\@dbltoproom |
| 219 |
\advance\@textmin-\@dblbotroom % added |
| 220 |
\@fpmin\dblfloatpagefraction\textheight |
| 221 |
\@fptop\@dblfptop |
| 222 |
\@fpsep\@dblfpsep |
| 223 |
\@fpbot\@dblfpbot |
| 224 |
} |
| 225 |
% \end{macrocode} |
| 226 |
% \end{macro} |
| 227 |
% |
| 228 |
%\ifJAPANESE |
| 229 |
% \subsection{フロートリストへの登録} |
| 230 |
% 二段抜きフロートの定義は、クラスファイルで次のようにして行なわれる。 |
| 231 |
%\else |
| 232 |
% \subsection{Define float lists} |
| 233 |
% The definition of a double column float should be done in |
| 234 |
% a class file, as follows. |
| 235 |
%\fi |
| 236 |
%\begin{verbatim} |
| 237 |
% \newenvironment{figure*} |
| 238 |
% {\@dblfloat{figure}} |
| 239 |
% {\end@dblfloat} |
| 240 |
%\end{verbatim} |
| 241 |
%\ifJAPANESE |
| 242 |
% 文章中で|figure*|環境で囲まれた部分は、フロート保持用のリストに登録される。 |
| 243 |
% この節では、段抜きフロートをページ下部にも置けるようにするために拡張した |
| 244 |
% マクロについて説明をする。 |
| 245 |
%\else |
| 246 |
% The content of |figure*| environment is registered in the two-column float |
| 247 |
% holding list. |
| 248 |
% In this section, we expand it so that you can put a float at the bottom of the page. |
| 249 |
%\fi |
| 250 |
% \begin{macro}{\@dblbotlist} |
| 251 |
% \begin{macro}{\L@toplist} |
| 252 |
% \begin{macro}{\R@toplist} |
| 253 |
% \begin{macro}{\L@botlist} |
| 254 |
% \begin{macro}{\R@botlist} |
| 255 |
%\ifJAPANESE |
| 256 |
% 二段組のページ下部に置くフロートを保持するために|\@dblbotlist|を追加する。 |
| 257 |
% また、カラムの上下に置くフロート用には、左側と右側で区別をするため、 |
| 258 |
% |\L@toplist|, |\R@toplist|, |\L@botlist|, |\R@botlist|を追加する。 |
| 259 |
%\else |
| 260 |
% Add the |\@dblbotlist| to hold the float to be placed at the bottom of |
| 261 |
% the two-column page. |
| 262 |
% In addition, for floats to be placed above and below the column, |
| 263 |
% distinguish between the left side and the right side, |
| 264 |
%\fi |
| 265 |
% \begin{macrocode} |
| 266 |
\gdef\@dblbotlist{} |
| 267 |
\gdef\L@toplist{} |
| 268 |
\gdef\R@toplist{} |
| 269 |
\gdef\L@botlist{} |
| 270 |
\gdef\R@botlist{} |
| 271 |
% \end{macrocode} |
| 272 |
% \end{macro} |
| 273 |
% \end{macro} |
| 274 |
% \end{macro} |
| 275 |
% \end{macro} |
| 276 |
% \end{macro} |
| 277 |
% |
| 278 |
% \begin{macro}{\@dblfloat} |
| 279 |
% \begin{macro}{\@dbflt} |
| 280 |
% \begin{macro}{\end@dblfloat} |
| 281 |
%\ifJAPANESE |
| 282 |
% |\@dblfloat|から呼び出される、|\@dbflt|を再定義し、位置指定が省略された |
| 283 |
% ときのパラメータを``tb''とする。また、|\end@dblfloat|を|\end@float|にして、 |
| 284 |
% 現在ページの下部にフロートを置けるようにする。 |
| 285 |
%\else |
| 286 |
% |\@dblfloat|, |\@dbflt| is redefined so that the default position |
| 287 |
% argument is set to ``tb''. Also, set |\end@dblfloat| to |\end@float| to |
| 288 |
% allow floats to be placed at the bottom of the page. |
| 289 |
%\fi |
| 290 |
% \begin{macrocode} |
| 291 |
\def\@dblfloat{% |
| 292 |
\if@twocolumn\let\reserved@a\@dbflt\else\let\reserved@a\@float\fi |
| 293 |
\reserved@a} |
| 294 |
\def\@dbflt#1{\@ifnextchar[{\@xdblfloat{#1}}{\@xdblfloat{#1}[tb]}} |
| 295 |
\def\@xdblfloat#1[#2]{% |
| 296 |
\@xfloat{#1}[#2]\hsize\textwidth\linewidth\textwidth} |
| 297 |
\let\end@dblfloat\end@float |
| 298 |
% \end{macrocode} |
| 299 |
% \end{macro} |
| 300 |
% \end{macro} |
| 301 |
% \end{macro} |
| 302 |
% |
| 303 |
% \begin{macro}{\@addtocurcol} |
| 304 |
%\ifJAPANESE |
| 305 |
% |\@xdblfloat|から呼び出された、|\@xfloat|は位置指定オプションの評価を行ない、 |
| 306 |
% フロートオブジェクトの組み立てを開始する。 |
| 307 |
% フロートオブジェクトの組み立ては|\end@float|で終了する。 |
| 308 |
% |\end@float|は、ペナルティ値を$-10004$にして|\output|ルーチンを起動する。 |
| 309 |
% この値での|\output|ルーチンは|\@specialoutput|を起動する。 |
| 310 |
% |\@specialoutput|は|\@addtocurcol|を呼び出し、フロートの内容を現在ページに |
| 311 |
% 出力できるのならば出力をする。そうでなければ、別の可能性を探る。 |
| 312 |
%\else |
| 313 |
% Called from | @xdblfloat|, |\@xfloat| evaluates the position specification option, |
| 314 |
% and start building the float object. |
| 315 |
% Assembling a float object ends with |\end@float|. |
| 316 |
% |\end@float| starts the |\output| routine with a penalty value of $-10004$. |
| 317 |
% The |\output| routine with this value invokes |\@specialoutput|. |
| 318 |
% |\@specialoutput| calls |\@addtocurcol| to move the contents of the float to |
| 319 |
% the current page. |
| 320 |
% If it can be output, then do so; otherwise we explore another possibility. |
| 321 |
%\fi |
| 322 |
% \begin{macrocode} |
| 323 |
\def\@addtocurcol{% |
| 324 |
% \end{macrocode} |
| 325 |
%\ifJAPANESE |
| 326 |
% このパッケージの場合、段抜きのフロートが渡される可能性があるので、まず、 |
| 327 |
% それをチェックする。フロートの幅がカラム幅よりも大きい場合は、強制的に |
| 328 |
% 段抜きフロートとして扱う。 |
| 329 |
%\else |
| 330 |
% In the case of this package, there is a possibility that a double column |
| 331 |
% float may be passed, so check it. If the width of the float is larger |
| 332 |
% than the column width, forcibly treat as starred, double column float. |
| 333 |
%\fi |
| 334 |
% \begin{macrocode} |
| 335 |
\ifdim\wd\@currbox>\columnwidth |
| 336 |
\@addtodblcol |
| 337 |
\else |
| 338 |
% \end{macrocode} |
| 339 |
%\ifJAPANESE |
| 340 |
% それ以外の場合は、元の動作とほとんど同じである。 |
| 341 |
%\else |
| 342 |
% Otherwise, it is almost the same as the original version. |
| 343 |
%\fi |
| 344 |
% \begin{macrocode} |
| 345 |
\@insertfalse |
| 346 |
\@setfloattypecounts |
| 347 |
\ifnum\@fpstype=8 % is only `!p' |
| 348 |
\else |
| 349 |
\ifnum\@fpstype=24 % is only `p' |
| 350 |
\else |
| 351 |
\@flsettextmin |
| 352 |
\advance\@textmin\@textfloatsheight |
| 353 |
\@reqcolroom\@pageht |
| 354 |
\ifdim\@textmin>\@reqcolroom \@reqcolroom\@textmin\fi |
| 355 |
\advance\@reqcolroom\ht\@currbox |
| 356 |
\ifdim\@colroom>\@reqcolroom |
| 357 |
\@flsetnum\@colnum |
| 358 |
\ifnum\@colnum>\z@ |
| 359 |
\@bitor\@currtype\@deferlist |
| 360 |
\if@test |
| 361 |
\else |
| 362 |
% \end{macrocode} |
| 363 |
%\ifJAPANESE |
| 364 |
% ページ下部のフロートを保持しているフロートリストの名前が異なる。 |
| 365 |
%\else |
| 366 |
% The only difference from \LaTeX\ is the name of float list, |
| 367 |
%\fi |
| 368 |
% \begin{macrocode} |
| 369 |
\@bitor\@currtype{\L@botlist\R@botlist}% |
| 370 |
\if@test |
| 371 |
\@addtobot |
| 372 |
\else |
| 373 |
\ifodd\count\@currbox |
| 374 |
\advance\@reqcolroom\intextsep |
| 375 |
\ifdim\@colroom>\@reqcolroom |
| 376 |
\global\advance\@colnum\m@ne |
| 377 |
\global\advance\@textfloatsheight\ht\@currbox |
| 378 |
\global\advance\@textfloatsheight 2\intextsep |
| 379 |
\@cons\@midlist\@currbox |
| 380 |
\if@nobreak |
| 381 |
\nobreak |
| 382 |
\@nobreakfalse |
| 383 |
\everypar{}% |
| 384 |
\else |
| 385 |
\addpenalty \interlinepenalty |
| 386 |
\fi |
| 387 |
\vskip\intextsep |
| 388 |
\box\@currbox |
| 389 |
\penalty\interlinepenalty |
| 390 |
\vskip\intextsep |
| 391 |
\ifnum\outputpenalty<-\@Mii \vskip-\parskip \fi |
| 392 |
\outputpenalty\z@ |
| 393 |
\@inserttrue |
| 394 |
\fi |
| 395 |
\fi |
| 396 |
\if@insert\else\@addtotoporbot\fi |
| 397 |
\fi |
| 398 |
\fi |
| 399 |
\fi |
| 400 |
\fi |
| 401 |
\fi |
| 402 |
\fi |
| 403 |
\if@insert\else\@resethfps\@cons\@deferlist\@currbox\fi |
| 404 |
\fi |
| 405 |
} |
| 406 |
% \end{macrocode} |
| 407 |
% \end{macro} |
| 408 |
% |
| 409 |
% \begin{macro}{\@addtotoporbot} |
| 410 |
%\ifJAPANESE |
| 411 |
% フロートを保持しているリスト変数の修正。 |
| 412 |
% \changes{v2.3}{2000/12/20}{% |
| 413 |
% タイプミスの修正と\cs{@flcheckspace}の呼び出しを変更} |
| 414 |
%\else |
| 415 |
% Update variables holding float lists. |
| 416 |
%\fi |
| 417 |
% \begin{macrocode} |
| 418 |
\def\@addtotoporbot{% |
| 419 |
\@getfpsbit \tw@ |
| 420 |
\ifodd\@tempcnta |
| 421 |
\@flsetnum\@topnum |
| 422 |
\ifnum\@topnum>\z@ |
| 423 |
\@tempswafalse |
| 424 |
\@flcheckspace\@toproom\@toplist\L@toplist\R@toplist |
| 425 |
\if@tempswa |
| 426 |
\@bitor\@currtype{\@midlist\L@botlist\R@botlist}% |
| 427 |
\if@test\else |
| 428 |
\if@firstcolumn |
| 429 |
\@flupdates \@topnum \@toproom \L@toplist |
| 430 |
\else |
| 431 |
\@flupdates \@topnum \@toproom \R@toplist |
| 432 |
\fi |
| 433 |
\@inserttrue |
| 434 |
\fi |
| 435 |
\fi |
| 436 |
\fi |
| 437 |
\fi |
| 438 |
\if@insert\else\@addtobot\fi |
| 439 |
} |
| 440 |
% \end{macrocode} |
| 441 |
% \end{macro} |
| 442 |
% |
| 443 |
% \begin{macro}{\@addtobot} |
| 444 |
%\ifJAPANESE |
| 445 |
% フロートを保持しているリスト変数の修正。 |
| 446 |
% \changes{v2.3}{2000/12/20}{\cs{@flcheckspace}の呼び出しを変更} |
| 447 |
%\else |
| 448 |
% Update variables holding float lists. |
| 449 |
%\fi |
| 450 |
% \begin{macrocode} |
| 451 |
\def\@addtobot{% |
| 452 |
\@getfpsbit 4\relax |
| 453 |
\ifodd\@tempcnta |
| 454 |
\@flsetnum\@botnum |
| 455 |
\ifnum\@botnum>\z@ |
| 456 |
\@tempswafalse |
| 457 |
\@flcheckspace\@botroom\@botlist\L@botlist\R@botlist |
| 458 |
\if@tempswa |
| 459 |
\global\maxdepth\z@ |
| 460 |
\if@firstcolumn |
| 461 |
\@flupdates \@botnum \@botroom \L@botlist |
| 462 |
\else |
| 463 |
\@flupdates \@botnum \@botroom \R@botlist |
| 464 |
\fi |
| 465 |
\@inserttrue |
| 466 |
\fi |
| 467 |
\fi |
| 468 |
\fi |
| 469 |
} |
| 470 |
% \end{macrocode} |
| 471 |
% \end{macro} |
| 472 |
% |
| 473 |
% \begin{macro}{\org@addtonextcol} |
| 474 |
% \begin{macro}{\@addtonextcol} |
| 475 |
%\ifJAPANESE |
| 476 |
% これらは、挿入に失敗したフロートや`p'指定のフロートを出力するために、 |
| 477 |
% |\@startcolumn|で用いられる。このパッケージでは、カラム幅よりも大きい幅を |
| 478 |
% 持つフロートに対しては、段抜きフロートリストとして出力するようにしている。 |
| 479 |
%\else |
| 480 |
% These macros are used inside |\@startcolumn|, to output a float |
| 481 |
% that failed to be inserted or a float specified by `p'. |
| 482 |
% In this package, a width larger than the column width |
| 483 |
% signals the float should be added to the double column float list. |
| 484 |
%\fi |
| 485 |
% \begin{macrocode} |
| 486 |
\let\org@addtonextcol\@addtonextcol |
| 487 |
\def\@addtonextcol{% |
| 488 |
\ifdim\wd\@currbox>\columnwidth |
| 489 |
\@addtodblcol |
| 490 |
\else |
| 491 |
\org@addtonextcol |
| 492 |
\fi |
| 493 |
} |
| 494 |
% \end{macrocode} |
| 495 |
% \end{macro} |
| 496 |
% \end{macro} |
| 497 |
% |
| 498 |
% \begin{macro}{\@addtodblcol} |
| 499 |
%\ifJAPANESE |
| 500 |
% |\@addtodblcol|マクロは、フロートオブジェクトが現在ページに入るかどうか |
| 501 |
% を確認し、入るのであれば|\@addtodbltoporbot|を呼び出す。そうでなければ、 |
| 502 |
% |\@dbldeferlist|に登録する。 |
| 503 |
% |
| 504 |
% まず|@insert|フラグを偽にする。そして、フロートタイプを|\@fpstype|に得る。 |
| 505 |
% フロートタイプが8または24の場合、位置オプションは`!p'か`p'だけであるので、 |
| 506 |
% 無条件に|\@dbldeferlist|に加える。 |
| 507 |
%\else |
| 508 |
% The |\@addtodblcol| macro determines whether the float object fits in |
| 509 |
% the current page and calls |\@addtodbltoporbot| if it would fit. |
| 510 |
% Otherwise, adds to |\@dbldeferlist|. |
| 511 |
% |
| 512 |
% First set |@insert| flag to false, obtain the float type as |\@fpstype|. |
| 513 |
% If the float type is 8 or 24, the position option is only `!p 'or `p', so |
| 514 |
% unconditionally add to |\@dbldeferlist|. |
| 515 |
%\fi |
| 516 |
% \begin{macrocode} |
| 517 |
\def\@addtodblcol{% |
| 518 |
\begingroup |
| 519 |
\@insertfalse |
| 520 |
\@setfloattypecounts |
| 521 |
\ifnum\@fpstype=8 % is only `!p' |
| 522 |
\else |
| 523 |
\ifnum\@fpstype=24 % is only `p' |
| 524 |
\else |
| 525 |
% \end{macrocode} |
| 526 |
%\ifJAPANESE |
| 527 |
% そうでなければ、同タイプのフロートで未出力のものがあるかどうかを確認する。 |
| 528 |
% 同タイプのフロートでまだ出力していないものがある場合は、現在のフロートを |
| 529 |
% 出力しない。ただし、同タイプであってもカラム幅のフロートについては考慮 |
| 530 |
% しない。出力することができるのならば、|\@addtodblbotortop|を呼び出す。 |
| 531 |
%\else |
| 532 |
% Otherwise, check whether there are unplaced ones of the same float type. |
| 533 |
% If there is a float of the same type that has not been output yet, |
| 534 |
% do not output. However, even with the same type, consider the float column width. |
| 535 |
% If you can output it, call |\@addtodblbotortop|. |
| 536 |
%\fi |
| 537 |
% \begin{macrocode} |
| 538 |
\@bitor\@currtype{\@dbldeferlist} |
| 539 |
%\@bitor\@currtype{\@deferlist\@dbldeferlist} |
| 540 |
\if@test |
| 541 |
\else |
| 542 |
\@tempswafalse |
| 543 |
\@checkdblspace |
| 544 |
\if@tempswa |
| 545 |
\@addtodbltoporbot |
| 546 |
\fi |
| 547 |
\fi |
| 548 |
\fi |
| 549 |
\fi |
| 550 |
\if@insert\else\@cons\@dbldeferlist\@currbox\fi |
| 551 |
\endgroup |
| 552 |
} |
| 553 |
% \end{macrocode} |
| 554 |
% \end{macro} |
| 555 |
% |
| 556 |
% \begin{macro}{\@addtodbltoporbot} |
| 557 |
%\ifJAPANESE |
| 558 |
% まず、`t'の指定があるかと、ページ上部に入れる数を越えていないかを確認する。 |
| 559 |
%\else |
| 560 |
% First, check whether there is a specification of `t', |
| 561 |
% and whether it exceeds the number allowed at the top of the page. |
| 562 |
%\fi |
| 563 |
% \begin{macrocode} |
| 564 |
\def\@addtodbltoporbot{% |
| 565 |
\@getfpsbit \tw@ |
| 566 |
\ifodd\@tempcnta |
| 567 |
\@flsetnum\@dbltopnum |
| 568 |
\ifnum\@dbltopnum>\z@ |
| 569 |
% \end{macrocode} |
| 570 |
%\ifJAPANESE |
| 571 |
% そして、ページ上部あるいは下部に同タイプのフロートが出力される可能性が |
| 572 |
% あるのかを調べる。二段組フロートは一段組フロートの上部に置かれることに注意。 |
| 573 |
%\else |
| 574 |
% Then, check whether the same type of float may be output at the top or |
| 575 |
% bottom of the page. |
| 576 |
% Note that two-column floats are placed on the top of a one-column floats. |
| 577 |
%\fi |
| 578 |
% \begin{macrocode} |
| 579 |
\@bitor\@currtype{% |
| 580 |
\L@toplist\R@toplist\L@botlist\R@botlist\@dblbotlist} |
| 581 |
\if@test |
| 582 |
\else |
| 583 |
% \end{macrocode} |
| 584 |
%\ifJAPANESE |
| 585 |
% 配置可能ならば、出力するだけのスペースがあるのかを確認する。 |
| 586 |
%\else |
| 587 |
% If possible, check if there is enough space to output the float. |
| 588 |
%\fi |
| 589 |
% \begin{macrocode} |
| 590 |
\@tempswafalse |
| 591 |
\@dblflcheckspace \@dbltoproom \@dbltoplist |
| 592 |
% \end{macrocode} |
| 593 |
%\ifJAPANESE |
| 594 |
% スペースがあれば、段抜きフロートが上部に占めることのできる高さから、 |
| 595 |
% その分を引く。また、上部に入れる段抜きフロートの数を減らし、 |
| 596 |
% 上部段抜き用のフロートリストに登録をする。 |
| 597 |
%\else |
| 598 |
% If there is a space, subtract the height of the float from |
| 599 |
% the space available for top floats. Also, reduce the number of |
| 600 |
% starred floats to put in the top, |
| 601 |
% and update the float list for double column top floats. |
| 602 |
%\fi |
| 603 |
% \begin{macrocode} |
| 604 |
\if@tempswa |
| 605 |
\@tempdima-\ht\@currbox |
| 606 |
\advance\@tempdima |
| 607 |
-\ifx\@dbltoplist\@empty \dbltextfloatsep\else\dblfloatsep\fi |
| 608 |
\global\advance\@dbltoproom\@tempdima |
| 609 |
\global\advance\@dbltopnum\m@ne |
| 610 |
\@cons\@dbltoplist\@currbox |
| 611 |
% \end{macrocode} |
| 612 |
%\ifJAPANESE |
| 613 |
% 左カラムのときは、カラムの高さ|\@colroom|からフロート分を引く。 |
| 614 |
%\else |
| 615 |
% For the left column, subtract the float from the column height |\@colroom|. |
| 616 |
%\fi |
| 617 |
% \begin{macrocode} |
| 618 |
\if@firstcolumn |
| 619 |
\advance\@colroom\@tempdima |
| 620 |
\global\advance\@colroom\maxdepth |
| 621 |
% \end{macrocode} |
| 622 |
%\ifJAPANESE |
| 623 |
% 右カラムのときは、新規の段抜きフロート分だけでなく、これを挿入すること |
| 624 |
% によって、左カラムから移動してくるテキストの高さも引く。 |
| 625 |
%\else |
| 626 |
% In the case of the right column, insert not only the new float, |
| 627 |
% also the height of the text moved from the left column is decreased. |
| 628 |
%\fi |
| 629 |
% \begin{macrocode} |
| 630 |
\else |
| 631 |
\@tempdima\textheight |
| 632 |
\@chkdblfloatht\advance\@tempdima-\@floatht |
| 633 |
\L@chkfloatht\advance\@tempdima-\@floatht |
| 634 |
\vbadness=\@M \splittopskip=\topskip \splitmaxdepth=\maxdepth |
| 635 |
\setbox\z@=\vbox{\unvcopy\@leftcolumn}% |
| 636 |
\setbox\@ne=\vsplit\z@ to\@tempdima |
| 637 |
\advance\@colroom-\ht\z@ |
| 638 |
\global\advance\@colroom-\dp\z@ |
| 639 |
\fi |
| 640 |
% \end{macrocode} |
| 641 |
%\ifJAPANESE |
| 642 |
% 最後に、|@insert|フラグを真にする。 |
| 643 |
%\else |
| 644 |
% Finally, set the |@insert| flag to true. |
| 645 |
%\fi |
| 646 |
% \begin{macrocode} |
| 647 |
\@inserttrue |
| 648 |
\fi |
| 649 |
\fi |
| 650 |
\fi |
| 651 |
\fi |
| 652 |
\if@insert\else\@addtodblbot\fi |
| 653 |
} |
| 654 |
% \end{macrocode} |
| 655 |
% \end{macro} |
| 656 |
% |
| 657 |
% \begin{macro}{\@addtodblbot} |
| 658 |
%\ifJAPANESE |
| 659 |
% ページ下部に段抜きフロートを置くときも、上部と同じである。 |
| 660 |
% ただし、二段組フロートは最下部に置かれるので、他の出力用リストを調べる |
| 661 |
% 必要はないことが異なる。 |
| 662 |
%\else |
| 663 |
% Placing a two-column float at the bottom of the page is |
| 664 |
% similar to the preceding section. |
| 665 |
% However, because a two-column float is placed at the very bottom, |
| 666 |
% we don't have to examine other output lists. |
| 667 |
%\fi |
| 668 |
% \begin{macrocode} |
| 669 |
\def\@addtodblbot{% |
| 670 |
\@getfpsbit 4\relax |
| 671 |
\ifodd\@tempcnta |
| 672 |
\@flsetnum\@botnum |
| 673 |
\ifnum\@botnum>\z@ |
| 674 |
\@tempswafalse |
| 675 |
\@dblflcheckspace \@dbltoproom \@dbltoplist |
| 676 |
\if@tempswa |
| 677 |
\@tempdima-\ht\@currbox \advance\@tempdima |
| 678 |
-\ifx\@dblbotlist\@empty \dbltextfloatsep\else\dblfloatsep\fi |
| 679 |
\global\advance\@dblbotroom\@tempdima |
| 680 |
\global\advance\@dblbotnum\m@ne |
| 681 |
\@cons\@dblbotlist\@currbox |
| 682 |
\if@firstcolumn |
| 683 |
\advance\@colroom\@tempdima |
| 684 |
\global\advance\@colroom\maxdepth |
| 685 |
\else |
| 686 |
\@tempdima\textheight |
| 687 |
\@chkdblfloatht\advance\@tempdima-\@floatht |
| 688 |
\L@chkfloatht\advance\@tempdima-\@floatht |
| 689 |
\vbadness=\@M \splittopskip=\topskip \splitmaxdepth=\maxdepth |
| 690 |
\setbox\z@=\vbox{\unvcopy\@leftcolumn}% |
| 691 |
\setbox\@ne=\vsplit\z@ to\@tempdima |
| 692 |
\advance\@colroom-\ht\z@ |
| 693 |
\global\advance\@colroom-\dp\z@ |
| 694 |
\fi |
| 695 |
\@inserttrue |
| 696 |
\fi |
| 697 |
\fi |
| 698 |
\fi |
| 699 |
} |
| 700 |
% \end{macrocode} |
| 701 |
% \end{macro} |
| 702 |
% |
| 703 |
%\ifJAPANESE |
| 704 |
% \subsection{フロートの高さを計算するマクロ} |
| 705 |
%\else |
| 706 |
% \subsection{Macro to calculate float height} |
| 707 |
%\fi |
| 708 |
% |
| 709 |
% \begin{macro}{\@floatht} |
| 710 |
%\ifJAPANESE |
| 711 |
% |\@floatht|は、出力リストに格納されているフロートの高さを格納するのに用いる。 |
| 712 |
%\else |
| 713 |
% |\@floatht| is used to store the float height stored in the output list. |
| 714 |
%\fi |
| 715 |
% \begin{macrocode} |
| 716 |
\global\newdimen\@floatht \@floatht\z@ |
| 717 |
% \end{macrocode} |
| 718 |
% \end{macro} |
| 719 |
% |
| 720 |
% \begin{macro}{\@flcheckspace} |
| 721 |
%\ifJAPANESE |
| 722 |
% \changes{v2.3}{2000/12/20}{状況別に場合わけするようにした} |
| 723 |
%\fi |
| 724 |
% \begin{macrocode} |
| 725 |
\def \@flcheckspace #1#2#3#4{% |
| 726 |
\advance \@reqcolroom |
| 727 |
\if@twocolumn |
| 728 |
\if@firstcolumn |
| 729 |
\ifx #3\@empty \textfloatsep \else \floatsep \fi |
| 730 |
\else |
| 731 |
\ifx #4\@empty \textfloatsep \else \floatsep \fi |
| 732 |
\fi |
| 733 |
\else |
| 734 |
\ifx #2\@empty \textfloatsep \else \floatsep \fi |
| 735 |
\fi |
| 736 |
\ifdim \@colroom>\@reqcolroom |
| 737 |
\ifdim #1>\ht\@currbox |
| 738 |
\@tempswatrue |
| 739 |
\else |
| 740 |
\ifnum \@fpstype<\sixt@@n |
| 741 |
\@tempswatrue |
| 742 |
\fi |
| 743 |
\fi |
| 744 |
\fi |
| 745 |
} |
| 746 |
% \end{macrocode} |
| 747 |
% \end{macro} |
| 748 |
% |
| 749 |
% \begin{macro}{\@dblflcheckspace} |
| 750 |
%\ifJAPANESE |
| 751 |
% 段抜きフロートがページ上部あるいは下部に占めることのできる割合を越えて |
| 752 |
% いないかをチェックする。越えていなければ|\@tempswa|を真にする。 |
| 753 |
% \changes{v2.6}{2003/05/15}{\cs{@fstype}を\cs{@fstyle}とタイプミスしていた} |
| 754 |
%\else |
| 755 |
% Check if the percentage that can be occupied by floats |
| 756 |
% on the top or bottom of the page has been exceeded. |
| 757 |
% If not, |\@tempswa| will be made true. |
| 758 |
%\fi |
| 759 |
% \begin{macrocode} |
| 760 |
\def\@dblflcheckspace#1#2{% |
| 761 |
\@tempdima=#1\relax |
| 762 |
\advance\@tempdima |
| 763 |
-\ifx #2\@empty \dbltextfloatsep\else\dblfloatsep\fi |
| 764 |
\ifdim\@tempdima>\ht\@currbox |
| 765 |
\@tempswatrue |
| 766 |
\else |
| 767 |
\ifnum\@fpstype<\sixt@@n |
| 768 |
\advance\@tempdima\@textmin |
| 769 |
\if \@tempdima>\ht\@currbox |
| 770 |
\@tempswatrue |
| 771 |
\fi |
| 772 |
\fi |
| 773 |
\fi |
| 774 |
} |
| 775 |
% \end{macrocode} |
| 776 |
% \end{macro} |
| 777 |
% |
| 778 |
% \begin{macro}{\@checkdblspace} |
| 779 |
%\ifJAPANESE |
| 780 |
% 段抜きフロートと段抜きフロート間スペース(あるいは段抜きフロートとテキストと |
| 781 |
% の間のスペース)を入れる余裕があるかを調べる。 |
| 782 |
% |
| 783 |
% まず、現在、組み立ててあるテキストの高さと、最小限入らなくてはならない |
| 784 |
% テキストの量とを比較し、大きいほうを|\@tempdima|に格納する。 |
| 785 |
% 右カラムにいるときは、左カラムのテキストの高さも加える。 |
| 786 |
%\else |
| 787 |
% Check whether the float would fit in the space allocated to text page floats. |
| 788 |
% |
| 789 |
% First, compare the height of text currently assembled with the amount of text |
| 790 |
% that must be minimized, and store the larger one in |\@tempdima|. |
| 791 |
% If you are in the right column, also add the height of the text in the left column. |
| 792 |
%\fi |
| 793 |
% \begin{macrocode} |
| 794 |
\def\@checkdblspace{% |
| 795 |
\@tempdima\@pageht\advance\@tempdima\@pagedp |
| 796 |
\@tempdimb\textfraction\@colht |
| 797 |
\ifdim\@tempdima<\@tempdimb \@tempdima\@tempdimb\fi |
| 798 |
\if@firstcolumn\else |
| 799 |
\advance\@tempdima\ht\@leftcolumn |
| 800 |
\advance\@tempdima\dp\@leftcolumn |
| 801 |
\fi |
| 802 |
% \end{macrocode} |
| 803 |
%\ifJAPANESE |
| 804 |
% そして、出力する予定のカラム幅フロートと段抜きフロートの高さを加える。 |
| 805 |
% このとき、段抜き用のフロートの高さは二倍する。 |
| 806 |
%\else |
| 807 |
% Then add the height of the column width float and |
| 808 |
% two-column float that are to be output. |
| 809 |
% At this time, double the height of the two-column float. |
| 810 |
%\fi |
| 811 |
% \begin{macrocode} |
| 812 |
\L@chkfloatht\advance\@tempdima\@floatht |
| 813 |
\R@chkfloatht\advance\@tempdima\@floatht |
| 814 |
\@chkdblfloatht\advance\@tempdima\tw@\@floatht |
| 815 |
% \end{macrocode} |
| 816 |
%\ifJAPANESE |
| 817 |
% それから、現在のフロートの高さと必要なスペースを加える。 |
| 818 |
% このときも、それらの高さを二倍する。 |
| 819 |
%\else |
| 820 |
% Then add the current float height and required space. |
| 821 |
% Again, double their heights. |
| 822 |
%\fi |
| 823 |
% \begin{macrocode} |
| 824 |
\@tempdimb\ht\@currbox\advance\@tempdimb\dp\@currbox |
| 825 |
\advance\@tempdimb |
| 826 |
\ifdim\@floatht>\z@ \dbltextfloatsep\else\dblfloatsep\fi |
| 827 |
\multiply\@tempdimb\tw@ \advance\@tempdima\@tempdimb |
| 828 |
% \end{macrocode} |
| 829 |
%\ifJAPANESE |
| 830 |
% これらすべての要素分の高さが|\textheight|の2倍よりも小さければ、 |
| 831 |
% 現在のフロートを置くことができると判断する。 |
| 832 |
%\else |
| 833 |
% If the height of all these elements is less than twice the |\textheight|, |
| 834 |
% we can place the current float. |
| 835 |
%\fi |
| 836 |
% \begin{macrocode} |
| 837 |
\ifdim\@tempdima>\tw@\textheight |
| 838 |
\@tempswafalse |
| 839 |
\else |
| 840 |
\@tempswatrue |
| 841 |
\fi |
| 842 |
} |
| 843 |
% \end{macrocode} |
| 844 |
% \end{macro} |
| 845 |
% |
| 846 |
% \begin{macro}{\tmp@comflelt} |
| 847 |
% \begin{macro}{\tmp@comdblflelt} |
| 848 |
%\ifJAPANESE |
| 849 |
% 出力リストに格納されているフロートの高さを計るために用いる。 |
| 850 |
% それぞれ、|\@comfelt|, |\@comdblflelt|と同じだが、フロートの内容が |
| 851 |
% 失われないように|\copy|をしているのが異なる。 |
| 852 |
%\else |
| 853 |
% Used to measure the height of the float stored in the output list. |
| 854 |
% Almost the same as |\@comfelt|, |\@comdblflelt| respectively, but |
| 855 |
% use |\copy| so that the original box is not lost. |
| 856 |
%\fi |
| 857 |
% \begin{macrocode} |
| 858 |
\def\tmp@comflelt#1{% |
| 859 |
\setbox\@tempboxa |
| 860 |
\vbox{\unvbox\@tempboxa\copy #1\vskip\floatsep}% |
| 861 |
} |
| 862 |
\def\tmp@comdblflelt#1{% |
| 863 |
\setbox\@tempboxa |
| 864 |
\vbox{\unvbox\@tempboxa\copy #1\vskip\dblfloatsep}% |
| 865 |
} |
| 866 |
% \end{macrocode} |
| 867 |
% \end{macro} |
| 868 |
% \end{macro} |
| 869 |
% |
| 870 |
% \begin{macro}{\L@chkfloatht} |
| 871 |
% \begin{macro}{\R@chkfloatht} |
| 872 |
%\ifJAPANESE |
| 873 |
% それぞれ、左カラムと右カラムに出力するフロートの高さを計算するのに用いる。 |
| 874 |
% 計算結果は|\@floatht|に格納する。 |
| 875 |
%\else |
| 876 |
% Used to calculate the height of the float to be output to the left and |
| 877 |
% right column, respectively. |
| 878 |
% The calculation result is stored in |\@floatht|. |
| 879 |
%\fi |
| 880 |
% \begin{macrocode} |
| 881 |
\def\L@chkfloatht{\@floatht\z@ |
| 882 |
\ifx\L@toplist\@empty\else |
| 883 |
\let\@elt\tmp@comflelt\setbox\@tempboxa\vbox{}\L@toplist |
| 884 |
\setbox\@ne\vbox{\boxmaxdepth\maxdepth |
| 885 |
\unvbox\@tempboxa\vskip-\floatsep\topfigrule\vskip\textfloatsep |
| 886 |
}% |
| 887 |
\let\@elt\relax \advance\@floatht\ht\@ne \advance\@floatht\dp\@ne |
| 888 |
\fi |
| 889 |
\ifx\L@botlist\@empty\else |
| 890 |
\let\@elt\tmp@comflelt\setbox\@tempboxa\vbox{}\L@botlist |
| 891 |
\setbox\@ne\vbox{\boxmaxdepth\maxdepth |
| 892 |
\vskip\textfloatsep\botfigrule\unvbox\@tempboxa\vskip-\floatsep |
| 893 |
}% |
| 894 |
\let\@elt\relax \advance\@floatht\ht\@ne \advance\@floatht\dp\@ne |
| 895 |
\fi |
| 896 |
\global\@floatht\@floatht |
| 897 |
} |
| 898 |
\def\R@chkfloatht{\@floatht\z@ |
| 899 |
\ifx\R@toplist\@empty\else |
| 900 |
\let\@elt\tmp@comflelt\setbox\@tempboxa\vbox{}\R@toplist |
| 901 |
\setbox\@ne\vbox{\boxmaxdepth\maxdepth |
| 902 |
\unvbox\@tempboxa\vskip-\floatsep\topfigrule\vskip\textfloatsep |
| 903 |
}% |
| 904 |
\let\@elt\relax \advance\@floatht\ht\@ne \advance\@floatht\dp\@ne |
| 905 |
\fi |
| 906 |
\ifx\R@botlist\@empty\else |
| 907 |
\let\@elt\tmp@comflelt\setbox\@tempboxa\vbox{}\R@botlist |
| 908 |
\setbox\@ne\vbox{\boxmaxdepth\maxdepth |
| 909 |
\vskip\textfloatsep\botfigrule\unvbox\@tempboxa\vskip-\floatsep |
| 910 |
}% |
| 911 |
\let\@elt\relax \advance\@floatht\ht\@ne \advance\@floatht\dp\@ne |
| 912 |
\fi |
| 913 |
\global\@floatht\@floatht |
| 914 |
} |
| 915 |
% \end{macrocode} |
| 916 |
% \end{macro} |
| 917 |
% \end{macro} |
| 918 |
% |
| 919 |
% \begin{macro}{\@chkdblfloatht} |
| 920 |
%\ifJAPANESE |
| 921 |
% ページ上部と下部に出力する段抜きフロートの高さを計算し、 |
| 922 |
% 結果を|\@floatht|に格納する。 |
| 923 |
%\else |
| 924 |
% Calculate the height of the double float output on the top and bottom |
| 925 |
% of the page, store the result in |\@floatht|. |
| 926 |
%\fi |
| 927 |
% \begin{macrocode} |
| 928 |
\def\@chkdblfloatht{\@floatht\z@ |
| 929 |
\ifx\@dbltoplist\@empty\else |
| 930 |
\let\@elt\tmp@comdblflelt\setbox\@tempboxa\vbox{}\@dbltoplist |
| 931 |
\setbox\@ne\vbox{\boxmaxdepth\maxdepth |
| 932 |
\unvbox\@tempboxa |
| 933 |
\vskip-\dblfloatsep |
| 934 |
\dblfigrule |
| 935 |
\vskip\dbltextfloatsep |
| 936 |
}% |
| 937 |
\let\@elt\relax \advance\@floatht\ht\@ne \advance\@floatht\dp\@ne |
| 938 |
\fi |
| 939 |
\ifx\@dblbotlist\@empty\else |
| 940 |
\let\@elt\tmp@comdblflelt\setbox\@tempboxa\vbox{}\@dblbotlist |
| 941 |
\setbox\@ne\vbox{\boxmaxdepth\maxdepth |
| 942 |
\vskip\dbltextfloatsep |
| 943 |
\dblfigrule |
| 944 |
\unvbox\@tempboxa |
| 945 |
\vskip-\dblfloatsep |
| 946 |
}% |
| 947 |
\let\@elt\relax \advance\@floatht\ht\@ne \advance\@floatht\dp\@ne |
| 948 |
\fi |
| 949 |
\global\@floatht\@floatht |
| 950 |
} |
| 951 |
% \end{macrocode} |
| 952 |
% \end{macro} |
| 953 |
% |
| 954 |
%\ifJAPANESE |
| 955 |
% \subsection{フロートとテキストのマージ} |
| 956 |
%\else |
| 957 |
% \subsection{Merging float and text} |
| 958 |
%\fi |
| 959 |
% |
| 960 |
% \begin{macro}{\@fixht} |
| 961 |
%\ifJAPANESE |
| 962 |
% |\@fixht|は、左カラムの高さを格納するのに用いる。 |
| 963 |
%\else |
| 964 |
% |\@fixht| is used to store the height of the left column. |
| 965 |
%\fi |
| 966 |
% \begin{macrocode}% |
| 967 |
\global\newdimen\@fixht |
| 968 |
% \end{macrocode} |
| 969 |
% \end{macro} |
| 970 |
% |
| 971 |
% \begin{macro}{\@rightfixht} |
| 972 |
%\ifJAPANESE |
| 973 |
% \emph{日本語\TeX{}開発コミュニティによる追加}: |
| 974 |
% |\@rightfixht|は、右カラムの高さを格納するのに用いる。 |
| 975 |
% \changes{v2.8}{2017/05/01}{\cs{@rightfixht}を追加} |
| 976 |
%\else |
| 977 |
% \emph{Added by the Japanese \TeX\ development community}: |
| 978 |
% |\@rightfixht| is used to store the height of the right column. |
| 979 |
%\fi |
| 980 |
% \begin{macrocode} |
| 981 |
\global\newdimen\@rightfixht |
| 982 |
% \end{macrocode} |
| 983 |
% \end{macro} |
| 984 |
% |
| 985 |
% \begin{macro}{\@combinefloats} |
| 986 |
%\ifJAPANESE |
| 987 |
% \changes{v2.4}{2001/07/23}{\cs{boxmaxdepth}を\cs{maxdepth}にしないようにした} |
| 988 |
% |\@combinefloats|は、カラム単位で、テキストとフロートをマージする。 |
| 989 |
% このマクロは右カラムのときに実行する。 |
| 990 |
%\else |
| 991 |
% This macro is executed in the right column. |
| 992 |
%\fi |
| 993 |
% \begin{macrocode} |
| 994 |
\def\@combinefloats{% |
| 995 |
%%\boxmaxdepth\maxdepth |
| 996 |
\if@twocolumn |
| 997 |
\if@firstcolumn |
| 998 |
\else |
| 999 |
% \end{macrocode} |
| 1000 |
%\ifJAPANESE |
| 1001 |
% 左カラムのテキスト、上下のカラム幅フロート、上下の段抜きフロートの高さの |
| 1002 |
% 合計を|\@fixht|に格納する。 |
| 1003 |
%\else |
| 1004 |
% Store the total height of left column text, upper and lower column width float, |
| 1005 |
% upper and lower double column float height in |\@fixht|. |
| 1006 |
%\fi |
| 1007 |
% \begin{macrocode} |
| 1008 |
\@fixht\ht\@leftcolumn \advance\@fixht\dp\@leftcolumn |
| 1009 |
\@chkdblfloatht \@tempdima\@floatht |
| 1010 |
\L@chkfloatht \advance\@tempdima\@floatht |
| 1011 |
\advance\@fixht\@tempdima |
| 1012 |
% \end{macrocode} |
| 1013 |
%\ifJAPANESE |
| 1014 |
% |\@fixht|の高さが|\textheight|よりも大きい場合、テキストを分割し、入らない |
| 1015 |
% 部分を右カラムに移す。 |
| 1016 |
%\else |
| 1017 |
% If |\@fixht| is greater than |\textheight|, split the text and |
| 1018 |
% transfer the remaining to the right column. |
| 1019 |
%\fi |
| 1020 |
% \begin{macrocode} |
| 1021 |
\ifdim\@fixht>\textheight |
| 1022 |
% \end{macrocode} |
| 1023 |
%\ifJAPANESE |
| 1024 |
% 左カラムに残す部分の高さを|\@fixht|に格納する。 |
| 1025 |
%\else |
| 1026 |
% Stores the height of the part left in the left column in |\@fixht|. |
| 1027 |
%\fi |
| 1028 |
% \begin{macrocode} |
| 1029 |
\@fixht\textheight |
| 1030 |
\advance\@fixht-\@tempdima |
| 1031 |
\advance\@fixht\maxdepth |
| 1032 |
% \end{macrocode} |
| 1033 |
%\ifJAPANESE |
| 1034 |
% |\@fixht|分のテキストをボックス0に格納する。 |
| 1035 |
%\else |
| 1036 |
% Store the text of height |\@fixht| in box 0. |
| 1037 |
%\fi |
| 1038 |
% \begin{macrocode} |
| 1039 |
\vbadness=\@M \splittopskip=\topskip \splitmaxdepth=\maxdepth |
| 1040 |
\setbox\z@=\vsplit\@leftcolumn to\@fixht |
| 1041 |
% \end{macrocode} |
| 1042 |
%\ifJAPANESE |
| 1043 |
% 移動する部分は|\@leftcolumn|に残っているので、 |
| 1044 |
% それを右カラム(|\@outputbox|)に入れる。 |
| 1045 |
% また、ボックス0の内容を左カラムに戻す。 |
| 1046 |
% \changes{v2.4}{2001/02/19}{行間が揃わない部分を修正} |
| 1047 |
% \changes{v2.4}{2001/02/19}{柱が出ないのを修正} |
| 1048 |
% \changes{v2.8}{2017/05/01}{\cs{@outputbox}を作るときの |
| 1049 |
% \texttt{to \cs{@fixht}}の高さ指定をやめた} |
| 1050 |
%\else |
| 1051 |
% Since the part to be moved remains in |\@leftcolumn|, |
| 1052 |
% place it in the right column (|\@outputput|). |
| 1053 |
% Also, return the contents of box 0 to the left column. |
| 1054 |
%\fi |
| 1055 |
% \begin{macrocode} |
| 1056 |
\advance\@fixht-\maxdepth |
| 1057 |
\@tempdima\baselineskip \advance\@tempdima-\topskip |
| 1058 |
\setbox\@outputbox=\vbox{% |
| 1059 |
\ifvoid\@leftcolumn |
| 1060 |
\else |
| 1061 |
\unvbox\@leftcolumn\vskip\@tempdima |
| 1062 |
\fi\relax |
| 1063 |
\unvbox\@outputbox}% \vss moved from here |
| 1064 |
% \end{macrocode}0 |
| 1065 |
%\ifJAPANESE |
| 1066 |
% \changes{v2.5}{2001/09/14}{\cs{vsplit}時、infiniteエラーになるのを修正} |
| 1067 |
% |\@leftcolumn|を作成するときに用いていた|\vss|が |
| 1068 |
% |
| 1069 |
% The |\vss| used to create |\@leftcolumn| |
| 1070 |
%\begin{verbatim} |
| 1071 |
% ! Infinite glue shrinkage found in box being split. |
| 1072 |
%\end{verbatim} |
| 1073 |
% のエラーを起こすことがあるので削除した。 |
| 1074 |
% |
| 1075 |
% \emph{日本語\TeX{}開発コミュニティによる修正}: |
| 1076 |
% この場所のすぐ上にあるコードの|\unvbox\@outputbox|の直後にあった|vss|を |
| 1077 |
% こちらに持ってきました。 |
| 1078 |
% \changes{v2.8}{2017/05/01}{\cs{vss}の位置を移動} |
| 1079 |
%\else |
| 1080 |
% \emph{Modified by the Japanese \TeX{} development community}: |
| 1081 |
% the |\vss| that was immediately after |\unvbox\@outputbox| |
| 1082 |
% of the code immediately above this location was moved here. |
| 1083 |
%\fi |
| 1084 |
% \begin{macrocode} |
| 1085 |
\setbox\@leftcolumn=\vbox to\@fixht{\unvbox\z@\vss}% to here (2017/05/01) |
| 1086 |
\fi |
| 1087 |
% \end{macrocode} |
| 1088 |
%\ifJAPANESE |
| 1089 |
% 左カラムのテキストサイズに左カラムに入るフロートの高さを加えることで、 |
| 1090 |
% 左カラムの高さを|\@fixht|に格納します。 |
| 1091 |
%\else |
| 1092 |
% Stores the height of the left column in |\@fixht|, |
| 1093 |
% by adding the height of the float that enters the left column to |
| 1094 |
% the text height of the left column. |
| 1095 |
%\fi |
| 1096 |
% \begin{macrocode} |
| 1097 |
\@fixht\ht\@leftcolumn |
| 1098 |
\advance\@fixht\dp\@leftcolumn \advance\@fixht\@floatht |
| 1099 |
% \end{macrocode} |
| 1100 |
%\ifJAPANESE |
| 1101 |
% \emph{日本語\TeX{}開発コミュニティによる追加}: |
| 1102 |
% 右カラムについても同様に処理します。これで、古くからあった |
| 1103 |
% 右カラムとフロートが重なるバグを解消しました。 |
| 1104 |
% \changes{v2.8}{2017/05/01}{右カラム用の処理を丸ごと追加} |
| 1105 |
%\else |
| 1106 |
% \emph {Added by the Japanese \TeX\ development community}: |
| 1107 |
% Process the right column as well. |
| 1108 |
% Fixed a longstanding bug where the right column overlapped with the float. |
| 1109 |
%\fi |
| 1110 |
% \begin{macrocode} |
| 1111 |
\@rightfixht\ht\@outputbox \advance\@rightfixht\dp\@outputbox |
| 1112 |
\@chkdblfloatht \@tempdima\@floatht |
| 1113 |
\R@chkfloatht \advance\@tempdima\@floatht |
| 1114 |
\advance\@rightfixht\@tempdima |
| 1115 |
\ifdim\@rightfixht>\textheight |
| 1116 |
\@rightfixht\textheight |
| 1117 |
\advance\@rightfixht-\@tempdima |
| 1118 |
\advance\@rightfixht\maxdepth |
| 1119 |
\vbadness=\@M \splittopskip=\topskip \splitmaxdepth=\maxdepth |
| 1120 |
\setbox\z@=\vsplit\@outputbox to\@rightfixht |
| 1121 |
\advance\@rightfixht-\maxdepth |
| 1122 |
\unvbox\@outputbox |
| 1123 |
\setbox\@outputbox=\vbox to\@rightfixht{\unvbox\z@\vss}% |
| 1124 |
\fi |
| 1125 |
\@rightfixht\ht\@outputbox |
| 1126 |
\advance\@rightfixht\dp\@outputbox \advance\@rightfixht\@floatht |
| 1127 |
% \end{macrocode} |
| 1128 |
%\ifJAPANESE |
| 1129 |
% 左右、それぞれテキストとカラム幅フロートを組み立てる。 |
| 1130 |
%\else |
| 1131 |
% Assemble text and column width floats, for left and right respectively. |
| 1132 |
%\fi |
| 1133 |
% \begin{macrocode} |
| 1134 |
\ifx\L@toplist\@empty\else\L@cflt\fi |
| 1135 |
\ifx\L@botlist\@empty\else\L@cflb\fi |
| 1136 |
\ifx\R@toplist\@empty\else\R@cflt\fi |
| 1137 |
\ifx\R@botlist\@empty\else\R@cflb\fi |
| 1138 |
\fi |
| 1139 |
% \end{macrocode} |
| 1140 |
%\ifJAPANESE |
| 1141 |
% 二段組でないときは従来どおりの動作をする。 |
| 1142 |
%\else |
| 1143 |
% When it is not a two-column float, it operates as usual. |
| 1144 |
%\fi |
| 1145 |
% \begin{macrocode} |
| 1146 |
\else |
| 1147 |
\ifx\@toplist\@empty\else\@cflt\fi |
| 1148 |
\ifx\@botlist\@empty\else\@cflb\fi |
| 1149 |
\fi |
| 1150 |
} |
| 1151 |
% \end{macrocode} |
| 1152 |
% \end{macro} |
| 1153 |
% |
| 1154 |
% \begin{macro}{\L@cflt} |
| 1155 |
% \begin{macro}{\L@cflb} |
| 1156 |
% \begin{macro}{\R@cflt} |
| 1157 |
% \begin{macro}{\R@cflb} |
| 1158 |
%\ifJAPANESE |
| 1159 |
% 左カラムと右カラムを組み立てるのに用いる。 |
| 1160 |
% |
| 1161 |
% \emph{日本語\TeX{}開発コミュニティによる追加}: |
| 1162 |
% 左カラムでは|\@fixht|、右カラムでは|\@rightfixht|の高さになるように |
| 1163 |
% します。また、|\@colht|をこれらの高さに更新します。 |
| 1164 |
% \changes{v2.3}{2000/12/20}{\cs{gdef}を\cs{global}\cs{let}に変更} |
| 1165 |
% \changes{v2.8}{2017/05/01}{右カラムでは\cs{@rightfixht}の高さで |
| 1166 |
% 組み立て、\cs{@colht}も更新するようにした} |
| 1167 |
%\else |
| 1168 |
% Used to assemble left and right columns. |
| 1169 |
% |
| 1170 |
% \emph {Added by the Japanese \TeX\ development community}: |
| 1171 |
% Update the height of |\@fixht| in the left column, |
| 1172 |
% |\@rightfixht| in the right column. |
| 1173 |
% Also update |\@colht| to these heights. |
| 1174 |
%\fi |
| 1175 |
% \begin{macrocode} |
| 1176 |
\def\L@cflt{% |
| 1177 |
\let\@elt\@comflelt\setbox\@tempboxa\vbox{}\L@toplist |
| 1178 |
\setbox\@leftcolumn\vbox to\@fixht{\boxmaxdepth\maxdepth |
| 1179 |
\unvbox\@tempboxa |
| 1180 |
\vskip-\floatsep\topfigrule\vskip\textfloatsep\unvbox\@leftcolumn |
| 1181 |
\vss}% |
| 1182 |
\let\@elt\relax |
| 1183 |
\xdef\@freelist{\@freelist\L@toplist}\global\let\L@toplist\@empty |
| 1184 |
\@colht\@fixht |
| 1185 |
} |
| 1186 |
\def\L@cflb{% |
| 1187 |
\let\@elt\@comflelt\setbox\@tempboxa\vbox{}\L@botlist |
| 1188 |
\setbox\@leftcolumn\vbox to\@fixht{\boxmaxdepth\maxdepth |
| 1189 |
\unvbox\@leftcolumn |
| 1190 |
\vskip\textfloatsep\botfigrule\unvbox\@tempboxa\vskip-\floatsep |
| 1191 |
\vss}% |
| 1192 |
\let\@elt\relax |
| 1193 |
\xdef\@freelist{\@freelist\L@botlist}\global\let\L@botlist\@empty |
| 1194 |
\@colht\@fixht |
| 1195 |
} |
| 1196 |
\def\R@cflt{% |
| 1197 |
\let\@elt\@comflelt\setbox\@tempboxa\vbox{}\R@toplist |
| 1198 |
\setbox\@outputbox\vbox to\@rightfixht{\boxmaxdepth\maxdepth |
| 1199 |
\unvbox\@tempboxa |
| 1200 |
\vskip-\floatsep\topfigrule\vskip\textfloatsep\unvbox\@outputbox |
| 1201 |
\vss}% |
| 1202 |
\let\@elt\relax |
| 1203 |
\xdef\@freelist{\@freelist\R@toplist}\global\let\R@toplist\@empty |
| 1204 |
\@colht\@rightfixht |
| 1205 |
} |
| 1206 |
\def\R@cflb{% |
| 1207 |
\let\@elt\@comflelt\setbox\@tempboxa\vbox{}\R@botlist |
| 1208 |
\setbox\@outputbox\vbox to\@rightfixht{\boxmaxdepth\maxdepth |
| 1209 |
\unvbox\@outputbox |
| 1210 |
\vskip\textfloatsep\botfigrule\unvbox\@tempboxa\vskip-\floatsep |
| 1211 |
\vss}% |
| 1212 |
\let\@elt\relax |
| 1213 |
\xdef\@freelist{\@freelist\R@botlist}\global\let\R@botlist\@empty |
| 1214 |
\@colht\@rightfixht |
| 1215 |
} |
| 1216 |
% \end{macrocode} |
| 1217 |
% \end{macro} |
| 1218 |
% \end{macro} |
| 1219 |
% \end{macro} |
| 1220 |
% \end{macro} |
| 1221 |
% |
| 1222 |
% \begin{macro}{\@combinedblfloats} |
| 1223 |
%\ifJAPANESE |
| 1224 |
% テキストと段抜きフロートをマージする。このパッケージでは、ページ下部の |
| 1225 |
% 段抜きフロートもマージするように拡張している。 |
| 1226 |
%\else |
| 1227 |
% Merge text and float. |
| 1228 |
% In this package, double column float at the bottom of the page are also merged. |
| 1229 |
%\fi |
| 1230 |
% \begin{macrocode} |
| 1231 |
%\def\@comdblflelt#1{\setbox\@tempboxa |
| 1232 |
% \vbox{\unvbox\@tempboxa\box#1\vskip\dblfloatsep}} |
| 1233 |
% |
| 1234 |
\def\@combinedblfloats{% |
| 1235 |
\ifx\@dbltoplist\@empty |
| 1236 |
\else |
| 1237 |
\let\@elt\@comdblflelt\setbox\@tempboxa\vbox{}\@dbltoplist |
| 1238 |
\setbox\@outputbox\vbox{\boxmaxdepth\maxdepth |
| 1239 |
\unvbox\@tempboxa |
| 1240 |
\vskip-\dblfloatsep |
| 1241 |
\dblfigrule |
| 1242 |
\vskip\dbltextfloatsep |
| 1243 |
\box\@outputbox}% |
| 1244 |
\let\@elt\relax\xdef\@freelist{\@freelist\@dbltoplist}% |
| 1245 |
\global\let\@dbltoplist\@empty |
| 1246 |
\fi |
| 1247 |
\ifx\@dblbotlist\@empty |
| 1248 |
\else |
| 1249 |
\let\@elt\@comdblflelt\setbox\@tempboxa\vbox{}\@dblbotlist |
| 1250 |
\setbox\@outputbox\vbox{\boxmaxdepth\maxdepth |
| 1251 |
\box\@outputbox |
| 1252 |
\vskip\dbltextfloatsep |
| 1253 |
\dblfigrule |
| 1254 |
\unvbox\@tempboxa |
| 1255 |
\vskip-\dblfloatsep |
| 1256 |
}% |
| 1257 |
\let\@elt\relax\xdef\@freelist{\@freelist\@dblbotlist}% |
| 1258 |
\global\let\@dblbotlist\@empty |
| 1259 |
\fi |
| 1260 |
\global\setbox\@outputbox\vbox to\textheight{\unvbox\@outputbox}% |
| 1261 |
} |
| 1262 |
% \end{macrocode} |
| 1263 |
% \end{macro} |
| 1264 |
% |
| 1265 |
%\ifJAPANESE |
| 1266 |
% \subsection{二段組の出力} |
| 1267 |
%\else |
| 1268 |
% \subsection{Output of two columns} |
| 1269 |
%\fi |
| 1270 |
% |
| 1271 |
% \begin{macro}{\if@balance} |
| 1272 |
%\ifJAPANESE |
| 1273 |
% 左右のカラムを均等にして出力するかどうかを示すフラグ。 |
| 1274 |
%\else |
| 1275 |
% Flag indicating whether the left and right columns are to be balanced. |
| 1276 |
%\fi |
| 1277 |
% \begin{macrocode} |
| 1278 |
\newif\if@balance \@balancefalse |
| 1279 |
% \end{macrocode} |
| 1280 |
% \end{macro} |
| 1281 |
% |
| 1282 |
% \begin{macro}{\@outputdblcol} |
| 1283 |
%\ifJAPANESE |
| 1284 |
% 左右のカラムを連結し、出力するのは|\@outputdblcol|が行なう。 |
| 1285 |
% このパッケージでは、左右のカラムを均等に分割するためのルーチンを加えてある。 |
| 1286 |
%\else |
| 1287 |
% Concatenate left and right columns and output them by |\@outputdblcol|. |
| 1288 |
% In this package, a routine for equally dividing the left and right |
| 1289 |
% columns has been added. |
| 1290 |
%\fi |
| 1291 |
% \begin{macrocode} |
| 1292 |
\newbox\@combinebox |
| 1293 |
% \end{macrocode} |
| 1294 |
%\ifJAPANESE |
| 1295 |
% 左カラムを組み立てただけの時点では、それを|\@leftcolumn|に格納するだけで |
| 1296 |
% 出力はしない。 |
| 1297 |
% \changes{v2.4}{2001/02/19}{最終ページで左右の行間が揃わない部分を修正} |
| 1298 |
% \changes{v2.4}{2001/02/19}{柱が出ないのを修正} |
| 1299 |
%\else |
| 1300 |
% Just store the assembled left column in |\@leftcolumn|, |
| 1301 |
% do not output it yet. |
| 1302 |
%\fi |
| 1303 |
% \begin{macrocode} |
| 1304 |
\def\@outputdblcol{% |
| 1305 |
\if@firstcolumn |
| 1306 |
\global\@firstcolumnfalse |
| 1307 |
\global\setbox\@leftcolumn\box\@outputbox |
| 1308 |
\@colht\textheight |
| 1309 |
\@chkdblfloatht\global\advance\@colht-\@floatht |
| 1310 |
\else |
| 1311 |
\global\@firstcolumntrue |
| 1312 |
% \end{macrocode} |
| 1313 |
%\ifJAPANESE |
| 1314 |
% ここからが左右カラムを均等に分割するコード。 |
| 1315 |
%\else |
| 1316 |
% Here starts the code that balances the left and right columns. |
| 1317 |
%\fi |
| 1318 |
% \begin{macrocode} |
| 1319 |
\if@balance |
| 1320 |
\@tempdima\baselineskip |
| 1321 |
\advance\@tempdima-\topskip |
| 1322 |
\setbox\@combinebox=\vbox{% |
| 1323 |
\unvbox\@leftcolumn\vskip\@tempdima\unvbox\@outputbox}% |
| 1324 |
\@tempdima\ht\@combinebox |
| 1325 |
\advance\@tempdima\dp\@combinebox |
| 1326 |
\divide\@tempdima\tw@ |
| 1327 |
\vbadness=\@M \splittopskip=\topskip \splitmaxdepth=\maxdepth |
| 1328 |
\setbox\@leftcolumn=\vsplit\@combinebox to\@tempdima |
| 1329 |
\setbox\@outputbox=\vtop{\unvbox\@combinebox} |
| 1330 |
\setbox\@leftcolumn=\vtop{\unvbox\@leftcolumn} |
| 1331 |
\fi |
| 1332 |
% \end{macrocode} |
| 1333 |
%\ifJAPANESE |
| 1334 |
% 整形する。 |
| 1335 |
%\else |
| 1336 |
% Format it. |
| 1337 |
%\fi |
| 1338 |
% \begin{macrocode} |
| 1339 |
\@tempdima\ht\@leftcolumn |
| 1340 |
\setbox\@outputbox\vbox to\@tempdima{% |
| 1341 |
\hb@xt@\textwidth{% |
| 1342 |
\hb@xt@\columnwidth{% |
| 1343 |
\vbox to\@tempdima{\box\@leftcolumn\vss}\hss}% |
| 1344 |
\hfil |
| 1345 |
\vrule width\columnseprule |
| 1346 |
\hfil |
| 1347 |
\hb@xt@\columnwidth{% |
| 1348 |
\vbox to\@tempdima{\box\@outputbox\vss}\hss}% |
| 1349 |
}% |
| 1350 |
\vss |
| 1351 |
}% |
| 1352 |
\@combinedblfloats |
| 1353 |
\@outputpage |
| 1354 |
\begingroup |
| 1355 |
\@dblfloatplacement |
| 1356 |
\@startdblcolumn |
| 1357 |
\@whilesw\if@fcolmade \fi{\@outputpage\@startdblcolumn}% |
| 1358 |
\endgroup |
| 1359 |
\fi |
| 1360 |
\global\@balancefalse |
| 1361 |
} |
| 1362 |
% \end{macrocode} |
| 1363 |
% \end{macro} |
| 1364 |
% |
| 1365 |
% \begin{macro}{\@startdblcolumn} |
| 1366 |
%\ifJAPANESE |
| 1367 |
% 二段組を開始するとき、まだ出力をしていないフロートを出力する。 |
| 1368 |
% それらは|\@sdblcolelt|を通じて、|\@addtonextcol|で出力される。 |
| 1369 |
% このパッケージでは、カラムの高さを|\textheight|からフロートの高さを |
| 1370 |
% 引いたものに設定するように再定義する。 |
| 1371 |
%\else |
| 1372 |
% When starting a two-column page, output a float that has not yet been output. |
| 1373 |
% They are output by |\@addtonextcol| via |\@sdblcolelt|. |
| 1374 |
% In this package, update the height of the column |
| 1375 |
% by subtracting the height of the float from |\textheight|. |
| 1376 |
%\fi |
| 1377 |
% \begin{macrocode} |
| 1378 |
\def\@startdblcolumn{% |
| 1379 |
\global\@colht\textheight |
| 1380 |
\@tryfcolumn\@dbldeferlist |
| 1381 |
\if@fcolmade |
| 1382 |
\else |
| 1383 |
\begingroup |
| 1384 |
\let\reserved@b\@dbldeferlist |
| 1385 |
\global\let\@dbldeferlist\@empty |
| 1386 |
\let\@elt\@sdblcolelt |
| 1387 |
\reserved@b |
| 1388 |
\endgroup |
| 1389 |
\fi |
| 1390 |
\@chkdblfloatht |
| 1391 |
\global\advance\@colht-\@floatht |
| 1392 |
} |
| 1393 |
% \end{macrocode} |
| 1394 |
% \end{macro} |
| 1395 |
% |
| 1396 |
% \begin{macro}{\@doclearpage} |
| 1397 |
%\ifJAPANESE |
| 1398 |
% 出力フロート用リストの初期化をするために、|\@doclearpage|を再定義する。 |
| 1399 |
%\else |
| 1400 |
% Redefine |\@doclearpage| to initialize output float list. |
| 1401 |
%\fi |
| 1402 |
% \begin{macrocode} |
| 1403 |
\def\@doclearpage{% |
| 1404 |
\ifvoid\footins |
| 1405 |
\setbox\@tempboxa\vsplit\@cclv to\z@ \unvbox\@tempboxa |
| 1406 |
\setbox\@tempboxa\box\@cclv |
| 1407 |
\xdef\@deferlist{% |
| 1408 |
\L@toplist\R@toplist\L@botlist\R@botlist\@deferlist}% |
| 1409 |
\global\let\L@toplist\@empty % changed from \@toplist |
| 1410 |
\global\let\R@toplist\@empty % added |
| 1411 |
\global\let\L@botlist\@empty % changed from \@botlist |
| 1412 |
\global\let\R@botlist\@empty % added |
| 1413 |
\global\@colroom\@colht |
| 1414 |
\ifx\@currlist\@empty |
| 1415 |
\else |
| 1416 |
\@latexerr{Float(s) lost}\@ehb |
| 1417 |
\global\let\@currlist\@empty |
| 1418 |
\fi |
| 1419 |
\@makefcolumn\@deferlist |
| 1420 |
\@whilesw\if@fcolmade \fi{\@opcol\@makefcolumn\@deferlist}% |
| 1421 |
\if@twocolumn |
| 1422 |
\if@firstcolumn |
| 1423 |
% added \@dblbotlist |
| 1424 |
\xdef\@dbldeferlist{\@dbltoplist\@dblbotlist\@dbldeferlist}% |
| 1425 |
\global\let\@dbltoplist\@empty |
| 1426 |
\global\let\@dblbotlist\@empty % added |
| 1427 |
\global\@colht\textheight |
| 1428 |
\begingroup |
| 1429 |
\@dblfloatplacement |
| 1430 |
\@makefcolumn\@dbldeferlist |
| 1431 |
\@whilesw\if@fcolmade \fi{\@outputpage |
| 1432 |
\@makefcolumn\@dbldeferlist}% |
| 1433 |
\endgroup |
| 1434 |
\else |
| 1435 |
\vbox{}\clearpage |
| 1436 |
\fi |
| 1437 |
\fi |
| 1438 |
\else |
| 1439 |
\setbox\@cclv\vbox{\box\@cclv\vfil}% |
| 1440 |
\@makecol\@opcol |
| 1441 |
\clearpage |
| 1442 |
\fi |
| 1443 |
} |
| 1444 |
% \end{macrocode} |
| 1445 |
% \end{macro} |
| 1446 |
% |
| 1447 |
% \begin{macro}{\@topnewpage} |
| 1448 |
%\ifJAPANESE |
| 1449 |
% |\@dblbotroom|と|dblbotnumber|を初期化するために|\@topnewpage|を再定義する。 |
| 1450 |
%\else |
| 1451 |
% Redefine |\@topnewpage| to initialize |\@dblbotroom| and |dblbotnumber|. |
| 1452 |
%\fi |
| 1453 |
% \begin{macrocode} |
| 1454 |
\long\def\@topnewpage[#1]{% |
| 1455 |
%\@nodocument |
| 1456 |
\@next\@currbox\@freelist{}{}% |
| 1457 |
\global\setbox\@currbox |
| 1458 |
\color@vbox |
| 1459 |
\normalcolor |
| 1460 |
\vbox{\hsize\textwidth |
| 1461 |
\@parboxrestore |
| 1462 |
\col@number\@ne |
| 1463 |
#1% |
| 1464 |
\vskip-\dbltextfloatsep}% |
| 1465 |
\color@endbox |
| 1466 |
\ifdim\ht\@currbox>\textheight |
| 1467 |
\ht\@currbox\textheight |
| 1468 |
\fi |
| 1469 |
\global\count\@currbox\tw@ |
| 1470 |
\@tempdima-\ht\@currbox |
| 1471 |
\advance\@tempdima-\dbltextfloatsep |
| 1472 |
\global\advance\@colht\@tempdima |
| 1473 |
\ifx\@dbltoplist\@empty |
| 1474 |
\else |
| 1475 |
\@latexerr{Float(s) lost}\@ehb |
| 1476 |
\let\@dbltoplist\@empty |
| 1477 |
\fi |
| 1478 |
\@cons\@dbltoplist\@currbox |
| 1479 |
\global\@dbltopnum\m@ne |
| 1480 |
\global\@dblbotnum\m@ne % added |
| 1481 |
\ifdim\@colht<2.5\baselineskip |
| 1482 |
\@latex@warning@no@line {Optional argument of \noexpand\twocolumn |
| 1483 |
too tall on page \thepage}% |
| 1484 |
\@emptycol |
| 1485 |
\if@firstcolumn |
| 1486 |
\else |
| 1487 |
\@emptycol |
| 1488 |
\fi |
| 1489 |
\else |
| 1490 |
\global\vsize\@colht |
| 1491 |
\global\@colroom\@colht |
| 1492 |
\@floatplacement |
| 1493 |
\fi |
| 1494 |
%\global\@dbltoproom\maxdimen |
| 1495 |
%\global\@dblbotroom\maxdimen |
| 1496 |
%\@addtodblcol |
| 1497 |
} |
| 1498 |
% \end{macrocode} |
| 1499 |
% \end{macro} |
| 1500 |
% |
| 1501 |
% \begin{macro}{\balancenewpage} |
| 1502 |
% \begin{macro}{\balanceclearpage} |
| 1503 |
%\ifJAPANESE |
| 1504 |
% テキストを均等に分割して出力するためのマクロ。 |
| 1505 |
% ただし、このマクロを用いた場合、そのページ内での|\newpage|や |
| 1506 |
% |\clearpage|コマンドが無効になることに注意。 |
| 1507 |
%\else |
| 1508 |
% Macro for evenly dividing text and outputting it. |
| 1509 |
% However, when using this macro, |\newpage| or |\clearpage| |
| 1510 |
% are not allowed on the current page. |
| 1511 |
%\fi |
| 1512 |
% \begin{macrocode} |
| 1513 |
\def\balancenewpage{\par\vfil\global\@balancetrue\penalty-\@M} |
| 1514 |
\def\balanceclearpage{\balancenewpage |
| 1515 |
\write\m@ne{}\vbox{}\global\@balancetrue\penalty-\@Mi} |
| 1516 |
\endinput |
| 1517 |
%</core> |
| 1518 |
% \end{macrocode} |
| 1519 |
% \end{macro} |
| 1520 |
% \end{macro} |
| 1521 |
% |
| 1522 |
% \Finale |
| 1523 |
% |
| 1524 |
% \endinput |