-
Notifications
You must be signed in to change notification settings - Fork 213
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
cols_align_decimal with Latex fails #1951
Comments
Hi @dropsplash ! Thanks for the report. Could you share a minimal reproducible example? I can't reproduce this. I tried this with gt 0.11.1 and Quarto 1.6.40 and it works as expected ---
title: test
format: pdf
---
```{r}
library(gt)
```
```{r}
dplyr::tibble(
char = LETTERS[1:9],
num = c(1.2, -33.52, 9023.2, -283.527, NA, 0.401, -123.1, NA, 41)
) |>
gt() |>
fmt_number(
columns = num,
decimals = 3,
drop_trailing_zeros = TRUE
) |>
cols_align_decimal()
``` |
Hello, version
here the exampletitle: test
|
Ok, I can reproduce this now. It seems that the engine has trouble dealing with the \U02007 character (a space)
It uses \U02007 for padding and pdflatex doesn't seem to like it. https://bookdown.org/yihui/rmarkdown-cookbook/latex-unicode.html This is the internal function where this is added. Unfortunately, I don't think this will receive a quick fix on the gt side.. Lines 174 to 257 in d99a57e
|
hello,
thanks for your work.
cols_align_decimal fails with latex
output
LaTeX Error: Unicode character (U+2007)
not set up for use with LaTeX.
Any clue how to solve it?
Thanks
The text was updated successfully, but these errors were encountered: