TEIC / Stylesheets

TEI XSL Stylesheets
231 stars 124 forks source link

phrase-level references to macros should be links in PDF #526

Closed sydb closed 2 years ago

sydb commented 2 years ago

In the Guidelines references to macros are, generally, encoded with <ident type="macro">.[1] These should (IMHO) produce links in the output HTML (and ePub and whatever) to the tagdoc for the encoded macro.

Notes

[1] I think they should be encoded with <name type="macro">, myself. But they are not. Sigh.

sydb commented 2 years ago

There are only 3 occurrences of <ident type=macro> in the Guidelines: in DEFCONTEI, MDMDCM, and ppf-err. The references to macros that are generated by the Stylesheets for the “Schema Declaration” section of the tagdocs are proper links.

martinascholger commented 2 years ago

<ident type="datatype"> should be a link as well

martindholmes commented 2 years ago

Waiting on Jenkins to see that all is well. Also we need to check the PDF build and the ePub and Kindle.

martindholmes commented 2 years ago

This needs to stay open, because links are not created in the PDF. They are working in the ePub, and therefore presumably in the Kindle version, but I can't check the latter. Changed the title of the issue to reflect the fact that only the PDF presents a problem now.

martindholmes commented 2 years ago

For the record: what is currently p. 16 of the Guidelines PDF, section 1.4.1, contains a list of macros, all of which should be links to their respective pages, and all of which are links in the HTML, but they aren't in the PDF, That's what we need to fix. Oddly enough, links do appear in section 1.5.

martindholmes commented 2 years ago

In fact this is a broader problem with the PDF. If you look at p. xviii and search for "References to classes are also presented as links, for example model.divLike for a model class, and att.global for an attribute class", you can see two more things which should be links but are not: model classes and attribute classes. In the input TEI Lite, these appear as <ident> elements too. I think the problem lies in latex/latex_core.xsl, in the template at line 337, which simply styles any ident instead of turning it into a link.

martindholmes commented 2 years ago

Fix created with @sydb and @npcole in branch issue-526-mdh-pdf-links. Pull request coming.

martindholmes commented 2 years ago

This can be closed following a pull request. A follow-up, issue #537, has been raised to cover the slightly different cases of ref elements rather than idents, in e.g. section 1.4.