-
Notifications
You must be signed in to change notification settings - Fork 23
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
tagpdf support #27
Comments
Sorry I know little about these at this time. I have given you write access to this repository. Please feel free to add anything you want. |
Thanks for the invitation. I'm sorry I don't have the time now to think about it, and in the project handling tabulars is for a good reason in a later phase of the project as this is not trivial. But I think it is important that you consider in your code not only if you get the right visual appearance but also consider how the structure of the table is encoded. This is important if one wants to copy&paste a table or export it to html, or if people want to define layouts in a css-like manner eg as "make all header cells bolder" |
Yes, it is useful. I will leave this issue open and hope to come back for it one day. |
Here a very simple example (it needs a current tagpdf 0.9). It marks up a table with one column which has a header and two rows. I think it gives an impression of the code we need to inject (it is even more as I left out a few details like attributes). If you compile this and then upload the pdf at https://ngpdf.com/loadFile you can check the html and it will give something like this
|
Yes, it is very interesting. |
I will close this issue and further comments could be leaved in issue #197. |
I decide to reopen this issue to record experiments with |
With the newly added public hooks and variables (#197) in <!DOCTYPE html>
<html><head>
<title>test-tagpdf-01</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body lang="en-US">
<div data-pdf-se-type="Document" id="ID.001">
<p data-pdf-se-type="P" id="ID.002"><span id="page-0" role="doc-pagebreak"></span>Some text.</p>
<table data-pdf-se-type="Table" id="ID.003">
<tbody><tr data-pdf-se-type="TR" id="ID.004">
<td data-pdf-se-type="TD" id="ID.005"><p data-pdf-se-type="P" id="ID.006">Alpha</p></td>
<td data-pdf-se-type="TD" id="ID.007"><p data-pdf-se-type="P" id="ID.008">Beta</p></td>
<td data-pdf-se-type="TD" id="ID.009"><p data-pdf-se-type="P" id="ID.010">Gamma</p></td>
<td data-pdf-se-type="TD" id="ID.011"><p data-pdf-se-type="P" id="ID.012">Delta</p></td>
</tr>
<tr data-pdf-se-type="TR" id="ID.013">
<td data-pdf-se-type="TD" id="ID.014"><p data-pdf-se-type="P" id="ID.015">Epsilon</p></td>
<td data-pdf-se-type="TD" id="ID.016"><p data-pdf-se-type="P" id="ID.017">Zeta</p></td>
<td data-pdf-se-type="TD" id="ID.018"><p data-pdf-se-type="P" id="ID.019">Eta</p></td>
<td data-pdf-se-type="TD" id="ID.020"><p data-pdf-se-type="P" id="ID.021">Theta</p></td>
</tr>
<tr data-pdf-se-type="TR" id="ID.022">
<td data-pdf-se-type="TD" id="ID.023"><p data-pdf-se-type="P" id="ID.024">Iota</p></td>
<td data-pdf-se-type="TD" id="ID.025"><p data-pdf-se-type="P" id="ID.026">Kappa</p></td>
<td data-pdf-se-type="TD" id="ID.027"><p data-pdf-se-type="P" id="ID.028">Lambda</p></td>
<td data-pdf-se-type="TD" id="ID.029"><p data-pdf-se-type="P" id="ID.030">Mu</p></td>
</tr>
</tbody></table>
<p data-pdf-se-type="P" id="ID.031">More text.</p>
</div>
</body></html> |
The Markdown package for TeX currently uses package tabularray to render CSV tables through the package csvsimple. However, we also wish to support PDF tagging and the package tabularray is listed as incompatible in latex3/tagging-project#177 and in https://latex3.github.io/tagging-project/tagging-status/: @lvjr: You seem to have made some effort over the past two years in supporting PDF tagging in #197 and in #27 (comment). To what extend would you say that the package supports PDF tagging and what are your plans going forward? |
@Witiko I always keep |
well hooks are nice, but they can be used by everyone and so you loose precise control over the places where the code is inserted. In the example below the xxxx inserted by someone else are lost in the structure. Another problem with tagging is that we tag paragraphs automatically, and this means if you insert something into a paragraph or start a paragraph you have to carefully keep track if you want it to open a structure and if you have to close an MC-chunk or not. So the example below works fine when I deactivate the paratagging and put the tblr in a paragraph of its own, but fails with active paragraph tagging. Tracking down what is going on here and which So the following code can get you started, but if you want to support the tagged PDF project, you will have to delve a bit deeper.
|
I decide to upload There are two benefits: (1) anyone can try the package; (2) anyone can adopt the package. |
We are working on a project to enhance LaTeX so that it can produce tagged pdf.
https://www.latex-project.org/news/2020/11/30/tagged-pdf-FS-study/
For a tabular this means that one need to add commands quite similar to html-table commands to cells and rows.
So to successfully tag a tabular, one needs at least
The code for the cells and rows should at best have access to data like the current row/column number.
It would be nice if tabularray would add suitable hooks for this.
The text was updated successfully, but these errors were encountered: