From 9b13535e778b97471153a4e68baf94c915ceed03 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Uwe=20St=C3=B6hr?= Date: Wed, 3 Oct 2007 18:58:02 +0000 Subject: [PATCH] PDFOptions.cpp: add two hyperref options for better compatibility for non-latin titles, etc. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20707 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/PDFOptions.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/PDFOptions.cpp b/src/PDFOptions.cpp index e25dd0710e..ab8a0cf785 100644 --- a/src/PDFOptions.cpp +++ b/src/PDFOptions.cpp @@ -93,6 +93,9 @@ void PDFOptions::writeLaTeX(odocstringstream &os) const string opt; opt = "\\usepackage["; + // since LyX uses unicode, also set the PDF strings to unicode strings with the + // hyperref option "unicode" + opt += "unicode=true,\n "; if (!title.empty()) opt += "pdftitle={" + title + "},\n "; if (!author.empty()) @@ -101,6 +104,10 @@ void PDFOptions::writeLaTeX(odocstringstream &os) const opt += "pdfsubject={" + subject + "},\n "; if (!keywords.empty()) opt += "pdfkeywords={" + keywords + "},\n "; + // try to extract author and title from document when none is + // explicitely given + if (title.empty() && author.empty()) + opt += "pdfusetitle,\n "; opt += "bookmarks=" + convert(bookmarks) + ','; if (bookmarks) { opt += "bookmarksnumbered=" + convert(bookmarksnumbered) + ','; -- 2.39.2