3 * \file src/PDFOptions.h
4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
9 * Full author contact details are available in file CREDITS.
15 #include "support/docstream.h"
21 /// Options for PDF generation
25 PDFOptions() { clear(); }
26 /// check whether user added any settings for hyperref
28 /// output to lyx header
29 void writeFile(std::ostream &) const;
30 /// output to tex header
31 void writeLaTeX(odocstringstream &) const;
32 /// read tokens from lyx header
33 std::string readToken(Lexer &lex, std::string const & token);
34 /// set implicit settings for hyperref
48 * A set of Acrobat bookmarks are written, in a manner similar to the
50 * bookmarks boolean true
54 * If Acrobat bookmarks are requested, include section numbers.
55 * bookmarksnumbered boolean false
57 bool bookmarksnumbered;
59 * If Acrobat bookmarks are requested, show them with all the subtrees
61 * bookmarksopen boolean false
65 * Level (\maxdimen) to which bookmarks are open
66 * bookmarksopenlevel parameter
68 int bookmarksopenlevel;
70 * Allows link text to break across lines.
71 * breaklinks boolean false
75 * The style of box around links; defaults to a box with lines of 1pt
76 * thickness, but the colorlinks option resets it to produce no border.
77 * pdfborder "0 0 1" / "0 0 0"
78 * Note that the color of link borders can be specified only as 3
79 * numbers in the range 0..1, giving an RGB color.
80 * You cannot use colors defined in TEX.
82 * We represent here only the last bit, there is no semantics in the
83 * first two. Morover the aim is not to represent the whole pdfborder,
84 * but just to deny the ugly boxes around pdf links.
88 * colorlinks boolean false
92 * Adds backlink text to the end of each item in the bibliography,
93 * as a list of section numbers.
94 * This can only work properly if there is a blank line after each
96 * backref boolean false
100 * Adds backlink text to the end of each item in the bibliography,
101 * as a list of page numbers.
102 * pagebackref boolean false
106 * Determines how the file is opening in Acrobat;
107 * the possibilities are None, UseThumbs (show thumbnails), UseOutlines
108 * (show bookmarks), and FullScreen.
109 * If no mode if explicitly chosen, but the bookmarks option is set,
110 * UseOutlines is used.
111 * pagemode text empty
113 * We currently implement only FullScreen, but all modes can be saved
114 * here, lyx format & latex writer is prepared.
115 * The only thing needed in such a case is wider Settings
116 * dialog -> PDFOptions.pagemode .
118 std::string pagemode;
120 * Flag indicating whether hyperref tries to derive the values for
121 * pdftitle and pdfauthor from \title and \author.
122 * pdfusetitle boolean false
124 * Note that we use true as default value instead. The option is also
125 * used in latex output only when title and author is not filled.
129 static const std::string pagemode_fullscreen;
131 * Additional parameters for hyperref given from user.
133 std::string quoted_options;
135 * Possible syntax check of users additional parameters here.
137 std::string quoted_options_get() const;
141 * Flag indicating whether user made some input into PDF preferences.
142 * We want to save options, when user decide to switch off PDF support
150 #endif // PDFOPTIONS_H