Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- \newbox\gridbox
- \setbox\gridbox\line{%
- \special{color push rgb .8 .8 1}%
- \vrule height\baselineskip width0pt \hrulefill
- \special{color pop}}
- \def\grid{\vtop to0pt{\hrule height0pt\kern-\dimexpr\baselineskip-\topskip\topskip=10pt\relax
- \vbox to\dimexpr\vsize+2pt\relax{\leaders\copy\gridbox\vfil}\vss}}
- \def\pagebody{\vbox to\vsize{\boxmaxdepth=\maxdepth \grid\pagecontents}}
- \input figflow
- \parskip=0pt \frenchspacing \raggedbottom
- \font\smallrm=cmr8
- \newdimen\thewidth
- \newdimen\theheight
- \newbox\figbox
- \newbox\captbox
- \newbox\compbox
- %
- \def\includegraphics#1#2#3#4{
- {\parfillskip=0pt\par}
- \thewidth=#1
- \theheight=#2
- \advance\thewidth by 1pc
- \setbox\figbox=\vbox to #2{\hsize=#1
- \XeTeXpicfile #3 width #1 height #2}
- \setbox\captbox=\vbox{\hsize=#1
- {\noindent\smallrm #4\par}}
- \advance\theheight by \ht\captbox
- \divide\theheight by \baselineskip
- \multiply\theheight by \baselineskip
- \advance\theheight by \baselineskip
- \setbox\compbox=\vbox to \theheight{\vfil\figbox\vskip2mm\captbox}
- \figflow{\thewidth}{\theheight}{}%
- \vtop to 0pt{\kern0pt\compbox\vss}\nobreak\vskip-\baselineskip
- \noindent\ignorespaces}
- \noindent
- A work in progress, {\tt JSBox} is a self-contained
- library---written in portable C---that instantiates sandbox-able,
- \TeX-language interpreters within the memory space
- of any C, Objective-C, or C++ 32- or 64-bit client
- program. Built and documented anew, {\tt JSBox}
- is faithful to the \TeX\ language's primitives,
- syntax, typesetting algorithms, measurements, data
- structures, and speed. At the same time, it fixes---in an
- upwardly compatible manner---a variety of important
- problems with or lacun\ae\ in the current \TeX\ engine's
- implementation. These include integral support for
- 21-bit Unicode, namespaces, OpenType font tables
- and metrics, job-specific 8-bit to 21-bit Unicode
- mapping, run-time settable compatibility levels,
- full 32-bit fixed-point math, and more.%
- \includegraphics{7cm}{7cm}{greybox.png}{Lorem ipsum dolor sit
- amet, consectetur adipiscing elit. Donec a diam lectus.}
- Especially pertinent to interactive applications---such as an
- eBook reader---is that all of a document's pages can
- optionally be kept as \TeX\ data structures in memory
- after a job is done, with direct random access of any
- requested page exported to the client program's screen
- without file I/O or DVI or PDF conversion if unneeded.
- Tracing (including recursive expansion, re-tracing
- interrupted commands, alignments, math, etc.) and
- all error messages have been significantly improved
- over what \TeX\ does. The author will demo what
- {\tt JSBox} can do now, and discuss what it
- could do in the future.
- A work in progress, {\tt JSBox} is a self-contained
- library---written in portable C---that instantiates sandbox-able,
- \TeX-language interpreters within the memory space
- of any C, Objective-C, or C++ 32- or 64-bit client
- program. Built and documented anew, {\tt JSBox}
- is faithful to the \TeX\ language's primitives,
- syntax, typesetting algorithms, measurements, data
- structures, and speed. At the same time, it fixes---in an
- upwardly compatible manner---a variety of important
- problems with or lacun\ae\ in the current \TeX\ engine's
- implementation. These include integral support for
- 21-bit Unicode, namespaces, OpenType font tables
- and metrics, job-specific 8-bit to 21-bit Unicode
- mapping, run-time settable compatibility levels,
- full 32-bit fixed-point math, and more. Especially
- pertinent to interactive applications---such as an
- eBook reader---is that all of a document's pages can
- optionally be kept as \TeX\ data structures in memory
- after a job is done, with direct random access of any
- requested page exported to the client program's screen
- without file I/O or DVI or PDF conversion if unneeded.
- Tracing (including recursive expansion, re-tracing
- interrupted commands, alignments, math, etc.) and
- all error messages have been significantly improved
- over what \TeX\ does. The author will demo what
- {\tt JSBox} can do now, and discuss what it
- could do in the future.
- \bye
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement