IACR / latex

Latex classes for IACR publications. We will start with the new journal proposal.
9 stars 2 forks source link

Add References automatically to the ToC #227

Closed jwbos closed 6 months ago

jwbos commented 9 months ago

There is a request to add the References to the ToC such that it shows up in the content list in (for example) acroread. This can be done with \addcontentsline{toc}{section}{References} It seems to often be off by one. This is a known issue. \clearpage is the suggested solution but this has other nasty side-effects.

jwbos commented 9 months ago

Fixed in fadd4f5bf74fc2efe4cf3b4168c25bc7486f5f9d: I created a pull request.

For bibtex this can be realized by extending thebibliography \apptocmd{\thebibliography}{\csname phantomsection\endcsname\addcontentsline{toc}{section}{\refname}}{}{} which is a rather nasty fix.

For biblatex this can be specified as an option to printbibliography (much nicer!) \DeclarePrintbibliographyDefaults{heading=bibintoc}

jwbos commented 6 months ago

Reopening: Dan Bernstein reported that the reference in the ToC points to the first reference and not to the section header. He provided a nice fix.

jwbos commented 6 months ago

See #243.