-
Notifications
You must be signed in to change notification settings - Fork 15
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
Backrefs with hyperlinks are broken #58
Comments
This is really nice issue. The problem is that BibLaTeX points back references back to the pages where they appeared. This cannot work in HTML, as there are no physical pages. So instead, we will insert link destination to first citation on the page (TeX4ht still knows page numbers in the compilation, even though there are no pages in HTML), and backlinks will link to these citations. I've made similar solution for the issue you linked, so here is a version that reuses that code for BibLaTeX. The following
|
Awesome! i will test it tomorrow. |
Unfortunately, it did not compile. I got an error:
This here was in a log file called 2000.log:
|
Uh, btw. i noticed that this backref issue not only affects html, it also affects .odt files |
This is another issue, I am surprised that you haven't experienced it earlier. |
These are the 3 files relevant for make4ht in my directory with the .tex file: |
I can compile the following example:
The
The log file seems like some patches for Biblatex-chicage are not active on your system. I can send you all I unfortunately sprained my ankle yesterday, so I will be a bit slower in my answers in next few days, as I need to rest :/ |
Yeah, i tried with your test file, and i could not compile. I would not know where and how to get the latest make4ht source files. I wish you get better with your ankle though! Have a happy Christmas time! :) |
It is a bit difficult to get all TeX4ht source files, as they are generated from literate TeX files in the source repository. The files are here: Thanks for your kind words, I wish you happy Christmas too! |
Except for this warning:
|
Hi Michal, The patch is trivial (in the sources):
As a side effect, that would also fix my regression testing. |
Hi guys, sorry for the late reply, I needed to handle some more medical emergencies. I think I will be still slower in my answers in the next days, as I shouldn't work for too long. Anyway, I think that I've tried the Regarding the wrong rendering in the document, can you please post a full MWE? It doesn't happen for my test document. |
I managed to track down the conditions for why some citations have a backref without link. There are two conditions:
This is the most minimal example i have found so far: The bibliography (.bib) file:
My preamble and text that triggers the malfunction:
Note how the citations are backrefed at page 2 in the html file, but if you compile as pdf they are shown to be on page 1 instead. |
Have a good new year and may it be even better than the last one was! Hope your medical issues have dissolved itself 😁🎉✨ |
Are you able to reproduce? (using this MWE: #58 (comment)) |
Hi, thanks for reminding me of this issue, I lost track of the old issues. I cannot reproduce it, links seem to be correct with current TeX4ht sources. Even the ODT file is correct. There was only one issue, spurious space after a backlink. But I fixed that in TeX4t sources. See the attached HTML and ODT files: |
Sorry, I can't seem to make it work on my side. It is even worse than back in the day, when i created the MWE, because back then I was able to compile. Now, it will NOT compile if I do either one of these:
It WILL compile if I do this:
Unfortunately, it does not look at all as the file you uploaded. Here the files + log: I am using these make4ht packages, WITHOUT the source files you sent me in one of the comments above: Therefore, I only can assume that either I compile differently than you do, or you do have quite different source files as compared to what is downloadable on Miktex. If I may ask, what method do you use to compile the .tex file before using make4ht? If there is any more information you would need of me or there is something unclear with the information I provided to you, just ask :) Edit: I also installed the make4ht__source package. It did not help. |
I see the issue now. It seems that it happens only with the Try the attached 4htfiles.zip, especially |
Ok, I tried again. Could not make it. Similar behaviour. Attached, you will find the whole directory with files BEFORE and AFTER using make4ht on it + Logs. I used the 4htfiles you sent me in your last comment and copied and pasted them all in the .tex directory. So to look for the output, just press t on your keyboard, as the .tex file is named "testthis". For details, you could look at the files and the logs, but the short story is the same: Using latex > bibtex > latex > pdflatex before make4ht compiles, but it fails at embedding the links. Using lua > bibtex > lua > lua leads to critical error while compiling. For reference, testthis.pdf shows that both sequences definitely work for PDF (using Texmaker), just the transfer to html5 (or odt) fails. (I also tried to use |
Funny enough, when browsing the source files I noticed, how the changelog uses the wrong date: 2021 instead of 2022 for changes logged since 17th march. https://svn.gnu.org.ua/viewvc/tex4ht/trunk/lit/ChangeLog?view=markup&pathrev=1099 |
There is also one prioblem that I see in the LOG file:
See the quotes around
Thanks for noticing this, I usually copy the changelog entries from previous records and change days and months, but didn't notice the wrong year. |
Nice! Yes, mkparams.lua made the difference. I get same results as you now. So, it will be very good, when this arrives in MikTex. At least the MWE is working. I still do have some trouble successfully compiling my larger document, but I am still trying to find out which package is the culprit. Will keep you updated. |
That's great! This bug was here for several months because it affects only Windows. I got a bug report just last week, when it was already late for the fix to be included in TeX Live 2022 :/ |
Uoh, I just tried to convert to odt and it would not compile again :(((( Here the generic command I used: At the end of the log there are lines that say some files cannot be found. |
I think that Babel should work even without Regarding pages without links, I think it is because sometimes BibLaTeX puts multiple pages into the the macro that we use to insert links. It works only for the first number, not for the rest. The |
Hmm ... still does not compile for odt. I created a folder called I also tested the MWE from #58 (comment) and it does not compile for that one either, so I guess I am missing yet another file that exists in the source repository, but is not in miktex yet. I am not sure which issue you refer to we discussed previously. Do you refer to the file-name issue? Here the log |
Yes, the filename issue. Some files are copied incorrectly because of spurious quotes. I think the format file is the only one necessary for correct running, but it seems that it isn't used even if you place it in the |
Alright. I will wait until your changes make it to Miktex, then test the odt conversion again and report back to you. Thank you so far :) |
I hope it will not take too long, I think Miktex updates quite frequently. |
Yesterday, I updated to the newest development version of make4ht on miktex (version 0.3l) and it compiles odt again. compiling the MWE from #58 (comment) via lua > bibtex (biber) > lua > lua and then converting via
compiling my larger document with same commands yields:
hmmm. Neverending story xD Shall I wait some more, until more files are pushed to miktex, or should I do some debugging? |
I think this will need some debugging. |
Putting the biblatex.4ht file you sent me in comment #58 (comment) into the folder with the .tex file, makes conversions to html AND odt work better (by creating a lot more links). So I guess the main problem is that this file is still not in MikTeX. |
Ah, that's good to hear. MikTeX updates .4ht files only occasionally, so it can take some time before they are available :/ |
Ahhhh, ok. Will wait some more then. I can't find the commit of you having changed the file here on GitHub btw. |
Edit: make4ht version v0.3j
For the simple command
make4ht file.tex "mathml"
i experience that backref with a pagenumber is generated, but when clicking on the cross-reference, nothing happens.my backref, biblatex and hyperref commands
the cross-reference of the page-numbers point to this: filepath/file.html#page.xyz
This is how it is formated:
It looks nice, but oh well...
Additional Info:
The text was updated successfully, but these errors were encountered: