Closed rosnertm closed 5 years ago
Are you trying to print a huxtable in a Word document directly from within rmarkdown? If so, that won't work - though if you upgrade to github master, it should. With 4.3.0, you still need to use as_flextable before printing to Word. See the introduction vignette section "Output to different formats".
Ah, okay. Sorry for missing that! Thanks for your help.
If you want to try out the GitHub version and report your experience that would be helpful! You’ll need the latest rstudio or at least a pandoc > 2.0.0 -- Sent from Gmail Mobile
I'll look into it! It might take a bit of time for me to get to that (the data I'm working with shouldn't be put online, so learning github is not my highest priority, though it is something I'm personally interested in.) I'll let you know here when I'm done so :) Thanks again!
You just need to run
remotes::install_github(“hughjonesd/huxtable”)
No learning required. Install remotes first if you need to.
On Fri, 14 Dec 2018 at 21:42, rosnertm notifications@github.com wrote:
I'll look into it! It might take a bit of time for me to get to that (the data I'm working with shouldn't be put online, so learning github is not my highest priority, though it is something I'm personally interested in.) I'll let you know here when I'm done so :) Thanks again!
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/hughjonesd/huxtable/issues/95#issuecomment-447473851, or mute the thread https://github.com/notifications/unsubscribe-auth/AFjJ91CU7u-Gg3Zaq3ZIxriuxnzYhpQqks5u5A1SgaJpZM4ZNpRe .
-- Sent from Gmail Mobile
Describe the bug I've been having issues aligning columns in a huxtable in a knitted word document. I first reported this problem on StackOverflow and was asked to report it here.
I still cannot get Huxtable to work, but now the problem is a bit different. Now, everything aligns as expected in the RStudio console, but it does not translate to my Word document. For the non-reproducible example in the Stack Overflow question, everything is acting the same in the word doc ('left' and 'center' lead to center alignment; 'right' leads to right alignment.) I am also now getting this error message, which I don't recall seeing before:
With my reproducible example (below), everything works fine in the RStudio console, but all specified alignments still result in right alignment in the word doc, and I get the same error message thrown.
Note that I did not update R, RStudio, or the Huxtable package since asking my original question in Stack Overflow. In addition, adding the following in the setup options leads to identical results:
if (guess_knitr_output_format() == "docx") options(huxtable.print = print_md)
Minimal Reproducible Example
Expected behavior I expected the first column (Supplement Type) to be left-aligned. Instead, it is right aligned (see attached picture).
System details Output of
packageVersion("huxtable")
: 4.3.0 R version: 3.5.1 Rstudio version: 1.1.456