next up previous contents
Next: Presentation-Applications Up: Applications Previous: Image Manipulation


Typesetting

  • LATEX, man-page is a high-quality typesetting system, with features designed for the production of technical and scientific documentation. LaTeX is the de facto standard for the communication and publication of scientific documents.

    LATEXis not a word processor! Instead, LATEXencourages authors not to worry too much about the appearance of their documents, but to concentrate on getting the right content. It is based on the idea that it is better to leave document design to document designers, and to let authors get on with writing documents. LATEXis based on Donald E. Knuth's TeX typesetting language. LATEXwas first developed in 1985 by Leslie Lamport, and is now being maintained and developed by the LaTeX3 Project.

    LaTeX here at ccrma is installed as part of the teTeX distribution. Latex is highly recommended for papers and other documents where very high quality and portability are essential. The TEXsystem generates device independent output so that not matter where you view or print your document, it will always look the same (up to the available resolution of the hardware device you are using, of course). You do have to learn a language, but it is worth it. See section §9.6.3 for LyX, a gui frontend that you can use to reap most of the benefits of LaTeX without the steep learning curve.

    Some of the commands that are part of the teTeX packages:

    tex
    tex formats the interspersed text and commands contained in the named files and outputs a typesetter independent file (called DVI, which is short for DeVice Independent)
    latex
    latex enables the LATEXset of TEXmacros and outputs a dvi file
    dvips
    converts a dvi file into postscript
    xdvi
    a very simple dvi file viewer

    To get a postscript file you might want to type following commands,

    
     		   
         latex  yourfile.tex
         ...
         ...
         ...
         dvips -o yourfile.ps yourfile.dvi
         ...
         ...
         ...
    
    where yourfile is the name of your file. Also please note that the latex command produces a dvi file which need further to be translated to ps format or Acrobat's pdf's format. To get a pdf format you type:

    
     		  dvipdf yourfile.dvi yourfile.pdf       
    
    A good LATEXreference manual can also be found at
  • LatexHelp

    To save some trees and as suggested by Julius Smith the following commands will let to print two pages in one from a ps file:

    psnup -n 2 infile.ps > outfile.ps
    psnup -pletter -n 2 infile.ps > outfile_2up.ps


    To print an A4 formatted document you need to re size to ``letter-size'' by using psresize as follows:

    psresize -PA4 -pletter infile.ps > outfile.ps

  • Producing PDF Output using pdfLATEX, man-page:

    The Portable Document Format (PDF) is a-page oriented format available for electronic documents. It is based on Postscript and combines fixed textual contents with hypertext elements, compression elements and security measures.

    Adobe (developers of Postscript) has made the ``PDF'' specification public and freely available so that anyone is entitled to write software to produce and to read files in this format. They have also made available a free reader program called ``Acrobat Reader'' (also known in Linux as the ``acroread'' command). Today most graphical and text processing programs are capable of generating PDF output.

    While having a TEX or LATEX file there are several ways the user can take. The choice depends more on the kind of graphics being used. As we know LATEX can handle a long list of graphic formats including ``ps'' and ``eps''. If LATEX is your choice for generating your ``pdf'' files, first you need to compile the device independent file or ``dvi'' (see previous section) and then use the ``dvipdf'' command as follows:

    dvipdf yourfile.dvi yourfile.pdf

    The other more direct method is to use the ``pdflatex'' program to get a ``PDF'' file right away. When started, the program reads a configuration file ``pdf.cfg'' which can set many parameter such as page size, offsets, compression level, dvi or pdf output, and can specify the names of the font mapping files.

    ``pdflatex'' handling of graphics is different from LATEX. For best results graphics should be imported as ``PDF'' also before running the ``pdflatex'' command. For instance if you have ``eps'' graphic files you can use the ``epstopdf'' to get a graphic ``PDF'' file like,

    epstopdf your_graph.eps

    If you are using Xfig §5.9 for diagrams or graphics you can export directly to ``PDF'' format. In some cases you might need to adjust your figure by using the LATEXcommands such as scalebox and rotatebox to place the figure as desired.

    As a matter of choice, here is an example of a LATEX- file heading for better handling of graphics in both programs by means of ``latex'' or ``pdflatex'' commands:

      \documentclass[letterpaper,11pt]{article}
      \usepackage{times}
    
      \ifx\pdftexversion\undefined
        \usepackage[dvips]{graphics}
      \else
        \usepackage[pdftex]{graphics}
      \fi
    

  • LaTeX2HTML (see man-page), is a convertor written in Perl that converts LATEX documents to HTML. This way e.g. scientific papers - primarily typeset for printing - can be put on the Web for online viewing.

    Very very useful stuff. The CCRMA Planet guide itself is written in LATEXand plublished on the web through latex2html. At ccrma the complete latex2html online documentation can be found at file:///usr/lib/latex2html/docs/manual/index.html


next up previous contents
Next: Presentation-Applications Up: Applications Previous: Image Manipulation

© Copyright 2001-2006 CCRMA, Stanford University. All rights reserved.
Created and Mantained by Juan Reyes