This preview shows pages 1–3. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: CS211 Assignment 3 A LATEX to HTML Table Translator, Fall 2007 Due October 4, 2007, 11:59:59PM 1 Introduction In this assignment, you will implement a translator from LATEX tables to HTML tables. This assignment is designed to exercise the following skills: recursion and recursive-descent parsing objects and inheritance data structures: lists and trees You will also learn a little about two very useful languages, HTML (HyperText Markup Language) and LATEX. Unlike previous assignments, which had many small parts, this assignment requires you to work on one relatively large program (as is often the case in real life!). Your goal is to develop a Java application that reads in a LATEX table, parses the table, and converts it to HTML. The resulting HTML table can be viewed in a web browser. You will not have to write all parts of this application. Many classes are already provided to you, and you only have to implement certain classes and methods. Nevertheless, if you start this assignment on the Wednesday morning before it is due, we guarantee that you will not get it finished. We therefore strongly advise that you get started early. 2 Background 2.1 HTML HyperText Markup Language (HTML) is the language that we use for creating web pages. Browsers can interpret HTML tags to determine how to convert simple textual information to structured information such as tables. Think of how boring web browsing would be if all web sites were just plain text! 2.1.1 Tags HTML is a tag-based language. You use tags to specify document structure and formatting. A start tag is of the form <tagName> and an end tag is of the form </tagName> . For example, to tell your browser to render a word in boldface , you would enclose the word in the tags <b> and </b> , thus: <b>boldface</b> . For this assignment, in addition to basic formatting tags, the HTML structure you need to know about is the HTML table . 2.1.2 Nesting of Tags Usually tags come in pairs. There is usually an opening tag, such as <html> , and a corresponding closing tag, such as </html> . These should be well nested, like parentheses. For example, the HTML fragment <i> <b> This text will be rendered in boldface and italics </b> </i> is well-nested, whereas page 1/10 CS211 Assignment 3 A LATEX to HTML Table Translator Due October 4, 2007, 11:59:59PM <i> <b> Will this text will be rendered in boldface and italics? </i> </b> is not. Your browsers behavior on such malformed HTML is undefined and unpredictable. Some HTML tags have optional closing tags. For consistency in grading we are requiring all HTML produced by your program to have closing tags, except where indicated otherwise. 2.1.3 Tag Attributes In addition to tag names, in HTML there can be attributes associated with a tag. Attributes appear in the start tag after the tag name but before the closing > , like so: <tagName attrName="value"> ....
View Full Document
This homework help was uploaded on 02/08/2008 for the course CS 2110 taught by Professor Francis during the Fall '07 term at Cornell University (Engineering School).
- Fall '07