Re: [DOCS] with
От | Alexander Lakhin |
---|---|
Тема | Re: [DOCS] |
Дата | |
Msg-id | 54391dfd-7f17-ead6-76be-0957ec2e67cb@gmail.com обсуждение исходный текст |
Ответ на |
Re: [DOCS] |
Список | pgsql-docs |
Hello Tom, 25.10.2017 23:23, Tom Lane writes: > >> 2. To remove @zone specification from indexterm's. >> Are there any reasons to specify it explicitly? > According to my understanding, the use of "zone" means that the > indexterm entry refers to the whole section named by the "zone" label, > not only the physical point the entry is at. So I think our usage > is correct in principle; for example, this would allow an index entry > to say something like "Section 4.2" not just "page 435". In practice, > though, the distinction seems merely pedantic: AFAICS it does not > affect either HTML output (which always gives you a hyperlink to the > containing section) or PDF output (which always gives you a page number). There is also the Docbook parameter "index.links.to.section" ( http://docbook.sourceforge.net/release/xsl/1.79.1/doc/html/index.links.to.section.html ) which affects the pedanticism of the distinction. > So we could run around and remove the zone tags, but that still seems > like rather a grotty answer --- maybe someday we'd want them back, > if the doc toolchain were ever improved to make effective use of them. > > How complicated is the "customize the xsl template" solution? > > (BTW, I do not see the extra-entries bug at all in PDF output.) Yes, the issue is with html/autoidx.xsl only. I would choose to customize xsl for now, though the corresponding docbook templates are not very human-friendly (for xhtml/autoidx.xsl they are autogenerated from html/autoidx). See the patch attached. (May be we might reformat it slightly.) The commands used to generate the patch are more simpler: wget http://docbook.sourceforge.net/release/xsl/1.79.1/xhtml/autoidx.xsl -O - | grep -Pzo '(?s)<xsl:template match="indexterm" mode="index-(primary|secondary|tertiary)">(.*?)</xsl:template>\s' | sed -e "s/\x0//" -e "s/\$refs\[@zone != '' or generate-id()/\$refs[generate-id()/" >> stylesheet-html-common.xsl perl -0777 -i -pe 's#\n</xsl:stylesheet>##' stylesheet-html-common.xsl; echo -e '\n</xsl:stylesheet>' >>stylesheet-html-common.xsl Nonertheless, it might be better solution as we can leave all the zone references intact and preserve the freedom to change our mind later. Best regards, ------ Alexander Lakhin Postgres Professional: http://www.postgrespro.com The Russian Postgres Company -- Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs
Вложения
В списке pgsql-docs по дате отправления: