-
-
Notifications
You must be signed in to change notification settings - Fork 149
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
当表头是中文的情况下,生成的表格内容错位 #835
Comments
chuxinyuan
changed the title
Table headers generated under the hugo stack theme are misaligned
当表头是中文的情况下,生成的表格内容错位
Jun 4, 2024
@haozhu233 朱兄,我把问题简化了以下,烦请帮忙看看,谢谢! |
xfun::session_info(c("kableExtra", "rmarkdown"))
#> R version 4.4.0 (2024-04-24)
#> Platform: x86_64-pc-linux-gnu
#> Running under: Manjaro Linux
#>
#> Locale:
#> LC_CTYPE=zh_CN.UTF-8 LC_NUMERIC=C
#> LC_TIME=zh_CN.UTF-8 LC_COLLATE=zh_CN.UTF-8
#> LC_MONETARY=zh_CN.UTF-8 LC_MESSAGES=zh_CN.UTF-8
#> LC_PAPER=zh_CN.UTF-8 LC_NAME=C
#> LC_ADDRESS=C LC_TELEPHONE=C
#> LC_MEASUREMENT=zh_CN.UTF-8 LC_IDENTIFICATION=C
#>
#> Package version:
#> base64enc_0.1.3 bslib_0.7.0 cachem_1.1.0 cli_3.6.2
#> colorspace_2.1.0 cpp11_0.4.7 digest_0.6.35 evaluate_0.23
#> farver_2.1.2 fastmap_1.2.0 fontawesome_0.5.2 fs_1.6.4
#> glue_1.7.0 graphics_4.4.0 grDevices_4.4.0 highr_0.11
#> htmltools_0.5.8.1 jquerylib_0.1.4 jsonlite_1.8.8 kableExtra_1.4.0
#> knitr_1.47 labeling_0.4.3 lifecycle_1.0.4 magrittr_2.0.3
#> memoise_2.0.1 methods_4.4.0 mime_0.12 munsell_0.5.1
#> R6_2.5.1 rappdirs_0.3.3 RColorBrewer_1.1.3 rlang_1.1.3
#> rmarkdown_2.27 rstudioapi_0.16.0 sass_0.4.9 scales_1.3.0
#> stats_4.4.0 stringi_1.8.4 stringr_1.5.1 svglite_2.1.3
#> systemfonts_1.1.0 tinytex_0.51 tools_4.4.0 utils_4.4.0
#> vctrs_0.6.5 viridisLite_0.4.2 xfun_0.44 xml2_1.3.6
#> yaml_2.3.8
#>
#> Pandoc version: 3.1.11 Created on 2024-06-10 with reprex v2.1.0 xfun::session_info(c("kableExtra", "rmarkdown"))
#> R version 4.2.2 Patched (2022-11-10 r83330)
#> Platform: x86_64-pc-linux-gnu (64-bit)
#> Running under: Debian GNU/Linux 12 (bookworm)
#>
#> Locale:
#> LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
#> LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
#> LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
#> LC_PAPER=en_US.UTF-8 LC_NAME=C
#> LC_ADDRESS=C LC_TELEPHONE=C
#> LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
#>
#> Package version:
#> base64enc_0.1.3 bslib_0.7.0 cachem_1.1.0 cli_3.6.2
#> colorspace_2.1.0 cpp11_0.4.7 digest_0.6.35 evaluate_0.23
#> farver_2.1.2 fastmap_1.2.0 fontawesome_0.5.2 fs_1.6.4
#> glue_1.7.0 graphics_4.2.2 grDevices_4.2.2 highr_0.11
#> htmltools_0.5.8.1 jquerylib_0.1.4 jsonlite_1.8.8 kableExtra_1.4.0
#> knitr_1.47 labeling_0.4.3 lifecycle_1.0.4 magrittr_2.0.3
#> memoise_2.0.1 methods_4.2.2 mime_0.12 munsell_0.5.1
#> R6_2.5.1 rappdirs_0.3.3 RColorBrewer_1.1.3 rlang_1.1.3
#> rmarkdown_2.27 rstudioapi_0.16.0 sass_0.4.9 scales_1.3.0
#> stats_4.2.2 stringi_1.8.4 stringr_1.5.1 svglite_2.1.3
#> systemfonts_1.1.0 tinytex_0.51 tools_4.2.2 utils_4.2.2
#> vctrs_0.6.5 viridisLite_0.4.2 xfun_0.44 xml2_1.3.6
#> yaml_2.3.8
#>
#> Pandoc version: 2.18 Created on 2024-06-10 with reprex v2.1.0 xfun::session_info(c("kableExtra", "rmarkdown"))
#> R version 4.2.3 (2023-03-15 ucrt)
#> Platform: x86_64-w64-mingw32/x64 (64-bit)
#> Running under: Windows 10 x64 (build 19045)
#>
#> Locale:
#> LC_COLLATE=Chinese (Simplified)_China.utf8
#> LC_CTYPE=Chinese (Simplified)_China.utf8
#> LC_MONETARY=Chinese (Simplified)_China.utf8
#> LC_NUMERIC=C
#> LC_TIME=Chinese (Simplified)_China.utf8
#>
#> Package version:
#> base64enc_0.1.3 bslib_0.7.0.9000 cachem_1.1.0 cli_3.6.2
#> colorspace_2.1.0 cpp11_0.4.7 digest_0.6.35 evaluate_0.23
#> farver_2.1.2 fastmap_1.2.0 fontawesome_0.5.2 fs_1.6.4
#> glue_1.7.0 graphics_4.2.3 grDevices_4.2.3 highr_0.11
#> htmltools_0.5.8.1 jquerylib_0.1.4 jsonlite_1.8.8 kableExtra_1.4.0
#> knitr_1.47 labeling_0.4.3 lifecycle_1.0.4 magrittr_2.0.3
#> memoise_2.0.1 methods_4.2.3 mime_0.12 munsell_0.5.1
#> R6_2.5.1 rappdirs_0.3.3 RColorBrewer_1.1.3 rlang_1.1.3
#> rmarkdown_2.27 rstudioapi_0.16.0 sass_0.4.9 scales_1.3.0
#> stats_4.2.3 stringi_1.8.4 stringr_1.5.1 svglite_2.1.3
#> systemfonts_1.1.0 tinytex_0.51 tools_4.2.3 utils_4.2.3
#> vctrs_0.6.5 viridisLite_0.4.2 xfun_0.44 xml2_1.3.6
#> yaml_2.3.8
#>
#> Pandoc version: 3.1.11 Created on 2024-06-10 with reprex v2.1.0 我试了三个系统了,都不正常。 |
感觉是encoding的问题,只用knitr::kable呢,有问题吗 |
只用 |
我记得以前是正常的,至少2022年12月份是正常的(我有篇文章是那个时候发出来的)。这次更新博客才发现不正常了。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
我的代码
生成的表格
系统环境
Created on 2024-06-05 with reprex v2.1.0
The text was updated successfully, but these errors were encountered: