[OS X TeX] a suggestion

Louis Talman talmanl at gmail.com
Mon Mar 3 09:00:45 CET 2008


On Mar 2, 2008, at 9:10 PM, ludwik kowalski wrote:

> Most Americans know that "one\index{Alaska}" was purchased from "two 
> \index{Russia}" in 1867 before the discovery of

Eliminate the quotes.  The code should be

Most Americans know that Alaska\index{Alaska} was purchased from  
Russia\index{Russia} in 1867 before the discovery of

As you know, when I want to write about the word "word", I must quote  
it.  So when I want to write about the code

Alaska\index{Alaska}

in-line, I should write "Alaska\index{Alaska}".  (And, in fact, there  
should be single quotes around that quoted code...)

Look carefully at the typeset paragraph you reported in your note of  
2047 PST.  It says "Most Americans know that was purchased from in  
1867...".  The words "Alaska" and "Russia" are missing.  Now replace

\index{Alaska}

with

Alaska\index{Alaska}

and go through the whole compilation, make index, double compilation  
cycle again.  Look carefully at the typeset paragraph.

Note the lack of a space between

Alaska

and

\index{Alaska}

That keeps LaTeX from deciding to put a page break between the two,  
and thus throwing the page entry in the
index off by one.


--Lou Talman
   Department of Mathematical & Computer Sciences
   Metropolitan State College of Denver

   <http://clem.mscd.edu/%7Etalmanl>






More information about the macostex-archives mailing list