On Sun, Mar 02, 2025 at 12:59:27PM +0100, pertu...@free.fr wrote: > On Sun, Mar 02, 2025 at 11:43:37AM +0000, Gavin Smith wrote: > > On Sun, Mar 02, 2025 at 12:27:49PM +0100, pertu...@free.fr wrote: > > Could we look at extending the htmlxref.cnf format? > > > > As well as mono/chapter/section/node, like: > > > > GS = ${G}/software > > hello mono ${GS}/hello/manual/hello.html > > hello chapter ${GS}/hello/manual/html_chapter/ > > hello section ${GS}/hello/manual/html_section/ > > hello node ${GS}/hello/manual/html_node/ > > > > - there could be suffixed versions giving the transliteration status. > > > > It could be something like "node.translit" to give the location of > > an online manual split by node, which nodes are named using transliteration: > > > > hello node.translit ${GS}/hello/manual/html_node/ > > Another option could be to consider that all the split possibilities of > a manual have the same transliteration/link type option, and use another > line like > > hello type translit > ... > > emacs type utf8 > > > and there would be the possibility to set also plain/default/expand to > override a previous entry and reset to the default
Since manuals only have one or two entries it seems harmless to have an extra line for each splitting option. This is only for manuals that need it (and I am not aware of which those manuals are). I want to keep the htmlxref.cnf format simple. With "hello type translit", "translit" is not a web URL, so this rule would not follow the pattern of existing rules. (However, I'm not certain that .translit etc. suffixes would be the end of augmenting the htmlxref.cnf format, so we should think if there are any other factors that would affect HTML cross-references.) I think anybody adding htmlxref.cnf rules should also take care to check each line, rather than assuming they all use the same transliteration. Both rules appear to be backwards compatible, except warnings are printed. If in htmlxref.d/Texinfo_GNU.cnf I have hello type translit hello mono ${GS}/hello/manual/hello.html hello node ${GS}/hello/manual/html_node_node/ hello node.translit ${GS}/hello/manual/html_node_translit/ then I get warnings: ./htmlxref.d/Texinfo_GNU.cnf:511: warning: unrecognised type: type ./htmlxref.d/Texinfo_GNU.cnf:514: warning: unrecognised type: node.translit ./htmlxref.d/Texinfo_GNU.cnf:511: warning: unrecognised type: type ./htmlxref.d/Texinfo_GNU.cnf:514: warning: unrecognised type: node.translit /home/g/src/texinfo/GIT/tta/C/.libs//../../perl//../../util/htmlxref.d/Texinfo_GNU.cnf:511: warning: unrecognised type: type /home/g/src/texinfo/GIT/tta/C/.libs//../../perl//../../util/htmlxref.d/Texinfo_GNU.cnf:514: warning: unrecognised type: node.translit This is the case regardless if whether I make a reference to the "hello" manual or not. Could the warnings be reduced so only to print the warning once, rather than twice for the ./htmlxref.d location? > This would remove the need to have something like > TRANSLITERATE_EXTERNAL_FILE_NAMES and still cater for main types of use, > but TRANSLITERATE_EXTERNAL_FILE_NAMES could still be relevant if a user > wants to override the default for manuals that are not in htmlxref > information. We could wait for users asking for it, though. Yes. Users could also add their own htmlxref files with this information in it.