Computer Languages for Graphics: SVG, PostScript...

Vector Graphics

Vector graphics are a form of computer graphics in which visual images are created directly from geometric shapes such as points, lines, curves and polygons.

This is the code for drawing a circle in vector graphics language SVG:

<circle cx="100" cy="100" r="50"/>

The associated mechanisms may include vector display and printing hardware, vector data models and file formats, as well as the software based on these data models (especially graphic design software, computer-aided design, and geographic information systems). Vector graphics are an alternative to raster or bitmap graphics, with each having advantages and disadvantages in specific situations.

File Formats

Vector graphics are commonly found today in the SVG, WMF, EPS, PDF, CDR or AI types of graphic file formats, and are intrinsically different from the more common raster graphics file formats such as JPEG, PNG, APNG, GIF, WebP, BMP and MPEG4.

The World Wide Web Consortium (W3C) standard for vector graphics is Scalable Vector Graphics (SVG). The standard is complex and has been relatively slow to be established owing to commercial interests. Many web browsers now have some support for rendering SVG.

Wikipedia prefers SVG for images such as simple maps, line illustrations, coats of arms, and flags, which generally are not like photographs or other continuous-tone images. Rendering SVG requires conversion to a raster format at a resolution appropriate for the current task. SVG is also a format for animated graphics.

There is also a version of SVG for mobile phones called SVGT (SVG Tiny version). These images can count links and also exploit anti-aliasing. They can also be displayed as wallpaper.

CAD software uses its own vector data formats, usually proprietary formats created by software vendors, such as Autodesk's DWG and public exchange formats such as DXF. Hundreds of distinct vector file formats have been created for GIS data over its history, including proprietary formats like the Esri file geodatabase, proprietary but public formats like the Shapefile and the original KML, open source formats like GeoJSON, and formats created by standards bodies like Simple Features and GML from the Open Geospatial Consortium.

TeX and LaTeX

Donald E. Knuth, a mathematician and computer scientist, developed the TeX typesetting system for the creation of beautiful books--and especially for books that contain a lot of mathematics. His brilliant work was a resounding success, and some variant of TeX is now used by most professional mathematicians. If you pick a random mathematics book published in the last five years, the chances are good that it was formatted with TeX.

Leslie Lamport created LaTeX as a structured, high-level interface to TeX. Technically, LaTeX is a large macro package that loads on top of TeX. An advantage of using LaTeX instead of plain TeX is that LaTeX takes care of many stylistic details automatically; also, many people have written add-on packages for LaTeX that solve common typesetting problems. In particular, the American Mathematical Society has sponsored the development of a package named amsmath that simplifies the typesetting of complicated mathematical expressions.

LaTeX is a Mark-Up Language

LaTeX is a markup system: this means that you type instructions to LaTeX in the same file as your text. Many common desk-top publishing systems follow the quite different paradigm of WYSIWYG (what you see is what you get). A markup system facilitates editing and revision, enhances portability, and enables sophisticated typesetting. LaTeX is actually a programming language, so you can (in principle) customize LaTeX to do almost anything.

LaTeX is a structural, as opposed to visual, markup language. In LaTeX, you should not give an instruction such as set this text flush left in 14 point bold type; instead, you should say set this text as a subsection heading. LaTeX encourages you to define the logical structure of your document rather than the visual appearance. When you are writing in LaTeX, you should pay attention to the content, not the form.

LaTeX is Portable

LaTeX is portable. Because LaTeX source files are composed of ordinary ASCII characters (the characters you see on the keyboard), it is simple to send LaTeX files by electronic mail and to transfer LaTeX files between different computer systems. From the user's point of view, LaTeX is the same on all computer platforms.

Other Good Parts of LaTeX

LaTeX creates publication quality output. While PC programs like Word and WordPerfect are adequate for office correspondence and training manuals, they are not suitable for serious scientific publications. LaTeX is a de facto standard for quality mathematics books and journals.

LaTeX is free. You can pay money for a LaTeX implementation if you want a turnkey system, but if you are willing to read the documentation, then you can download a free LaTeX system from the Internet.

Comparison of Some Major Verctor Graphics Formats

Feature SVG PostScript Metapost Asymptote