1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Item:
%% Test suite for l2h image generation.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Bug description (add references to further descriptive files if possible):
%%
%% Image generation in l2h is known to be sensitive to handle and error-prone.
%% The test suite should cover the coarsest aspects of this task, see
%% description below.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Bug caused this behaviour (may be several descriptions):
%%
%% The images following the absent page in images.tex get out of sync
%% (the amount of absent pages earlier than expected).
%% This flaw is not detected by latex2html and hence not indicated to the user!
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Bug severity (low|bothers|problematic|urgent -- fixed|open -- message):
%% problematic -- fixed --
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Bug fix identification
%% (id -- l2h release (or releases for multiple fixes) -- location in file(s)):
%% jcl(pag) -- 96.1h -- latex2html
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Author: Jens Lippmann <http://www-jb.cs.uni-sb.de/~www/people/lippmann>
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Change log (Mon/DD/YY -- author -- message):
%% jcl = Jens Lippmann
%%
%% Aug/25/96 -- jcl -- created
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Test suite decription:
%%
%% 0. Requirements for running this suite
%%
%% Besides the basic styles, it needs theorem.sty.
%% Use the styles of your site to get sure the suite runs with best fitting
%% version.
%%
%% 1. Introduction
%%
%% Image generation is done the following way:
%% There are TeX parts which l2h considers to be translated into an image,
%% eg. unknown environments, math, etc.
%% Therefore, at the end of its pass l2h generates the file images.tex, which
%% contains all those parts separated by a forced pagebreak.
%% Any metacommands encountered during the pass, and the used documents styles,
%% are put in front of that images.tex.
%% This file is translated to images.dvi using LaTeX in batch mode.
%% Then, dvips is called to convert every page to its own postscript file,
%% which is in turn converted to the apropriate image.
%%
%% 2. Requirements of Image Generation
%%
%% Due to the current implementation it is essentially necessary that
%% every TeX part evaluates to a dvi page of a known and fix page number.
%% This page number (also called image number) is used to process each
%% image on its own.
%%
%% The conversion must handle several requirements:
%% a) Header of images.tex
%% - The same styles as known from the source document must be used.
%% - Any metacommand (\def,\newenvironment,etc.) which has been parsed by
%% l2h must recur in the header
%% b) From HTML part to TeX part
%% - Contents of already digested TeX parts must be restored from HTML
%% to TeX in a sufficient way
%% c) From TeX part to dvi file
%% - Any counter commands must recur in images.tex, located at the same
%% context
%% - A TeX part which takes more space than one page (eg. long tables,
%% huge images)
%% This could result in an unwanted pagebreak which *messes up* the
%% image order. Such an event must be detected during image conversion.
%% Currently, a warning will be printed if the amount of generated
%% postscript pages exceeds the amount of expected pages.
%% - A TeX part which evaluates to no visible space (eg. broken commands)
%% This must result in an *empty* page. See also jcl(pag).
%% An absent page would mess up the image order.
%% - A TeX part which evaluates to visible space fitting on one page
%% Trivial.
%% ... (to be completed)
%% d) From dvi file to postscript
%% - dvips must convert the pages into postscript files
%% Assure correct system call.
%% ... (to be completed)
%% e) From postscript to the image
%% - The filter commands must be called to generate the apropriate
%% image format as referenced from the HTML output
%% Assure correct system calls.
%% ... (to be completed)
%% f) From the image to the HTML output
%% - Each image must be bound to its HTML reference
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Expected output of this suit:
%% The images of the html output must match the dvi images in a sufficing way.
%% Assure correct image order.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentstyle[12pt,theorem,epsf]{article}
\parindent 0mm
% Macro to handle figures
\newcommand{\postscript}[3]{\begin{figure}[ht]%
\begin{center}\epsfbox{#1.eps}\leavevmode
\caption{#2}\label{#1}{\em #3}\end{center}\end{figure}}
% The next macros produce three fake page entries in images.tex
\theoremstyle{plain}
\newtheorem{Defi}[equation]{Definition}
\newtheorem{Theo}[equation]{Theorem}
\theoremstyle{break}
\newtheorem{Pb}[equation]{Problem}
\theoremheaderfont{\scshape}
\begin{document}
Please look at next section.
\section{Empty DVI Page Test}
{\bf Unwanted empty DVI page test:}
This section is needed to have some fake entries *before*
this math equation in images.tex. These fake entries result in an
empty DVI page and, with former versions of l2h, to an *absent*
DVI page (see also jcl(pag)).
However, an absent DVI page will cause the next math equation
(and the following images) to be misordered.
The contents of math here is randomly chosen, but to assure at
least its translation into pictures.
Below an equation with Omega=... should occur:
$$\Omega=(\bar{{\cal D}^-}\cup\bar{{\cal D}^+})$$
{\bf Explicit empty DVI page test:}
Below a non-visible enviroment which is passed to images.tex.
\begin{figure}\null\end{figure}
\section{Normal DVI Page and Counter Test}
Below a figure numbered 14.
\setcounter{figure}{13}
\setcounter{equation}{38}
\begin{figure}[hb]
\begin{center}
\framebox{\hbox{\sl A $\leftrightarrow$ B}}
\end{center}\caption{An framed box}
\end{figure}
Below an equation numbered 39.
\begin{equation}
e(z)=\frac{1}{\sqrt{1-(z/L)^2}}
\end{equation}
\section{Overfull DVI Page Test}
Next page an overfull figure:
\clearpage
\postscript{pages1}{{\bf Test figure} -- Running LiPS: An Overview}
{{\bf Test text} --
This figure gives an overview on the layers constituting the LiPS-system.
The LiPS system provides the application programmer with the
{\tt tuplespace} paradigm of distributed
computing, where the processes of a distributed application communicate
through a virtual shared memory called {\tt tuplespace}.
The tuplespace is implemented within Serverprocesses called MessageServer.
}
\clearpage
Anything up to this point belongs to the previous figure example.
Next page an overfull self-defined environment. It should end with
'end of prefix type description'. The numbers make the entries unique
to ease comparation, the list should about 3 DVI pages long.
{\bf Known bug}: The dvips command itself shortens the page.
\clearpage
\def\mylist{\small\bf\tt}
\begin{mylist}
prefix type description \\ \hrule
1c char a character or byte\\
1uc unsigned char an unsigned character or byte\\
1i int an integer\\
1ui unsigned int an unsigned integer\\
1l long a long integer\\
1ul unsigned long an unsigned long integer\\
1f float a floating point number\\
1d double float with double precision\\
1s struct a user defined structure\\
1t type a user defined type\\
1pc char * pointer to character or byte\\
1pi int * pointer to integer\\
1pl long * pointer to long integer\\
1pul unsigned long * \dots\\
1pF FILE * pointer to file\\
1ps struct * pointer to user-def'd struct\\
1ts type struct used-def'd type of struct\\
1ac char [] array of character or byte\\
1ai int [] array of integer\\
1aul unsigned long [] array of unsigned long\\
1as struct [] array of struct\\
1pac char [] * pointer to char array\\
1ppc char ** pointer to char pointer\\
1. . . \\
2c char a character or byte\\
2uc unsigned char an unsigned character or byte\\
2i int an integer\\
2ui unsigned int an unsigned integer\\
2l long a long integer\\
2ul unsigned long an unsigned long integer\\
2f float a floating point number\\
2d double float with double precision\\
2s struct a user defined structure\\
2t type a user defined type\\
2pc char * pointer to character or byte\\
2pi int * pointer to integer\\
2pl long * pointer to long integer\\
2pul unsigned long * \dots\\
2pF FILE * pointer to file\\
2ps struct * pointer to user-def'd struct\\
2ts type struct used-def'd type of struct\\
2ac char [] array of character or byte\\
2ai int [] array of integer\\
2aul unsigned long [] array of unsigned long\\
2as struct [] array of struct\\
2pac char [] * pointer to char array\\
2ppc char ** pointer to char pointer\\
2. . . \\
3c char a character or byte\\
3uc unsigned char an unsigned character or byte\\
3i int an integer\\
3ui unsigned int an unsigned integer\\
3l long a long integer\\
3ul unsigned long an unsigned long integer\\
3f float a floating point number\\
3d double float with double precision\\
3s struct a user defined structure\\
3t type a user defined type\\
3pc char * pointer to character or byte\\
3pi int * pointer to integer\\
3pl long * pointer to long integer\\
3pul unsigned long * \dots\\
3pF FILE * pointer to file\\
3ps struct * pointer to user-def'd struct\\
3ts type struct used-def'd type of struct\\
3ac char [] array of character or byte\\
3ai int [] array of integer\\
3aul unsigned long [] array of unsigned long\\
3as struct [] array of struct\\
3pac char [] * pointer to char array\\
3ppc char ** pointer to char pointer\\
3. . . \\
4c char a character or byte\\
4uc unsigned char an unsigned character or byte\\
4i int an integer\\
4ui unsigned int an unsigned integer\\
4l long a long integer\\
4ul unsigned long an unsigned long integer\\
4f float a floating point number\\
4d double float with double precision\\
4s struct a user defined structure\\
4t type a user defined type\\
4pc char * pointer to character or byte\\
4pi int * pointer to integer\\
4pl long * pointer to long integer\\
4pul unsigned long * \dots\\
4pF FILE * pointer to file\\
4ps struct * pointer to user-def'd struct\\
4ts type struct used-def'd type of struct\\
4ac char [] array of character or byte\\
4ai int [] array of integer\\
4aul unsigned long [] array of unsigned long\\
4as struct [] array of struct\\
4pac char [] * pointer to char array\\
4ppc char ** pointer to char pointer\\
4. . . \\ \hrule
end of prefix type description \\ \hrule
\end{mylist}
\end{document}
|