I've been trying to update the metadata of my PDF and I've encountered some problems. I loaded hyperref in the last place on my document, but I tried to put it in different places.
\documentclass[a4paper,12pt,twoside]{book}
\usepackage[utf8]{inputenc}
\usepackage[catalan]{babel}
\usepackage[T1]{fontenc}
\usepackage[
type={CC},
modifier={by-nc-nd},
version={4.0},
]{doclicense}
\usepackage{extramarks}
\usepackage{etoolbox}
\makeatletter
\renewcommand{\title}[1]{\def@title{#1}}
\newcommand{\tipus}[1]{\def@tipus{#1}}
\newcommand{\actual}[2]{\def@curs{#1}\def@semestre{#2}}
\newcommand{\professor}[2]{\def@nom{#1}\def@cognom{#2}}
\newcommand{\resum}[1]{\def@resum{#1}}
\newcommand{\degree}[1]{\def@degree{#1}}
\newcommand{\titleback}[1]{\def@titleback{#1}}
\newcommand{\classification}[1]{\def@classification{#1}}
\makeatother
\author{Mario}
\title{Càlcul Diferencial en Diverses Variables}
\actual{2022-2023}{Cinquè}
\tipus{Apunts}
\professor{Dr. A}{B}
\degree{Matemàtiques}
\resum{Aquesta assignatura tracta les funcions reals de diverses variables reals, treballant les nocions de límit, continuïtat i diferenciabilitat d'aquestes funcions.}
\classification{00-01, 97I40, 97I60, 97N40}
\usepackage[pdftex,colorlinks=false]{hyperref}
\makeatletter%
\hypersetup{%
linkbordercolor={lightgray},%
urlbordercolor={darkgray},%
citebordercolor={lightgray},%
pdfinfo={%
Title={@title},%
Author={@author},%
Subject={@degree},%
Producer={pdfTeX},%
Creator={@author},%
Keywords={@tipus},%
}%
}
\makeatother%
\pgfplotsset{compat=1.18}
\begin{document}
\setlength{\baselineskip}{.6cm}
Hello
\end{document}
When I get info on the generated PDF, the author field doesn't even appear. The same happens with the keywords. I have also tried to assign Author to an immutable (like s, for example). Nothing has worked so far. Assume that I've tried everything in here, here and here.
Note: checking the hyperxmp documentation, in particular, the complete example section, it would suffice to include hyperxmp right before hyperref.
Thanks in advance!

\authorin your document? – samcarter_is_at_topanswers.xyz Dec 27 '22 at 11:39\@authorvariable. It seems to be empty. – Gargantuar Dec 27 '22 at 11:48Creatorfield catches the value correctly. I will leave a photo. – mariovilar Dec 27 '22 at 11:50