#include "support/convert.h"
#include "support/lstrings.h"
-#include "debug.h"
+#include "support/debug.h"
#include "Lexer.h"
#include <sstream>
#include <string>
-namespace lyx {
+using namespace std;
+using namespace lyx::support;
+namespace lyx {
-using std::ostream;
-using std::ostringstream;
-using std::string;
const string PDFOptions::pagemode_fullscreen("FullScreen");
os << "\\pdf_quoted_options \"" << quoted_options << "\"\n";
}
-void PDFOptions::writeLaTeX(odocstringstream &os) const
+void PDFOptions::writeLaTeX(odocstream & os, bool hyper_required) const
{
- if (!use_hyperref)
+ if (!use_hyperref && !hyper_required)
return;
string opt;
if (!pagemode.empty())
opt += "pdfpagemode=" + pagemode + ',';
- opt = support::rtrim(opt,",");
+ opt = rtrim(opt,",");
opt += "]\n {hyperref}\n";
// load the pdftitle etc. as hypersetup, otherwise you'll get
hyperset += "\n ";
hyperset += quoted_options_get();
}
- hyperset = support::rtrim(hyperset,",");
+ hyperset = rtrim(hyperset,",");
if (!hyperset.empty())
opt += "\\hypersetup{" + hyperset + "}\n ";
lex >> pagemode;
} else if (token == "\\pdf_quoted_options") {
lex >> quoted_options;
- } else if (token == "\\pdf_store_options") {
- //leftover from previous option; intended for later removal
} else {
return token;
}