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

nifu_gt_theme #14

Open
sda030 opened this issue Jun 6, 2024 · 0 comments
Open

nifu_gt_theme #14

sda030 opened this issue Jun 6, 2024 · 0 comments

Comments

@sda030
Copy link
Member

sda030 commented Jun 6, 2024

Tidlig forsøk. Mangler en del linjer, osv. (Tenker APA7 er godt utgangspunkt, men kan få inn litt mer fet tekst, farger, etc?) Og gt fungerer fortsatt ikke helt optimalt med Quarto, docx og typst.

gt_nifu_style <- function(x) {
  if(!gt:::is_gt_tbl(x)) x <- gt::gt(x, locale = "nb")
  gt::tab_options(data = x, 
                  table.font.size = 10.5,
                  table.font.names = "Calibri",
                  # table.align = "center",
                  table.width = gt::px(550),
                  table.margin.left = gt::px(55),
                  table.margin.right = gt::px(0),
                  heading.align = "left",
                
                  # table.layout = "auto",
                  quarto.use_bootstrap = TRUE) |>
    # gt::opt_interactive(use_pagination = FALSE, use_pagination_info = FALSE, use_sorting = FALSE, use_highlight = TRUE) |>
    gt::sub_missing(missing_text = "") |>
    # gt::opt_align_table_header(align = "left") |>
    gt::tab_style(style = gt::cell_text(weight = "bold"), 
                  locations = list(gt::cells_title(),
                                   gt::cells_column_labels(),
                                   gt::cells_column_spanners())) |>
    gt::cols_align(align = "left",
                   columns = 1)
}
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