diff --git a/xespdinfo.sty b/xespdinfo.sty index 2b5b9f0..625eeca 100644 --- a/xespdinfo.sty +++ b/xespdinfo.sty @@ -96,7 +96,18 @@ \renewcommand{\date}[1]{\XESPDdate{#1}} \RequirePackage{xespdafterpkg} +\RequirePackage{ifxetex} \XESPD@after@package{hyperref}{% - \hypersetup{breaklinks,pdftitle=\XESPDtheUnitName,% - pdfsubject=\XESPDtheDocName,pdfauthor=\XESPDtheAuthor}} + \ifxetex + \hypersetup{xetex,% + breaklinks,pdftitle=\XESPDtheUnitName,% + \XESPD@lang,unicode=true,pdfusetitle,bookmarks=true,% + pdfsubject=\XESPDtheDocName,pdfauthor=\XESPDtheAuthor} + \else + \hypersetup{% + breaklinks,pdftitle=\XESPDtheUnitName,% + \XESPD@lang,unicode=true,pdfusetitle,bookmarks=true,% + pdfsubject=\XESPDtheDocName,pdfauthor=\XESPDtheAuthor} + \fi +}