LaTeX is the de facto standard for scientific typesetting; in a nutshell, it's the markup language for maths-oriented print media, in the same way that HTML is the language with which hypertext on the web is formatted. But LaTeX had "style sheets" long before they appeared on the internet as CSS.
LaTeX is capable of essentially everything that you can do in HTML/CSS, including hyperlinks and multimedia, but it can do much more because its foundation, TeX, is actually a kind of programming language, albeit not one that implements the latest fashions. It is from a time when graphical user interfaces (GUIs) were still in their infancy, and most user-interfaces were text or script based. Of course as GUIs matured, they themselves became "scriptable" (see, e.g., ApppleScript on the Mac). The moral of the story is that scripting is still the only way to do serious work on a computer, so why abandon a powerful program like TeX only because it isn't GUI-oriented?
LaTeX allows you to produce high-quality PDF output, and can also be converted to other formats such as RTF, OpenOffice or HTML. But just like HTML, it isn't so easy to see what the output will look like while you're typing the source code. That immediate feedback is something you only get with WYSIWYG editors, i.e., the garden-variety word processor to which MS Word has become eponymous. This is a drawback of LaTeX. The advantage of LaTeX is that the styling of your document can be changed by loading different packages and setting options in a few lines, without having to go back to the content and make changes at the level of paragraphs and equations.
If you want the best of both worlds, you should use LyX
. Since this is a page about LaTeX
, I will just point you to this introductory video explaining the easy with which LaTeX can be used from within LyX
.
As LyX
shows, the two worlds of WYSIWYG and LaTeX aren't completely disconnected. One can also, within limits, convert a given document from word processor format to LaTeX format and back. Here are two pages that deal with the conversion problem under various aspects:
The return journey from LaTeX to word processor format is, however, a more advanced topic, because it involves the tex4ht
package - a highly customizable but also highly intricate system for translating both the semantic and stylistic content of a LaTeX document into HTML and related markup languages (Here is an example for the uses of tex4ht
.). These conversion problems become much easier to solve if you write your documents in LyX
right from the start. The reason is that the internal format used by LyX is much closer than LaTeX to the XML structure underlying web pages and Office documents.
texlive
distribution (which is the bulk of MacTeX) is also available from fink If you previously installed fink's tetex
package, you can replace it with texlive
by following the instructions here.
scalefnt
package, and the rotating
package. With these you can create text that is either huge or microscopically small, and criscrosses the page at any desired angle. Scaling to arbitrary sizes doesn't work with all maths fonts (the age of TeX shows here), but it does work, e.g., with mathtime
or mathpazo
.
That can be very easy if you don't have complicated formatting going on, and if you aren't using math formulas, cross references and other fancy things. OK, so in other words, for the audience I'm talking to here, it is not easy.
So don't even start with Word for serious work. It's hard to keep it future-proof and portable (unless you're able to spend the money on upgrades and site-licensing etc.)
For people who want to go through with the switch, I'll try to give some advice on a separate page.
There is an inexhaustible amount of information on LaTeX on the web -
png
images of equations, if you don't have LaTeX on your computer.
uothesis
LaTeX package on CTAN.
dvi
format. The following programs can open dvi
files:
xdvi(k)
, the original Xwindow program. It is the only one (in this list) that does not need to build an auxiliary PDF file from the dvi input first.
texdoc
; for example, to get general information about the latex command itself, type texdoc latex
.
texexec --pdfarrange --result=merged.pdf file1.pdf file22.pdf
texexec
utility can also be used to extract pages from a file, and much more (see the manual page).
Start with a multi-page file "newfile1.pdf" in an otherwise empty working directory. I'm assuming I want the page numbers 2, 4 and 5 extracted. The code for this could look like this (in tcsh
):
foreach i ( 2 4 5) foreach? gs -dSAFER -dBATCH -dNOPAUSE -dFirstPage=$i -dLastPage=$i -sDEVICE=pdfwrite -sOutputFile=im$i.pdf newfile1.pdf foreach? end gs -dSAFER -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=combine.pdf `ls -t im*.pdf`With this, the output file "combine.pdf" has the desired three pages and also the original page format. You have to use
tcsh
so that the "foreach" command is recognized, which I use to loop through the list of pages to be extracted. The loop creates one file each per extracted page, and the last line after the loop combines these pages back into a single document. The ls -t
above sorts the individual pages in the order in which they were created.
Automator
, it's easy to create a workflow containing the steps "Combine PDF Pages", followed by "Open Images in Preview". Saved this as a Finder Plugin
to be accessed by right-clicking any set of PDFs in a Finder window. In Mac OS Leopard, the Preview application provides this functionality.
Automator
script on Mac OS X opens up another command-line solution to combine PDF
files. Essentially, Automator uses Apple's built-in CoreGraphics library via a Python
script. That script can also be called by the user directly, as I did for example in this post on the Mathematica user group. The syntax for merging file1.pdf
and file2.pdf
would be
/System/Library/Automator/Combine\ PDF\ Pages.action/Contents/Resources/join.py --output merged.pdf file1.pdf file2.pdf
pdflatex
and the pdfpages
package. Instead of doing the same thing again, here is another example for the use of pdfpages
:LaTeX
code:
\documentclass{minimal} \usepackage{xcolor} \pagecolor[HTML]{B0A030}\usepackage{pdfpages} \begin{document} \includepdf[fitpaper,pages=-]{inputfile.pdf} \end{document}Here, the desired background color is given in hexadecimals, e.g.,
B0A030
(as one does in HTML code, too). The screenshot below shows what this looks like:Incidentally, the script removes access restrictions from the PDF file while recompiling it (it's not my script that does that, it's the pdfpages package). Obviously, you should use it on such files only with the proper permission.
Based on pdfpages
, I wrote a script that can not only color the background of a PDF file, but also re-arrange its pages so that there are n×m original pages per physical output page. This is also called "n-up" printing. Details about the script are on a separate page.