Open-Systems-Pharmacology / OSPSuite.ReportingEngine

R implementation of the reporting engine
https://www.open-systems-pharmacology.org/OSPSuite.ReportingEngine/
Other
5 stars 5 forks source link

Tables: change default word style #857

Open Yuri05 opened 2 years ago

Yuri05 commented 2 years ago

@sfrechen @annikarps please attach word document (1 page) which contains a table with dummy data in required format

sfrechen commented 2 years ago

Table_Template.docx

pchelle commented 1 year ago

I have done some testing of the word conversion for the table format. Currently, the reference word document managing the styles of the report (provided as wordConversionTemplate argument of the workflow) updates the Table properties as follows:

Shading and border styles of the table

Font style of the Table

The font defined by the previous workflow was not used by Pandoc in my tests, however, the following workflow was working to change the font of the table

Alignment

Alignment did not work in my tests:

pchelle commented 1 year ago

@Yuri05 While creating an article for documenting how to work with word reports I may have found a solution for alignment.

It is possible to defined inline openxml raw code for alignment

|header 1|long header 2|very long header 3|
|----|-----|-----|
|a     |b     |`<w:pPr><w:jc w:val="right"/></w:pPr>`{=openxml} c|

would render the following in word.

header 1 long header 2 very long header 3
a b c