How to Design Programs: An Introduction to Programming and Computing

Info icon This preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
T E X2page Dorai Sitaram Making books is a skilled trade, like making clocks. — Jean de la Bruy` ere ( 1696) TeX2page makes Web pages from TeX [14] manuscripts. It reads an input document that is marked up in plain TeX or LaTeX [16] and produces an output document with the functionally equivalent HTML markup. TeX2page uses the same input file syntax, calling conventions, and error-recovery mechanisms as TeX. Thus, TeX2page demands no additional expertise of a user already familiar with TeX. TeX2page runs on modern Schemes and Common Lisp. There are several advantages to keeping the document source in TeX and leaving the task of converting to HTML to TeX2page: There is no need to write and maintain two separate documents, one for paper and the other for the screen. Indeed, there is no need to learn a new input format, as TeX2page reuses a format already in wide and stable use for printed documents [6, 24, 4]. Creating TeX source requires no special-purpose software; any text editor will do. Furthermore, powerful and reliable tools such as BibTeX [20], MakeIndex [15], and MetaPost [10] have developed around TeX, and their benefits can be enjoyed by TeX2page too. Finally, TeX, unlike HTML, is a programming language, which lets the composer of the document exercise a fine control over its structure and presentation. A converter such as TeX2page that can convert TeX macro definitions in addition to basic TeX markup enables the format converted to to also benefit from TeX’s extensibility. For the cases where TeX2page’s implementation of the TeX macro system is not manipulable enough, the document writer can use the TeX2page extension language , which is full Scheme augmented with all the TeX2page procedure definitions. The rest of this manual is organized as follows: I Running TeX2page, 1 II TeX commands, 4 III TeX2page commands, 7 IV TeX commands with a difference, 8 V Referring to external documents, 11 VI Flags, 13 VII Style, 15 VIII Verbatim text, 16 IX Images, 20 X Scheme as TeX’s extension language, 25 XI Recovery from errors, 27 A Auxiliary files, 28 B Bibliography, 29 C Concept index, 30 I Running TeX2page TeX2page is invoked in much the same way as plain TeX or LaTeX.* For instance, given a plain-TeX document file with the relative or full pathname wherever-it-is/jobname . ext , where jobname is the basename of the file and . ext is its extension, you type * Hereafter, we will use TeX to mean any format of TeX, and plain TeX when we specifically mean the “plain” format. 1
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
tex wherever-it-is/jobname . ext at the operating-system command line. You do not need to mention the extension . ext if it is .tex . This creates the output DVI file, jobname .dvi , in the working directory. TeX2page is called analogously. To create the HTML version of the same file wherever-it-is/jobname . ext , type tex2page wherever-it-is/jobname . ext Again, the . ext is optional if it is .tex . This creates jobname .html in the working directory.
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern