[tex-eplain] Many TOC's in one document, help.

Arctic Fidelity spam at sacrificumdeo.net
Fri Sep 23 20:43:12 CEST 2005


Hello everyone,

Up until now, for this project, I have been able to keep you all from
having to deal with my questions, because I have found them in the
manuals. But this one, which I have been reading about in the eplain
manual, does not seem to work for me in the way I would expect it. 

What I have is a document that has a main TOC, List of Figures, and
List of Tables, which all seem to work just fine, for right now. But
what I also have certain appendices that have a bunch of smaller
sections in them. I want these sections to each have their own custom
TOC so that I can list the subsections in each of these sections at
the start of the sections without having to list them manually.

Here is what I have so far:
% PROCEDURE CONTROLS MACROS
%
% These macros are designed to make the creation of procedures easier.

% \beginprocset{OSid}{Code}{subject}{objective}
%
% Starts a procedure set.
\long\def\beginprocset#1#2#3#4{%
  \begingroup
  \gdef\cos{#1}
  \gdef\pcd{#2}
  {\bf Test Subject:} #3 (\uppercase\expandafter{\pcd})\hfil\break
  {\bf Test Objective:} #4\par
  \edef\tmpname{\jobname\cos\pcd}
  \gdef\tocfilebasename{\tmpname}
  \def\tocprocedureentry#1#2{%
    \uppercase\expandafter{\cos}-\uppercase\expandafter{\pcd}-#1
    \dotfill{} #2\break}
  \readtocfile
  \jobname\cos\pcd
  {\bf Procedures/Expected Results/Results:}\par}

% \insproc{code}{long Description}
%
% Inserts a Procedure
\long\def\insproc#1#2{%
  \gdef\pid{#1}
  \writetocentry{procedure}{\pid :#2}
  {\prcf \uppercase\expandafter{\cos{}}-\uppercase\expandafter{\pcd{}}-#1}\par}

These are meant to be used as follows:

\beginprocset{Linux}{XYZ}{Something}{My Objective}
\insproc{001}{Title text for Linux-XYZ-001}

[Some sort of text follows.]

\endproc (defined elsewhere)

The idea was that I would use tocfilebasename to change the name that
the toc file would write to, to the \jobname\cos\pcd. So in this case
I was thinking that all the entries for this "procedure" would be
saved to filenameLinuxXYZ.toc, and then be read from that file as
well, without messing with the main TOC.

The only problem with this is that the \writetocentry's are still
going to the main TOC file, rather than to the special one, and I
think this is where my problem is. I have not been able to get past
this to actually test the rest of my macros in this case, so I don't
know what's going on there, but I would greatly appreciate if someone
would point out what I am missing here.

Thanks!

- Arctic Fidelity

-- 
"Why must you tell me all your secrets when it's hard enough to love
you knowing nothing?"
		-- Lloyd Cole and the Commotions



More information about the tex-eplain mailing list