LaTeXFeatures features(*this, params(), runparams);
validate(features);
// This is only set once per document (in master)
- if (!runparams.is_child)
+ if (!runparams.is_child) {
runparams.use_polyglossia = features.usePolyglossia();
+ runparams.use_hyperref = features.isRequired("hyperref");
+ }
LYXERR(Debug::LATEX, " Buffer validation done.");
bool const output_preamble =
LaTeXFeatures features(*this, params(), runparams);
validate(features);
runparams.use_polyglossia = features.usePolyglossia();
+ runparams.use_hyperref = features.isRequired("hyperref");
// latex or literate
otexstream ots(os);
// output above
&& language() != prev.language()) {
if (!language()->polyglossia().empty()) {
string tmp = "\\text" + language()->polyglossia();
- if (!language()->polyglossiaOpts().empty())
+ if (!language()->polyglossiaOpts().empty()) {
tmp += "[" + language()->polyglossiaOpts() + "]";
+ if (runparams.use_hyperref && runparams.moving_arg)
+ // We need to strip the command for
+ // the pdf string, see #11813
+ tmp = "\\texorpdfstring{" + tmp + "}{}";
+ }
tmp += "{";
os << from_ascii(tmp);
count += tmp.length();
: flavor(LATEX), math_flavor(NotApplicable), nice(false), is_child(false),
moving_arg(false), intitle(false), inbranch(false), inulemcmd(0),
local_font(0), master_language(0), encoding(enc), free_spacing(false),
- use_babel(false), use_polyglossia(false),
+ use_babel(false), use_polyglossia(false), use_hyperref(false),
use_indices(false), use_japanese(false), linelen(0), depth(0),
exportdata(new ExportData), inDisplayMath(false), wasDisplayMath(false),
inComment(false), openbtUnit(false), only_childbibs(false),
*/
bool use_polyglossia;
+ /** Do we use hyperref?
+ */
+ bool use_hyperref;
+
/** Are we generating multiple indices?
*/
bool use_indices;
- Fix loading of amsmath in beamer article classes (bug 11768).
+- Prevent polyglossia options from being output to PDF TOC (bug 11813).
+
* USER INTERFACE