LaTeX: It's Not Just for Academia, Part 1
Pages: 1, 2, 3
X11-Based LaTeX Implementations
The above programs focus on bringing Mac OS X users a comfortable and familiar environment for composing LaTeX documents. These programs mainly offer LaTeX services, wrapped in an Aqua interface. However, if you have a Unix background, or are a bit more adventurous and willing to learn some new tools, you can use LaTeX under Unix.
As you know, lurking under Mac OS X's familiar Aqua interface is Unix, specifically BSD. Apple's implementation of X11, the XFree86 project, and projects such as Fink are actively bringing the world of Unix open source software to Mac OS X. This is great news for users since it opens up a whole new world of high-quality software for the Macintosh, all for free.
Now, LaTeX users under Mac OS X have access to many of the LaTeX tools from the Unix world. To use these tools, you will need to install Fink, as well as X11. This is a very simple process and each of the web sites provide all the information you need.
LaTeX via Fink
Once Fink is installed, you use the Fink command-line program fink or apt-get, the cursors-based package management front end called dselect, or Fink Commander, to install and manage your Unix software. The Fink tools are documented on the Fink site and in man pages, which are placed on your system when you install Fink. Use any of these programs to install the Fink LaTeX packages (tetex-base, tetex-texmf, and so on). In addition to these packages, there are many other TeX packages available via Fink. For example, LaTeX2rtf will convert a LaTeX file to an RTF file; LaTeX2html converts LaTeX documents to HTML; and texpower can be used for creating dynamic online presentations with LaTeX. Note: you will need root permission to install the software.
Now that TeX is installed, you can process your LaTeX files from the command line, just as you would under Unix. For example, to process a file:
- Open a shell (either from Terminal or X11)
- Change directory (cd) to the directory that contains your LaTeX file
- type: latex <latex-file>
Unix LaTeX Programs
There are many Unix LaTeX programs and utilities available for Mac OS X. LyX is an open source document processor. The visual appearance for this version is similar to the native Macintosh version, except that it uses the X11 environment.
AUCTeX is a GNU Emacs-based package that provides a customizable integrated environment for composing LaTeX files using Emacs. To use AUCTeX, you need to install Emacs version 21 (emacs21). Once installed, when you open a LaTeX file in an Emacs buffer, several new menus are added to the EMacs menu bar. These include Preview, LaTeX, Commands, Math, and Ref. These menus hold commands and shortcuts that support composing and viewing LaTeX documents--much like the Mac OS X programs previously discussed.
TeX Mode is an Emacs mode that supports editing LaTeX files. The mode usually come installed with Emacs. When you open a LaTeX file in an Emacs buffer, Emacs selects the LaTeX mode. The mode provides support for editing and composing LaTeX files with Emacs. See the TeX Mode site for more information.
GNU TeXmacs is a free TeX-based WYSIWYG environment that enables you to write structured documents. The goal of the project is to produce a complete scientific office suite, including a spreadsheet, a technical drawing editor, and a presentation program.
Installing TeXShop
Now that you have seen what versions of LaTeX are available for Mac OS X, let's look at one of them in more detail. For this example, we will use TeXShop. To begin using TeXShop, go to the TeXShop web site and perform the following instructions. Note: you will need root permission to install the software.
Installing TeXShop
- Download the latest version of TeXShop
- Locate and open the TeXShop .dmg file and drag TeXShop to your Applications folder (if you wish, place TeXShop in the Dock)
- Place
pdfsync.styin your~/Library/texmf/tex/latexfolder (if necessary, create the folders within your Library folder) - Save the remaining files in the folder to a new folder called TeXShop
Installing TeXLive and teTeX Distributions
- Download II2.dmg from the TeXShop site (under Obtaining TeXShop and TeXLive-teTeX)
- Open II2.dmg and drag i-Installer to the Utilities folder inside Applications
- Double-click on the i-Installer, choose i-Package->Known Packages i-Directory...
- Install each of the following packages, in this following order
(not all of these packages are required, but it's a good idea to install them anyway). To install a package, select the package, click the "Open i-Package" button, and click the "Install & Configure" button
- TeX
- CM Super for TeX
- Ghostscript 8
- Freetype 2
- wmf and iconv conversion support
- ImageMagick
- TeX Support: TeX4ht
Now that you've installed the program, launch TeXShop and select File->Open.
Maneuver to the TeXShop folder (that you saved above) and open example.tex, which is located in TeXShop_Folder. Finally, click on the Typeset button in
the editors toolbar. If everything installed correctly you will
see TeXShop process the document and display the corresponding PDF file.
LaTeX Versus Word Processors
An advantage to using a word processor is that it comes with integrated features that support the writing process. Since LaTeX files are stored as text, you can easily roll your own support tools by using Unix commands and some open source applications.
For example, when submitting articles for publication, you sometimes need to stay under a certain number of words. So, you will need a method for determining the number of words in a LaTeX document. Since LaTeX documents contain LaTeX control sequences as well as your text, the problem is somewhat more complicated. To accomplish this, you follow the age-old Unix practice of chaining small, pre-existing programs together to accomplish new tasks. To do this you will need DeTeX, a filter program that removes LaTeX/TeX control sequences from the input, and the Unix utility wc, which displays the number of lines, words, and bytes contained in an input stream. DeTeX is available from Fink, wc is a standard Unix utility that comes with Mac OS X.
The following example shows a simple LaTeX file and command for counting and displaying the file's word count.
\section*{Introduction}
This is the first line in the file.
This is the second line.
% detex detex_test.txt | wc -w
14
Conclusion
I hope this article has piqued your interest in trying LaTeX. In reality, the only way to know if it's right for you is to roll up your sleeves and give it a try. If you are most comfortable with Mac OS X applications, try TeXShop and iTeXMac first, and see which one works better for you. You may also want to check out the other Aqua-based programs. If you like using a mixed environment (Aqua and X11), or you are primarily a Unix user, give the Unix-based versions a try. Also, check out the web for more information on TeX and LaTeX.
I'm sure you will see why so many people are using LaTeX. In my next article, I will introduce you to using LaTeX for common writing tasks. I look forward to hearing about your experiences using LaTeX. Until then, enjoy!
ResourcesGeneral LaTeX Web ResourcesLaTeX Books
|
Kevin O'Malley is a long time Macintosh and UNIX developer. His articles have appeared in Dr. Dobb's Journal, IEEE Internet Computing, and The Perl Journal, and he is the author of Programming Mac OS X: A Guide for UNIX Developers.
Return to the Mac DevCenter
You must be logged in to the O'Reilly Network to post a talkback.
Showing messages 1 through 22 of 22.
-
Install directions.
2004-02-22 21:00:26 epistemos [Reply | View]
The package install list is different than that posted on the TextShop page, especially the order. Also, TextShop says that (lib)iconv is no longer necessary in Panther.
-travis n
-
I love LaTeX, but...
2004-02-11 20:54:38 mmmpie [Reply | View]
I hate the install process.
The author didnt talk about any of the underlying TeX packages. What is teTeX, how is it different from TeX, which one should I choose? I installed tex and lyx with the i<thingy> system, and it just doesnt work, cant find any of the packages.
Then you start to read about LaTeX, and you run into all these things you have to do to get fonts, and to generate pdf's that dont use bitmaps etc etc.
Where is the one stop install? Is that what the shareware packages give you? I want a double click and install, with no crappy issues that you need to add four lines to the top of all your tex files and change how you call dvips to fix sort of things.
Its just not user friendly ( the install ).
-
I like LaTeX but how to share with MS office users
2004-02-06 19:37:09 jahumada [Reply | View]
I do love LaTeX and I use TeXshop to prepare my papers and
reports, but I am often frustated by the fact that I want to share
my documents in an MS Word compatible format. I have tried
a couple of programs like Latex2rtf with no avail. Anybody knows of a good way to compile your latex document into an rtf or Word format? -
I like LaTeX but how to share with MS office users
2009-09-21 20:05:53 aquatarian [Reply | View]
And now, years later, we have http://www.pdfonline.com/pdf2word/index.asp
Works pretty well... -
I like LaTeX but how to share with MS office users
2004-02-08 08:00:30 maartensneep [Reply | View]
The short version: there is none. I usually dump them a pdf version, and if they complain that they want to change something, they either get the source, or they can forget it. Rude? yes, but very effective. I never felt the urge to share something in MS Word.
The long version: http://www.goldmark.org/netrants/no-word/attach.html
That said: I've heard reports that a conversion to html will give OK results (forget about maths, that is just impossible in Word).
Maarten
-
text editors and word processors
2004-02-06 09:37:11 xeroply [Reply | View]
I've never used LaTeX but the article definitely got me interested. The bibliography extensions look especially attractive, as it seems like formatting "works cited" pages is the worst part of any research paper.
As for text editors, I highly recommend SubEthaEdit. Even though its main purpose is collaborative editing over a network, it's an excellent single-user editor too. I use it a lot for writing precisely for the reason you cited -- I can just get thoughts down without fussing with formatting and spelling (though you can turn on the Apple spell checker if you want). Combined with the free WordService, which adds neat text processing features to all Cocoa application via Services, I can do pretty much everything I need (including word counts) until it's time to format .
When it's time to write code instead, it's got pretty good syntax coloring support, including for LaTeX.
-
Latex is to document creation as Cocoa is to application development
2004-02-04 17:28:34 toolman [Reply | View]
With just a little bit of a learning curve, Latex provides so many things for free. Bibliography, positioning graphics and images in the most appropriate places, indexes, table of contents, table of figures, all for free.
Used Oztex back in 1994-1995 to write my masters thesis in electrical engineering. Our university had it's own thesis style already created so a lot of the hard work had already been done. Latex has a fairly steep learning curve, but once you "get it", all the benefits combined with the professional look of the documents makes using it a no brainer.
I haven't had a need for it since my thesis, but if I need to create a manual for an application or somthing else fairly complex, I will definitely use one of the implementations described in the article.
-
tool for latex under emacs
2004-02-04 10:23:35 louabill [Reply | View]
For folks who like other editors, such as emacs (and there are probably few enough of them), try out the very niceultratexpackage for editing LaTeX. It can be found at:
http://www.math.washington.edu/~palmieri/Emacs/ultratex.html
-
Fonts and More...
2004-02-04 08:23:56 bkerstetter [Reply | View]
You can install fonts by following the instructions here:
http://homepage.mac.com/bkerstetter/tex/fonttutorial-current.html
If they do not work, please let me know. I maintain the document, but someone else (more experienced and much smarter) wrote the original.
I have been using TeX, LaTeX and ConTeXt for 18 months and have never looked back.
The learning curve is about the same as for Word, if you use Word with it's styles and such. The output is much much much much better. The typesetting is excellent.
If you need to do complex layouts, LaTeX is pretty good, but ConTeXt is better. I currently do a multi-column monthly newsletter using LaTeX, but am switching to ConTeXt over the next several months.
TeX and friends have there own set of frustrations, but I use the same source files to generate PDF, HTML and Word output (through a simple conversion process). I use the TeXShop frontend and the distribution of TeX by Gerben Wierda.
The TeX on Mac OS X Mailing List is very helpful.
Here are some links, some duplicated from the article.
TeXShop:
http://www.uoregon.edu/~koch/texshop/texshop.html
gwTeX:
http://www.rna.nl/tex.html
TeX on Mac OS X Mailing List:
http://www.esm.psu.edu/mac-tex/
-
Fonts and More...
2004-02-04 10:46:42 jimothy [Reply | View]
Perhaps that'll address an issue I've had: LaTeX-generated documents are immediately identifiable because the font looks...somehow off. I'm not typesetting expert, so I can't put my finger on it, but the text doesn't have the appearance of a professionally typeset book, or even anything one might produce in Word or some other word processor. Perhaps it's the spacing between letters? -
Fonts and More...
2004-02-06 15:30:17 maartensneep [Reply | View]
No, certainly not the letter-spacing, it is the letter-shape, I think. I like LaTeX, but I can't stand Computer Modern, to the point of actually buying the Lucida typefaces (about US$ 250, that was the savings on the software ;-).
The Computer Modern typeface, at least the serifed ones, have a very strong contrast (the difference in thickness of the up- and down-stroke of a letter; the difference between the thick and thin lines). On current printers the contrast is so large, it becomes hard to read -- vertical lines nearly dissappear. Older, lower-res printers "blurr" it a bit more, and then the effect isn't as striking. It doesn't bother me in the TeXBook (the description by D. E. Knuth, and that certainly is CM).
On current LaTeX installations, you can try \usepackage{mathptmx} to see what happens with times (some maths letters are not available in the standard times typeface, and are faked or taken from CM. Other typefaces are available, even in a standard configuration.
Maarten
-
Fonts
2004-02-04 04:14:11 bonaldi [Reply | View]
LaTeX is all well and good ... but Computer Modern only appeals for so long. Installing new Fonts so that Word can see them is a drag and drop process. But doing so in LaTeX? Well, I still haven't managed. This needs fixed before it becomes my document processor. -
Fonts
2004-02-04 08:24:34 bkerstetter [Reply | View]
You can install fonts by following the instructions here:
http://homepage.mac.com/bkerstetter/tex/fonttutorial-current.html
If they do not work, please let me know. I maintain the document, but someone else (more experienced and much smarter) wrote the original.
-
vim-latex + iTeXMac
2004-02-03 21:56:05 sjrey [Reply | View]
for those who prefer vim to emacs, there is a very nice project
at http://vim-latex.sourceforge.net/.
you can use this with either carbon versions of vim or fink versions of vim, as well as with iTeXMac or tetex from fink.
-
unicode?
2004-02-03 18:37:12 qazxsw [Reply | View]
Text based is nice, but what about unicode support? I'd like to find a replacement for Word, since it's Japanese language support is so poor.
-
unicode?
2004-02-04 09:00:35 luckyluke666 [Reply | View]
With the right set of packages and fonts, LaTeX can handle Japanese quite well. The quite lengthy procedure is explained here: http://www.ece.uci.edu/~chou/unicode-tex.html. I have followed the instruction and made it work on my installation of teTeX, to the delight of my girlfriend. You may want to use TeXShop and set it up to save your files in UTF8 format. -
unicode?
2004-02-04 08:51:03 bkerstetter [Reply | View]
Omega may offer some hope for unicode. Don't have used it. It just use the quaint way in TeX: \'a to get á
http://omega.enstb.org/ -
unicode?
2004-02-04 03:23:27 otto [Reply | View]
Sorry to say, but LaTeX's unicode support stinks. I know, you can get it to work with anything, but it doesn't Just Work (the reason is probably that unicode wasn't yet invented when Knuth wrote TeX). There's a next generation LaTeX project called Omega, that aims to support unicode, but it's been going on for years without any visible progress whatsoever.
Don't get me wrong, I love LaTeX and use it for most anything, but it is tedious to write and definitely has its shortcomings. -
unicode?
2007-05-30 21:38:36 Vocaro [Reply | View]
Actually, I figured out how you can use Unicode in LaTeX quite easily.
1) Using Fink, install the unicode-tex package
2) Add the following line at the top of your document:
\usepackage[utf8x]{inputenc}
With that simple change, you can insert non-ASCII characters (such as accents and umlauts) directly into your document without having to use LaTeX's clumsy escape mechanism.






http://www.inf.unibz.it/~franconi/mac-emacs/