Excellent Typesetting, Part 4
February 23, 2005 – 12:00 pm“I would not give a fig for the simplicity this side of complexity, but I would give my life for the simplicity on the other side of complexity.” –Oliver Wendell Holmes
Last week, I said that LaTeX was difficult to figure out. What an understatement!
LaTeX is great if all you want to do is use it with its default settings. It really does produce excellent typesetting in an automated way. However, if you need to change page layout or use a variety of fonts, LaTeX is far from being automated. In fact, most LaTeX packages are so focused on doing everything for you that getting the control you need is almost impossible–unless you’re willing to learn the TeX macro language. Frankly, I’m not.
So what’s the alternative? Not being willing to give up on this particular idea, I’ve been investigating a variety of things. The program I’ve settled on is one I mentioned last week: ConTeXt:
Here’s what the manual has to say:
“The development of ConTeXt was started in 1990. [Our company had used] a number of TeX-based macro packages. . . . However, the nontechnical users at our company were not accustomed to [the] rather complex . . . interfaces [of those packages]. For this reason we initiated the development of ConTeXt with a parameter-driven interface and commands that are easy to understand.”
“Well,” says I, “that sounds promising.”
Unlike many LaTeX codes, ConTeXt codes really can be used and understood by mere mortals. For example, here’s what a typical document looks like:
\definepapersize[book][width=6in,height=9in] %Define page size
\setuppapersize[book][letter] %Put the page on letter-size paper
\setuplayout[location=middle,marking=on] %Center the page, display crop marks
\setuppagenumbering [alternative=doublesided,location={footer,center}] %Place folio
\usetypescript[palatino][\defaultencoding] %Use the Palatino typeface
\setupbodyfont[palatino,10pt] %Set up body font
\starttext
\chapter{The Setting}
{\sc It was} the best of times, it was the worst of times, it was the age of wisdom, it was the age of foolishness, it was the epoch of belief, it was the epoch of incredulity, it was the season of Light, it was the season of Darkness, it was the spring of hope, it was the winter of despair, we had everything before us, we had nothing before us, we were all going direct to Heaven, we were all going direct the other way—in short, the period was so far like the present period, that some of its noisiest authorities {\it insisted} on its being received, for good or for evil, in the superlative degree of comparison only.
\stoptext
You can see the result here:
http://www.editorium.com/ftp/dickens.pdf
Not too bad, eh? Try that with LaTeX; you’ll be tearing your hair out. The LaTeX packages and documentation are scattered and inconsistent because they’re written by a variety of people. ConTeXt, on the other hand, is a self-contained system that doesn’t require the use of outside packages, and the documentation (including installation instructions) is voluminous and easy to access. For beginners, the first three manuals are the most important:
http://www.pragma-ade.com/showcase.pdf
I actually like the idea of working with raw codes (if they’re understandable), for reasons explained here:
http://lists.topica.com/lists/editorium/read/message.html?mid=17111328 42
http://ricardo.ecn.wfu.edu/~cottrell/wp.html#tth_sEc2.5
If you’d like to try ConTeXt, here’s the scoop:
For PC:
1. Download and install the TeXLive TeX distribution:
You can buy the package on DVD, or, if you have a broadband or DSL internet connection (the package is huge), you can download it for free.
If you prefer, you can get a minimal TeX distribution for ConTeXt here:
http://www.pragma-ade.com/download-1.htm
In particular, you want the file named “context/install/cont-bas.zip.”
2. Download and install the ConTeXt package:
http://www.pragma-ade.com/download-1.htm
You want the last download on the list–the one named “context/install/mswincontext.zip.”
“Install” here means unzipping the file (giving you a folder named “isoimage”), drilling down through the isoimage/usr/local folders, and copying the “context” folder right onto the root of your hard drive. In other words, the complete path should be c:\context. Then create a shortcut from the cscite.bat file that’s in that folder, and put the shortcut on your desktop. To run the ConTeXt editor, double-click the shortcut. Other than that, TeXLive should already include everything you need.
For Macintosh:
Not being a real Macintosh user, I don’t know how to install ConTeXt on a Mac, but you’ll definitely need to go here–
http://www.pragma-ade.com/download-1.htm
–and download this package:
context/install/macosxtex.zip
You’ll find some helpful stuff by following the thread here:
http://www.ntg.nl/pipermail/ntg-context/2004/007442.html
You’ll also need a TeX distribution, which you should install *before* installing ConTeXt. You can get the TeXLive distribution here:
You can buy the package on DVD, or, if you have a fast internet connection (the package is huge), you can download it for free.
Lots of Mac users like the XeTeX distribution:
http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&item_id=xetex
IMPORTANT NOTE: If you get stuck on the install or on getting ConTeXt to work, go here and *ask for help*:
http://archive.contextgarden.net/list/context.html
http://www.ntg.nl/mailman/listinfo/ntg-context
Don’t be shy; these are friendly, helpful, knowledgeable people, including Hans Hagen, ConTeXt’s creator.
One thing remains: getting an edited Word document into ConTeXt. For starters, you’ll need to find text styled as headings (Heading 1, Heading 2, and so on–you do use styles, right?) and tag them with ConTeXt codes. You’ll find complete instructions for this kind of thing here:
http://lists.topica.com/lists/editorium/read/message.html?mid=17035255 14
For example, you might search for text styled as Heading 1 and replace it with *itself* (^&) inside the ConTeXt chapter code, so it ends up looking like this:
\chapter{My Chapter Title}
Do the same kind of thing for italicized text, so it ends up like this:
“You did {\it what}?” she said.
Replace opening quotation marks with “. Replace closing quotation marks with ”. Replace em dashes with —. Replace en dashes with –. Replace single paragraph marks (^p) with two paragraph marks (^p^p).
My RazzmaTag program can do all of this for you in one fell swoop (after you set up the list of replacements):
http://www.editorium.com/razzmatag.htm
And if you want to convert Word footnotes (which is what started this whole adventure), you’ll need my NoteStripper program to strip notes and embed them, tagged, inline with text:
http://www.editorium.com/15078.htm
ConTeXt footnotes are coded like this:
It was the best of times, it was the worst of times,\footnote{Make up your mind, Mr. Dickens. It could hardly have been both!} it was the age of wisdom, it was the age of foolishness, . . .
Another possibility (which I have *not* tried) is to open your Word document into AbiWord and save it as a DocBook file:
You’ll need to download and install the AbiWord plug-ins before doing this:
http://www.abiword.org/download/plugins.phtml
Then, once you’ve got a DocBook file, you should be able to bring it into ConTeXt using the program here:
http://www.leverkruid.nl/context/index.html
I hope this article has been enough to get you started with ConTeXt. You can find additional resources and help here:
http://contextgarden.net/Main_Page
If you need to do truly excellent, mostly automated typesetting, ConTeXt is a great way to go. Set aside a couple of days to just play with it and to read the beginners’ manual. You’ll soon find yourself typesetting with the best of them, using automatic footnotes and ligatures, hanging punctuation, margin kerning, full-paragraph justification–the works. This is the real deal, and all it will cost you is some time. For me, the price has been worth the effort.
Now, I did promise to tell you how to get a Word document into LaTeX (rather than ConTeXt). If you really need to do that, please send me an email message and I’ll tell you what I’ve learned.
Note that ConTeXt files (indeed, any .tex files) are straight ASCII text, which means they can be edited in any text editor or word processor–including Microsoft Word, putting all your usual editorial tools at your disposal.
Next week, I hope to give you a macro that will let you process a ConTeXt file directly from Microsoft Word. Then I promise to get back to stuff that’s more directly related to Word itself.
_________________________________________
READERS WRITE
After reading Clive Tolley’s tip about Guy Verville’s scripts for footnotes in InDesign, Richard A. O’Regan wrote:
I just took a look at Verville’s site and came to the conclusion that, excellent as it his scripts may be, and gratis at that, I am just not able to face up to assembling so much to do the required job. I would simply rather dish out $195, as I did, costly as it was, for a finished program I can work fairly simply. Besides, Verville’s solution appears designed for the PC and not for use with the Mac. So I do not feel ready to make the comparison you suggested.
I have rather the same reaction to your own very detailed efforts to get Office.org working well. I feel I just don’t have the time for anything complicated. I noticed, meanwhile, that the Office.org group has already a beta version of a Mac version called NeoOffice. I have actually now installed that, and made some early tests with it. It looks as if it has great potential to replace Word.
Certainly some solution must be found to replace Word. The reason for the delay in my response is that I have just struggled with an utterly impossible Word document, where absolutely nothing ran as I expected. In a compilation of several chapters, I had paragraphs I couldn’t detach from their original auto-formatting. I had sections that refused to follow the document settings. I had misplaced footers on some pages, and paragraph styles that refused to be applied despite all the “clear all formatting” I had carried out.
I have been experimenting briefly with Apple’s new program “Pages,” part of what they call “iWork.”
When you first look at it, you have the impression it is just another program written for the “masses” who want simple-minded prepared templates for newsletters, school reports, etc., with lots of multimedia attachments like photos and music. Not for the likes of us 500-page, footnote-encumbered strugglers.
But I am not so sure that it doesn’t meet all the needs. It seems to hide away most of the typographical features we need. I need to do some more experimentation. I’m a bit bewildered by one aspect, and I quote from the manual: “When exporting to Microsoft Word, the line spacing may not be identical, so the Word document may have fewer pages than the Pages document.” I can’t figure out why that should occur, and perhaps it doesn’t matter, because I am not likely to turn an original Word document back into Word (only into a PDF file) if I can help it.
I will do anything to avoid Word next time, except I don’t see myself following your instructions over to the Mac. But I congratulate you on your efforts and admire them, and hope profoundly that you may come up with something that helps all Microsoft victims like ourselves.
—————————
After reading Clive Tolley’s comments about typesetting in Corel Ventura, Richard H. Adin wrote:
Over the years, I have used with varying degrees of success PageMaker, Framemaker, QuarkXPress, Ventura, WordPerfect, and Word to do traditional typesetting to produce camera-ready pages for books ranging in size from 150 to 2,000 print pages–some with only a few (or no) footnotes, and some with hundreds of footnotes, math equations, tables, charts, illustrations, and whatever else a creative author has thought to provide. And although I agree that Ventura has its problems (not unlike any other bit of software I have used), it is by far the best choice for long document publishing–we use it to typeset as many as 50 books a year. Second best is Framemaker. I had high hopes that Adobe would address long document publishing in InDesign, but it hasn’t.
Certain things are known not to work well in Ventura. Search and Replace is one. However, knowing that only means that Search and Replace is done in Word or WordPerfect rather than in Ventura. And this is easy to do. A feature of Ventura that does work well is the ability to edit a Ventura document that was originally created in Word or WordPerfect and have the changes immediately reflected in the Ventura document. Here’s the process we follow:
First, a chapter is copyedited and coded in Word or WordPerfect.
Second, it is cleaned up (i.e., all styles and formatting are deleted except for attributes such as bold, italics, small caps, and superscript, and all graphics are removed) and all footnotes are embedded in the text where they are called out. The styles and formatting are not needed because that is the purpose of the codes.
Third, we import the chapter into Ventura, where we have already defined the codes (in 10 years of using Ventura, we have had little difficulty importing prepared Word or WordPerfect files). We now have a formatted chapter in Ventura except for the footnotes and placement of any graphics.
The next step is to move the text-embedded footnotes to real footnotes.
Graphics are removed from the original author files and placed manually because placement depends on how pages break. Ventura even makes this easy. If an author has supplied a quality graph created in, e.g., Excel, we can copy the graph from Excel and use Paste Special to paste it into Ventura. Otherwise, we create the illustration using CorelDraw, Adobe Illustrator, or another appropriate program.
Now comes the best part of using Ventura: When we get corrected page proofs returned and find that we need to replace, e.g., 100 Greek alphas with betas, we go to the chapter in Ventura, right click, and select Text Edit in Word (or WordPerfect). This opens the chapter in Word, and we can do our F&R there, as well as any other corrections, save the file and exit, and find ourselves back in Ventura with an updated file. Did the authors make a correction to the Excel graph or to a figure that we drew in Illustrator? We follow the same procedure to make the correction.
Does Ventura sometimes crash when we use it? Yes, it occasionally does. But with autobackup set to 5 minutes, we don’t lose much when a crash occurs. But then, Word, Framemaker, Illustrator, and Quark, among others, also crash. When using a program like Ventura, it must be remembered that the program is not a word-processing program like Word and WordPerfect. Consequently, its word-processing features are not as robust. Does Ventura lack Unicode? Yes, but that is known. Satisfied Ventura users such as myself hope the new owners will spend some money and effort to fix and improve Ventura. Until a better long-document DTP program comes along, Ventura is the best choice among slim pickings.
—————————
Many thanks to Richard O’Regan and Richard Adin for these excellent and helpful comments.
_____________________________________________________
THE FINE PRINT
Editorium Update (ISSN 1534-1283) is published by:
The EDITORIUM, LLC
Microsoft Word Add-Ins for Publishing Professionals
http://www.editorium.com
Copyright © 2008 by the Editorium. All rights reserved. Editorium Update and Editorium are trademarks of the Editorium.
You may forward copies of Editorium Update to yourself and others (but not charge for it) and print or store it for your own use. Any other broadcast, publication, retransmission, copying, or storage, without written permission from the Editorium, is prohibited. Send reprint requests to reprints [at symbol] editorium.com
Editorium Update is provided for informational purposes only and without a warranty of any kind, either express or implied, including but not limited to implied warranties of merchantability, fitness for a particular purpose, and freedom from infringement. The user assumes the entire risk as to the accuracy and use of this document.
The Editorium is not affiliated with Microsoft Corporation.
_____________________________________________________
HOW TO SUBSCRIBE OR UNSUBSCRIBE
To subscribe, send a blank email message to editorium-subscribe [at symbol] topica.com.
To unsubscribe, send a blank email message to editorium-unsubscribe [at symbol] topica.com.
We do not sell, rent, or give our subscriber list to anyone.
____________________________________________________
You must be logged in to post a comment.