Believe it or not, I'm still using legacy Macs with Framemaker 7 for basic database publishing. I need dictionary-style headers that update on the fly, i.e., the first and last entry on the page have to be copied into the headers automatically. I also need at least two, but usually 4 indices. From Wikipedia:
Released in 2002. FrameMaker 7.0 introduced combined SGML and unstructured version, XML application support introduced, Save As PDF fixed, tagged PDF support, improved running header/footer support, document info stored in XMP format. FrameMaker 7.0 was the last version to run on the Macintosh (OS 8/9), HP/UX and IBM AIX.
LaTex can do this but the learning curve is steep: