LyX ⇒ Hyperref and cleveref conflict
Hyperref and cleveref conflict
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.
- Attachments
-
- referencetest.lyx
- Minimal working example
- (3.34 KiB) Downloaded 393 times
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
Hyperref and cleveref conflict
I am also having the same problem and am looking for a solution. Did you solve the problem?
- Stefan Kottwitz
- Site Admin
- Posts: 10335
- Joined: Mon Mar 10, 2008 9:44 pm
Hyperref and cleveref conflict
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
Hyperref and cleveref conflict
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
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.