Lecture 7 the appearance of text
This presentation is the property of its rightful owner.
Sponsored Links
1 / 18

CS 502: Computing Methods for Digital Libraries PowerPoint PPT Presentation

  • Uploaded on
  • Presentation posted in: General

Lecture 7 The Appearance of Text. CS 502: Computing Methods for Digital Libraries. Administration. Wednesday evening -- balance section sizes Assignment 2. The Design Tension. Who controls the appearance of a document stored in a repository and displayed on a client?

Download Presentation

CS 502: Computing Methods for Digital Libraries

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript

Lecture 7 the appearance of text

Lecture 7

The Appearance of Text

CS 502: Computing Methods for Digital Libraries



  • Wednesday evening -- balance section sizes

  • Assignment 2

The design tension

The Design Tension

  • Who controls the appearance of a document stored in a repository and displayed on a client?

  • The representation in the repository -- page description, style sheets, fonts, etc.

  • The user -- window sizes, fonts and sizes, etc.

  • The rendering software (e.g., browser) -- mapping from markup to appearance.

The design tension1

The Design Tension

  • Important special cases:

  • The user has special requirements (e.g., poor eyesight).

  • The client computer has restricted capability (e.g., PalmPilot, slow network connection).

  • Presentation profile:

  • The representation in the repository suggests formatting, but client can over-ride the suggestions.

    • e.g., in HTML, alt option with img tag allows text string as substitute for image.

Style sheet systems

Style Sheet Systems

Markup languageStyle sheet systemNotes

SGMLDSSSLToo ambitious

for general use


HTMLCSSIn production

Cascading style sheets css

Cascading Style Sheets (CSS)




<title>Observations from the Library of Congress</title>


[See next slide]




[Body of document]



Cascading style sheets css1

Cascading Style Sheets (CSS)



H1 { font-size: x-large; font-family: Arial, Helvetica, sans-serif;

color: #990000 }

H2 { font-size: large; font-family: Arial, Helvetica, sans-serif;

color: #990000}

H3 { font-family: Arial, Helvetica, sans-serif }

H4 { font-family: Arial, Helvetica, sans-serif; margin-left: 10px}

body { background: #fff7e7 }

P.nav {font-size: small; text-align: right }



Simple css

Simple CSS

  • A rule defines styles to be applied to selected elements of a document, e.g.,

  • h1 {color: blue}



Simple css1

Simple CSS

  • A declaration has two parts, a property and a value, separated by a colon:

  • {color: blue}



  • More examples:

  • h1, h2 {font-family: sans-serif; color: blue}

  • h3 {font-family: Arial, Helvetica, sans-serif}

Simple css inheritance

Simple CSS: Inheritance

  • HTML mark-up defines a hierarchy:

  • heading, paragraph, and list are elements of body

  • list items are elements within list

  • lists can be nested within each other.

  • CSS style sheets: If no rule explicitly selects an element, it inherits the rules for the elements higher in the hierarchy, e.g.

  • body {font-family: serif}

  • h1, h2 {font-family: sans-serif}

  • No explicit rule for paragraph or list -- inherit the styles that apply to body.

Simple css attaching style sheets

Simple CSS: Attaching Style Sheets


Embed style sheet in head of document

Provide link from document to external file

Browser or other rendering program

Built-in style sheet (usually implicit)


Private style sheet

Simple css cascading

Simple CSS: Cascading

  • Several style sheets may apply to the same page.

  • If the rules conflict:

  • one rule is selected; others are ignored

  • rules that explicitly select elements have priority over

  • inherited rules

  • rules can be flagged !important to gain priority

  • for direct conflict, the designer's rules have priority over

  • the user's

Use of css

Use of CSS

  • Cascading style sheets have been available for several years.

  • They are supported by the major browsers.

  • Some major web sites use them (e.g., CNN).

  • Why are they not used more?

Page description languages

Page Description Languages

  • Objective:

  • To represent the appearance of documents with the same graphic quality as the best printed documents.

  • printed output

  • rendering on computer display

  • Secondary considerations:

  • storage and transmission

  • searching and manipulation

Cs 502 computing methods for digital libraries


  • Macro language for high-quality printing; emphasis on mathematics

  • LaTex macro package

  • Metafont system for designing fonts

  • Specification and code made openly available by Donald Knuth

  • Widely used for scientific publishing



  • Product of Adobe Systems (Xerox spin-off 1984)

  • Programming language to create graphical output for printers

  • (fun to program)

  • Explicit support for fonts:

  • screen -- 70 dots per inch

  • laser printer -- 300+ dots per inch

  • type-setters -- 1,200 dots per inch

  • Other applications:

  • storage and transmission

  • window managers (News, NeXT)

Portable document format pdf

Portable Document Format (PDF)

  • Adobe Systems -- based on experience with PostScript

  • Aims at storage and manipulation as well as rendering

  • Supports hyperlinks, searching, annotation, etc.

  • File sizes moderate except when they contain bit maps

  • Approximate fonts computed where necessary

Pdf business considerations

PDF: Business Considerations

  • PDF is a proprietary format, but is a de facto standard:

  • Adobe publishes the specification

  • Adobe allows competitors to write PDF software

  • To stimulate use:

  • Adobe provides viewers for almost every type of computer

  • Adobe distributes the viewers without charge

  • Adobe makes revenue from the programs that create PDF files

  • Login