PDF-support patches by Pavel

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20429 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Uwe Stöhr 2007-09-22 11:39:19 +00:00
parent 77f4172bb2
commit f675f011be
3 changed files with 144 additions and 144 deletions

View File

@ -1183,15 +1183,6 @@ bool BufferParams::writeLaTeX(odocstream & os, LaTeXFeatures & features,
if (!bullets_def.empty())
lyxpreamble += bullets_def + "}\n\n";
// We try to load babel late, in case it interferes
// with other packages.
// Jurabib has to be called after babel, though.
if (use_babel && !features.isRequired("jurabib")) {
// FIXME UNICODE
lyxpreamble += from_utf8(babelCall(language_options.str())) + '\n';
lyxpreamble += from_utf8(features.getBabelOptions());
}
// PDF support. Hypreref manual: "Make sure it comes last of your loaded
// packages, to give it a fighting chance of not being over-written,
// since its job is to redefine many LATEX commands."
@ -1201,6 +1192,15 @@ bool BufferParams::writeLaTeX(odocstream & os, LaTeXFeatures & features,
pdfoptions().writeLaTeX(oss);
lyxpreamble += oss.str();
// We try to load babel late, in case it interferes
// with other packages.
// Jurabib has to be called after babel, though.
if (use_babel && !features.isRequired("jurabib")) {
// FIXME UNICODE
lyxpreamble += from_utf8(babelCall(language_options.str())) + '\n';
lyxpreamble += from_utf8(features.getBabelOptions());
}
lyxpreamble += "\\makeatother\n\n";
int const nlines =

View File

@ -60,7 +60,7 @@ void PDFOptions::writeFile(ostream & os) const
os << "\\pdf_bookmarks " << convert<string>(bookmarks) << '\n';
os << "\\pdf_bookmarksnumbered " << convert<string>(bookmarksnumbered) << '\n';
os << "\\pdf_bookmarksopen " << convert<string>(bookmarksopen) << '\n';
if (bookmarksopenlevel.empty())
if (!bookmarksopenlevel.empty())
os << "\\pdf_bookmarksopenlevel \"" << bookmarksopenlevel << "\"\n";
os << "\\pdf_breaklinks " << convert<string>(breaklinks) << '\n';
@ -141,7 +141,7 @@ string PDFOptions::readToken(Lexer &lex, string const & token)
} else if (token == "\\pdf_bookmarksnumbered") {
lex >> bookmarksnumbered;
} else if (token == "\\pdf_bookmarksopen") {
lex >> bookmarksopenlevel;
lex >> bookmarksopen;
} else if (token == "\\pdf_bookmarksopenlevel") {
lex >> bookmarksopenlevel;
} else if (token == "\\pdf_breaklinks") {

View File

@ -5,7 +5,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>450</width>
<width>448</width>
<height>403</height>
</rect>
</property>
@ -41,12 +41,125 @@
<string>Load in &amp;fullscreen mode</string>
</property>
</widget>
<widget class="QGroupBox" name="groupBox_3" >
<property name="geometry" >
<rect>
<x>10</x>
<y>340</y>
<width>421</width>
<height>54</height>
</rect>
</property>
<property name="title" >
<string>Additional o&amp;ptions for hyperref</string>
</property>
<property name="flat" >
<bool>true</bool>
</property>
<property name="checkable" >
<bool>false</bool>
</property>
<property name="checked" >
<bool>false</bool>
</property>
<layout class="QGridLayout" >
<property name="margin" >
<number>9</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item row="0" column="0" >
<widget class="QLineEdit" name="optionsLE" >
<property name="toolTip" >
<string>eg: pdfstartview=XYZ, plainpages=false, pdfpagelabels</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QGroupBox" name="bookmarksGB" >
<property name="geometry" >
<rect>
<x>10</x>
<y>180</y>
<width>181</width>
<height>121</height>
</rect>
</property>
<property name="title" >
<string>Generate Bookmarks</string>
</property>
<property name="checkable" >
<bool>true</bool>
</property>
<property name="checked" >
<bool>true</bool>
</property>
<layout class="QGridLayout" >
<property name="margin" >
<number>9</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item row="1" column="0" >
<widget class="QGroupBox" name="bookmarksopenGB" >
<property name="title" >
<string>Open bookmarks</string>
</property>
<property name="checkable" >
<bool>true</bool>
</property>
<property name="checked" >
<bool>false</bool>
</property>
<widget class="QLineEdit" name="bookmarksopenlevelLE" >
<property name="geometry" >
<rect>
<x>60</x>
<y>19</y>
<width>91</width>
<height>22</height>
</rect>
</property>
<property name="toolTip" >
<string>Number of levels</string>
</property>
</widget>
<widget class="QLabel" name="label" >
<property name="geometry" >
<rect>
<x>21</x>
<y>22</y>
<width>31</width>
<height>16</height>
</rect>
</property>
<property name="text" >
<string>&amp;Level:</string>
</property>
<property name="buddy" >
<cstring>bookmarksopenlevelLE</cstring>
</property>
</widget>
</widget>
</item>
<item row="0" column="0" >
<widget class="QCheckBox" name="bookmarksnumberedCB" >
<property name="text" >
<string>Numbered bookmarks</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QGroupBox" name="groupBox_4" >
<property name="geometry" >
<rect>
<x>220</x>
<x>209</x>
<y>180</y>
<width>210</width>
<width>221</width>
<height>148</height>
</rect>
</property>
@ -60,6 +173,23 @@
<property name="spacing" >
<number>6</number>
</property>
<item row="2" column="0" >
<widget class="QCheckBox" name="colorlinksCB" >
<property name="text" >
<string>Color links</string>
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QCheckBox" name="pdfborderCB" >
<property name="text" >
<string>No frames around links</string>
</property>
<property name="tristate" >
<bool>false</bool>
</property>
</widget>
</item>
<item row="0" column="0" >
<widget class="QCheckBox" name="breaklinksCB" >
<property name="toolTip" >
@ -70,13 +200,6 @@
</property>
</widget>
</item>
<item row="2" column="0" >
<widget class="QCheckBox" name="colorlinksCB" >
<property name="text" >
<string>Color links</string>
</property>
</widget>
</item>
<item row="3" column="0" >
<widget class="QCheckBox" name="backrefCB" >
<property name="toolTip" >
@ -97,16 +220,6 @@
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QCheckBox" name="pdfborderCB" >
<property name="text" >
<string>No frames around links</string>
</property>
<property name="tristate" >
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QGroupBox" name="groupBox_2" >
@ -182,119 +295,6 @@
</item>
</layout>
</widget>
<widget class="QGroupBox" name="bookmarksGB" >
<property name="geometry" >
<rect>
<x>10</x>
<y>180</y>
<width>191</width>
<height>121</height>
</rect>
</property>
<property name="title" >
<string>Generate Bookmarks</string>
</property>
<property name="checkable" >
<bool>true</bool>
</property>
<property name="checked" >
<bool>true</bool>
</property>
<layout class="QGridLayout" >
<property name="margin" >
<number>9</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item row="1" column="0" >
<widget class="QGroupBox" name="bookmarksopenGB" >
<property name="title" >
<string>Open bookmarks</string>
</property>
<property name="checkable" >
<bool>true</bool>
</property>
<property name="checked" >
<bool>false</bool>
</property>
<widget class="QLineEdit" name="bookmarksopenlevelLE" >
<property name="geometry" >
<rect>
<x>60</x>
<y>19</y>
<width>101</width>
<height>22</height>
</rect>
</property>
<property name="toolTip" >
<string>Number of levels</string>
</property>
</widget>
<widget class="QLabel" name="label" >
<property name="geometry" >
<rect>
<x>21</x>
<y>22</y>
<width>31</width>
<height>16</height>
</rect>
</property>
<property name="text" >
<string>&amp;Level:</string>
</property>
<property name="buddy" >
<cstring>bookmarksopenlevelLE</cstring>
</property>
</widget>
</widget>
</item>
<item row="0" column="0" >
<widget class="QCheckBox" name="bookmarksnumberedCB" >
<property name="text" >
<string>Numbered bookmarks</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QGroupBox" name="groupBox_3" >
<property name="geometry" >
<rect>
<x>10</x>
<y>340</y>
<width>421</width>
<height>54</height>
</rect>
</property>
<property name="title" >
<string>Additional o&amp;ptions for hyperref</string>
</property>
<property name="flat" >
<bool>true</bool>
</property>
<property name="checkable" >
<bool>false</bool>
</property>
<property name="checked" >
<bool>false</bool>
</property>
<layout class="QGridLayout" >
<property name="margin" >
<number>9</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item row="0" column="0" >
<widget class="QLineEdit" name="optionsLE" >
<property name="toolTip" >
<string>eg: pdfstartview=XYZ, plainpages=false, pdfpagelabels</string>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
<tabstops>
<tabstop>use_hyperrefCB</tabstop>