2

I am having trouble getting the PDF metadata to be created. I tried using the code below but the metadata is not created.

\documentclass[15pt,a4paper]{article}
\usepackage{lipsum}
\usepackage{url}
\usepackage[nochapters]{classicthesis}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{hyperref}
\usepackage{mathtools}
\usepackage{tabularx}
\usepackage{booktabs}
\usepackage[left=1.5in,right=1in,top=1in,bottom=1in]{geometry}
\usepackage[pdftex,
            pdfauthor={nxkryptor},
            pdftitle={Lorem ipsum},
            pdfsubject={ME},
            pdfkeywords={},
            pdfproducer={Latex with hyperref, or other system},
            pdfcreator={pdflatex, or other tool}]{hyperref}

\graphicspath
    { 
    {Figures/}
    }

\begin{document}
\title{\rmfamily\normalfont\spacedallcaps{Title}}
\author{\spacedlowsmallcaps{Lorem Ipsum}}
\date{} % no date

\maketitle
\section*{This is a section}
This is just a metadata test
\end{document}

How can I create the PDF metadata?

  • 1
    Please make your code compilable (if possible), or at least complete it with \documentclass{...}, the required \usepackage's, \begin{document}, and \end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem. – DG' Mar 25 '15 at 21:15
  • 1
    To start: 15pt is no valid option for article. Remove the font commands from \author and \title (they do not belong there). – DG' Mar 25 '15 at 21:19
  • 1
    You load hyperref twice, which is not necessary. – Erik Mar 25 '15 at 21:26
  • 1
    Thank you for posting a working example! At the same time, much of your code does not seem to be relevant to the question you're asking here. Please limit the example to only the code required for your issue to appear. You can have a look at this guide for how to prune your code for this purpose. – Martin Schröder Mar 27 '15 at 11:52
5

classicthesis already loads hyperref, so you have to use \hypersetup to set the metadata (Hint: do not use pdftex):

\documentclass{article}
\usepackage{lipsum}
\usepackage{url}
\usepackage[nochapters]{classicthesis}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{mathtools}
\usepackage{tabularx}
\usepackage{booktabs}
\usepackage[left=1.5in,right=1in,top=1in,bottom=1in]{geometry}
\hypersetup{pdfauthor={nxkryptor},
            pdftitle={Lorem ipsum},
            pdfsubject={ME},
            pdfkeywords={},
            pdfproducer={Latex with hyperref, or other system},
            pdfcreator={pdflatex, or other tool}
            }

\begin{document}
\title{Title}
\author{Lorem Ipsum}
\date{} % no date

\maketitle
\section*{This is a section}
This is just a metadata test
\end{document}

enter image description here

  • Oh, i overlooked your answer. Please add a hint not to load option pdftex, i'll remove my answer. – Johannes_B Mar 25 '15 at 21:46
  • Done ;) Hint, hint – DG' Mar 25 '15 at 21:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.