Stockholm 5:th of May 2009.
KTH regulations: This is a personal web page created by Lars Jonsson. More information. You can contact me at ljonsson AT kth DOT se. This page contains a cookie, used for visitor statistics.
Typeset the file test.tex, from
above e.g.
latex testbibtex test, either through emacs menu TeX or from command line e.g
bibtex test
Typeset twice again (to get the bibliography correct) e.g.
latex test latex test
If all worked out well, you now have the result in an dvi file. I provide mine here
test.dvi.
To display it use
xdvi testTo translate it to postscript, use
divps test -o test.psTo create a portable document file (pdf):
ps2pdf test.ps
Sometimes the resulting pdf-document has dropped its margins. This will occure even if we specified a4 paper format in the latex. The resulting pdf-file does not remember this latex setting. It looks as if the whole text moved up to the left top corner. This is typical for the problem of paper size. One solution is:
ps2pdf -sPAPERSIZE=a4 test.ps test.pdf
Sometimes one can use as an alternative:
pdflatex test
to directly create a PDF-file. This is supposed to have some better
searching and display properties than the file created by ps2pdf.
Note: to use the typesetter all your .eps-files has to be .pdf:
epstopdf figure.epsFor more details on pdflatex see eg. prepare pdf-files form LaTeX. One often occurring problem while useing pdflatex or direct conversion to pdf-formats is that some useful tools like psfrag do not work anymore, and as of yet (2007-08) there is no pdffrag nor pdfrag tool. There are some routs around see pdfrack Home page and fragmaster Home page.
One work around is to use ps2pdf. A better alternative is to use Latex create a single -.ps document containing the figure with its psfrag replacments and then to use the ps2eps package e.g.
ps2eps filename.psand then
epstopdf filename.epsIt is a roundabout way to solve the problem, but it works.
Upon submitting your manuscript to an archive, I recomend to use the style file habbrv.bst which provides eprint and can be used to include internal links. The style file you can find here with an explanation of how it works.
\newcommand{\En}{\mathcal{E}}
Normally one will have several such macros, and therefor it is a good idea to put it in a separate macro file. (include the file with 'include
filename'). See how the files macro_dyn
provides macros for test in the section 'an example' above
\input{filename} or with page breaks etc. \include{filename}
xdvi -paper a4r slideshowTo translate .dvi -> ps, use:
dvips -t landscape slideshow -o slideshow.psThe special command:
\special{landscape}\special{! /landplus90 true store}
in the file, makes sure that the file does not turn upside down.
It might still cause some trouble when printing (using e.g. psnup) more than one page, since the pages may appear counter clockwise. The counter to these troubles is to write psnup -l -4 filename newfileIt works like a dream.
MakeIndex filenameis straight forward on a superficial level. The program solves the technical part of indexing i.e. how to associate the position (page) with a desired word or concept in the text is there solved. The keyword to use in the LaTeX document is
\index{favorite word} It is also neccessary to include
\documentclass{book}
\usepackage{makeidx}
in the preamble as well as
\printindexwhere you want to print the index.
However to produce a good index, that is how an index is organization and structured and typographically presented is less that trivial. One
document that discuss the idea of organizing (book indexing and/or back-of-book
indexing) a text (or texts) is TAO-maps. Which
discuss the model Topics Association Occurrence Maps, it clears some of the idea
structure of how a text can be indexed.
Models which answers or suggest
From my point of view, a simple index which only lists one level of topics is the easiest to construct. On the other hand, one might get several very similar words scattered through the index: e.g. surface current density, volume current density, current density, will all be split into several places e.g. under the letters c,s and v. An alternative might be to list all three as subtopics to of e.g. current density. Such a subtopic listing often have troubles with associations. E.g. imagine that we choose current and density as two separate topics, should then a current density subtopic (of density, and of current) have mutual associations between density and current (see also...)?
Ideally an index is to be a concentration of the information in a text. This ideal requires an iterative procedure to extract an appropriate set of pointers to the text, almost like constructing a miniature abstract for each paragraph.
psbind test.ps new.psnew.ps will have two columns (each column containing one of the pages of test.ps) on each page of paper.
psbind -3 test.ps new.pswould try to make three pages per page.
EPS files, psnup and printing on HP LaserJet 4250 caused the printer to crash. A work-around is available at the computer groups help files. This work around, makes the pages formated with psbind printable, but unfortunately some size parameter gets wrongly set and printing typically slizes of the last line of the page. If the latex code is awailable you below find another way of inserting two pages on one.
A suggestion to fix the crash of laserjet printers upon using psbind (not psnup) is
psbind --fix=force'which forces the document through gs before combining multiple pages.
psnup -2 filename.ps to_filenamePuts two pages to each page. Save a tree, print smaller:) Even better use psbind above.
When printing four or more files in for e.g. slides with paper in the landscape direction, either of the following two solutions works well:
psnup -4 -l landscapefilename.ps out_file.psor
psbind -4 --psnup="psnup -l" landscapefilname.ps out_file.psThe option '-l' tells psnup that the paper is landscape and improve the ordering that the papers are displayed. Many thanks to KenShan for providing this solution.
\documentclass[10pt,twocolumn,landscape,a4paper]{article}
\special{landscape}\special{! /landplus90 true store}
\setlength{\oddsidemargin}{0mm}
\setlength{\evensidemargin}{0mm}
\addtolength{\textheight}{55mm}
\addtolength{\textwidth}{43mm}
\setlength{\topmargin}{0mm}
\setlength{\headsep}{4mm}
\voffset=-20mm
\hoffset=-20mm
\columnseprule=.01pt
The length parameters are optional the key is the 'twocolumn'. But this set of parameters work fine on A4 paper.
To obtain bigger textarea and smaler margins there is a fix in certain versions of the Acrobat program:
Under the menu:
Tools : Advanced Editing : Crop Tool
a tool,
that can crop margins is provided. Simply mark the text that you want to remain, on one page in your PDF document. Double click on the frame that appears.
In the option window, called 'Crop Pages' that appears, there is a button,
'Remove White Margins' and we can apply it to the Page Range option 'All'.
Printing the resulting document (with the above described 2 pages per page),
is roughly equivalent to psbind for pdf files.
dvips -t landscape documentcauses the resulting postscript file to display upside down. One quick fix for this is to insert the command
\special{landscape}\special{! /landplus90 true store} immediately
after \documentclass in the tex file.
For printing landscape oriented fiels with psbind/psnup see the printing section.