# Cosmetic update in building the pdf docs

Reported by: Owned by: strogdon minor sage-9.3 documentation jhpalmieri Steven Trogdon Dave Morris N/A c9b1d27 c9b1d279fe791b8246e6df0efcf11a74375119f7

### Description

With the current 9.3.beta7 devel version there is

(/usr/share/texmf-dist/tex/latex/xcite/xcite.sty
Package: xcite 2020/01/21 v16383.99998 eXternal Citations (EG)

(/usr/share/texmf-dist/tex/latex/tools/xr.sty
Package: xr 2019/07/22 v5.05 eXternal References (DPC)
))
(/usr/share/texmf-dist/tex/latex/hyperref/xr-hyper.sty
Package: xr-hyper 2019/10/03 v6.1 eXternal References (DPC)
)
Package xr Info: IMPORTING LABELS FROM ../references/references.aux on input li
ne 66.
Package xr Info: IMPORTING LABELS FROM ../references/references.aux on input li
ne 68.

LaTeX Warning: Label ../references/index:aagmrz2019' multiply defined.


when building the pdf docs. This appears in every latex generated .log file.

### comment:1 Changed 16 months ago by strogdon

I'm not sure why index:aagmrz2019 is the only reference that is multiply defined unless it is because it is the first reference in src/doc/en/reference/references/index.rst - the labels are imported twice. The following seems to get rid of the warnings

• ## src/doc/en/reference/conf_sub.py

diff --git a/src/doc/en/reference/conf_sub.py b/src/doc/en/reference/conf_sub.py
index 28c95c69e4..be60aefdb1 100644
 a latex_elements['hyperref'] = r""" \usepackage{xcite} \usepackage{xr-hyper} \externaldocument[../references/]{../references/references} \externalcitedocument[../references/]{../references/references} % Include hyperref last. \usepackage{hyperref} % Fix anchor placement for figures with captions.

I believe the xr-hyper package aliases \externalcitedocument to \externaldocument. I haven't thoroughly tested this to determine if references are OK, but the multiply defined warnings are not present.

Last edited 16 months ago by strogdon (previous) (diff)

### comment:3 Changed 16 months ago by strogdon

No, perhaps the warnings are to be tolerated. At a very minimum local/share/doc/sage/pdf/en/reference/cryptography/cryptography.pdf has undefined references with the change.

Last edited 16 months ago by strogdon (previous) (diff)

### comment:4 follow-up: ↓ 9 Changed 16 months ago by gh-DaveWitteMorris

What happens if you delete \usepackage{xcite}? (In addition to deleting \externalcitedocument.) There is no reason to import this package:

The package xcite is no longer necessary, because its functionality has been taken
over by xr, so this final version is just a stub that loads xr.
(from https://ctan.org/pkg/xcite)


There is no reason to load both xr and xr-hyper, because they both do the same thing. I do not understand why only one reference would be multiply defined, but maybe the problem is an incompatibility between these two packages.

It may also help to update to the latest version of xr-hyper (7.00j 2021-02-10), or, at least, a newer version than 2019/10/03 v6.1.

### comment:5 Changed 16 months ago by strogdon

Certainly not intended but even without addressing the multiply defined warnings there are undefined references.


test

\chapter{Testing $$\mathbf{x}=3$$}

test

\end{document}


This does not:

{{{
\documentclass{report}
\usepackage{hyperref}
\begin{document}

\chapter{Testing $$\mathbf{x}=3$$}

test

\chapter{Testing \texorpdfstring{$$\mathbf{y}=4$$}{blah}}

test

\end{document}
}}}


### comment:20 in reply to: ↑ 18 Changed 16 months ago by strogdon

Package hyperref Warning: Token not allowed in a PDF string (Unicode):
(hyperref)                removing math shift' on input line 8.


I see the above as well with

hyperref.sty    2020/01/14 v7.00d Hypertext links for LaTeX


### comment:21 Changed 16 months ago by gh-DaveWitteMorris

Now that I've upgraded Latex, I'm getting the results that jhpalmieri reported in comment:19. Changing the order of the chapters makes a difference, but I have no idea why.

### comment:24 Changed 16 months ago by jhpalmieri

Anyway, I have no opinions on the subject of this ticket. I've created #31397 for the errors in building the PDF documents. Let's keep this ticket focused on the original cosmetic issues; sorry for derailing it in the first place.

### comment:25 Changed 16 months ago by strogdon

• Branch set to u/strogdon/trac_31387

### comment:26 Changed 16 months ago by strogdon

• Authors set to Steven Trogdon
• Commit set to c9b1d279fe791b8246e6df0efcf11a74375119f7
• Status changed from new to needs_review

I will address the undefined references on another ticket.

New commits:

 ​c9b1d27 cosmetic update to building the pdf docs

### comment:27 Changed 16 months ago by strogdon

The undefined references are now addressed on #31398.

### comment:28 Changed 16 months ago by gh-DaveWitteMorris

• Priority changed from major to minor
• Reviewers set to Dave Morris
• Status changed from needs_review to positive_review

Thanks for fixing this.

### comment:29 Changed 15 months ago by vbraun

• Branch changed from u/strogdon/trac_31387 to c9b1d279fe791b8246e6df0efcf11a74375119f7
• Resolution set to fixed
• Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.