X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FPDFOptions.h;h=cd99b2afc10d4859bcfc30fdfc673fe425389116;hb=55a3dd7b346d29a52ba305a4558e9e380ef50f47;hp=f49b2b03fc1806a27d4cafa72131861346d8d34f;hpb=51179197c6121e1bcd18d4b1520395640425aa84;p=lyx.git diff --git a/src/PDFOptions.h b/src/PDFOptions.h index f49b2b03fc..cd99b2afc1 100644 --- a/src/PDFOptions.h +++ b/src/PDFOptions.h @@ -12,28 +12,35 @@ #ifndef PDFOPTIONS_H #define PDFOPTIONS_H +#include "OutputParams.h" + +#include "support/strfwd.h" #include -#include "support/docstream.h" namespace lyx { class Lexer; +// FIXME UNICODE +// Write functions need to use odostream instead of ostream before +// we can use docstring instead of string. + /// Options for PDF generation class PDFOptions { public: /// PDFOptions() { clear(); } - /// check for string settings + /// check whether user added any settings for hyperref bool empty() const; /// output to lyx header void writeFile(std::ostream &) const; /// output to tex header - void writeLaTeX(odocstream &) const; + void writeLaTeX(OutputParams &, otexstream &, + bool hyperref_already_provided) const; /// read tokens from lyx header std::string readToken(Lexer &lex, std::string const & token); - /// keep implicit hyperref settings + /// set implicit settings for hyperref void clear(); /// @@ -67,7 +74,7 @@ public: * Level (\maxdimen) to which bookmarks are open * bookmarksopenlevel parameter */ - std::string bookmarksopenlevel; + int bookmarksopenlevel; /** * Allows link text to break across lines. * breaklinks boolean false @@ -92,18 +99,14 @@ public: bool colorlinks; /** * Adds backlink text to the end of each item in the bibliography, - * as a list of section numbers. + * as a list of section/slide/page numbers. * This can only work properly if there is a blank line after each * \bibitem. - * backref boolean false - */ - bool backref; - /** - * Adds backlink text to the end of each item in the bibliography, - * as a list of page numbers. - * pagebackref boolean false + * backref string empty(="section"), "false", "section", "slide", "page" + * + * Internally we use false/section/slide/pages. See also bug 5340. */ - bool pagebackref; + std::string backref; /** * Determines how the file is opening in Acrobat; * the possibilities are None, UseThumbs (show thumbnails), UseOutlines @@ -118,6 +121,15 @@ public: * dialog -> PDFOptions.pagemode . */ std::string pagemode; + /** + * Flag indicating whether hyperref tries to derive the values for + * pdftitle and pdfauthor from \title and \author. + * pdfusetitle boolean false + * + * Note that we use true as default value instead. The option is also + * used in latex output only when title and author is not filled. + */ + bool pdfusetitle; ///latex string static const std::string pagemode_fullscreen; /** @@ -126,8 +138,10 @@ public: std::string quoted_options; /** * Possible syntax check of users additional parameters here. + * Returns repaired string. For the time being only newlines + * are checked. */ - std::string quoted_options_get() const; + std::string quoted_options_check(std::string const str) const; /**