Open crsh opened 2 years ago
This sounds great, I would also love the ability to make page layouts landscape for wide apa_tables in docx (related to point 7).
Indeed, thanks for mentioning this. It seems that this would require either an additional Lua-filter (also see here) or using the officedown package.
The Lua-filter list-table
seems a promising alternative to power a cross-format apa_table()
!
Flagging that with pandoc 2.19 col/row spanners are supported via the grid table layout. Could help in getting the col_spanners argument to work with docx.
An example that should work out of the box in papaja::apa6_docx
rmarkdown::pandoc_version()
#> [1] '2.19'
: A table caption
+---------------+---------------+--------------------+
| | col_spanner |
+ +---------------+--------------------+
| | Var1 | Var2 |
+===============+:=============:+:==================:+
| Row 1 | 1.32 | 1.54 |
+---------------+---------------+--------------------+
| Row 2 | 2.89 | 3.21 |
+===============+===============+====================+
<div custom-style='Compact'>
*Note.* a note
</div>
As it currently stands,
apa6_docx
produces a decent document that is reasonably close to APA-style (with some manual labor involved), but it lacks several features available in PDF documents. It would be great to offer support for the most important ones. Since I first wrote the function there has been a lot of improvements on thepandoc
-side and new R packages, such asofficedown
that could be leveraged to makeapa6_word
more powerful. I'll try to collect some of the things I would like to improve here for later reference.For all of the below, we should do some research on
officedown
. I'd prefer to use nativepandoc
features and Lua-filters where possible, but this package adds a lot of functionality that may be indispensible or laborous to reimplement.native_numbering
extensiongt
,flextable
,huxtable
, andkableExtra
as a backend to extend the functionality ofapa_table()
(https://github.com/crsh/papaja/issues/466)figurelist
etc.