mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 05:16:21 +00:00
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:
parent
77f4172bb2
commit
f675f011be
@ -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 =
|
||||
|
@ -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") {
|
||||
|
@ -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 &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&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>&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>&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&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>
|
||||
|
Loading…
Reference in New Issue
Block a user