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

goska opened this Issue Jun 21, 2018 · 3 comments


None yet
3 participants

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

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 


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

@dginev dginev added this to the LaTeXML-0.8.4 milestone Jun 21, 2018


This comment has been minimized.


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.


This comment has been minimized.


goska commented Jun 21, 2018



This comment has been minimized.


brucemiller commented Jul 10, 2018

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!

@dginev dginev modified the milestones: LaTeXML-0.8.4, LaTeXML-0.8.3 Jul 10, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment