[OS X TeX] Writing a book

John B. Thoo jthoo at yccd.edu
Mon Apr 21 09:34:43 EDT 2014


On Apr 18, 2014, at 12:00 PM, macosx-tex-request at email.esm.psu.edu wrote:

> Message: 3
> Date: Thu, 17 Apr 2014 17:11:10 -0300
> From: "Nestor E. Aguilera" <nestoreaguilera at gmail.com>
> 
> On 14 Apr 2014, at 09:54, John B. Thoo wrote:
> 
>> [...]
>> The only technical problem I haven't resolved at this point is in the TOC.  For some reason, when it lists Part III in the TOC, shows "IIIFoundations" instead of "III Foundations" (with a space).  Parts I and II show up correctly in the TOC as "I Numeration Systems" and "II Arithmetic Snapshots" (each with a space).  I would appreciate any help to fix this.
>> [...]
> 
> It might be a problem with the "numwidth". You might want to take a look at the documentation of the "tocloft" package ("$ texdoc tocloft" in terminal), where the parameters of the layout for toc (lof, lot) are explained.
> 
> You could try with "\makeatletter \renewcommand etc" or use the package tocloft
> 
> If you don't mind that the text in the toc may not be aligned, you could simply try "\part{\hspace{1em}Foundations}" instead of "\part{Foundations}" in the source.

Hi, Nestor.  Thanks for the suggestion.  I tried "\part{\hspace{1em}Foundations}," but I didn't quite like the alignment.


> Message: 4
> Date: Thu, 17 Apr 2014 17:05:21 -0400
> From: Themis Matsoukas <tmatsoukas at icloud.com>
> 
> Here is one way to fix the part number in the table of contents:
> 
> \renewcommand\cftpartaftersnumb{\enspace}
> 
> It will put an ?enspace? between the part number and its title but you can replace that with any other spacer you want. See bottom of p 154 in the memoir manual.

Thanks, Themis.  I didn't like that way that looked in the TOC because the alignment of the other items looked off to me.  (A subjective call, I know.  By the way, in a separate message, someone also pointed me to

<http://tex.stackexchange.com/questions/39971/adjusting-spaces-for-the-toc>

but that resulted in pretty much the same.)  However, your suggestion helped me google the following

<http://hstuart.dk/2007/05/26/styling-the-table-of-contents/>

that gave me the idea to try

\renewcommand{\cftpartpresnum}{\partname\ }
\renewcommand{\cftpartaftersnumb}{\hspace{3em}}

This seems to be acceptable.  What do you think?

Thank you both, Nestor and Themis, very much for your suggestions.  They were very helpful.

---John.

(I receive the digest of this mailing list.)


More information about the MacOSX-TeX mailing list