[NTG-context] Multiple pleas for help (long)

Scott Steele scottlsteele at gmail.com
Mon May 10 02:28:33 CEST 2010


Thanks so much for the help! Pleas 1, 2, 5, and 6 are completely solved. (In
particular, Mojca, the fix for accents is fantastic!) I wasn't able to get
\Frowny to work any better with the advice provided, but I found that when I
scaled it down, it stopped knocking the text off the grid, and I have a hard
time telling the difference in size between the old and new.

% New (works) :
\useexternalfigure[frowny][Frowny][factor=7,type=pdf]
\def\Frowny{\hbox{\externalfigure[frowny]}}
\useexternalfigure[smiley][Smiley][factor=7,type=pdf]
\def\Smiley{\hbox{\externalfigure[smiley]}}
\useexternalfigure[slashy][Slashy][factor=7,type=pdf]
\def\Slashy{\hbox{\externalfigure[slashy]}}



I'm currently working on the Table of Contents formatting. I'm trying to
format it as follows:

\starttable[|r|c|l|]
subjectName · pageNumber\MR
subjectName · pageNumber\MR
...etc...
\stoptable % Of course, where I don't actually input it subject by subject
like this.

Ideally, I'd like to be able to position the table on the page by deciding
where the center line of single dots is (eg a setup where the dots are in
the very center of the page layout or another setup where they are
two-thirds of the textblock/pagelayout size (I'm not sure what the correct
term is here) to the right).

I've tried a number of different ways to set this up. This is the only thing
close to what I want that I can get to work, but of course, it doesn't have
the dots aligned:

\def\ListCommand#1#2#3%
{
\starttabulate[|r|c|l|]
\NC #2\NC ·\NC #3
 \stoptabulate
}

\def\TableOfContents
{
\placelist[section]
 [criterium={chapter,subject}, alternative=command,
command=\ListCommand]
}

Here's an example of what I tried to do but which doesn't work:

\def\ListCommandOne#1#2#3%
{#2\NC}
\def\ListCommandTwo#1#2#3%
{·\NC}
\def\ListCommandThree#1#2#3%
{#3\NC}

\def\TableOfContents
{
\starttabulate[|l|l|l|]
\NC
 \placelist[section]
[criterium={chapter,subject}, alternative=command,
command=\ListCommandOne]
 \NC
\placelist[section]
[criterium={chapter,subject}, alternative=command,
 command=\ListCommandTwo]
\NC
\placelist[section]
 [criterium={chapter,subject}, alternative=command,
command=\ListCommandThree]
 \stoptabulate
}

Obviously that attempt—aside from not working—is incredibly un-elegant and
could quickly screw things up with misaligned names and page numbers. Here
is another attempt:

\def\ListCommand#1#2#3{#2 · #3\MR}

\def\TableOfContents
{
\starttable[|r|c|l|]
\placelist[section]
[criterium={chapter,subject}, alternative=command,
 command=\ListCommand]
\stoptable
}

I think part of my problem is that I really don't understand what placelist
{\em is} or what it is doing. Is this something that would be clearer only
if I knew more about plain Tex?

Note: I'm putting \TableOfContents in the frontmatter.



Scott

-----
This is a work of fiction.  Names, characters, places, and incidents either
are the product of the writer's imagination or are used fictitiously, and any
resemblance to actual persons, living or dead, businesses, companies,
events, or locales is entirely coïncidental.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ntg.nl/pipermail/ntg-context/attachments/20100509/cb81fcee/attachment-0001.html>


More information about the ntg-context mailing list