-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
forcing hyperref commands even if hyperref is not detected #585
Comments
Mhhh, the problem is that the option is also executed in Would it work for you to go with
|
I know that the problem is that biblatex handles the option in \AtEndPreamble. That is why I wrote that I "have a \AtEndPreamble racing problem". I also know that I can avoid it by rearranging the package loading. The problem is that loading hyperref in a class or a package is getting very tricky if too many packages try to automatically detect hyperref and its settings in \AtEndPreamble or \AtBeginDocument. For a class writer it would be really helpful if there were some option to tell biblatex: "Trust me, I will load hyperref with the following settings. So don't check it but simply set up your code for this scenario." I don't think that biblatex needs to patch command of hyperref (or commands patched by hyperref) but if this were the case, then a command that the class writer should call after loading hyperref would be fine. (It would be also helpful if hyperref could be splitted so that its core could be loaded earlier, but this is not a biblatex problem ;-)) |
I could think of a |
Perhaps "delayed" or "manual" would be a better name. Then this
or this
would work like
works like If more cleaning up or additional settings after hyperref are needed, this is fine too. |
Let me see whether that can be cleanly implemented. Of course if we make this official, the internal macros We should probably wait for @plk to have a say. |
I am fine with this being an option - it just means making those two macros user-facing and documented and adding one package option. Do you want to do this @moewew? |
Let me have a look. When I looked at this the last time, it looked a bit messy. |
Does anyone have a good idea for the new user-facing 'manual' macros? I assume we shouldn't use the internal |
Have a look at https://github.com/moewew/biblatex/tree/forcehyperref, in particular moewew@49ca052 The name of the user-facing macro will probably have to change (I'm grateful for any suggestions), we could also consider defining it in the flow of the |
This looks ok but perhaps we can call the user-facing macros just |
Yes, maybe. But I feared that due to the generic name we might run into conflicts with other packages. |
Fair enough - @u-fischer - can you comment so we can close this? |
@u-fischer - can you check this? We are aiming for a release shortly. |
I will check tomorrow. (Sorry about the delay, I saw the message on the 5. september but got ill that day and forgot). |
I think there is no real test version yet, so I only looked at the code. If I got it right, then I can do Imho it will work as wanted in my case but that one should test / check the following questions:
|
Thank you very much for your feedback. Indeed the changes have not been merged yet so can't really be tested. For easier testing I created a gist with a drop-in replacement for I have taken up your suggestion 1 there already. 2 also sounds good, but I can't think of a proper place to put it. It would have to go directly into the Any comment and code review is appreciated. |
I'm not sure that 2 is so complicated. Can't one do
at an arbitrary place in biblatex and in the |
But that would make |
I don't really think that there is much point to hide the command. After all \blx@mkhyperref is defined, and calling it in the wrong place would do the same harm that a wrongly called \BiblatexManualHyperrefOn. But you could add the test |
You are right. I didn't want to define We could make I have pushed moewew@b0df2fd and moewew@37cd212 to https://github.com/moewew/biblatex/tree/forcehyperref The drop-in replacement for 3.7's With that commit |
Blast, I forgot: @plk At the moment |
I don't see the need to explain more - it's a very specific command. |
Very good. I'll wait for @u-fischer to respond and will merge if there are no further changes needed. |
@u-fischer The current status can be found in dev...moewew:forcehyperref, https://gist.github.com/moewew/86d34f18e0a8342a236b15bd9545c407. Comments and testing would be appreciated. I hope I could take up most of your suggestions. |
Imho it looks good. You could add in the docu e.g. at the end something like "This option should be only needed by package writers to solve special problems with the loading order of packages." |
Add hyperref=manual option, see plk#585.
Thank you for your comment and suggestion. I added a short line in the spirit of your suggestion to the docs. The changes are merged now in e423c75 |
Closing this for now. If anything relevant comes up again, please comment here and we can reopen this. |
I have a
AtEndPreamble
racing problem. biblatex tries to setup the support for hyperref in \AtEndPreamble. This means that the following example biblatex doesn't detect that hyperref has been loaded and so disables all hyperlinks for cite command. biblatex also undefines\blx@mkhyperref
and so it is difficult to reenable the support.Would it be possible to have an option "hyperref=manual" that works e.g. in \ExecuteBibliographyOptions or something similar so that one could use it after loading hyperref to enable the links in such situations?
The text was updated successfully, but these errors were encountered: