Skip to content
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

Incorrect references to tables, figures and equations #1009

Open
goska opened this issue Jun 21, 2018 · 4 comments
Open

Incorrect references to tables, figures and equations #1009

goska opened this issue Jun 21, 2018 · 4 comments

Comments

@goska
Copy link
Contributor

goska commented Jun 21, 2018

Affects XML and HTML document collections (i.e. split into multiple documents) generated with LaTeXML 0.8.2 using latexml LaTeX -> XML followed by latexmlpost XML -> collection of XML/HTML documents with splitnaming set to labelrelative and urlstyle set to server.

href attributes of hyperlinks (HTML)/refs (XML) to tables/figures/equations in index.html/index.xml pages do not get prefixed with index.html/index.xml. This gets resolved on the server if referenced from another branch of the tree, but does work not in the descendants of the page, which end up with the references to local same-page anchors (i.e. prefixed with "#"), which do not exist.

Using my test files and the commands listed below, in HTML collection, links to the the table/figure/equation in minimalRefs-html5-html/Introduction/chap_testChap1/ssec_test_section1/index.html from subsection of the same section, e.g. /minimalRefs-html5-html/Introduction/chap_testChap1/ssec_test_section1/ssec_testsub.html don't work as hrefs contain strings like "#Ch1.T1" and get interpreted as minimalRefs-html5-html/Introduction/chap_testChap1/ssec_test_section1/ssec_testsub.html#Ch1.T1.

A reference from another chapter, e.g. href="../../../Introduction/chap_testChap1/ssec_test_section1/#Ch1.T1" works on a server.
References to objects occurring in pages, which are not named "index" get correct hrefs and work fine, e.g. href in a hyperlink from minimalRefs-html5-html/Introduction/chap_testChap1/ssec_test_section1/ssec_testsub2.html linking to a table in minimalRefs-html5-html/Introduction/chap_testChap1/ssec_test_section1/ssec_testsub.html#Ch1.T2 is
href="ssec_testsub.html#Ch1.T2.

I attach the files used for the test.
Commands used:

latexml --dest=minimalRefsTest.xml minimalRefsTest.tex
latexmlpost --dest=minimalRefs-html5-html/index.html --urlstyle=server  --navigationtoc=context   --splitat=subsection  --splitnaming=labelrelative  --css=LaTeXML-navbar-left.css --format=html5 minimalRefsTest.xml 

or

latexmlpost --dest=minimalRefs-xml-xml/index.xml --urlstyle=server  --navigationtoc=context   --splitat=subsection  --splitnaming=labelrelative  --css=LaTeXML-navbar-left.css --format=xml minimalRefsTest.xml 

minimalRefsTest.zip

@dginev
Copy link
Collaborator

dginev commented Jun 21, 2018

Thank you for the report! I took the liberty of adding a little extra formatting to the description for extra readability.

@goska
Copy link
Contributor Author

goska commented Jun 21, 2018

Thanks!

@brucemiller
Copy link
Owner

Tricky thing if you think that "index.html" is the same relative url as "", you get fooled!
Should be fixed now in master; Thanks for the report!

@goska
Copy link
Contributor Author

goska commented May 15, 2023

This appears to be a problem with LaTeXML 0.8.7. Tested using the same conversion procedure and the same test file.

@dginev dginev reopened this May 15, 2023
@dginev dginev modified the milestones: LaTeXML-0.8.3, LaTeXML-0.8.8 May 15, 2023
@dginev dginev modified the milestones: LaTeXML-0.8.8, LaTeXML-0.8.9 Jan 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants