The message
The package hyperref has already been loaded with options:
[]
There has now been an attempt to load it with options
[pdftex]
Adding the global options:
,pdftex
to your documentclass declaration may fix this.
As advised, added “pdftex” to [Document-> Settings -> Document Class -> Class Options] does not help.
Done [Export->”LaTeX plain)] and found the problem:
%% LyX 2.4.0 created this file. For more info, see https://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
documentclass[british,american,doc, 11pt, a4paper]{apa7}
usepackage{textcomp}
usepackage[utf8]{inputenc}
usepackage{color}
definecolor{note_fontcolor}{rgb}{0.800781, 0.800781, 0.800781}
usepackage{babel}
usepackage{ifsym}
usepackage{graphicx}
PassOptionsToPackage{normalem}{ulem}
usepackage{ulem}
usepackage[]
{hyperref}
There is “usepackage{Hyperref}” that is not resulting from “[Document->Settings->PDF Properties->Use hyperref Support]. If the option is selected:
%% LyX 2.4.0 created this file. For more info, see https://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
documentclass[british,american,doc, 11pt, a4paper]{apa7}
usepackage{textcomp}
usepackage[utf8]{inputenc}
usepackage{color}
definecolor{note_fontcolor}{rgb}{0.800781, 0.800781, 0.800781}
usepackage{babel}
usepackage{ifsym}
usepackage{graphicx}
PassOptionsToPackage{normalem}{ulem}
usepackage{ulem}
usepackage[pdfusetitle,
bookmarks=true,bookmarksnumbered=false,bookmarksopen=false,
breaklinks=false,pdfborder={0 0 1},backref=false,colorlinks=false]
{hyperref}
Still the the same error message
! LaTeX Error: Option clash for package hyperref
The package hyperref has already been loaded with options:
[]
There has now been an attempt to load it with options
[pdftex,pdfusetitle, bookmarks=true,bookmarksnumbered=false,bookmarksopen=fal
se, breaklinks=false,pdfborder={0 0 1},backref=false,colorlinks=false]
Adding the global options:
,pdftex,pdfusetitle, bookmarks=true,bookmarksnumbered=false,bookmarksopen=fal
se, breaklinks=false,pdfborder={0 0 1},backref=false,colorlinks=false
to your documentclass declaration may fix this.
So, IMHO, the problem:
- Package hyperref is usepackage by the core code of LyX, not the DocumentClass (apa7 – I checked)
- The require option “pdftex” is an option of hyperref that must be specified as part of usepackage (See CTAN manual).
- Therefore, setting in [Document->Settings->PDF Properties->Additional Options] that resulting in hypersetup will not work.
- The LyX core code do not interpret pdftex in “[Document-> Settings -> Document Class -> Class Options]”, or the code generating “usepackage{hyperref}” did not interpret Class Options to deter presence od “pdftex”.
Please advice if there are other means to avoid this pesky error message.
Thanks!
Dave LEE is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.