[NTG-context] Tagged export breaks r2l alignment in tabulate

Wolfgang Schuster wolfgang.schuster.lists at gmail.com
Sun Sep 27 15:40:56 CEST 2020


Denis Maier schrieb am 26.09.2020 um 22:39:
> Am 23.09.2020 um 16:04 schrieb Wolfgang Schuster:
>> Denis Maier schrieb am 23.09.2020 um 14:14:
>>> Hi,
>>>
>>> this example produces correctly aligned right-to-left text:
>>>
>>> ============
>>> \setupalign[verytolerant,stretch]
>>> \setupdirections[bidi=global,method=unicode]
>>>
>>> \starttext
>>>
>>> \starttabulate[|p|p|]
>>> \NC Text
>>> \NC Translation
>>> \NC\NR
>>> \NC\setupalign[r2l]\input ward
>>> \NC\input ward
>>> \NC\NR
>>> \stoptabulate
>>>
>>> \stoptext
>>> ==============
>>>
>>> But, this here fails:
>>>
>>> ============
>>> \setupalign[verytolerant,stretch]
>>> \setupdirections[bidi=global,method=unicode]
>>> \setupbackend[export=yes]
>>> \setupstructure[state=start,method=auto]
>>>
>>> \starttext
>>>
>>> \starttabulate[|p|p|]
>>> \NC Text
>>> \NC Translation
>>> \NC\NR
>>> \NC\setupalign[r2l]\input ward
>>> \NC\input ward
>>> \NC\NR
>>> \stoptabulate
>>>
>>> \stoptext
>>> ==============
>>>
>>> Why is that?
>>
>> The export can lead to unwanted results in the PDF and should always 
>> be done in a separate run.
>>
>>> And what can I do about it? (I need tagged pdf for PDF/A compliance.)
>>
>> You do you use export when you need only tagging?
>>
>>
>> You can enable tagging with
>>
>>      \setuptagging[state=start]
>>
>> and to set the PDF format use \setupbackend but ignore the export key.
>>
>> Wolfgang
> 
> Thanks, Wolfgang for that suggestion. However, that does not seems to 
> solve the problem. Put differently, tagging seems to lead to the same 
> sort of problems.

It works when you set the alignment in the template of the table.

\setupdirections
   [bidi=global,
    method=unicode]

\setuptagging
   [state=start]

\starttext

\starttabulate[|pA{righttoleft}|p|]
%\NC \raggedleft Text    \NC Translation \NC\NR
\NC \rightaligned{Text} \NC Translation \NC\NR
\NC \input ward         \NC \input ward \NC\NR
\stoptabulate

\stoptext

Wolfgang


More information about the ntg-context mailing list