TEIC / Stylesheets

TEI XSL Stylesheets
231 stars 124 forks source link

Issue 526 mdh pdf links #536

Closed martindholmes closed 2 years ago

martindholmes commented 2 years ago

Proposed fix for missing links for macros etc. per issue #526.

sydb commented 2 years ago

Nope. I built the PDF version using this branch (issue-526-mdh-pdf-links) of the Stylesheets against the dev branch of the Guidelines using Hugh’s Docker container. The PDF still does not have the links you (@martindholmes) specifically mention on the ticket. I believe the problem is that the new line 340 compares against "macro", "datatype", and "model", but not "class".

sydb commented 2 years ago

Nope. I went ahead and corrected line 340. (It had "model" where it should have had "class".) But that did not solve the problem. I added debugging code to be sure: the "makeInternalLink" template is being called properly now, but (at least in xviii case) the classes are still not links. I have removed my debugging code and pushed the fix to line 340 in 8d8ac5f2. Will spend a few more minutes on this, but then off to bed.

martindholmes commented 2 years ago

@sydb are you doing the full pdf build or just the pdfonce?

sydb commented 2 years ago

Using make pdf, which I think does both pdfonce and pdfrest.

Found that the <ident type="class">model.divLike</> was (reasonably) testing for id('model.divLike'), but there is no such ID. There is "TEI.model.divLike", which looks like the right thing. So I separated out the test for "class" and prepended “TEI.” to the $dest. Seems to be working, but I am too tired to test carefully. Updated in a6e34de6.

sydb commented 2 years ago

Yes, looks like make pdf does Guidelines.pdf: (which does pdfonce) and pdf-complete: (which does pdfrest).

sydb commented 2 years ago

Note 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. Should we be doing something there, too?

martindholmes commented 2 years ago

@sydb did the touch-ups, and we tested with @npcole, so this is ready to merge. A new ticket for the instances of ref rather than ident will be raised.