latex3 / tagpdf

Tagging support code for LaTeX
59 stars 7 forks source link

setting ID entry in structure elements #62

Closed lvjr closed 8 months ago

lvjr commented 1 year ago

In the documentation of tagpdf, I can not find a way to set ID key inside \tagstructbegin command. ID key is needed by /Headers attribute with owner /Table.

u-fischer commented 1 year ago

no there is no IDtree currently as we didn't really started on tabulars yet, and for other structures there isn't much use for it. But it wouldn't be very difficult to add. I will look into it.

lvjr commented 1 year ago

Basically I know a little more HTML/CSS than PDF. Since Tagged PDF is similar to HTML/CSS in many aspects and there is a specification for deriving HTML from Tagged PDF, I think it is a good idea to understand Tagged PDF concepts from the point of view of HTML/CSS.

In HTML/CSS, I would think id and class attributes are two most elementary and important attributes of elements, and they can be used in almost all elements. They correspond to ID and C keys in Tagged PDF respectively.

u-fischer commented 1 year ago

as I wrote I will add an IDtree, it is on my todo list anyway. But while tagged PDF is in some parts similar to html, don't forget that there are also differences: ID is not required to connect and references structures as every structure already has a unique ID through its object number, and to quote the reference "Attribute classes are strictly a mechanism for storing attribute information in a more compact form;".

u-fischer commented 1 year ago

I have added ID's to the structures and also the IDtree and uploaded a new version to ctan. There isn't yet a good interface to use them in attributes, I need to do more experiments first.

u-fischer commented 8 months ago

I'm closing as the IDtree is now there. For new question about e.g. how to retrieve them, open a new issue.