rstudio / pagedown

Paginate the HTML Output of R Markdown with CSS for Print
https://pagedown.rbind.io
Other
894 stars 127 forks source link

Newlines after reference numbers in bibliography #328

Open rickhelmus opened 3 months ago

rickhelmus commented 3 months ago

Hello,

When using the following CSL: http://www.zotero.org/styles/environmental-science-and-technology

This results in newlines after reference numbers:

image

Using the workaround from rstudio/rmarkdown#1959 appears to fix this.

Details **MWE** ````r --- title: "pd_bug" date: "`r Sys.Date()`" output: pagedown::html_letter bibliography: references.bib csl: "environmental-science-and-technology.csl" --- ``` {r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` See references [@Knitr1;@Knitr2;@Knitr3] # References ```` `sessionInfo()` ``` R version 4.2.2 (2022-10-31 ucrt) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 22631) Matrix products: default locale: [1] LC_COLLATE=Dutch_Netherlands.utf8 LC_CTYPE=Dutch_Netherlands.utf8 LC_MONETARY=Dutch_Netherlands.utf8 [4] LC_NUMERIC=C LC_TIME=Dutch_Netherlands.utf8 attached base packages: [1] stats graphics grDevices datasets utils methods base other attached packages: [1] fstcore_0.9.18 patRoon_2.3.2 loaded via a namespace (and not attached): [1] colorspace_2.1-0 rjson_0.2.21 class_7.3-22 base64enc_0.1-3 rstudioapi_0.16.0 listenv_0.9.1 [7] bit64_4.0.5 DT_0.33 prodlim_2024.06.25 fansi_1.0.6 lubridate_1.9.3 xml2_1.3.6 [13] codetools_0.2-20 splines_4.2.2 cachem_1.1.0 knitr_1.48 itertools_0.1-3 rlist_0.4.6.2 [19] jsonlite_1.8.8 pROC_1.18.5 caret_6.0-94 rJava_1.0-11 cluster_2.1.6 png_0.1-8 [25] shiny_1.8.1.1 BiocManager_1.30.23 readr_2.1.5 compiler_4.2.2 backports_1.5.0 Matrix_1.6-5 [31] fastmap_1.2.0 cli_3.6.3 later_1.3.2 htmltools_0.5.8.1 tools_4.2.2 gtable_0.3.5 [37] glue_1.7.0 reshape2_1.4.4 dplyr_1.1.4 rsvg_2.6.0 Rcpp_1.0.13 jquerylib_0.1.4 [43] fmcsR_1.38.0 vctrs_0.6.5 svglite_2.1.3 nlme_3.1-165 iterators_1.0.14 timeDate_4032.109 [49] fastcluster_1.2.6 gower_1.0.1 xfun_0.46 stringr_1.5.1 globals_0.16.3 rbibutils_2.2.16 [55] ps_1.7.7 enviPat_2.6 timechange_0.3.0 mime_0.12 lifecycle_1.0.4 renv_1.0.7 [61] future_1.33.2 MASS_7.3-60.0.1 scales_1.3.0 ipred_0.9-15 hms_1.1.3 promises_1.3.0 [67] fingerprint_3.5.7 parallel_4.2.2 RColorBrewer_1.1-3 rcdk_3.8.1 yaml_2.3.9 memoise_2.0.1 [73] gridExtra_2.3 ggplot2_3.5.1 sass_0.4.9 rpart_4.1.23 RSQLite_2.3.7 stringi_1.8.4 [79] foreach_1.5.2 checkmate_2.3.1 hardhat_1.4.0 lava_1.8.0 Rdpack_2.6 rlang_1.1.4 [85] pkgconfig_2.0.3 systemfonts_1.0.4 bitops_1.0-7 evaluate_0.24.0 lattice_0.22-6 purrr_1.0.2 [91] ChemmineR_3.48.0 recipes_1.1.0 htmlwidgets_1.6.4 bit_4.0.5 processx_3.8.4 tidyselect_1.2.1 [97] parallelly_1.37.1 bookdown_0.40 plyr_1.8.9 magrittr_2.0.3 R6_2.5.1 magick_2.7.3 [103] generics_0.1.3 DBI_1.2.3 pillar_1.9.0 withr_3.0.0 survival_3.7-0 RCurl_1.98-1.16 [109] nnet_7.3-19 tibble_3.2.1 future.apply_1.11.2 reactable_0.4.4 rcdklibs_2.9 xgboost_1.7.7.1 [115] utf8_1.2.4 tzdb_0.4.0 rmarkdown_2.27 grid_4.2.2 data.table_1.15.4 pagedown_0.20.1 [121] blob_1.2.4 callr_3.7.6 ModelMetrics_1.2.2.2 digest_0.6.36 MS2Quant_1.1.0 xtable_1.8-4 [127] tidyr_1.3.1 httpuv_1.6.15 fst_0.9.8 stats4_4.2.2 munsell_0.5.1 viridisLite_0.4.2 [133] kableExtra_1.4.0.4 bslib_0.7.0 ```