Skip to content

Commit

Permalink
fixing font
Browse files Browse the repository at this point in the history
  • Loading branch information
kartikeya committed Sep 20, 2023
1 parent 4fdd520 commit e2fb8e0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions R/Renderer.R
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,13 @@ Renderer <- R6::R6Class( # nolint: object_name_linter.
" ft <- flextable::fontsize(ft, size = 7, part = 'body')",
" ft <- flextable::bg(x = ft,bg = 'lightgrey')",
" ft <- flextable::border_outer(ft)",
" ft <- flextable::font(ft, fontname = 'Courier New')",
" if(flextable_dim(ft)$widths > 8) {",
" ft <- width(ft, width = 8)",
" }",
" ft",
"}",
collapse = "\n"
sep = "\n"
)
} else {
""
Expand Down Expand Up @@ -148,7 +149,7 @@ Renderer <- R6::R6Class( # nolint: object_name_linter.
unlist(
lapply(seq_along(block_content_lst), function(b) {
sprintf(
"### \n\n```{r, echo=FALSE}\ncode_block(data.frame(\n%s))\n```\n",
"---\n\n```{r, echo=FALSE}\ncode_block(data.frame(\n%s))\n```\n",
shQuote(block_content_lst[[b]])
)
})
Expand All @@ -157,7 +158,7 @@ Renderer <- R6::R6Class( # nolint: object_name_linter.
)
} else {
sprintf(
"### \n\n```{r, %s}\n%s\n```\n",
"--- \n\n```{r, %s}\n%s\n```\n",
paste(names(params), params, sep = "=", collapse = ", "),
block_content
)
Expand Down

0 comments on commit e2fb8e0

Please sign in to comment.