diff options
author | Manuel Pégourié-Gonnard <mpg@elzevir.fr> | 2008-07-07 09:54:46 +0000 |
---|---|---|
committer | Manuel Pégourié-Gonnard <mpg@elzevir.fr> | 2008-07-07 09:54:46 +0000 |
commit | 06c4daa53d286161db92cf8d0f9c7055748ee92e (patch) | |
tree | 670af1851b2bb6c3affd2ef490c89f2b7d3c878c /Master/texmf-dist/tex/xmltex/passivetex/fotex.sty | |
parent | 50edff76c23a58397d042ed589bbdec6cc2bfa88 (diff) |
passivetex update
git-svn-id: svn://tug.org/texlive/trunk@9324 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/xmltex/passivetex/fotex.sty')
-rw-r--r-- | Master/texmf-dist/tex/xmltex/passivetex/fotex.sty | 1230 |
1 files changed, 358 insertions, 872 deletions
diff --git a/Master/texmf-dist/tex/xmltex/passivetex/fotex.sty b/Master/texmf-dist/tex/xmltex/passivetex/fotex.sty index f0581d1b4f3..bccbf77a039 100644 --- a/Master/texmf-dist/tex/xmltex/passivetex/fotex.sty +++ b/Master/texmf-dist/tex/xmltex/passivetex/fotex.sty @@ -1,6 +1,6 @@ -%RCS: $Id: //depot/Master/texmf-dist/tex/xmltex/passivetex/fotex.sty#1 $, $Date: 2004/02/09 $ +%RCS: $Id: //TEI/web/Software/passivetex/fotex.sty#29 $, $Date: 2002/06/26 $ % -% Copyright 2003 Sebastian Rahtz/Oxford University +% Copyright 2002 Sebastian Rahtz/Oxford University % <sebastian.rahtz@oucs.ox.ac.uk> % % Permission is hereby granted, free of charge, to any person obtaining @@ -14,41 +14,14 @@ % The above copyright notice and this permission notice shall be included % in all copies or substantial portions of the Software. % -\batchmode -\ProvidesPackage{fotex}[2003/03/10: version 1.25. support for XSL formatting, S Rahtz] -\RequirePackage{graphicx,color} -%\IfFileExists{multicol.sty} -% {\RequirePackage{multicol}[1997/12/16]} -% {\newenvironment{multicols}[1]% -% {\typeout{Warning, at line \the\inputlineno, multicol package not available}}{}% -%} - -\def\confirmnomulticols{ - \RequirePackage{nomulticol}[2003/01/09] - \typeout{INFO (nomulticol.sty: fo:block span="all" works} -} -\def\warnnomulticols{ - \RequirePackage{multicol}[1997/12/16] - \typeout{WARNING (multicol.sty: fo:block span="all" does not work} - \fakenomulticols -} -\def\warnmulticols{ - \typeout{WARNING (no multicol.sty: multiple columns not available} - \newenvironment{multicols}[1]{\typeout{Warning, at line \the\inputlineno, multicol package not available}}{} - \fakenomulticols -} -\def\fakenomulticols{ - \def\nobeginmulticols##1{\begin{multicols}{##1}} - \def\noendmulticols{\end{multicols}} - \def\interbeginmulticols##1{} - \let\interendmulticols\relax - \let\refreshmulticols\relax -} -\IfFileExists{nomulticol.sty} -{\confirmnomulticols} -{\IfFileExists{multicol.sty} - {\warnnomulticols} - {\warnmulticols} +% Includes fixes from Tomas Bures <ghort@pauline.vellum.cz> +% +\ProvidesPackage{fotex}[2002/06/25: version 1.17. support for XSL formatting, S Rahtz] +\RequirePackage{graphicx} +\IfFileExists{multicol.sty} + {\RequirePackage{multicol}[1997/12/16]} + {\newenvironment{multicols}[1]% + {\typeout{Warning, at line \the\inputlineno, multicol package not available}}{}% } \RequirePackage{rotating} \RequirePackage{array} @@ -57,12 +30,12 @@ \newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}} \newcolumntype{R}[1]{>{\raggedleft\arraybackslash}p{#1}} \newcolumntype{P}[1]{>{\arraybackslash}p{#1}} -\RequirePackage{soul} \RequirePackage{amsmath} \let\Vec\undefined \RequirePackage{longtable} \RequirePackage{url} \RequirePackage[normalem]{ulem} +\RequirePackage{color} \RequirePackage{times} \RequirePackage{mlnames} \RequirePackage{unicode} @@ -70,17 +43,14 @@ \RequirePackage{ucharacters} %\usepackage{ucs}\usepackage[utf8]{inputenc} \RequirePackage{nameref} -\RequirePackage[pdfcreator={PassiveTeX 1.25},colorlinks=false,plainpages=true,hypertexnames=false,pdfborder={1 0 0}]{hyperref}[1999/08/1] +\RequirePackage[colorlinks=false,plainpages=true,hypertexnames=false,pdfborder={1 0 0}]{hyperref}[1999/08/1] %------------------------------------------- \newcount\FOListBlocks -\edef\This@FOListBlocks{\the\FOListBlocks} \newcount\FOTableNesting \newcount\FOinList \newcount\FOinTable \newcount\NCols \newcount\RowCount -\newcount\SimplePMRefs -\newskip\LeaderLength \newdimen\CurrentCellWidth \newdimen\FObalancespace \newdimen\FOspaceleft @@ -107,17 +77,13 @@ \newif\ifMulticolPending \newif\ifNoTableCheckHeight \newif\ifStartWithOmit -\newif\ifForcePageSetup -\newif\ifBlankPage -\newif\ifInInsertion \newsavebox\BlockBox \newsavebox\CellBox \newsavebox\FOBOX \newsavebox\ItemBox \newtoks\ColSpecs -\newtoks\BoxedFootnotes % -%\FODebugtrue +\FODebugfalse \FOBlockGrabfalse \FODefiningPagefalse \FOListBodyfalse @@ -133,10 +99,6 @@ \MasterTopMargin\z@ \MulticolPendingfalse \StartWithOmitfalse -% smarts from Anton to deal with long lines in verbatim -\gdef\FOdiscretionary{\ifx\FOwrapoption\att@nowrap\discretionary{\kern-.5ex\lower1ex\hbox{$\hookleftarrow$}}{}{\kern1ex}\else\space\fi} -\def\obeyspaces{\catcode`\ =\active} -{\obeyspaces\global\let =\FOdiscretionary} \def\DEBUG#1{% \ifFODebug \typeout{#1, at \the\inputlineno}% @@ -158,7 +120,6 @@ \def\FOborderendstyle{#2}% \def\FOborderbeforestyle{#2}% \def\FOborderafterstyle{#2}% - \interpretwidth } \def\FOexpandattributes{% % @@ -221,25 +182,36 @@ \fi % end of shortcuts \ifx\FOborderendstyle\att@solid + \ifx\FOborderendwidth\att@thin\def\FOborderendwidth{0.4pt}\fi + \ifx\FOborderendwidth\att@medium\def\FOborderendwidth{0.8pt}\fi + \ifx\FOborderendwidth\att@thick\def\FOborderendwidth{1.2pt}\fi \FOBlockGrabtrue \else \def\FOborderendwidth{\z@}% \fi \ifx\FOborderstartstyle\att@solid + \ifx\FOborderstartwidth\att@thin\def\FOborderstartwidth{0.4pt}\fi + \ifx\FOborderstartwidth\att@medium\def\FOborderstartwidth{0.8pt}\fi + \ifx\FOborderstartwidth\att@thick\def\FOborderstartwidth{1.2pt}\fi \FOBlockGrabtrue \else \def\FOborderstartwidth{\z@}% \fi \ifx\FOborderafterstyle\att@solid + \ifx\FOborderafterwidth\att@thin\def\FOborderafterwidth{0.4pt}\fi + \ifx\FOborderafterwidth\att@medium\def\FOborderafterwidth{0.8pt}\fi + \ifx\FOborderafterwidth\att@thick\def\FOborderafterwidth{1.2pt}\fi \else \def\FOborderafterwidth{\z@}% \fi \ifx\FOborderbeforestyle\att@solid + \ifx\FOborderbeforewidth\att@thin\def\FOborderbeforewidth{0.4pt}\fi + \ifx\FOborderbeforewidth\att@medium\def\FOborderbeforewidth{0.8pt}\fi + \ifx\FOborderbeforewidth\att@thick\def\FOborderbeforewidth{1.2pt}\fi \FOBlockGrabtrue \else \def\FOborderbeforewidth{\z@}% \fi - \interpretwidth } %------------------------------------------- % @@ -285,107 +257,33 @@ \def\NoTableSetup{% \global\advance\AbsoluteTableCount by 1 \DeclareArray{fotable\the\AbsoluteTableCount:}% - \DeclareArray{fotabletextalign\the\AbsoluteTableCount:}% - \DeclareArray{fotableborderbeforestyle\the\AbsoluteTableCount:}% - \DeclareArray{fotableborderafterstyle\the\AbsoluteTableCount:}% - \DeclareArray{fotableborderstartstyle\the\AbsoluteTableCount:}% - \DeclareArray{fotableborderendstyle\the\AbsoluteTableCount:}% - \DeclareArray{fotableborderbeforewidth\the\AbsoluteTableCount:}% - \DeclareArray{fotableborderafterwidth\the\AbsoluteTableCount:}% - \DeclareArray{fotableborderstartwidth\the\AbsoluteTableCount:}% - \DeclareArray{fotableborderendwidth\the\AbsoluteTableCount:}% - \DeclareArray{fotableborderbeforecolor\the\AbsoluteTableCount:}% - \DeclareArray{fotableborderaftercolor\the\AbsoluteTableCount:}% - \DeclareArray{fotableborderstartcolor\the\AbsoluteTableCount:}% - \DeclareArray{fotableborderendcolor\the\AbsoluteTableCount:}% \global\CellCount0 -\ifnum\FOinTable=0 - \global\BoxedFootnotes{}% - \global\let\FOfoottext\FOboxedfoottext -\fi -} - -\def\NoTableFinish{ -\ifnum\FOinTable=0 - \the\BoxedFootnotes - \global\BoxedFootnotes={}% - \global\let\FOfoottext\FOplainfoottext -\fi -} - -\def\saveinterlineskip{% - \edef\savedbaselineskip{\the\baselineskip}% - \edef\savedlineskip{\the\lineskip}% - \edef\savedlineskiplimit{\the\lineskiplimit}% - \baselineskip=-1000pt\relax - \lineskiplimit=16383pt\relax - \lineskip=0pt -} - -\def\restoreinterlineskip{% - \baselineskip\savedbaselineskip\relax - \lineskip\savedlineskip\relax - \lineskiplimit\savedlineskiplimit\relax } \def\NoTableStart#1{#1} -\def\NoTableEnd{% - \clearArray{fotable\the\AbsoluteTableCount:}% - \clearArray{fotabletextalign\the\AbsoluteTableCount:}% - \clearArray{fotableborderbeforestyle\the\AbsoluteTableCount:}% - \clearArray{fotableborderafterstyle\the\AbsoluteTableCount:}% - \clearArray{fotableborderstartstyle\the\AbsoluteTableCount:}% - \clearArray{fotableborderendstyle\the\AbsoluteTableCount:}% - \clearArray{fotableborderbeforewidth\the\AbsoluteTableCount:}% - \clearArray{fotableborderafterwidth\the\AbsoluteTableCount:}% - \clearArray{fotableborderstartwidth\the\AbsoluteTableCount:}% - \clearArray{fotableborderendwidth\the\AbsoluteTableCount:}% - \clearArray{fotableborderbeforecolor\the\AbsoluteTableCount:}% - \clearArray{fotableborderaftercolor\the\AbsoluteTableCount:}% - \clearArray{fotableborderstartcolor\the\AbsoluteTableCount:}% - \clearArray{fotableborderendcolor\the\AbsoluteTableCount:}% -} +\def\NoTableEnd{\clearArray{fotable\the\AbsoluteTableCount:}} \def\NoTableColumn{% - \ifx\@empty\FOcolumnnumber - \global\advance\NCols by 1 - \else - \global\NCols\FOcolumnnumber - \fi - \ifx\prop@width\FOcolumnwidth\def\FOcolumnwidth{1in}\fi - \ifx\@empty\FOcolumnwidth\def\FOcolumnwidth{1in}\fi - \TablePercentToDimen{\FOcolumnwidth}% - \addToArray{fotable\the\AbsoluteTableCount:}{\the\@tempdima}% - \addToArray{fotabletextalign\the\AbsoluteTableCount:}{\FOtextalign}% - \addToArray{fotableborderbeforestyle\the\AbsoluteTableCount:}{\FOborderbeforestyle}% - \addToArray{fotableborderafterstyle\the\AbsoluteTableCount:}{\FOborderafterstyle}% - \addToArray{fotableborderstartstyle\the\AbsoluteTableCount:}{\FOborderstartstyle}% - \addToArray{fotableborderendstyle\the\AbsoluteTableCount:}{\FOborderendstyle}% - \addToArray{fotableborderbeforewidth\the\AbsoluteTableCount:}{\FOborderbeforewidth}% - \addToArray{fotableborderafterwidth\the\AbsoluteTableCount:}{\FOborderafterwidth}% - \addToArray{fotableborderstartwidth\the\AbsoluteTableCount:}{\FOborderstartwidth}% - \addToArray{fotableborderendwidth\the\AbsoluteTableCount:}{\FOborderendwidth}% - \addToArray{fotableborderbeforecolor\the\AbsoluteTableCount:}{\FOborderbeforecolor}% - \addToArray{fotableborderaftercolor\the\AbsoluteTableCount:}{\FOborderaftercolor}% - \addToArray{fotableborderstartcolor\the\AbsoluteTableCount:}{\FOborderstartcolor}% - \addToArray{fotableborderendcolor\the\AbsoluteTableCount:}{\FOborderendcolor}% - \DEBUG{Table Column \the\NCols, in Table \the\AbsoluteTableCount, - \FOcolumnwidth, = \the\@tempdima}% + \ifx\@empty\FOcolumnnumber + \global\advance\NCols by 1 + \else + \global\NCols\FOcolumnnumber + \fi + \ifx\prop@width\FOcolumnwidth\def\FOcolumnwidth{1in}\fi + \ifx\@empty\FOcolumnwidth\def\FOcolumnwidth{1in}\fi + \TablePercentToDimen{\FOcolumnwidth}% + \addToArray{fotable\the\AbsoluteTableCount:}{\the\@tempdima}% + \DEBUG{Table Column \the\NCols, in Table \the\AbsoluteTableCount, + \FOcolumnwidth, = \the\@tempdima}% } \def\NoTableRow#1{% - \setbox0=\vbox{ - \ifx\FOheight\att@auto% - \strut They - \else - \rule{\z@}{\FOheight}% - \fi - }% + \setbox0=\vbox{\strut They}% \NoTableCellHeight=\ht0 \advance\NoTableCellHeight by \dp0 \global\CellCount0 \NoTableCheckHeightfalse - \setbox0=\vbox{\hbox{\let\FOfoottext\FOnofoottext#1}}% + \setbox0=\hbox{#1}% \@tempdima=\ht0 \advance\@tempdima by \dp0 \FOspaceleft=\pagegoal @@ -397,49 +295,30 @@ \fi \ifdim\@tempdima>\NoTableCellHeight %\typeout{row pass 2 at \the\inputlineno, as [\the\@tempdima] > [\the\NoTableCellHeight]}% + \global\CellCount0 \NoTableCellHeight=\@tempdima + \NoTableCheckHeighttrue + \vbox{\hbox{#1}}% + \else + \box0\relax \fi - \global\CellCount0 - \NoTableCheckHeighttrue - \vbox to \NoTableCellHeight{\hbox{#1}}% -% \ifFOinOutput\else\vskip-\lineskip\fi -} - -\def\inheritfromcolumn#1#2{% - \explicitattribute{#1}% - \ifx\isexplicit\relax - \expandafter\edef\csname FO#2\endcsname{\csname fotable#2\the\AbsoluteTableCount:\the\CellCount\endcsname}% - \fi + \vskip-\lineskip } \def\NoTableCell#1{% \ifx\FOstartsrow\att@true -% \vskip-\lineskip + \vskip-\lineskip \global\CellCount1 \else \global\advance\CellCount by 1 \fi \ifnum\NCols<1 \CurrentCellWidth\z@ - \setbox0=\hbox{\restoreinterlineskip#1\strut}% + \setbox0=\hbox{#1}% \CurrentCellWidth=\wd0 -%\DEBUG{report \the\CurrentCellWidth}% +\DEBUG{report \the\CurrentCellWidth}% \else \CurrentCellWidth=\csname fotable\the\AbsoluteTableCount:\the\CellCount\endcsname - \inheritfromcolumn{text-align}{textalign}% - \inheritfromcolumn{border-before-style}{borderbeforestyle}% - \inheritfromcolumn{border-after-style}{borderafterstyle}% - \inheritfromcolumn{border-start-style}{borderstartstyle}% - \inheritfromcolumn{border-end-style}{borderendstyle}% - \inheritfromcolumn{border-before-width}{borderbeforewidth}% - \inheritfromcolumn{border-after-width}{borderafterwidth}% - \inheritfromcolumn{border-start-width}{borderstartwidth}% - \inheritfromcolumn{border-end-width}{borderendwidth}% - \inheritfromcolumn{border-before-color}{borderbeforecolor}% - \inheritfromcolumn{border-after-color}{borderaftercolor}% - \inheritfromcolumn{border-start-color}{borderstartcolor}% - \inheritfromcolumn{border-end-color}{borderendcolor}% - \interpretwidth \fi \advance\CurrentCellWidth by -\FOpaddingstart \advance\CurrentCellWidth by -\FOpaddingend @@ -462,7 +341,7 @@ \leavevmode\hbox{\FOTableCellBlock#1\FOEndTableCellBlock}% \fi \ifx\FOendsrow\att@true -% \vskip-\lineskip + \vskip-\lineskip \global\CellCount0 \fi } @@ -471,18 +350,17 @@ \begin{lrbox}{\CellBox}% \vbox\bgroup \hsize\the\CurrentCellWidth - \restoreinterlineskip - \ifFOinOutput\else \color@begingroup\fi + \color@begingroup \FOSetFont{tablecellblock}% \ifx\FOwhitespace\att@pre\obeyspaces\obeylines\fi \ifx\FOwhitespacecollapse\att@false\obeyspaces\fi \ifx\FOwrapoption\att@nowrap\obeylines\fi - \ifx\FOverticalalign\att@bottom\vfill\fi + \ifx\TOverticalalign\att@bottom\vfill\fi } \def\FOEndTableCellBlock{% - \ifx\FOverticalalign\att@top\vfill\fi - \ifFOinOutput\else \color@endgroup\fi + \ifx\TOverticalalign\att@top\vfill\fi + \color@endgroup \egroup \end{lrbox}% \@tempdima\FOmargintop @@ -498,7 +376,7 @@ \hbox{% \hskip\FOmarginleft \vbox{% - \kern\FOmargintop + \vskip\FOmargintop \vbox{% \ifx\FOborderbeforestyle\att@solid {\color{\FOborderbeforecolor}\hrule\@height\FOborderbeforewidth}% @@ -515,29 +393,29 @@ % According to FOdisplayalign property, we put glue % before and/or after the cell contents \vtop to \NoTableCellHeight{% - \kern\FOpaddingbefore + \vskip\FOpaddingbefore \ifx\FOdisplayalign\att@auto - \else\ifx\FOdisplayalign\att@before - \else\ifx\FOdisplayalign\att@after\vfil + \else\ifx\FOdisplayalign\att@after + \else\ifx\FOdisplayalign\att@before\vfil \else\ifx\FOdisplayalign\att@centered\vfil\fi \fi \fi \fi \hbox{\kern\FOpaddingstart\box\CellBox\kern\FOpaddingend}% \ifx\FOdisplayalign\att@auto\vfil - \else\ifx\FOdisplayalign\att@before\vfil - \else\ifx\FOdisplayalign\att@after + \else\ifx\FOdisplayalign\att@after\vfil + \else\ifx\FOdisplayalign\att@before \else\ifx\FOdisplayalign\att@centered\vfil\fi \fi \fi \fi - \kern\FOpaddingafter + \vskip\FOpaddingafter }% \else \vbox{% - \kern\FOpaddingbefore + \vskip\FOpaddingbefore \hbox{\kern\FOpaddingstart\box\CellBox\kern\FOpaddingend}% - \kern\FOpaddingafter + \vskip\FOpaddingafter }% \fi \ifx\FOborderendstyle\att@solid @@ -547,7 +425,7 @@ \ifx\FOborderafterstyle\att@solid {\color{\FOborderaftercolor}\hrule\@height\FOborderafterwidth}\fi }% - \kern\FOmarginbottom + \vskip\FOmarginbottom }% \hskip\FOmarginright }% @@ -555,22 +433,18 @@ } \def\FOBoxedBlock#1{% -% Dirk Roorda: I cannot perceive what should be going on here. -% But \hbox{#1} cannot be right, since #1 is a length or even a dimen. -% In the latter case this leads to a TeX error! -% So I have commented out the then-branch. -% \ifdim\@tempdimb=\z@ -% \setbox0=\hbox{#1}\@tempdimb\wd0\relax + \ifdim\@tempdimb=\z@ + \setbox0=\hbox{#1}\@tempdimb\wd0 %\typeout{report \the\CurrentCellWidth}% -% \else - \@tempdimb#1\relax% -% \fi - \advance\@tempdimb by -\FOpaddingstart\relax - \advance\@tempdimb by -\FOpaddingend\relax - \ifx\FOborderstartstyle\att@solid\advance\@tempdimb by -\FOborderstartwidth\relax\fi - \ifx\FOborderendstyle\att@solid\advance\@tempdimb by -\FOborderendwidth\relax\fi - \advance\@tempdimb by -\FOmarginright\relax - \advance\@tempdimb by -\FOmarginleft\relax + \else + \@tempdimb#1% + \fi + \advance\@tempdimb by -\FOpaddingstart + \advance\@tempdimb by -\FOpaddingend + \ifx\FOborderstartstyle\att@solid\advance\@tempdimb by -\FOborderstartwidth\fi + \ifx\FOborderendstyle\att@solid\advance\@tempdimb by -\FOborderendwidth\fi + \advance\@tempdimb by -\FOmarginright + \advance\@tempdimb by -\FOmarginleft \begin{lrbox}{\BlockBox}% \vbox\bgroup \hsize\the\@tempdimb @@ -581,12 +455,11 @@ \ifx\FOwrapoption\att@nowrap\obeylines\fi \parindent\FOtextindent \Quadding - %\strut - \start@strut + \strut } \def\FOEndBoxedBlock{% - \start@strut + \par \color@endgroup \egroup \end{lrbox}% @@ -605,7 +478,7 @@ \hbox{% \kern\FOtempdim \vbox{% - \kern\FOmargintop + \vskip\FOmargintop \vbox{% \ifx\FOborderbeforestyle\att@solid {\color{\FOborderbeforecolor}\hrule\@height\FOborderbeforewidth}% @@ -618,9 +491,9 @@ {\color{\FObackgroundcolor}\vrule\@width\@tempdimc\kern-\@tempdimc}% \fi \vbox{% - \kern\FOpaddingbefore + \vskip\FOpaddingbefore \hbox{\kern\FOpaddingstart\box\BlockBox\kern\FOpaddingend}% - \kern\FOpaddingafter + \vskip\FOpaddingafter }% \ifx\FOborderendstyle\att@solid {\color{\FOborderendcolor}\vrule\@width\FOborderendwidth}\fi @@ -628,7 +501,7 @@ \ifx\FOborderafterstyle\att@solid {\color{\FOborderaftercolor}\hrule\@height\FOborderafterwidth}\fi }% - \kern\FOmarginbottom + \vskip\FOmarginbottom }% \kern\FOmarginright }% @@ -675,7 +548,6 @@ \xdef\FOsrcname{#1}% } \def\NColumns{1} -\gdef\PrevNColumns{1} \def\Pass#1\\{\expandafter\@Pass#1} \def\@Pass#1|#2|#3|#4|{% \columnsep=#1 @@ -713,42 +585,32 @@ \xdef\FOsrcname{#1#2#3#4#5#6#7#8}% \fi \fi} - - -{\catcode`\%=12\relax -\gdef\percentother{%} -} -{\catcode`\%=13\relax -\gdef\defpercentother{\xdef%{\percentother}} -} -{\catcode`\%=12\relax +{\catcode`\%=13 \gdef\percenttest#1%#2#3\@{\ifx#2\relax\def\percentval{#1}\expandafter\@firstoftwo \else \expandafter\@secondoftwo \fi} -\gdef\performpercent#1{\defpercentother\edef\dopercent{\noexpand\percenttest#1\relax%.\noexpand\@}\dopercent} - -\gdef\TablePercentToDimen#1{\performpercent{#1} - {\@tempdimb\percentval pt\relax\divide\@tempdimb by 100 +\gdef\TablePercentToDimen#1{\expandafter\percenttest#1\relax%.\@ + {\@tempdimb\percentval pt\relax\divide\@tempdimb by 100 \edef\SCALE{\strip@pt\@tempdimb}\global\@tempdima=\SCALE\TableWidth}{\global\@tempdima#1} } -\gdef\PercentToDimen#1{\performpercent{#1} +\gdef\PercentToDimen#1{\expandafter\percenttest#1\relax%.\@ {\@tempdimb\percentval pt\relax\divide\@tempdimb by 100 \edef\SCALE{\strip@pt\@tempdimb}\global\@tempdima=\SCALE\hsize}{\global\@tempdima#1} } -\gdef\FOSetGWidth{\performpercent{\FOcontentwidth} +\gdef\FOSetGWidth{\expandafter\percenttest\FOcontentwidth\relax%.\@ {\@tempdima\percentval pt\relax\divide\@tempdima by 100 \edef\WSCALE{\strip@pt\@tempdima}\setkeys{Gin}{width=\WSCALE\Gin@nat@width}}{\setkeys{Gin}{width=\FOcontentwidth}}} -\gdef\FOSetGHeight{\performpercent{\FOcontentheight} +\gdef\FOSetGHeight{\expandafter\percenttest\FOcontentheight\relax%.\@ {\@tempdima\percentval pt\relax\divide\@tempdima by 100 \edef\HSCALE{\strip@pt\@tempdima}\setkeys{Gin}{height=\HSCALE\Gin@nat@height}}{\setkeys{Gin}{height=\FOcontentheight}}} \gdef\PlayWithFSize#1{\@default\f@size pt - \performpercent{#1} + \expandafter\percenttest#1\relax%.\@ {\dimen@0.01\@default \multiply\dimen@\percentval\relax}{\dimen@#1}\edef\FOfontsizefinal{\the\dimen@}} -\gdef\PlayWithShift{performpercent{\FOverticalalign} +\gdef\PlayWithShift{\expandafter\percenttest\FOverticalalign\relax%.\@ {\dimen@0.01\baselineskip\multiply\dimen@\percentval\relax}{\dimen@\FOverticalalign}} } \def\strip@pt@and@otherjunk#1{\expandafter\rem@ptetc\the#1!} @@ -771,19 +633,15 @@ } \catcode`\/=12 % -\def\nocontentbox{\vbox to \z@{}} - \def\BlankPage{% + \def\@thehead{\csname\FirstHead\endcsname}% + \def\@thefoot{\csname\FirstTail\endcsname}% + \let\@themargin\oddsidemargin + \def\headheight{\FirstHeadExtent}% + \def\tailheight{\FirstTailExtent}% + \mark{}% \DEBUG{Blank Page \the\c@page}% -% \def\@thehead{\csname\FirstHead\endcsname}% -% \def\@thefoot{\csname\FirstTail\endcsname}% -% \let\@themargin\oddsidemargin -% \def\headheight{\FirstHeadExtent}% -% \def\tailheight{\FirstTailExtent}% -% \mark{}% - \global\BlankPagetrue - \nocontentbox - \newpage + \hbox{} } %----------------------------------------------- % longtable @@ -856,12 +714,10 @@ \endgroup } -\def\oline#1{$\overline{\mbox{#1}}$} \def\TableHeader{} \def\DECO@{\@firstofone} \def\DECO@blink{\uwave} \def\DECO@underline{\uline} -\def\DECO@overline{\oline} \expandafter\def\csname DECO@line-through\endcsname{\sout} \def\QuaddingStart{% \ifx\FOtextalignlast\att@relative @@ -885,19 +741,20 @@ \fi }% % page number compression (by David Carlisle) -\def\fopagecitation{\csname r@\FOrefid\endcsname} + +\def\fopagecitation{\pageref{\FOrefid}} %was \hyperlink{\FOrefid}{\pageref{\FOrefid}}} \newcount\sortcount \newtoks\sorttoks \def\fosortpagecitation{% \setbox0\hbox{\global\sortcount=0\expandafter\expandafter\expandafter \@secondoffive\csname r@\FOrefid\endcsname - \relax\relax\relax\relax\relax}% + \relax\relax\relax\relax\relax} \let\@elt\fosort@elt \global\sorttoks\expandafter{\expandafter}\the\sorttoks \ifnum\sortcount<\maxdimen \global\sorttoks\expandafter{% - \the\expandafter\sorttoks\expandafter\@elt\expandafter{\the\sortcount}}% + \the\expandafter\sorttoks\expandafter\@elt\expandafter{\the\sortcount}} \fi } @@ -914,19 +771,18 @@ } \gdef\focompress@elt#1{% - \global\advance\sortcount\@ne - \ifnum#1=\sortcount\relax - \edef\foheld{#1}% - \else - \ifx\foheld\relax - \else - \FOrangechar - \fi - \foheld\fosep#1\relax - \let\foheld\relax - \fi - \global\sortcount#1\relax - \def\fosep{, }% + \global\advance\sortcount\@ne + \ifnum#1=\sortcount + \ifx\foheld\relax + \edef\foheld{#1}% + \else + \def\foheld{\textendash#1}% + \fi + \else + \foheld\fosep#1 + \fi + \global\sortcount#1 + \def\fosep{, }% } % headers @@ -987,32 +843,6 @@ \def\FOgeneratePage#1#2\@null{\csname Format-#1\endcsname{\c@page}#2} -\def\endtrivlist{% - \if@inlabel - \leavevmode - \global \@inlabelfalse - \fi - \if@newlist - \@noitemerr - \global \@newlistfalse - \fi - \ifhmode\unskip \par\fi - \if@noparlist \else - \ifInInsertion\else - \ifdim\lastskip >\z@ - \@tempskipa\lastskip \vskip -\lastskip - \advance\@tempskipa\parskip \advance\@tempskipa -\@outerparskip - \vskip\@tempskipa - \fi - \fi - \@endparenv - \fi -} - -\def\@endparenv{% - \ifInInsertion\else\addpenalty\@endparpenalty\addvspace\@topsepadd\@endpetrue\fi -} - \def\@item[#1]{% \if@noparitem \@donoparitem @@ -1023,22 +853,19 @@ \ifhmode \unskip\unskip \par \fi - \ifInInsertion - \else - \if@newlist + \if@newlist % removed this test 2000/11/05. always put in topsep. -% \if@nobreak -% \@nbitem -% \else - \addpenalty\@beginparpenalty - \addvspace\@topsep - \addvspace{-\parskip}% -% \fi - \else - \addpenalty\@itempenalty - \addvspace\itemsep - \fi - \fi +% \if@nobreak +% \@nbitem +% \else + \addpenalty\@beginparpenalty + \addvspace\@topsep + \addvspace{-\parskip}% +% \fi + \else + \addpenalty\@itempenalty + \addvspace\itemsep + \fi \global\@inlabeltrue \fi \global\everypar{% @@ -1050,7 +877,7 @@ \ifvoid\z@ \kern-\itemindent \fi}% - \box\@labels\FOlabel + \box\@labels \penalty\z@ \fi \if@nobreak @@ -1059,8 +886,7 @@ \else \clubpenalty \@clubpenalty \global\everypar{}% - \fi - }% + \fi}% \if@noitemarg \@noitemargfalse \if@nmbrlist @@ -1122,85 +948,59 @@ } -%\tracingpages3\relax % vertical spacing \newskip\FOafterskip \def\FOvspaceafter{% - \ifFOinOutput - \else - \ifnum\FOTableNesting>0 - \else - \ifx\@empty\FOspaceafter - \@tempdima\FOspaceafteroptimum - \advance\@tempdima by -\FOspaceafterminimum - \@tempdimb\FOspaceafteroptimum - \advance\@tempdimb by \FOspaceaftermaximum - \FOafterskip\FOspaceafteroptimum plus \@tempdimb minus \@tempdima - \else - \FOafterskip\FOspaceafter - \fi - \@tempswafalse - \ifx\FOkeepwithnext\att@always\@tempswatrue\fi - \ifx\FOkeepwithnextColumn\att@always\@tempswatrue\fi - \ifx\FOkeepwithnextPage\att@always\@tempswatrue\fi - \addvspace\FOafterskip - \if@tempswa \addpenalty{9996}\fi - \fi - \fi +\ifFOinOutput +\else + \ifnum\FOTableNesting>0 + \else + \ifx\@empty\FOspaceafter + \@tempdima\FOspaceafteroptimum + \advance\@tempdima by -\FOspaceafterminimum + \@tempdimb\FOspaceafteroptimum + \advance\@tempdimb by \FOspaceaftermaximum + \FOafterskip\FOspaceafteroptimum plus \@tempdimb minus \@tempdima + \else + \FOafterskip\FOspaceafter + \fi + \@tempswafalse + \ifx\FOkeepwithnext\att@always\@tempswatrue\fi + \ifx\FOkeepwithnextColumn\att@always\@tempswatrue\fi + \ifx\FOkeepwithnextPage\att@always\@tempswatrue\fi + \if@tempswa\addpenalty{\@M}\fi + \addvspace\FOafterskip + \fi +\fi } -\@secpenalty = -300 \def\FOvspacebefore{% - \ifFOinOutput - \else - \ifx\@empty\FOspacebefore - \@tempdima\FOspacebeforeoptimum - \advance\@tempdima by -\FOspacebeforeminimum - \@tempdimb\FOspacebeforeoptimum - \advance\@tempdimb by \FOspacebeforemaximum - \@tempskipa\FOspacebeforeoptimum plus \@tempdimb minus \@tempdima - \else - \@tempskipa\FOspacebefore - \fi - %\typeout{SPACE BEFORE \the\inputlineno: \the\@tempskipa, \FOspacebeforeminimum/\FOspacebeforemaximum/\FOspacebeforeoptimum}% - \ifnum\FOTableNesting>0 - \rule{\z@}{\@tempskipa}% - \else - \@tempswafalse - \ifx\FOkeepwithnext\att@always\@tempswatrue\fi - \ifx\FOkeepwithnextColumn\att@always\@tempswatrue\fi - \ifx\FOkeepwithnextPage\att@always\@tempswatrue\fi - \@tempskipb\f@baselineskip\relax\@tempskipb3\@tempskipb\relax - %\ifx\@empty\FOspacebefore\else - %\if@tempswa\vskip0pt plus \@tempskipb - %\addpenalty\@secpenalty\vskip-\lastskip\fi\fi - \if@tempswa\addpenalty\@secpenalty\fi - \addvspace\@tempskipa - \fi - \fi - \def\FOspacebefore{\z@}% +\ifFOinOutput +\else + \ifx\@empty\FOspacebefore + \@tempdima\FOspacebeforeoptimum + \advance\@tempdima by -\FOspacebeforeminimum + \@tempdimb\FOspacebeforeoptimum + \advance\@tempdimb by \FOspacebeforemaximum + \@tempskipa\FOspacebeforeoptimum plus \@tempdimb minus \@tempdima + \else + \@tempskipa\FOspacebefore + \fi +%\typeout{SPACE BEFORE \the\inputlineno: \the\@tempskipa, \FOspacebeforeminimum/\FOspacebeforemaximum/\FOspacebeforeoptimum}% + \ifnum\FOTableNesting>0 + \rule{\z@}{\@tempskipa}% + \else + \@tempswafalse + \ifx\FOkeepwithnext\att@always\@tempswatrue\fi + \ifx\FOkeepwithnextColumn\att@always\@tempswatrue\fi + \ifx\FOkeepwithnextPage\att@always\@tempswatrue\fi + \if@tempswa\addpenalty\@secpenalty\fi + \addvspace\@tempskipa + \fi +\fi +\def\FOspacebefore{\z@}% } -\def\addpenalty#1{% - \ifvmode - \if@minipage - \else - \if@nobreak - \else - \ifdim\lastskip=\z@ - \penalty#1\relax - \else - \@tempskipb\lastskip - \vskip -\lastskip - \penalty#1% - \vskip\@tempskipb - \fi - \fi - \fi - \else - \@noitemerr - \fi -} % lets do some setup % setup \paperwidth211mm @@ -1219,8 +1019,8 @@ \relpenalty=500 \tolerance=1000 \vbadness=3000 -\widowpenalty=0 -\clubpenalty=0 +\widowpenalty=8000 +\clubpenalty=8000 \@twosidetrue \fboxsep0pt \setcounter{topnumber}{5} @@ -1249,108 +1049,82 @@ %\catcode`\^^M\active\gdef\@resetactivechars{\def^^M{x}}\endgroup \def\@outputpage{% - \begingroup % the \endgroup is put in by \aftergroup - \let\protect\noexpand +\begingroup % the \endgroup is put in by \aftergroup + \let \protect \noexpand % \@resetactivechars - \@parboxrestore - \shipout\vbox{% - \set@typeset@protect - \aftergroup\endgroup - \aftergroup\set@typeset@protect + \@parboxrestore + \shipout \vbox{% + \set@typeset@protect + \aftergroup \endgroup + \aftergroup \set@typeset@protect % correct? or just restore by ending % the group? - \if@specialpage -% \typeout{PAGE=FIRST \the\c@page}% - \global\@specialpagefalse - \def\@thehead{\csname\FirstHead\endcsname}% - \def\@thefoot{\csname\FirstTail\endcsname}% - \let\@themargin\oddsidemargin - \def\headheight{\FirstHeadExtent}% - \def\tailheight{\FirstTailExtent}% - \else - \ifBlankPage -%\typeout{PAGE=BLANK \the\c@page}% - \global\BlankPagefalse - \def\@thehead{\csname\BlankHead\endcsname}% - \def\@thefoot{\csname\BlankTail\endcsname}% - \let\@themargin\oddsidemargin - \def\headheight{\BlankHeadExtent}% - \def\tailheight{\BlankTailExtent}% - \else - \ifodd\count\z@ -% \typeout{PAGE=ODD \the\c@page}% - \def\@thehead{\csname\OddHead\endcsname}% - \def\@thefoot{\csname\OddTail\endcsname}% - \let\@themargin\oddsidemargin - \def\headheight{\OddHeadExtent}% - \def\tailheight{\OddTailExtent}% - \else -% \typeout{PAGE=EVEN \the\c@page}% - \def\@thehead{\csname\EvenHead\endcsname}% - \def\@thefoot{\csname\EvenTail\endcsname}% - \let\@themargin\evensidemargin - \def\headheight{\EvenHeadExtent}% - \def\tailheight{\EvenTailExtent}% - \fi - \fi - \fi - \@tempdima\textwidth - \advance\@tempdima by -\FOheadindent - \reset@font - \normalsize - \normalsfcodes - \let\label\@gobble - \let\index\@gobble - \let\glossary\@gobble - %\baselineskip\z@skip \lineskip\z@skip \lineskiplimit\z@ - \offinterlineskip - \@begindvi - \vskip \topmargin - \vskip -\InnerTopMargin - \moveright\@themargin \vbox {% - \setbox\@tempboxa \vbox to\z@{% - \color@hbox - \normalcolor - \hb@xt@\textwidth{\hfill\llap{\hb@xt@\@tempdima{\@thehead}}}% - \color@endbox - \vss - }% - \dp\@tempboxa \z@ - \box\@tempboxa - \vskip\headsep - \vskip\InnerTopMargin - \box\@outputbox - \baselineskip\footskip - \vskip\bottommargin - \vskip-\tailheight - \@tempdima\textwidth - \advance\@tempdima by -\FOheadindent - \setbox\@tempboxa \vbox to\tailheight{% - \color@hbox - \normalcolor - \hb@xt@\textwidth{\hfill\llap{\hb@xt@\@tempdima{\@thefoot}}}% - \color@endbox - \vfil - }% - \dp\@tempboxa \z@ - \box\@tempboxa + \if@specialpage + \global\@specialpagefalse + \def\@thehead{\csname\FirstHead\endcsname}% + \def\@thefoot{\csname\FirstTail\endcsname}% + \let\@themargin\oddsidemargin + \def\headheight{\FirstHeadExtent}% + \def\tailheight{\FirstTailExtent}% + \else + \ifodd\count\z@ + \def\@thehead{\csname\OddHead\endcsname}% + \def\@thefoot{\csname\OddTail\endcsname}% + \let\@themargin\oddsidemargin + \def\headheight{\OddHeadExtent}% + \def\tailheight{\OddTailExtent}% + \else + \def\@thehead{\csname\EvenHead\endcsname}% + \def\@thefoot{\csname\EvenTail\endcsname}% + \let\@themargin\evensidemargin + \def\headheight{\EvenHeadExtent}% + \def\tailheight{\EvenTailExtent}% + \fi + \fi + \@tempdima\textwidth + \advance\@tempdima by -\FOheadindent + \reset@font + \normalsize + \normalsfcodes + \let\label\@gobble + \let\index\@gobble + \let\glossary\@gobble + \baselineskip\z@skip \lineskip\z@skip \lineskiplimit\z@ + \@begindvi + \vskip \topmargin + \moveright\@themargin \vbox {% + \setbox\@tempboxa \vbox to\headheight{% + \color@hbox + \normalcolor + \hb@xt@\textwidth{\hfill\llap{\hb@xt@\@tempdima{\@thehead}}}% + \color@endbox + \vfil }% + \dp\@tempboxa \z@ + \box\@tempboxa + \vskip \headsep + \box\@outputbox + \baselineskip \footskip + \vskip \bottommargin + \@tempdima\textwidth + \advance\@tempdima by -\FOheadindent + \setbox\@tempboxa \vbox to\tailheight{% + \color@hbox + \normalcolor + \hb@xt@\textwidth{\hfill\llap{\hb@xt@\@tempdima{\@thefoot}}}% + \color@endbox + \vfil }% - \global \@colht \textheight - \stepcounter{page}% - \ifForcePageSetup - \global\advance\SimplePMRefs1\relax - \DEBUG{Start page \the\SimplePMRefs\space of page sequence, using layout \CurrentPageMaster, at page \the\c@page}% - \setaccordingtomaster - \ifnum\NColumns>1\relax - \refreshmulticols % this is defined in nomulticols.sty - \fi - \else - \DEBUG{Skipping page set up at page \the\c@page}% - \fi - \let\firstmark\botmark + \dp\@tempboxa \z@ + \box\@tempboxa + }% + }% + \global \@colht \textheight + \stepcounter{page}% + \let\firstmark\botmark } +%%%% \def\FO@character#1{% \ifx\FOverticalalign\att@baseline #1% @@ -1368,52 +1142,25 @@ \fi } \def\FO@inlinesequence#1{% - \FOSetFont{normal}% - \ifx\FOletterspacing\att@normal - \def\pre@sequence{{#1}}% - \else - \def\pre@sequence{\@ifundefined{thisso}{\sodef\thisso{}{\FOletterspacing}{.4em}{.5em}}{}{\thisso{#1}}}% - \fi - \ifx\FOverticalalign\att@baseline - \csname DECO@\FOtextdecoration\endcsname{\FOlabel\pre@sequence}% - \else - \ifx\FOverticalalign\att@super - \textsuperscript{\csname DECO@\FOtextdecoration\endcsname{\FOlabel\pre@sequence}}% - \else - \ifx\FOverticalalign\att@sub - \textsubscript{\csname DECO@\FOtextdecoration\endcsname{\FOlabel\pre@sequence}}% - \else - \PlayWithShift - \raisebox{\dimen@}{\csname DECO@\FOtextdecoration\endcsname{\FOlabel\pre@sequence}}% - \fi - \fi - \fi -} -\def\interpretwidth{% - \ifx\FOborderwidth\att@thin\def\FOborderwidth{0.4pt}\fi - \ifx\FOborderwidth\att@medium\def\FOborderwidth{0.8pt}\fi - \ifx\FOborderwidth\att@thick\def\FOborderwidth{1.2pt}\fi - \ifx\FOborderbeforewidth\att@thin\def\FOborderbeforewidth{0.4pt}\fi - \ifx\FOborderbeforewidth\att@medium\def\FOborderbeforewidth{0.8pt}\fi - \ifx\FOborderbeforewidth\att@thick\def\FOborderbeforewidth{1.2pt}\fi - \ifx\FOborderafterwidth\att@thin\def\FOborderafterwidth{0.4pt}\fi - \ifx\FOborderafterwidth\att@medium\def\FOborderafterwidth{0.8pt}\fi - \ifx\FOborderafterwidth\att@thick\def\FOborderafterwidth{1.2pt}\fi - \ifx\FOborderstartwidth\att@thin\def\FOborderstartwidth{0.4pt}\fi - \ifx\FOborderstartwidth\att@medium\def\FOborderstartwidth{0.8pt}\fi - \ifx\FOborderstartwidth\att@thick\def\FOborderstartwidth{1.2pt}\fi - \ifx\FOborderendwidth\att@thin\def\FOborderendwidth{0.4pt}\fi - \ifx\FOborderendwidth\att@medium\def\FOborderendwidth{0.8pt}\fi - \ifx\FOborderendwidth\att@thick\def\FOborderendwidth{1.2pt}\fi + \FOSetFont{normal}% +\ifx\FOverticalalign\att@baseline + \csname DECO@\FOtextdecoration\endcsname{\FOlabel#1}% +\else + \ifx\FOverticalalign\att@super + \textsuperscript{\csname DECO@\FOtextdecoration\endcsname{\FOlabel#1}}% + \else + \ifx\FOverticalalign\att@sub + \textsubscript{\csname DECO@\FOtextdecoration\endcsname{\FOlabel#1}}% + \else + \PlayWithShift + \raisebox{\dimen@}{\csname DECO@\FOtextdecoration\endcsname{\FOlabel#1}}% + \fi + \fi +\fi } - \def\FOboxedsequence#1{% \FOSetFont{normal}% -\ifx\FOborderwidth\@empty -\else - \interpretwidth - \fboxrule\FOborderwidth -\fi +\ifx\FOborderwidth\@empty\else\fboxrule\FOborderwidth\fi \ifx\FOverticalalign\att@baseline \fbox{\csname DECO@\FOtextdecoration\endcsname{\FOlabel#1}}% \else @@ -1453,117 +1200,6 @@ \def\FOfontvariant{#4}% \def\FOfontweight{#5}% \def\FOfontstyle{#3}#8\global\FOinOutputfalse}}}% - \ifx\FOflowname\att@xsl@footnote@separator\relax - \xdef\footnoterulepre{Static:#9}% - \global\footnotesep\z@\relax - \setbox\@tempboxa\vbox{\csname\footnoterulepre\endcsname}% - \@tempdima=\z@\relax - \advance\@tempdima\ht\@tempboxa\relax - \advance\@tempdima\dp\@tempboxa\relax - \global\skip\footins\@tempdima\relax - \gdef\footnoterule{\vfill\vbox to\z@{\vss\csname\footnoterulepre\endcsname}}% - \fi -} - -\def\setaccordingtomaster{% - \global\@specialpagetrue - \@ifundefined{Atomic:\CurrentPageMaster} - { - \@ifundefined{Lead:\the\SimplePMRefs:\CurrentPageMaster} - { - \ifnum\SimplePMRefs>1\relax\global\@specialpagefalse\fi - \@ifundefined{First:\CurrentPageMaster} - { - \ifx\FOinitialpagenumber\att@auto - \ifodd\c@page - \DEBUG{Master \CurrentPageMaster: no first page, use odd page} - \xdef\PFirst{\csname Odd:\CurrentPageMaster\endcsname} - \else - \DEBUG{Master \CurrentPageMaster: no first page, use even page} - \@ifundefined{Even:\CurrentPageMaster} - {\xdef\PFirst{\csname Odd:\CurrentPageMaster\endcsname}} - {\xdef\PFirst{\csname Even:\CurrentPageMaster\endcsname}} - \fi - \else - \ifx\FOinitialpagenumber\att@autoeven - \@ifundefined{Even:\CurrentPageMaster} - {\xdef\PFirst{\csname Odd:\CurrentPageMaster\endcsname}} - {\xdef\PFirst{\csname Even:\CurrentPageMaster\endcsname}} - \else - \ifx\FOinitialpagenumber\att@autoodd - \xdef\PFirst{\csname Odd:\CurrentPageMaster\endcsname} - \else - \ifodd\FOinitialpagenumber - \xdef\PFirst{\csname Odd:\CurrentPageMaster\endcsname} - \else - \@ifundefined{Even:\CurrentPageMaster} - {\xdef\PFirst{\csname Odd:\CurrentPageMaster\endcsname}} - {\xdef\PFirst{\csname Even:\CurrentPageMaster\endcsname}} - \fi - \fi - \fi - \fi - } - { - \xdef\PFirst{\csname First:\CurrentPageMaster\endcsname} - } - \@ifundefined{Blank:\CurrentPageMaster} - {\xdef\PBlank{\csname Odd:\CurrentPageMaster\endcsname}} - {\xdef\PBlank{\csname Blank:\CurrentPageMaster\endcsname}} - \@ifundefined{Even:\CurrentPageMaster} - {\xdef\PEven{\csname Odd:\CurrentPageMaster\endcsname}} - {\xdef\PEven{\csname Even:\CurrentPageMaster\endcsname}} - \xdef\POdd{\csname Odd:\CurrentPageMaster\endcsname} - } - { - \xdef\PFirst{\csname Lead:\the\SimplePMRefs:\CurrentPageMaster\endcsname} - \global\let\POdd\PFirst - \global\let\PEven\PFirst - \global\let\PBlank\PFirst - } - } - { - \global\let\PFirst\CurrentPageMaster - \global\let\PBlank\CurrentPageMaster - \global\let\POdd\CurrentPageMaster - \global\let\PEven\CurrentPageMaster - } - \DEBUG{ first page master is [\PFirst]} - \DEBUG{ odd page master is [\POdd]} - \DEBUG{ even page master is [\PEven]} - \DEBUG{ blank page master is [\PBlank]} - \expandafter\Pass\csname\POdd:xsl-region-body\endcsname\\ - \csname Atomic:\POdd\endcsname - \global\oddsidemargin\MasterLeftMargin - \global\evensidemargin\MasterLeftMargin - \global\advance\evensidemargin by \SpecialOffset - \global\advance\oddsidemargin by \SpecialOffset - \@ifundefined{Atomic:\PEven} - { - \DEBUG{no master for Atomic:\PEven} - } - { - \csname Atomic:\PEven\endcsname - \global\evensidemargin\MasterLeftMargin - \global\advance\evensidemargin by \SpecialOffset - } - \xdef\EvenHeadExtent{\csname\PEven:before-extent\endcsname} - \xdef\EvenHead{Static:\csname\PEven:before\endcsname} - \xdef\EvenTailExtent{\csname\PEven:after-extent\endcsname} - \xdef\EvenTail{Static:\csname\PEven:after\endcsname} - \xdef\FirstHeadExtent{\csname\PFirst:before-extent\endcsname} - \xdef\FirstHead{Static:\csname\PFirst:before\endcsname} - \xdef\FirstTailExtent{\csname\PFirst:after-extent\endcsname} - \xdef\FirstTail{Static:\csname\PFirst:after\endcsname} - \xdef\OddHeadExtent{\csname\POdd:before-extent\endcsname} - \xdef\OddHead{Static:\csname\POdd:before\endcsname} - \xdef\OddTailExtent{\csname\POdd:after-extent\endcsname} - \xdef\OddTail{Static:\csname\POdd:after\endcsname} - \xdef\BlankHeadExtent{\csname\PBlank:before-extent\endcsname} - \xdef\BlankHead{Static:\csname\PBlank:before\endcsname} - \xdef\BlankTailExtent{\csname\PBlank:after-extent\endcsname} - \xdef\BlankTail{Static:\csname\PBlank:after\endcsname} - \FOSetPage } \let\olditem\item @@ -1573,7 +1209,7 @@ % \typeout{Hypertext label \FOid, at \the\inputlineno}% \@bsphack \protected@write\@mainaux{}% - {\string\newlabel{\FOid}{{}{\noexpand\FOgeneratePage\FOformat\noexpand\@null}{}{}{}}}% + {\string\newlabel{\FOid}{{}{\expandafter\FOgeneratePage\FOformat\@null}{}{\FOid}{}}}% \@esphack \hyper@@anchor{\FOid}{\relax}% \global\let\FOid\@empty @@ -1593,10 +1229,9 @@ \itemsep\FOspacebefore \fi \itemindent=\FOstartindent - \PercentToDimen{\FOprovisionaldistancebetweenstarts}% - \leftmargin=\@tempdima\relax + \leftmargin=\FOprovisionaldistancebetweenstarts \rightmargin=\FOmarginright - \labelwidth=\@tempdima\relax + \labelwidth=\FOprovisionaldistancebetweenstarts \advance\labelwidth by -\FOprovisionallabelseparation \expandafter\csname List\FOtextalign\endcsname %\typeout{List at \the\inputlineno: labelwidth: \the\labelwidth, @@ -1607,106 +1242,72 @@ \def\FOOutputBlock{% \FOSetFont{output}% + \ifFOBlockGrab + \FOBoxedBlock{\textwidth}% + \fi \ifx\FOtextalignlast\att@relative \csname startQ@\FOtextalign\endcsname -% \csname Q@\FOtextalign\endcsname + \csname Q@\FOtextalign\endcsname \else \csname startQ@\FOtextalignlast\endcsname -% \csname Q@\FOtextalignlast\endcsname - \fi -% \Quadding - \ifFOBlockGrab - \FOBoxedBlock{\textwidth}% + \csname Q@\FOtextalignlast\endcsname \fi } -\def\list#1#2{% - \ifnum \@listdepth >5\relax - \@toodeep - \else - \global\advance\@listdepth\@ne - \fi - \rightmargin\z@ - \listparindent\z@ - \itemindent\z@ - \csname @list\romannumeral\the\@listdepth\endcsname - \def\@itemlabel{#1}% - \let\makelabel\@mklab - \@nmbrlistfalse - #2\relax - \@trivlist - \parskip\parsep - \parindent\listparindent - \global\advance\linewidth -\rightmargin - \global\advance\linewidth -\leftmargin - \advance\@totalleftmargin \leftmargin - \parshape \@ne \@totalleftmargin \linewidth - \ignorespaces} - \def\FONormalBlock{% - \ifnum\FOTableNesting>0 - \ifx\FOtextalign\att@centered - \centering - \fi - \FOSetFont{normalblock}% -% \vrule height \f@baselineskip depth \z@ width \z@\relax - \else - \ifnum\FOinList>0 - \ifFOListInnerPar - \unskip\par - \FOvspacebefore - \fi - \ifx\FOwhitespace\att@pre\obeyspaces\obeylines\fi - \ifx\FOwhitespacecollapse\att@false\obeyspaces\fi - \ifx\FOwrapoption\att@nowrap\obeylines\fi - \ifInInsertion\start@strut\fi - \else - \ifx\FObreakbefore\att@page - \let\tempID\FOid -% \penalty -\@M - \newpage - \let\FOid\tempID - \else - \ifx\FObreakbefore\att@oddpage - \let\tempID\FOid -% \penalty -\@M - \newpage - \ifodd\c@page\else\BlankPage\fi - \let\FOid\tempID - \else - \ifx\FObreakbefore\att@evenpage - \let\tempID\FOid -% \penalty -\@M - \newpage - \ifodd\c@page\BlankPage\fi - \let\FOid\tempID - \fi - \fi - \fi - \par - \Quadding - \ifFOBlockGrab - \FOBoxedBlock{\linewidth}% - \else - \FOBorderTop - \ifdim\FOpaddingbefore>\z@ - \vskip\FOpaddingbefore - \fi - \FOvspacebefore - \parindent\FOtextindent - \advance\leftskip by \FOpaddingstart - \advance\leftskip by \FOmarginleft - \advance\rightskip by \FOpaddingend - \advance\rightskip by \FOmarginright - \fi -% \par - \ifx\FOwhitespace\att@pre\obeyspaces\obeylines\fi - \ifx\FOwhitespacecollapse\att@false\obeyspaces\fi - \ifx\FOwrapoption\att@nowrap\obeylines\fi - \FOlabel - \fi - \ifx\XML@parent\FOFootnoteBody\else\FOSetFont{normal}\fi + \let\@x\relax + \ifnum\FOTableNesting>0 + \ifx\FOtextalign\att@centered + \centering + \fi + \let\@x\relax + \FOSetFont{normalblock}% + \vrule height \f@baselineskip depth \z@ width \z@ + \else + \ifnum\FOinList>0 + \FOlabel + \ifFOListInnerPar\par\FOvspacebefore\fi + \ifx\FOwhitespace\att@pre\obeyspaces\obeylines\fi + \ifx\FOwhitespacecollapse\att@false\obeyspaces\fi + \ifx\FOwrapoption\att@nowrap\obeylines\fi + \else + \ifx\FObreakbefore\att@page + \let\tempID\FOid + \penalty -\@M + \let\FOid\tempID + \else + \ifx\FObreakbefore\att@oddpage + \let\tempID\FOid + \penalty -\@M + \ifodd\c@page\else\BlankPage\newpage\fi + \let\FOid\tempID + \fi + \fi + \par + \FOlabel + \Quadding + \ifFOBlockGrab + \FOBoxedBlock{\linewidth}% + \else + \FOBorderTop + \ifdim\FOpaddingbefore>\z@ + \vskip\FOpaddingbefore \fi + \FOvspacebefore + \parindent\FOtextindent + \advance\leftskip by \FOpaddingstart + \advance\leftskip by \FOmarginleft + \advance\rightskip by \FOpaddingend + \advance\rightskip by \FOmarginright + \fi +% \par + \ifx\FOwhitespace\att@pre\obeyspaces\obeylines\fi + \ifx\FOwhitespacecollapse\att@false\obeyspaces\fi + \ifx\FOwrapoption\att@nowrap\obeylines\fi + \fi + \FOSetFont{normal}% + \fi +\@x } \def\FOEndOutputBlock{% @@ -1724,8 +1325,7 @@ \ifx\XML@parent\FOListItemLabel \else \ifnum\FOinList>0 - \ifInInsertion\start@strut\fi - \ifFOListInnerPar\unskip\par\fi + \ifFOListInnerPar\par\fi \else \ifnum\FOTableNesting>0 \else @@ -1735,7 +1335,6 @@ \fi } - \def\FOEndBlockTwo{% \par \ifFOBlockGrab @@ -1747,27 +1346,22 @@ \FOBorderBottom \fi \ifx\FObreakafter\att@page - \clearpage -% \penalty -\@M + \penalty -\@M \else \ifx\FObreakafter\att@oddpage - \ifodd\c@page\cleardoublepage\else\clearpage\fi - \else - \ifx\FObreakafter\att@evenpage - \ifodd\c@page\clearpage\else\cleardoublepage\fi - \fi + \cleardoublepage \fi \fi \@tempswafalse \ifx\FOkeepwithnext\att@always\@tempswatrue\fi \ifx\FOkeepwithnextColumn\att@always\@tempswatrue\fi \ifx\FOkeepwithnextPage\att@always\@tempswatrue\fi - \if@tempswa\addpenalty{9993}\fi + \if@tempswa\nobreak\fi \FOvspaceafter -% \if@tempswa\@afterheading\fi + \if@tempswa\@afterheading\fi } -% \FOStartGrab is never called, so it seems + \def\FOStartGrab#1{% \@tempdima#1 \XFOstartindent\FOstartindent @@ -1805,7 +1399,6 @@ \vskip\FOpaddingbefore \parindent\FOtextindent\leftskip\z@\rightskip\z@ } -% \FOEndGrab is never called, so it seems \def\FOEndGrab#1{% \vspace*{\FOpaddingafter}% \end{minipage}% @@ -1818,7 +1411,6 @@ \advance\@tempdima by \FOborderbeforewidth \advance\@tempdima by \FOborderafterwidth \ifx\FOborderstyle\att@solid - \interpretwidth \ifx\FObackgroundcolor\att@transparent \fboxrule\FOborderwidth \fboxsep\FOpadding @@ -1910,88 +1502,17 @@ \expandafter\let\csname p@footnote\endcsname\relax \@footnotetext{\FOlabel#2}} -\def\start@strut{% - \vrule height \ht\strutbox depth \dp\strutbox width \z@\relax -} - \def\FOplainfootmark#1{#1} - -\newtoks\sav@everypar -\newbox\sav@labels - -%\showboxbreadth10 -%\showboxdepth10 -\gdef \@makecol {% - \ifvoid\footins - \setbox\@outputbox \box\@cclv - \else -% \showbox\footins - \setbox\@outputbox \vbox {% - \boxmaxdepth \@maxdepth - \@tempdima\dp\@cclv - \unvbox \@cclv - \vskip \skip\footins - \color@begingroup - \normalcolor - \footnoterule - \unvbox \footins - \color@endgroup - }% - \fi - \xdef\@freelist{\@freelist\@midlist}% - \global \let \@midlist \@empty - \@combinefloats - \ifvbox\@kludgeins - \@makespecialcolbox - \else - \setbox\@outputbox \vbox to\@colht {% - \@texttop - \dimen@ \dp\@outputbox - \unvbox \@outputbox - \vskip -\dimen@ - \@textbottom - }% - \fi - \global \maxdepth \@maxdepth +\long\def\FOplainfoottext#1{\insert\footins{% + \reset@font\footnotesize + \interlinepenalty\interfootnotelinepenalty + \splittopskip\footnotesep + \splitmaxdepth \dp\strutbox \floatingpenalty \@MM + \hsize\columnwidth \@parboxrestore + \color@begingroup + #1\unskip\ifhmode\nobreak\fi\vskip\lineskip + \color@endgroup}% } - -\long\def\FOplainfoottext#1{% - \insert\footins{\relax - \reset@font\footnotesize - \FORestoreFontSize - \size@update - \interlinepenalty\interfootnotelinepenalty - \splittopskip0pt\relax - \splitmaxdepth \dp\strutbox \floatingpenalty \@MM - \hsize\columnwidth\@parboxrestore - \color@begingroup\InInsertiontrue - \xdef\Sav@FOListBlocks{\the\FOListBlocks}\FOListBlocks0\relax - \global\let\sav@if@inlabel\if@inlabel - \global\let\sav@if@nobreak\if@nobreak - \global\let\sav@if@newlist\if@newlist - \global\setbox\sav@labels\box\@labels - \expandafter\global\expandafter\sav@everypar\expandafter{\the\everypar}\global\everypar{}\relax - \FOinList0\relax - \FOListBodyfalse - #1\ifhmode\nobreak\fi - \global\FOListBlocks\Sav@FOListBlocks\relax - \global\let\if@inlabel\sav@if@inlabel - \global\let\if@nobreak\sav@if@nobreak - \global\let\if@newlist\sav@if@newlist - \global\setbox\@labels\box\sav@labels - \expandafter\global\expandafter\everypar\expandafter{\the\sav@everypar}\relax - %\vskip\lineskip - \color@endgroup}% -} -\let\FOfoottext\FOplainfoottext - -\def\FOboxedfoottext#1{ - \edef\boxedfootnotetext{\the\BoxedFootnotes\noexpand\FOplainfoottext}% - \global\BoxedFootnotes=\expandafter{\boxedfootnotetext{#1}}% -} - -\def\FOnofoottext#1{} - \ColSpecs={}% \NCols0 \RowCount0 @@ -2038,15 +1559,6 @@ %} \edef\LastLanguage{\newL}} -\def\FoTeXSetSpacingStyle{% - \ifx\FoTeXSpacingStyle\att@french - \frenchspacing - \typeout{INFO: Using french-spacing in document}% - \else - \typeout{INFO: Using normal, i.e. nonfrench-spacing in document}% - %\nonfrenchspacing - \fi -} \def\FOSetHyphenation{% \ifx\FOhyphenate\att@true \LoadLanguage{\FOlanguage}% @@ -2061,8 +1573,8 @@ \csname Weight@\FOfontweight\endcsname}% \ifx\LaTeXshape\@empty\def\LaTeXshape{m}\fi \edef\fFamName{\FOfontfamily}% -\DEBUG{#1: \FOfontweight, \FOfontstyle, - \FOfontsize, \FOtextalign, \LaTeXshape}% +%\typeout{#1 At \the\inputlineno, \FOfontweight, \FOfontstyle, +% \FOfontsize, \FOtextalign, \LaTeXshape}% \edef\f@series{\LaTeXshape}% \edef\f@shape{\csname Posture@\FOfontstyle\endcsname}% \ifx\FOfontvariant\att@smallcaps @@ -2120,69 +1632,43 @@ \set@fontsize\baselinestretch{\FOfontsizefinal}{\FOlineheight}% \fi } -\def\FOSaveFontSize{% - \computeFOfontsize - \ifx\FOlineheight\att@normal - \@tempdima\FOfontsizefinal - \multiply\@tempdima by 12 - \divide\@tempdima by 10 - \xdef\FORestoreFontSize{\noexpand\set@fontsize\noexpand\baselinestretch{\FOfontsizefinal}{\the\@tempdima}}% - \else - \xdef\FORestoreFontSize{\noexpand\set@fontsize\noexpand\baselinestretch{\FOfontsizefinal}{\FOlineheight}}% - \fi -} - \DeclareRobustCommand*\textsubscript[1]{% \@textsubscript{\selectfont#1}} -%\def\@textsubscript#1{% -% {\m@th\ensuremath{_{\mbox{\fontsize\sf@size\z@#1}}}}} \def\@textsubscript#1{% - {\m@th\ensuremath{_{\mbox{#1}}}}} -\def\@textsuperscript#1{% - {\m@th\ensuremath{^{\mbox{#1}}}}} + {\m@th\ensuremath{_{\mbox{\fontsize\sf@size\z@#1}}}}} \def\reserved@e{} - \def\FOSetPage{% - \global\bottommargin\Marginbottom -% \headsep\Margintop - \global\headsep\z@ - \global\topmargin\MasterTopMargin - \global\advance\topmargin by \SpecialOffset - \global\textheight\paperheight - \global\textwidth\paperwidth -% \advance\textheight by -\FirstHeadExtent -% \advance\textheight by -\FirstTailExtent - \global\advance\textheight by -\MasterTopMargin -% \advance\textheight by -\Margintop - \global\advance\textheight by -\MasterBottomMargin -% \advance\textheight by -\Marginbottom - \global\advance\textwidth by -\MasterLeftMargin - \global\advance\textwidth by -\MasterRightMargin + \bottommargin\Marginbottom + \headsep\Margintop + \topmargin\MasterTopMargin + \advance\topmargin by \SpecialOffset + \textheight\paperheight + \textwidth\paperwidth + \advance\textheight by -\FirstHeadExtent + \advance\textheight by -\FirstTailExtent + \advance\textheight by -\MasterTopMargin + \advance\textheight by -\Margintop + \advance\textheight by -\MasterBottomMargin + \advance\textheight by -\Marginbottom + \advance\textwidth by -\MasterLeftMargin + \advance\textwidth by -\MasterRightMargin \FOpdfsetpagesize{\paperwidth}{\paperheight} - \global\@colht\textheight - \global\@colroom\textheight - \global\vsize\textheight - \global\columnwidth\textwidth - \global\hsize\columnwidth - \global\linewidth\hsize - \gdef\headheight{12pt}% -% if we are in the middle of a list, we have to redo some of the list assignments - \FOResetPageParts + \@colht\textheight + \@colroom\textheight + \vsize\textheight + \linewidth\textwidth + \columnwidth\textwidth + \hsize\columnwidth \linewidth\hsize + \def\headheight{12pt}% \DEBUG{Page size is \the\textwidth/\the\textheight, on paper \the\paperwidth/\the\paperheight,^^J with paper margins \the\MasterRightMargin/\the\MasterLeftMargin, and region margins \the\topmargin/\the\MasterBottomMargin;^^J footskip is \the\footskip, headsep is \the\headsep^^J evensidemargin \the\evensidemargin, oddsidemargin \the\oddsidemargin}% + \global\@specialpagetrue } - -\def\FOResetPageParts{ - \expandafter\ifx\csname This@LineWidth\endcsname\relax\else - \global\linewidth\This@LineWidth\relax - \fi -} - % don't ask \def\supppdf{supp-pdf} \let\FOinputIfFileExists\InputIfFileExists @@ -2234,5 +1720,5 @@ \g@addto@macro\Gin@extensions{,.gif} \@namedef{Gin@rule@.eps}#1{{pdf}{.pdf}{`epstopdf #1}} \@namedef{Gin@rule@.gif}#1{{png}{.png}{`giftopng #1}} -\errorstopmode + \endinput |