-
Notifications
You must be signed in to change notification settings - Fork 15
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
feature request: an interface for BBox attribute #763
Comments
I'm not sure if a simple public variant of As background: the BBox attribute describes the absolute coordinates of a picture on a page (this allows application like html derivation to make a "screenshot" and catch the picture). A BBox is only needed if the graphic is actually tagged as a Figure, if it is an artifact or a Span one can drop it. So the code has to use some \pdfsavepos variant to get the absolute position on the page, needs to know the size of the picture, then has to calculate from both sensible absolute left bottom and right upper coordinates and at last adds that (if wanted) to the structure object. How the "calculation" is done varies. E.g. for includegraphics it is rather complicated as I tried to follow rotations and shifts, the picture code on the other side simply uses the declared bounding box, both use a standard pdfsavepos; in the tikz code, that is currently under development, I reused their remember picture code to get an absolute position and take the internal bounding box they calculate and do not handle a box at all. So do you actually need code to add a savepos and to calculate the BBox values, or do you only need an interface to add this values to the structure object? That is would something like |
Thanks for the detailed explanation. |
@hvoss49 this discussion is also relevant for pstricks imho. |
Ulrike, this Email is from July: I've taken the options from L3 code into pstricks.tex
Similiar to Can I use the extensions found in
and
??? I suppose that |
@hvoss49 Hm. I can't remember an email about that. I don't have time now, but next week we should discuss it. Btw: you should define the artifact key so, that it can be used without value. |
It depends on what should be the default. For example:
is |
As suggested in lualatex/luamplib#151, I propose a new interface for adding BBox attribute to a structure.
To support tagged PDF in luamplib package, I encountered the need to add BBox attribute to Figure structures. I also found that the relevant code exists already in latex-lab-testphase-graphic.sty. The only missing point is a user interface accessing this code.
It seems that the interface should accept a required argument of a box register and an optional argument of dimensional values to correct the BBox. The optional argument is needed because MetaPost has its
setbounds
command which makes a picture lie about its bounding box.It would be much convenient if you kindly provide the interface for generating BBox attribute, which can be used in luamplib or any other packages that need this feature as well.
The text was updated successfully, but these errors were encountered: