Repository navigation
PDF language tagging (a short text) #357
Replies: 8 comments 17 replies
This sets the language in two places: in the structure and in the included mc-chunks. That is not really necessary. One of both options are enough. Setting the language in a Span structure works fine as long as there is no paragraph break in the argument. Setting the language on the mc chunks with Be aware that "works" currently mostly only means "it works in adobe reader on windows" (but foxit will hopefully add support in the near future). |
|
May I suggest using an example where the language code is not identical with a key word? |
|
This is setting an internal variable |
|
@cfr42 @u-fischer Thank you for your comments. Rewritten. |
|
@jbezos I think you should update the example. With a current babel, this here works quite ok: Personally I think it would be better if the tagging is activated automatically if The I made some reading tests: for me only adobe switches the voices (for danish it says "Danish not supported and then tries with the english voice). With all other readers only the english voice was used. |
Sure. Since they are the first steps, for the moment it’s optional, just in case. I’m investigating possible issues related to
I’ve found two approaches. One of them is based on an explanatory text (hence the Since you’ve confirmed it works, I think this page should be rewritten (not only the example). |
|
Actually it is trivial to add language for selectlanguage now too. You only need Or perhaps, to reduce the number of |
|
Although |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
To be updated. See What’s new in babel 26.14.
Version 25.12 of the manual included a tentative example for a very basic and minimal tagging of text with
\foreignlanguage(only text, without a par break). It was incomplete and didn’t work. Here a more complete one, but note proper tagging in complex situations is far from trivial.Be aware the behavior related to tagging can and very likely will change.
Here is what PDF Accesibility Checker shows:
(The word ’welsh’ is split into two chunks because of a kern. The
langproperty is inherited by the inner content.)If you want to look at the PDF code, add the option
uncompressto\DocumentMetadataand open the generated file with a text editor. You will see something like this:Note the
/Lang (cy-GB). This object contains (inside/K, meaning ‘kids’) the text ‘welsh’ referred to as/MCID 1followed by the object27 0 R(the text ‘emphasis’). The marked content for ‘welsh’ is defined before:(
EMCmeans ‘end of marked content'. The string is<0072>28<003200480062003F0067>but note it’s not ASCII.)Here is also the marked content for ‘emphasis’ (
/MCID 2):All reactions