Hyperref support
Richard Kimberly Heck
rikiheck at lyx.org
Thu Mar 19 13:42:01 UTC 2020
On 3/19/20 3:01 AM, Daniel wrote:
> On 2020-03-18 14:59, Steve Hnizdur wrote:
>> Hi
>>
>> When "Use Hyperref Support" is checked in PDF properties Lyx
>> automatically inserts
>>
>> \usepackage[unicode=true,
>> bookmarks=false,
>> breaklinks=false,pdfborder={0 0 1},backref=section,colorlinks=false]
>> {hyperref}
>>
>> in the preamble. Any ideas where all these options come from? are
>> they hard coded?
>>
>> Setting "unicode=false" in additional options doesn't seem to
>> override the "unicode=true". So if unicode=true is causing a problem
>> (in particular trying to redefine \C or \G) then this all has to
>> added manually.
>>
>> MWE attached. Using Lyx 2.3.4.2 on Ubuntu 18.04
>>
>
> Hi
>
> Yes, these options come from settings in the Hyperref dialog.
>
> "bookmarks=..." = "Generate bookmars (toc)"
> "breaklinks=..." = "Break links over lines"
> "pdfborder=..." = "No frames around links"
> "colorlinks=..." = "Color links"
> "backref=..." = "Backreferences"
>
> However, there seems to be no option for the "unicode=..." which seems
> like an oversight. And the biggest problem is that according to the
> manual:
>
> Note however that some options (for example unicode) can only be used
> as packge options,and not in \hypersetup as the option settings are
> processed as the package is read. (p. 6)
>
> So, unicode=false has no effect as an additional option.
>
> My guess is that this is a bug in LyX but others might know better.
Well, the code is:
// Since LyX uses unicode, also set the PDF strings to unicode strings
// with the hyperref option "unicode". (With Xe/LuaTeX and pTeX,
// unicode=true is the default, with Japanese (platex), the option
// leads to errors (even if the input encoding is UTF-8).)
if (!runparams.isFullUnicode() && !runparams.use_japanese)
opt += "unicode=true,";
That is: LyX outputs unicode itself in some cases, so setting
unicode=false could lead to errors. Still, it might be worth a document
preference on this.
Riki
More information about the lyx-users
mailing list