Fixes <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=40803>.
Reported by "operator.name" <operator.name@protonmail.com>.
* doc/build.scm (%languages): Add smaller list for the cookbook.
(syntax-highlighted-html): Adapt regexp for mono-node files to include
the cookbook.
This allows us to catch "operating_002dsystem-1", for instance.
* doc/build.scm (syntax-highlighted-html)[build](anchor-id->key): Drop
"-1" & co. from ID.
This is a followup to da9deba13d.
Last-minute modification of the 'match' pattern would lead to an error:
"multiple ellipsis patterns not allowed at same level"
* doc/build.scm (syntax-highlighted-html)[build](collect-anchors):
Add 'worthy-entry?' procedure and use it instead of the unsupported
pattern for ('dt ...).
This makes it easier to jump to the definition of a procedure or
variable when looking at a code snippet. There can be false-positive
because scoping rules are ignored, for example, but it should be a good
approximation.
* doc/build.scm (syntax-highlighted-html)[build](highlights->sxml*): Add
'anchors' parameter. Add clause for ('symbol text).
(syntax-highlight): Add 'anchors' parameter. Wrap body in named let and
use it in recursive calls. Pass ANCHORS to 'highlights->sxml*'.
(underscore-decode, anchor-id->key, collect-anchors, html?): New procedures.
(process-file): Add 'anchors' parameter. and honor it.
Rewrite mono-node and multi-node HTML files separately.
Fixes <https://bugs.gnu.org/39060>.
Reported by Tobias Geerinckx-Rice <me@tobias.gr>.
* doc/build.scm (html-manual)[build]: Copy 'htmlxref.cnf' to the current
directory so that 'makeinfo' honors it.
* doc/build.scm (%manual): New variable.
(html-manual): #:manual now defaults to %MANUAL.
[build]: Define 'language->texi-file-name' and use it. Filter out items
of LANGUAGES that lack a .texi file.
(pdf-manual, html-manual-indexes, pdf+html-manual): #:manual now
defaults to %MANUAL.
Suggested by Julien Lepiller.
* doc/build.scm (html-manual-indexes)[build]: Add 'with-extensions'.
(translate): Actually honor DOMAIN. Add call to 'bindtextdomain' for
ISO-CODES.
(%iso639-languages): New variable.
(language-code->name, top-level-index): New procedures.
Add call to 'write-html' for OUTPUT/index.html.
* doc/build.scm (html-manual-indexes)[build](sxml-index): Generalize;
add a 'title' and a 'body' parameter and honor them.
(language-index): New procedure.
(write-index): Remove.
(write-html): New procedure.
Use 'write-html' and 'language-index'.