From e2fb8e0e231fac278e39eae22a82d89f4d5e90fb Mon Sep 17 00:00:00 2001 From: kartikeya Date: Wed, 20 Sep 2023 16:03:51 +0530 Subject: [PATCH] fixing font --- R/Renderer.R | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/R/Renderer.R b/R/Renderer.R index f61c7d2f..c4a2e9e0 100644 --- a/R/Renderer.R +++ b/R/Renderer.R @@ -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 { "" @@ -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]]) ) }) @@ -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 )