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

Caption from Markdown table are not shown in typst output anymore #11733

Open
cderv opened this issue Dec 23, 2024 · 1 comment
Open

Caption from Markdown table are not shown in typst output anymore #11733

cderv opened this issue Dec 23, 2024 · 1 comment
Assignees
Labels
bug Something isn't working regression Functionality that used to work but now is broken. tables Issues with Tables including the gt integration typst
Milestone

Comments

@cderv
Copy link
Collaborator

cderv commented Dec 23, 2024

---
title: "Quarto Playground"
format: typst
---

| Default | Left | Right | Center |
|---------|:-----|------:|:------:|
| 12      | 12   |    12 |   12   |
| 123     | 123  |   123 |  123   |
| 1       | 1    |     1 |   1    |

: Demonstration of pipe table syntax

This is quite simple document

  • v1.6.39
    Image

  • v1.5.57
    Image

Somehow we are loosing the caption - I don't think this is on purpose - is it ?

We do get it on top if we use cross reference table

---
title: "Quarto Playground"
format: typst
keep-typ: true
---

| Default | Left | Right | Center |
|---------|:-----|------:|:------:|
| 12      | 12   |    12 |   12   |
| 123     | 123  |   123 |  123   |
| 1       | 1    |     1 |   1    |

: Demonstration of pipe table syntax {#tbl-one}

Image

@cderv cderv added regression Functionality that used to work but now is broken. tables Issues with Tables including the gt integration typst labels Dec 23, 2024
@cderv cderv added this to the Hot-fix milestone Dec 23, 2024
@mcanouil mcanouil added the bug Something isn't working label Dec 23, 2024
@gordonwoodhull
Copy link
Contributor

gordonwoodhull commented Dec 24, 2024

The table is also left-aligned where it was centered previously.

This looks like one of those edge cases that happens with figures that aren't Typst figures because they are not cross-referenced.

The offending commit was c88e6d7, which fixed numbering (lettering) of subtables #10438

Note that the "good" behavior before this commit has a cross-reference ("Table 1") which is arguably incorrect.

I think we have gone back and forth a little bit about non-cross-referenced figures in Typst. Ideally they should look the same but they should not have the cross reference.

IIUC if we want to use Typst's figure infrastructure for non-cross-referenced figures, we'd need

  • a custom kind
  • a blank or bogus supplement
  • a filter to remove the supplement / last traces of cross-reference

It might be easier just to duplicate the formatting and not make it a figure (but then we'd have to keep it in sync with figure formatting).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working regression Functionality that used to work but now is broken. tables Issues with Tables including the gt integration typst
Projects
None yet
Development

No branches or pull requests

4 participants