Skip to content
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

Display text from two different cells in a single line in toc #2816

Open
LouisBernon opened this issue Dec 3, 2024 · 0 comments
Open

Display text from two different cells in a single line in toc #2816

LouisBernon opened this issue Dec 3, 2024 · 0 comments

Comments

@LouisBernon
Copy link

LouisBernon commented Dec 3, 2024

Hello,

Is there a way to display the text of two different cells from a table into a single line in the table of content ?
This resulted in two different lines when I first tried.

I then tried to merge the two cells so I could apply the tocItem, which works, but the issue is that now the elements in the second cells are not aligned with each other because the text from the first cell is not of constant length, like on this picture :
image

Another solution I thought of would be to set the horizontal position of the text from the second cell relatively to the table but that doesn't seem to be possible.

My attempt with the merged cells :

let table_lot = {
    margin: [0, 0, 0, 0],
        table: {
            widths: [30,'*', 20, 34],
                body: [[{
                    text : [
                        {text: "0.0.1 -  "},
                        {text :`Documents`}],
                    style: 'h3',
                    tocItem: 'tocId',
                    tocStyle: 'toch3',
                    colSpan: 2,
                    border: [true, true, true, false],
                },
                {},
                {
                    text : "15",
                    rowSpan: 3,
                    border: [true, true, true, true],
                },
                {
                    text : "m²",
                    rowSpan: 3,
                    border: [true, true, true, true],
                },
                ],

Thank you in advance !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant