Text processing Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Section 12.1.

Slides:



Advertisements
Similar presentations
DOCUMENT TYPES. Digital Documents Converting documents to an electronic format will preserve those documents, but how would such a process be organized?
Advertisements

Introduction to Microsoft Excel 2010 Chapter Extension 3.
Digital Workbooks Options and Guide. Microsoft Office - Publisher If you use PC’s rather than Macs then ‘Publisher’ is part of the Microsoft Office Software.
COE201 – Computer Proficiency Mr. Hamze Msheik
Microsoft Word Objectives: Word processing using Microsoft Word
PZ14A Programming Language design and Implementation -4th Edition Copyright©Prentice Hall, PZ14A - Text processing Programming Language Design and.
Introduction to LaTeX CPS470 Software Engineering Fall 1998.
XP New Perspectives on Microsoft Office Word 2003 Tutorial 1 1 Microsoft Office Word 2003 Tutorial 1 – Creating a Document.
XP 1 Microsoft Office Word 2003 Tutorial 1 – Creating a Document.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
Quark QuarkXPress 4 Intermediate Level Course. Working with Master Pages The Document Layout Palette allows you to add, delete, and move document and.
Chapter 12: Network Programming Desktop Publishing Translator models Latex Documentation Preparation Postscript programming language WYSIWIG Editors.
1 Chapter 11 Developing Custom Help. 11 Chapter Objectives Use HTML to create customized Help topics for an application Use the HTML Help Workshop to.
With Microsoft Access 2010 © 2011 Pearson Education, Inc. Publishing as Prentice Hall1 PowerPoint Presentation to Accompany GO! with Microsoft ® Access.
Chapter 5 Using Business Information Sets
A First Program Using C#
W rking with W rds Word Processing and Desktop Publishing o o.
Lecture 2 Character Codes and Low-Structure Text Document Formats.
Microsoft Office Word 2003 Tutorial 1 Creating a Document.
1Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall. Exploring Microsoft Office Access 2010 by Robert Grauer, Keith Mast, and Mary Anne.
PZ07A Programming Language design and Implementation -4th Edition Copyright©Prentice Hall, PZ07A - Expressions Programming Language Design and Implementation.
Introduction to Unix – CS 21 Lecture 16. Lecture Overview LaTeX History Running and creating LaTeX documents Documents and Articles Tables Lists Fonts.
INSERT BOOK COVER 1Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall. Exploring Microsoft Office Excel 2010 by Robert Grauer, Keith.
With Microsoft Office 2007 Intermediate© 2008 Pearson Prentice Hall1 PowerPoint Presentation to Accompany GO! with Microsoft ® Office 2007 Intermediate.
Chapter 8 Introduction to HTML and Applets Fundamentals of Java.
Object-Oriented Program Development Using Java: A Class-Centered Approach, Enhanced Edition.
PZ07A Programming Language design and Implementation -4th Edition Copyright©Prentice Hall, PZ07A - Expressions Programming Language Design and Implementation.
Text processing Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Section 12.1.
1 Expressions Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Section
IS 1014 Introduction to Computer Graphics -- Paul Munro A Postscript Tutorial Book available at: cdf.fnal.gov/offline/PostScript/BLUEBOOK.PDF.
Document Computing Technologies for Managing Electronic Document Collections Ross Wilkinson... [et al.] Circulation Counter [RES3H] ZA4080.D
 Start Microsoft Word from the icon or shortcut for the application. This is usually accessible from the Start Button. Then go to Programs, then Microsoft.
Expressions Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Section
Chapter – 8 Software Tools.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. A Concise Introduction to MATLAB ® William J. Palm III.
Application software Word processing 1. Application software  Some types:  Document production:  Word-processing, desktop publishing, web page authoring.
Chapter 5 Using a Template to Create a Resume and Sharing a Finished Document Microsoft Word 2013.
Working with Cascading Style Sheets
Formatting a Research Paper
Microsoft Word Objectives: Word processing using Microsoft Word
Topics Designing a Program Input, Processing, and Output
Lesson 16 Enhancing Documents
Exploring Microsoft Office Access 2007
CSCI-235 Micro-Computer Applications
Shelly Cashman: Microsoft Word 2016
Creating a Word Document – Part 1
Tabs, Line & Paragraph Spacing, and working with lists
Computer Fundamentals
Guide To UNIX Using Linux Third Edition
Tutorial 1 – Creating a Document
Chapter 7 Advanced Formatting and Merging Publications with Data
COMPSCI 111 / 111G An introduction to practical computing
Agenda: 10/05/2011 and 10/10/2011 Review Access tables, queries, and forms. Review sample forms. Define 5-8 guidelines each about effective form and report.
The How-to-Guide for Using Word
Page description language from Adobe
Unit# 6: ICT Applications
Benchmark Series Microsoft Word 2016 Level 2
Creating a Word Document – Part 1
Lesson 15 Working with Tables
Word Tutorial 1 Creating a Document
Expressions Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Section
Word Processing and Desktop Publishing Software
Topics Designing a Program Input, Processing, and Output
Topics Designing a Program Input, Processing, and Output
Word Processing Software Photo credit: © 2007 JupiterImagesCorporation.
Exploring Microsoft® Office 2016 Series Editor Mary Anne Poatsy
HIBBs is a program of the Global Health Informatics Partnership Learning the Basics of Microsoft Word 2019 and Microsoft office support TFN
Expressions Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Section
Word Tutorial 1 Creating a Document
Expressions Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Section
Presentation transcript:

Text processing Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Section 12.1

Desktop publishing Traditional publication systems: WYSIWYG - What you see is what you get Typewriters examples of early WYSIWYG systems More complex today - Multiple fonts, colors, embedded graphics Need for embedded commands to describe layout of document Three approaches to desktop publishing: WYSIWYG Page description languages Document compiling Text processing

WYSIWYG A common approach in PC world Tools like Microsoft Word and Corel WordPerfect Embedded commands in document to control layout (fonts, colors, font size, location of objects) Rich Text Format (RTF) - An ASCII language for describing such layout. Can be used to pass information among different processors Text processing

LaTeX TeX: Document processing system developed by Donald Knuth a macro processing system for creation of string text (i.e., documents) Arcane syntax LaTeX: Macros for TeX a set of macros developed for TeX by Leslie Lamport creates a series of environments and control structures similar to programming language structures for lack of a better term, we often refer to the compiling of the book as various chapters are processed by the TeX program This book developed using LaTeX Text processing

LaTeX execution Executes much like a traditional compiler: First pass: Read in text and create output format. Create symbol table for all internal references (section numbers, page numbers, figure numbers) Create table of contents and index, if desired Second pass: This time, internal references are correct because of symbol table created during pass 1. Third pass: If no changes made to symbol table by pass 2, same as pass 2; otherwise repeat pass 2, again until no further changes are made to symbol table [Why more than 2 passes? - Think of putting a table of contents at beginning of a report.] Text processing

LaTeX features LaTeX creates environments that make TeX easier to use. These behave much like C or Pascal scope rules For example, one can begin and end a list of items: Numbered \begin{enumerate} \item text [Prints as number 1] \item text [prints as number 2] \end{enumerate} [End of list] Bulleted (“itemized”) Named (“description”) Starting new sections or subsections automatically adjusts the appropriate section numbers. LaTeX has a syntax similar to the block-structured style of a programming languages. Text processing

LaTeX structure Text processing

LaTeX execution By invoking LaTeX, the latex.tex macros are read into TeX to create commands for chapters, sections, subsections, figures, tables, lists, and the numerous other structures needed to write simple documents. The documentstyle command (in LaTeX) allows the user to add other style features. The required article parameter causes article.sty to be read in to tailor latex.tex with commands needed for an article. For example, there are no chapters in articles, but for style book (i.e., book.sty), chapters are defined. 11pt defines the size of the text font (11-point type), and art11.sty is read giving additional information on line and character spacing for 11- point type. The TeX program along with article.sty and art11.sty form the standard way to process a LaTeX article. Mystyle.sty defines addition maccros a user can add to tailor LaTeX for a specific document. Text processing

Page description languages A Postscript program consists of five components: 1. An interpreter for performing calculations. A simple postfix execution stack is the basic model. 2. A language syntax. This is based on Forth. 3. Painting extensions. An extension to Forth with painting commands for managing the process of painting text and pictures on a sheet of paper. 4. Defines a virtual machine for drawing information (text and graphics on a page). The showpage operator causes the described page to be displayed 5. Conventions. A series of conventions, not part of the formal Postscript language, that various printers use for consistency in presentation. Use of these conventions makes it easier for transporting postscript documents from one system to another. Text processing

Postscript execution model A Postscript program consists of a sequence of commands that represent the postfix of the algorithm necessary to paint the document. Postscript execution begins with two entries initially on the stack, which the program may not remove: Systemdict is the system dictionary, which represents the initial binding of Postscript objects to their internal representation. Userdict is the user dictionary, which represents the new definitions included within this execution of a Postscript program. This may include redefinition of primitive objects already defined in systemdict. Text processing

Sample Postscript command Each argument is stacked on Postscript stack: /box {newpath 0 0 moveto 0 1 lineto 3 1 lineto 3 0 lineto closepath} def /box: Add name box to stack. / says this is a definition and not to evaluate arguments, only move to stack (like quote in LISP) newpath: start a new path moveto: Take top two stack arguments and move cursor to that (X,Y) location lineto: Draw line from current cursor to the (X,Y) address, which is the top two stack numbers closepath: Draw line back to newpath location def: Everything within { ... } is defined to be command box [Note that the command box now draws a rectangle from (0,0) to (0,1) to (3,1) to (3,0) and back to (0,0)] Text processing

Summary Note 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 Text processing

Postscript execution stacks 1. The operand stack contains the operands as they are stacked,executed, and unstacked. 2. The dictionary stack contains only dictionary objects. This stack defines the scope and context of each definition. 3. The execution stack contains executable objects. For the most part, these are functions in intermediate stages of execution. 4. The graphics state stack manages the context for painting objects on the page A Postscript program is a sequence of ASCII characters. As each token is read, its definition is accessed in the stack (by first looking in userdict and then systemdict) and executed by an appropriate action. Text processing

Document conventions Conventions built into all Postscript interpreters: The leading comment should be%!PS That informs the interpreter that the file is a Postscript program. Each page of a document is usually bracketed by a save and a restore command to isolate that page from the effects of other pages. %%DocumentFonts: a list of fonts used in the document %%Title: an arbitrary string, the title of the document %%Creator: the name of the program that created the file %%CreationDate: the date and time of creation %%Pages: the number of pages in the document. %%BoundingBox: the four values that represent the lower left and upper right corners of the page that are actually painted by the program. This allows the pages to be inserted into other documents. Text processing

Postscript summary Postscript was developed to be a virtual machine architecture that can be used to create printable documents. Postscript of a document is not meant to be read by a programmer. However, the syntax is quite simple and easily understood. Postscript has been developed further by Adobe with the creation of their Portable Document Format (PDF). PDF is a form of compressed Postscript. PDF readers are freely available over the Internet, and most Web browsers can display PDF files. PDF has become ubiquitous for the transmission and display of formatted documents. Giving away PDF display programs was a shrewd move for Adobe because they sell the Acrobat program needed to create PDF documents. Text processing