[texhax] Custom sorting of section names in CWEB

Tomas Rokicki rokicki at gmail.com
Tue Jul 10 19:05:03 CEST 2018


The best solution is to retitle your sections so one is not a prefix of the
other.
A section name of "type definitions", when it's obviously type definitions,
does not
help the reader all that much.

If you *really* can't bring yourself to do that, move the null to the end
of the name.
But ughh.

-tom

On Tue, Jul 10, 2018 at 7:07 AM Igor Liferenko <igor.liferenko at gmail.com>
wrote:

> Hi all,
>
> I want typedefs for mytype1 and mytype2 to go after typedef for mystruct
> in woven output.
>
> But all three typedefs _do_ define types, so I want corresponding sections
> to be named like "Type definitions".
>
> So, to avoid naming conflict ("! New name extends <Type definitions>"
> warning)
> I use "\null" at the beginning of section name.
>
> This works great, but there is an interesting puzzle: how to make
> "Type definitions" be sorted before "Type definitions used in my struct"
> on "names of the sections" page in woven output?
> (i.e., as they would be sorted if "\null" was not there).
>
> I found and interisting part in cwebman, but I do not know how to
> apply it:
>
>   A similar idea can be used to insert hidden material into section
>   names so that they are alphabetized in whatever way you might wish.
>
> Regards,
> Igor
>
> --------------------------------------------------
>
> Example test.w:
> \nocon
> @* Intro.
>
> @c
> @<\null Type definitions@>@;
>
> @ @<\null Type definitions@>=
> typedef struct {
>   int m;
>   int n;
> } somestruct;
>
> @ @<\null Type definitions@>=
> @<Type definitions used in my struct@>@;
> typedef struct {
>   mytype1 x;
>   mytype2 y;
> } mystruct;
>
> @ @s mytype1 int
>
> @<Type definitions used in my struct@>=
> typedef struct {
>   int a;
> } mytype1;
>
> @ @s mytype2 int
>
> @<Type definitions used in my struct@>=
> typedef struct {
>   int b;
> } mytype2;
> _______________________________________________
> TeX FAQ: http://www.tex.ac.uk/faq
> Mailing list archives: http://tug.org/pipermail/texhax/
> More links: http://tug.org/begin.html
>
> Automated subscription management: http://tug.org/mailman/listinfo/texhax
> Human mailing list managers: postmaster at tug.org
>


-- 
--  http://cube20.org/  --  http://golly.sf.net/  --
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/texhax/attachments/20180710/56f6aa17/attachment.html>


More information about the texhax mailing list