Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

The Shuttle is now going five times the sound of speed. -- Dan Rather, first landing of Columbia


computers / comp.text.tex / Why is there no "hook" for \addtocontents ?

SubjectAuthor
o Why is there no "hook" for \addtocontents ?GL

1
Why is there no "hook" for \addtocontents ?

<63e50df7$0$25829$426a74cc@news.free.fr>

  copy mid

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

  copy link   Newsgroups: comp.text.tex
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!cleanfeed1-b.proxad.net!nnrp2-2.free.fr!not-for-mail
Date: Thu, 9 Feb 2023 16:15:03 +0100
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.6.1
Newsgroups: comp.text.tex
Content-Language: en-US
From: gouailles@gmail.com (GL)
Subject: Why is there no "hook" for \addtocontents ?
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Antivirus: Avast (VPS 230209-4, 9/2/2023), Outbound message
X-Antivirus-Status: Clean
Lines: 22
Message-ID: <63e50df7$0$25829$426a74cc@news.free.fr>
Organization: Guest of ProXad - France
NNTP-Posting-Date: 09 Feb 2023 16:15:03 CET
NNTP-Posting-Host: 78.192.188.105
X-Trace: 1675955703 news-2.free.fr 25829 78.192.188.105:63434
X-Complaints-To: abuse@proxad.net
 by: GL - Thu, 9 Feb 2023 15:15 UTC

Hello,

While \protected@write {<file>}{<hook>}{<contents>} provides a "hook" as
second argument to change commands before expansion,

\addtocontents does not provide a way to change some commands before
expansion. The only setting is :

\let\label\@gobble
\let\index\@gobble
\let\glossary\@gobble

It would be interesting to add a hook at this point, so that :

\section [<toc and headers contents>]{section title}

some macros could be changed before <toc and header contents> is written
(hence expanded) to toc file.

Best regards.

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor