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
24 Possible cleanups, left for next fileformat change:
26 - bookmarksopenlevel is stored in .lyx as string;
27 after change to spinbox it would be appropriate
29 - store_options flag can be completely replaced by
30 function store_options() doing essentialy the same
37 PDFOptions() { clear(); }
38 /// check whether user added any settings for hyperref
40 /// output to lyx header
41 void writeFile(std::ostream &) const;
42 /// output to tex header
43 void writeLaTeX(odocstringstream &) const;
44 /// read tokens from lyx header
45 std::string readToken(Lexer &lex, std::string const & token);
46 /// keep implicit hyperref settings
60 * A set of Acrobat bookmarks are written, in a manner similar to the
62 * bookmarks boolean true
66 * If Acrobat bookmarks are requested, include section numbers.
67 * bookmarksnumbered boolean false
69 bool bookmarksnumbered;
71 * If Acrobat bookmarks are requested, show them with all the subtrees
73 * bookmarksopen boolean false
77 * Level (\maxdimen) to which bookmarks are open
78 * bookmarksopenlevel parameter
80 int bookmarksopenlevel;
82 * Allows link text to break across lines.
83 * breaklinks boolean false
87 * The style of box around links; defaults to a box with lines of 1pt
88 * thickness, but the colorlinks option resets it to produce no border.
89 * pdfborder "0 0 1" / "0 0 0"
90 * Note that the color of link borders can be specified only as 3
91 * numbers in the range 0..1, giving an RGB color.
92 * You cannot use colors defined in TEX.
94 * We represent here only the last bit, there is no semantics in the
95 * first two. Morover the aim is not to represent the whole pdfborder,
96 * but just to deny the ugly boxes around pdf links.
100 * colorlinks boolean false
104 * Adds backlink text to the end of each item in the bibliography,
105 * as a list of section numbers.
106 * This can only work properly if there is a blank line after each
108 * backref boolean false
112 * Adds backlink text to the end of each item in the bibliography,
113 * as a list of page numbers.
114 * pagebackref boolean false
118 * Determines how the file is opening in Acrobat;
119 * the possibilities are None, UseThumbs (show thumbnails), UseOutlines
120 * (show bookmarks), and FullScreen.
121 * If no mode if explicitly chosen, but the bookmarks option is set,
122 * UseOutlines is used.
123 * pagemode text empty
125 * We currently implement only FullScreen, but all modes can be saved
126 * here, lyx format & latex writer is prepared.
127 * The only thing needed in such a case is wider Settings
128 * dialog -> PDFOptions.pagemode .
130 std::string pagemode;
132 static const std::string pagemode_fullscreen;
134 * Additional parameters for hyperref given from user.
136 std::string quoted_options;
138 * Possible syntax check of users additional parameters here.
140 std::string quoted_options_get() const;
144 * Flag indicating whether user made some input into PDF preferences.
145 * We want to save options, when user decide to switch off PDF support
153 #endif // PDFOPTIONS_H