Inicio » size

Archivos de la categoría: size

LaTeX topics: Paper size and margins when producing PS documents

By Kenneth M. Hanson from [http://kmh-lanl.hansonhub.com/spie/]:

DVIPS – converting DVI files to PostScript files
When latex is run, it produces a file with the extension DVI (for Device Independent), which completely encodes the formatted document, with the exception of the image files. A separate application is needed to view or print the document, or to convert the DVI file to a standard document format. The LaTeX application most often used for this purpose is DVIPS, which converts a DVI file to a PostScript (PS) file.
 
The utility DVIPS has numerous options to control various aspects of the PS file that it creates. The defaults depend on how LaTeX is installed on your system. To make sure that these options are set appropriately for your intended use, it is wise to explicitly specify them.
To summarize the following sections, it is a good idea to use the DVIPS options “-t letter -P pdf” for letter paper, and “-t a4 -P pdf”, for A4 paper. In addition, if you use the times package, append the option list with -G0 (G zero).
If you execute DVIPS through a command line, the above options are included at the end of the command. In applications designed for window-based systems, e.g., Windows and the Mac OS, the DVI viewer may be based on DVIPS. In such applications, the DVIPS options can usually be specified. Check with your system administrator or read the manuals for your installation.

It is advisable to use the same paper-size option in DVIPS as specified in the documentclass command in the LaTeX source file. The DVIPS option “-t” specifies paper size. For (USA) letter paper (8.5 in. X 11 in.), use the option “-t letter”; for A4 paper, use “-t a4”.

Share

LaTeX topics: Reducing the size of large PS files

By Kenneth M. Hanson from [http://kmh-lanl.hansonhub.com/spie/]:

If the PS file produced by DVIPS is large (>5 MB), it is probably because of the size of the EPS image files you are using for figures. DVIPS essentially copies the EPS image files directly into its output PS file. To reduce the size of the PS file, the best approach is to reduce the sizes of the image files.

PS and EPS files: PostScript documents consist of instructions for building each page. The PS markup language specifies text in terms of scalable fonts and the position of each text string, and vector graphics commands to describe graphical features. This means of specification has the advantage that a page can be scaled to any size, and the text and graphical elements still appear sharp. The disadvantage of using vector graphics is that when millions of points (or vectors) are drawn, the EPS file can become rather large or take a long time to draw on the monitor.

The PS instruction set also includes “bit-mapped” fonts and rasterized images, which appear blocky when magnified.

PS instructions are given as ASCII text, so you can open an (E)PS file with a text editor and examine the PS instructions.

An Encapsulated Postscript (EPS) file is a PS file that describes a single page. Figures in LaTeX are usually provided as EPS files. EPS files are distinguished from PS files by their BoundingBox command, found near the beginning of the file:

%%BoundingBox: 0 0 1200 900

This command specifies the position and size of the text/image area in PS units (72/inch) or for a rasterized image, its size in pixels.

When an EPS file includes a rasterized (or pixelated) image, it is defined as having a specific size, e.g., 1200 by 900 (pixels). This type of file is created when a rasterized image, such as GIF, TIFF, PNG, or JPEG, is converted to EPS. The list of pixel values can be uncompressed or compressed. The former produce a rather large file. For example, an uncompressed 1200 by 900 pixel color image will be at least 3 MB in size. The compressed type of EPS image often employs JPEG compression, and is usually much smaller. The image file mcr3b.eps, provided above for the sample manuscript, is an example of this type of EPS file.

EPS files for LaTeX: If you are using uncompressed rasterized EPS image files, the obvious way to make them much smaller is to convert them to compressed files using an application such as PhotoShop, HyperSnap, IDL, or MatLab. If a large EPS file uses vector coding, the solution is to convert it to a rasterized image file (for example, GIF, PNG, or JPEG; avoid TIFF because of copyright problems), and then convert that back to a compressed rasterized EPS file.

You should select the resolution of each rasterized image to be high enough to maintain the inherent quality of the published image or graph. A pixel density of 300 to 400 dpi (dots per inch = pixels per inch) on the printed page is often good enough. Thus, an image that will be a half-page wide (~3.4 in.), should be around 1000-1200 pixels wide. Attention should be given to the selection of the JPEG resolution option. The option of “maximum quality” is often not needed – either “high” or “medium” quality usually provides satisfactory print quality and results in a smaller file.
 

Share

Archivos

Categorías