Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

"It takes all sorts of in & out-door schooling to get adapted to my kind of fooling" -- R. Frost


computers / comp.text.tex / Plain TeX TOC Macros

SubjectAuthor
o Plain TeX TOC MacrosBob Kerstetter

1
Plain TeX TOC Macros

<2cb20be5-2e72-4839-9340-1ca5e36aae2fn@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=7279&group=comp.text.tex#7279

  copy link   Newsgroups: comp.text.tex
X-Received: by 2002:ac8:7949:0:b0:410:9af1:f9db with SMTP id r9-20020ac87949000000b004109af1f9dbmr405980qtt.8.1699054982735;
Fri, 03 Nov 2023 16:43:02 -0700 (PDT)
X-Received: by 2002:a9d:4e94:0:b0:6c4:c9dd:cfa6 with SMTP id
v20-20020a9d4e94000000b006c4c9ddcfa6mr6913802otk.0.1699054982526; Fri, 03 Nov
2023 16:43:02 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!1.us.feeder.erje.net!feeder.erje.net!border-1.nntp.ord.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.text.tex
Date: Fri, 3 Nov 2023 16:43:02 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:3f70:6d00:dcea:c0ff:6281:88a9;
posting-account=fQjw1AoAAABK88lRUtaJdkrd0y_8Kzha
NNTP-Posting-Host: 2600:1700:3f70:6d00:dcea:c0ff:6281:88a9
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <2cb20be5-2e72-4839-9340-1ca5e36aae2fn@googlegroups.com>
Subject: Plain TeX TOC Macros
From: texuser@gmail.com (Bob Kerstetter)
Injection-Date: Fri, 03 Nov 2023 23:43:02 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 32
 by: Bob Kerstetter - Fri, 3 Nov 2023 23:43 UTC

Hi

After using LaTeX for 20-ish years, I am attempting to learn TeX, starting with macros for the document structure and table of contents.
Document section titles format and print as expected.
The \jobname.toc file contains the same page number for every entry.
The toc does not show up in the document.

I have searched here, the general web, stack,Tugboat archives. I have also read docs for ePlain, OPmac, plus other. Of course, I have read The TeXBook..

I am a journalist by education and practice, but I developed software some in Basic years ago. I use the Templar static site generator for my website, so I have a tiny bit of Perl knowledge. The point being, I am not a programmer, but somewhat tuned in to development ways and means.

The sample contains everything. Using \show did not help.

%start macros
% open toc file
\newwrite\TOCfile
\immediate\openout\TOCfile=\jobname.toc

\def\writeTOC#1#2{%
\immediate\write\TOCfile{#2\quad\leaders\hbox{.}\hfill#1\par}%
}

% input toc
\def\toc{%
\closeout\TOCfile
\input \jobname.toc
}

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor