Hi all,
I'm trying to use the Hyperref and Cleveref package together in LyX, but this is giving me some problems. I want my refences to be like 'Figure 1.1' and 'Equation 3.1'.
The Hyperref documentation says the package should be loaded after all other packages, except for some conflicting packages (this list does not include cleveref).
The Cleveref documentation states that it should be compatible with Hyperref and Hyperref should therefore be loaded after Cleveref.
LyX itself has hyperref built in, but that does not give any control over the order in which packages are loaded so I load the hyperref package manually in the preamble.
However in no combination of loading the packages and altering the references, hyperref and cleveref seem to work together. When I just use cleveref, the refences are formatted as I want them to. As soon as I load Hyperref the references are back to '1.1' (without 'Figure').
Hyperref says in its documentation that, for it to work with packages that alter the reference macros, the statement 'implicit=false' should be added. However this just results in no effect of either cleveref or hyperref.
None of the formats that can be selected from the dropdown when inserting the cross-reference gives the format I want, plus it's a lot of effort to change this in the entire report now and it's too easily forgotten when inserting a new reference.
Attached is a minimal working example in which I've disabled all other packages that I use. There should be a way to make this work, right? I'm also open to using other packages than cleveref, but I thought cleveref is the most easy one.
LyX ⇒ Hyperref and cleveref conflict
Hyperref and cleveref conflict
- Attachments
-
- referencetest.lyx
- Minimal working example
- (3.34 KiB) Downloaded 399 times
NEW: TikZ book now 40% off at Amazon.com for a short time.

Hyperref and cleveref conflict
Hi Paul,
I am also having the same problem and am looking for a solution. Did you solve the problem?
I am also having the same problem and am looking for a solution. Did you solve the problem?
- Stefan Kottwitz
- Site Admin
- Posts: 10348
- Joined: Mon Mar 10, 2008 9:44 pm
Hyperref and cleveref conflict
Hi rskarbo,
welcome to the forum!
Perhaps provide information about your specific case. Please attach a small .lyx file with the problem, and also a pdfLaTeX export file of that document, so also people without LyX can help - most is LaTeX anyway.
Stefan
welcome to the forum!
Perhaps provide information about your specific case. Please attach a small .lyx file with the problem, and also a pdfLaTeX export file of that document, so also people without LyX can help - most is LaTeX anyway.
Stefan
LaTeX.org admin
Hyperref and cleveref conflict
Which version of LyX do you use?
I'm working with 2.2.2 and in Document->Settings->Modules you can enable numbering equation, figure,tables by sections, just search in Modules and there's a little description, without having to use other package, but I don't know if this is implemented in other version of LyX too.
I'm working with 2.2.2 and in Document->Settings->Modules you can enable numbering equation, figure,tables by sections, just search in Modules and there's a little description, without having to use other package, but I don't know if this is implemented in other version of LyX too.
-
- Site Moderator
- Posts: 542
- Joined: Sat Sep 01, 2012 6:38 am
Hyperref and cleveref conflict
Can you post a better minimal example? Currently I get an error about an image not being found. Indeed, you included an image:
2013 - 2014/Internship UoT/Report/images/Current-Design.png
For tips on creating a good minimal example, please read https://wiki.lyx.org/FAQ/MinimalExample
If you post a minimal example, I think I can figure out a solution.
2013 - 2014/Internship UoT/Report/images/Current-Design.png
For tips on creating a good minimal example, please read https://wiki.lyx.org/FAQ/MinimalExample
If you post a minimal example, I think I can figure out a solution.