Amazing pdf(s)
 
 

Briefly: TeX and LaTeX

TeX (take care of using the right capitalization, the author of TeX dedicated an entire chapter to convince us about all the meanings that are behind this word. For further details you can download the TeX source of his own TeXbook available on CTAN archives. You have to hack it a bit in order to effectively compile it, a very stupid and enjoyable task even for a newbie) is a software for document presentation generously donated to the community by Donald Knuth (simply Don for the rest of the world). It was originally designed to make the writing of a mathematical artifact using computer a more effective experience. At the time the formulas were rendered, in the best case, using some pedice notation and in courier, really ugly at first glance and very far from the fashion of the handwritten formulas; moreover, these artifacts were produced in two steps involving the writing of the manuscript by the author and then the typing of it: two sources of errors without any kind of benefit. The idea of Knuth's was easy: "Ok, it's time to publish the formulas as the matematichians write them!" and so TeX was born.

One of the major problem, using TeX, is its complexity. Try to read a TeX source file (please note that a TeX source file is not recognizable just for the extension .tex provided that it's used also for LaTeX files and some others). In fact, to productively use it, you should make up a library of macros (written in TeX obviously) to accomplish the most common tasks... a job quite far from what we intend as "writing a book"; moreover, you likely want to change the aspect of the page, rearranging it in a different way from the default one: an other frustration in TeX. Fortunately, someone did it for us, once and for all (at least for the most common needs).

LaTeX is a software designed and firstly implemented by Laslie Lamport based on Knuth's TeX. It is an easy extensible set of macros that put immediately everyone in conditions to write an amazing book or a more modest article, full up of splendid formulas.

Just a last advice for the beginners who are intended to learn more about TeX and LaTeX. Unfortunately, nowdays we are accustomed to use WYSWYG tools which permit to type and see the results immediately. At a very first glance it maight appear easier but, using this approach reveals a lot of limitations in long terms, the most two relevants are, in my opinion, the wasting of time spent in continuosly correction to the presentation and, consequently, loss of attention on the (real) job. The results, even in terms of look and appeal, aren't so appreciable, dued especially to the manual publishing. Definitively, this approach is totally inappropriate for serious works! TeX and LaTeX are totally different from this point of view: they allow you to concentrate on contents and all the rest is automatically and robustly performed by the compiler! Try to get!

From a LaTeX file to a .pdf

The whole process to produce a pdf file involves many steps that I don't want to touch in depth. I simply mention them in the order they occurr:

  1. produce the .dvi (merely, run $latex filename.tex)
  2. produce the .ps (merely, run $dvips filename.dvi)
  3. produce the .pdf (merely, run $ps2pdf filename.ps)

Some of the above steps may be merged togheter but, essentially, the process is the same.

Why my pdfs are so ugly?

In most cases the result is very ugly. AcrobatReader shows the fonts scattered, why? My GhostView (or any kind of FreeSoftware you use) shows it so fine, where I'm wrong?

The answer is a bit technical but instructive: the document gathered to AcrobatReader doesn't contain Type1 fonts! If you check the fonts used into your document (in AcroRead you can check them through File>Document Properties>Fonts...) you'll get, likely, a list of Type3 fonts, a kind of fonts that are bitmaps. The first thing you have to do is to import the package ae into the preamble of your LaTeX document, merely:

\usepackage{"ae"}

this is the widely known solution, but, when you use some PS tricky package it, sometimes, doesn't drammatically work.

To fix the problem definitively, you have to instruct dvips appropriately to remap the default fonts with the Type1 variant, where possible. Go ahead for the trick...

What's the trick for a wonderful pdf?

The question is very annoying and this is one of the reason I spent my expen$ive time writing this doc, hoping it will help one of you allowing to save a lot of InterTrotting time. Your TeX distribution, likely, has been deployed with many funny things, one of this is a configuration file for dvips suitable to accomplish the task for you, so, without tamping you much more, try the following command in substitution of the previously 2nd step:

$dvips -Ppdf filename.dvi

it will automagically substitute all the Type3 fonts with their most appropriate Type1 variant and you'll get your amazing pdf!

There are other ways?

Yeah, of course. As I sayd before your distribution ought to be deployed with some easier tool to accomplish the whole process with a single command (I'm thinking, for example, at pdflatex utility). But, unfortunately, these tools experience many troubles when you try to compile LaTeX source files that use some uncommon package that use tricky PS commands. Personally I experienced such kind of problems using pstricks package and the pdflatex tool on my MiKTeX distribution. The solution I proposed is more robust even though more intricate.

Links

  • Donald Knuth's Mythical Home Page! So huge for just one person.
  • Laslie Lamport's personal home page @ Microsoft.
  • CTAN: the Comprehensive TeX Archive Network. All about the TeXworld.
  • tug: TeX Users Group.
  • MiKTeX: a popular TeX distribution for Windows platform.

 


Valid XHTML 1.0!

Valid CSS!

home – e-mail
(C) 2003 by Giovanni Costagliola — All Rites Reversed