I'm not sure if an answer is still of interest. Anyway:
1) I would strongly advise to use the pdfx package:
\usepackage[a-1b]{pdfx}
2) The error in the pdfx package is caused by the way how the timestamp is put together. Depending on your timezone (e.g. UTC+1, UTC-1, etc) you have a different sign there. This causes the issue.
Use of \getTZh doesn't match its definition.
You therefore need to put the pdfx.sty in your working directory and need to adjust that specific line accordingly:
\def\getTZh +#1#2{\edef\xTZh{#1#2}\getTZm} % change - to + if error occurs (due to timezone)
...
T\xHour:\xMin:\xSec+\xTZh:\xTZm}} % change - to + if error occurs (due to timezone)
Alternatively, you may change the timezone of your system.
3) pdfx automatically loads the hyperref package, too. If you want to have a customized hyperref setup, you can use:
\hypersetup{
unicode,
colorlinks=true
}
In addition to that, you need to provide a color profile and a valid xmp file. Information on this can be found in the pdfx manual. This solution relies on pdftex.
I'm not aware of any solution using dvips.
The behavior you describe as erroneous is, in fact, entirely correct according to the hyperref syntax rules: the argument of a \label
command is "attached" to the most recently encountered entity that can receive a label.
In your example, the second \label
command is encountered after a figure
environment is set up and is given a caption
. Thus, the hyperref
package (which provides the autoref
command) must assign the label sec:DEFdown
to the figure
environment. The fact that the label string in the example contains the substring "sec:" does not affect the element to which it will be assigned.
The uptake:
- Always aim to issue
\label
directives immediately following the associated sectioning or captioning command. Keep in mind that environments such as equation
s can also be assigned \label
s for cross-referencing purposes.
- In the case of floats such as figures and tables, be sure to provide the
\label
command before the float environment ends -- but also, of course, after the float's \caption
command is issued.
Best Answer
Package
babel
supports many languages, therefore you have to put the redefinition into\extrasenglish
:It is also explained in the manual of
hyperref
.