kellertuer / Kartei

Eine Karteikartenklasse für LaTeX
48 stars 23 forks source link

Kartei doesn't work with hyperref loaded #3

Closed lekv closed 9 years ago

lekv commented 12 years ago

When using the hyperref package, kartei won't work in print mode and instead will only output every other card as if it was running in preview mode. To reproduce, add \usepackage{hyperref} to beispiel.tex right before the document begins.

I'm not sure whether it makes sense to use hyperref with kartei at all, but it's being included in my default template and hence I noticed this bug.

kellertuer commented 12 years ago

There might be troubles with pgfpages and hyperref. I just did a quick search and noticed, that pgfpages (which i am using for the rearrangement) should be loaded after hyperref.

Thanks for the note, i'll think about a solution. One would be, to add an option, whether to use hyperref in Kartei. But then you would have to initialize your hyperref with hypersetup and you can't provide many options to hyperref yourself. Hm. But - and you're right there too - it only affects the version using the print option. The other one (which i like to call screen-version) works fine with hyperref (which is great, because by clicking you can jump between cards).

lekv commented 12 years ago

Is there a way to fix this manually so that I can have hyperref loaded and don't need to comment it out each time? Or will the packages get loaded by kartei and I cannot take influence on the order?

kellertuer commented 12 years ago

Well, pgfpages is loaded in line 159 of the file https://github.com/kellertuer/Kartei/blob/master/kartei.cls - so one way to get around your problem is, to put RequirePackage directly before that. But i haven't checked, whether the packages loaded afterwards should be loaded before hyperref. So you could also (just to be sure) load hyperref in line 169 or something and load pgfpages directly afterwards. I'll try that next weekend and hope, that'll fix the error.

Though, you can't give any options to hyperref then, i have to think, whether that might be important.