Skip to content

Please expose alt and actualtext in graphics support #957

@borisveytsman

Description

@borisveytsman

Right now tagging code puts alt and actualtext in internal variables. A snippet from latex-lab-testphase-graphic.sty

\NewTaggingSocketPlug{graphic/begin}{alt}
  {
    \tag_mc_end_push:
    \tl_if_empty:NT\l__tag_graphic_alt_tl
      {
        \msg_warning:nne{tag}{alt-text-missing}{#1}
        \tl_set:Ne\l__tag_graphic_alt_tl {\text_purify:n{#1}}
      }
    \tag_struct_begin:n
      {
        tag=\l__tag_graphic_struct_tl,
        alt=\l__tag_graphic_alt_tl,
      }
    \tag_mc_begin:n{}
  }

and similarly for actualtext

A class author may need to know alt text to generate their own warning, or create a table of alt texts, etc. However, one cannot provide their own plug since \l__tag_graphic_alt_tl is internal, and we cannot rely on it.

Please make \l__tag_graphic_alt_tl and \l__tag_graphic_actualtext_tl public.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions