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

Pandoc should not hardcode inset: 6pt for Typst tables #9580

Closed
mcanouil opened this issue Mar 15, 2024 · 0 comments
Closed

Pandoc should not hardcode inset: 6pt for Typst tables #9580

mcanouil opened this issue Mar 15, 2024 · 0 comments
Labels

Comments

@mcanouil
Copy link
Contributor

mcanouil commented Mar 15, 2024

Currently Pandoc (3.1.11.1) hardcodes an inset into tables which blocks any possible global customisation.

(Adding eventually a rule in the template would be more appropriate/flexible.)

Example:

```{=typst}
#set table(
  inset: 40pt,
  fill: luma(225)
)
```

## Bad

| Hello |
|-------|
| World |


## Good

```{=typst}
#table(
  [Hello],
  [World],
)
```

Using Pandoc:

pandoc index.qmd --from markdown --to typst

Produces the following document where the Typst table will use the defined inset and fill, but the markdown table will only use fill because inset is hardcoded thus global setting has no effect.

#set table(
  inset: 40pt,
  fill: luma(225)
)
== Bad
<bad>
#figure(
align(center)[#table(
  columns: 1,
  align: (col, row) => (auto,).at(col),
  inset: 6pt,
  [Hello],
  [World],
)]
)

== Good
<good>
#table(
  [Hello],
  [World],
)
@mcanouil mcanouil added the bug label Mar 15, 2024
@jgm jgm closed this as completed in ea37198 Mar 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant