CS 211 Assignment 3 - CS211 Assignment 3 A LATEX to HTML...

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

View Full Document Right Arrow Icon
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
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
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 browser’s 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"> .
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