TEIC / Stylesheets

TEI XSL Stylesheets
231 stars 124 forks source link

`<ref>` elements not becoming links in PDF #537

Closed sydb closed 2 years ago

sydb commented 2 years ago

From work on #526, @martindholmes and I have discovered that the headwords (as it were) in “1.4.1 Standard Content Models” on PDF page 16 are still not links. They are encoded as <ref>s, not <ident>s, so we did not try to fix them on that ticket.

martinascholger commented 2 years ago

Do you mean <ptr>s? They are links in my PDF download.

sydb commented 2 years ago

Update from Stylesheets group meeting 2022-01-28

@martinascholger’s comment above can be ignored. (I had not been precise enough in the description of where there were problematic <ref>s, so she was looking in wrong place. I meant in the TEI Lite intermediate file, not the source of the Guidelines.)

We discovered that the code in latex/latex_tagdocs.xsl that handles this (roughly lines 290–307)

  1. Does not have a template that matches specList-dataSpec, although it does have the others
  2. Uses <value-of> where surely it should be <apply-templates>
  3. Generates ugly output that is both boldfaced and a link

So (after some testing) we removed the boldface bit from the template for specList-elementSpec and changed the <value-of> to <apply-templates>; and just removed the other templates, since all they were adding was the boldface bit, which we think is ugly, anyway.

And it seems to work. That’s the good news. The bad news is I forgot to make a new branch for this, so it will be a few minutes to hours before I can check it in and generate a PR.

martindholmes commented 2 years ago

@sydb This might be useful:

https://css-tricks.com/git-switching-unstaged-changes-to-a-new-branch/

sydb commented 2 years ago

Thanks, @martindholmes, that is a nice description. Forgot to say so here, but the changes were pushed up to the "sydb_issue_537" branch at ~16:49Z, and PR #542 (on which you have already commented) created for it at ~16:54Z.