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

Word report: text body should not be bold #748

Closed
PavelBal opened this issue Mar 31, 2022 · 3 comments
Closed

Word report: text body should not be bold #748

PavelBal opened this issue Mar 31, 2022 · 3 comments

Comments

@PavelBal
Copy link
Member

Most of the text is currently "bold":

image

vs

image

@Yuri05
Copy link
Member

Yuri05 commented Mar 31, 2022

Conversion MD=>DOCX is done via Pandoc; most of the Word formatting options are triggered by the conversion template word file, which is passed to Pandoc.
Currently RE is using the conversion template file which was adjusted to our needs for non-qualification workflows (MeanModel-/Population-Workflow) and we need to keep it AS IS.
What we could do: extend qualification workflow start function with an optional argument (path to user supplied conversion template) and then create another template (or even different templates) for qualification workflows, which could be then optionally passed to the qualification workflow.
Then users could even create their own conversion templates (which is however not straight forward).

If you like, you can create a new conversion template by:

  • opening the current conversion template file
  • adjusting the properties of different elements (text, figure captions, TOC etc.).
    Important: you need to adjust the properties of those elements not directly in the document, but in the styles



    grafik


  • Save the document.
    Important: do NOT upgrade the document version while saving, otherwise the Pandoc conversion will crash.

@Yuri05
Copy link
Member

Yuri05 commented Apr 29, 2022

@PavelBal Good introduction to creating/adjusting word templates for pandoc is here:
https://bookdown.org/yihui/rmarkdown-cookbook/word-template.html
So you can create your own template and pass it to the createQualificationReport function.
And if you create some nice template(s) - we could install them with the package additionally to the default one :)

#' @param wordConversionTemplate File name of docx template document passed to Pandoc for the conversion of the md report into docx
#' Default template is available using `system.file("extdata", "reference.docx", package = "ospsuite.reportingengine")`
#' @examples
#' # Create a Qualification Report without any option and running v9.1.1 of Qualification Runner
#' createQualificationReport("C:/Software/QualificationRunner9.1.1")
#'
#' # Create a Qualification Report and turn of the creation of a doc version
#' createQualificationReport("C:/Software/QualificationRunner9.1.1", createWordReport = FALSE)
#'
#' # Create a Qualification Report and set the number of simulations to be run per core
#' createQualificationReport("C:/Software/QualificationRunner9.1.1", maxSimulationsPerCore = 8)
#'
#' # Create a Qualification Report and update Qualification Version Information on title page
#' versionInfo <- QualificationVersionInfo$new("1.1", "2.2","3.3")
#' createQualificationReport("C:/Software/QualificationRunner9.1.1", versionInfo = versionInfo)
#'
createQualificationReport <- function(qualificationRunnerFolder,
pkSimPortableFolder = NULL,
createWordReport = TRUE,
maxSimulationsPerCore = NULL,
versionInfo = NULL,
wordConversionTemplate = NULL) {

pchelle added a commit to pchelle/OSPSuite.ReportingEngine that referenced this issue Dec 22, 2022
…n-Systems-Pharmacology#748 Open-Systems-Pharmacology#749 Open-Systems-Pharmacology#750 Open-Systems-Pharmacology#754 default reference document styles

In the new reference document
- Default line spacing is 1.5
- Default font is Arial and not bold
- Default alignment is Justify
- Tables use borders, first row and column only in bold
Yuri05 pushed a commit that referenced this issue Jan 2, 2023
* Fixes #963 Adapt pandoc options to version

* Fixes #746 #747 #748 #749 #750 #754 default reference document styles

In the new reference document
- Default line spacing is 1.5
- Default font is Arial and not bold
- Default alignment is Justify
- Tables use borders, first row and column only in bold

* Unfix #747 back to left aligned paragraphs
@Yuri05
Copy link
Member

Yuri05 commented Jan 2, 2023

Fixed by #965

@Yuri05 Yuri05 closed this as completed Jan 2, 2023
@Yuri05 Yuri05 moved this to Verified in Version 2.1 / 2.2 Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Verified
Development

No branches or pull requests

2 participants