140 likes | 258 Views
Chapter 12: Network Programming Desktop Publishing. Translator models Latex Documentation Preparation Postscript programming language WYSIWIG Editors. Translator models. Interpretation - the output is a value. Compilation - translator produces an algorithm that computes the answer
E N D
Chapter 12: NetworkProgrammingDesktop Publishing • Translator models • Latex Documentation Preparation • Postscript programming language • WYSIWIG Editors
Translator models • Interpretation -the outputis a value. • Compilation - translator produces an algorithm that computes the answer • Semantic Description - translator produces a description of the output
Translator modelsfor text processing languages • Interpretation: bitmap output • Compilation: documents are converted to an executable program that creates an image – Postscript • Semantic Description : description of the text's attributes – Microsoft Rich Text format
LaTex Documentation Preparation • high-quality typesetting system • de facto standard for the communication and publication of scientific documents • a special version of Donald Knuth's TeX program • TeX: sophisticated program designed to produce high-quality typesetting, especially for mathematical text.
Features of TeX • automatic hyphenation, • line justification, centering, flushing right or left, • tabular aligning, • formatting of complicated mathematical expressions, • section and page numbering, • numbering and placing of footnotes, • preparation of a table of contents and an index.
TeX and LaTeX • LaTeX makes TeX facilities easy to use • LaTeX uses environments to define different document styles - article, report, letter, etc
Example Programming languages for document preparation Peter Loven September 2000 Hello world!
Example – cont. \documentclass{article} \title{Programming languages for document preparation} \author{Peter Loven} \date{September 2000} \begin{document} \maketitle Hello world! \end{document}
LaTeX processing • The TEX compiler outputs a symbol table in Pass 1 like a regular compiler • Pass 2 (optional) produces a Table of Contents • Pass 3 produces the formatted document in a device-independent (dvi) form • Convert the dvi form to a format that allows a particular device to display or print the result
Postscript programming language • An interpreter for performing calculations – postfix execution stack • Language syntax based on FORTH • Painting Extensions – extension to FORTH for printing • Conventions for different printing systems
WYSIWIG Editors • WYSIWIG (what you see is what you get) - a file is preformatted to its final output presentation by embedded tags. • The word processing program is a virtual machine designed to display those commands. • All editing is immediately reflected on the screen display.
Differences between models LaTeX and MS Word - define the layout of the final document Postscript - defines a program which computes the final layout. A Postscript printer contains an interpreter that executes the Postscript program to produce the final printed document