pandoc-ext/section-bibliographies

Reference list does not render for 0. chapter

RheumGlutinosa opened this issue · 3 comments

Hello,

The filter works great when the chapters are normally numbered but when there is an unnumbered chapter (e.g., the Introduction of my thesis has the number 0 so that the following chapters ~ papers are numbered from 1). I use RMarkwdown, the chapters are added as child documents. Knitting to PDF using pdflatex.
Also, I believe it worked for the first time but ignored \newpage for new chapters. When I played with it a bit, the reference list for chapter 0 disappeared and the \newpage started to work.

Is there a way to suppress the final full list of references which gets rendered automatically?

I'm working in RMarkdown. SessionInfo:

R version 4.2.2 Patched (2022-11-10 r83330)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.5 LTS

Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.9.0
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.9.0

locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=cs_CZ.UTF-8
[4] LC_COLLATE=en_US.UTF-8 LC_MONETARY=cs_CZ.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=cs_CZ.UTF-8 LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=cs_CZ.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] lmerTest_3.1-3 lme4_1.1-31 Matrix_1.5-3

loaded via a namespace (and not attached):
[1] Rcpp_1.0.9 mvtnorm_1.1-3 lattice_0.20-45 zoo_1.8-11
[5] assertthat_0.2.1 digest_0.6.30 utf8_1.2.2 R6_2.5.1
[9] cellranger_1.1.0 coda_0.19-4 evaluate_0.18 ggplot2_3.4.0
[13] pillar_1.8.1 gdtools_0.2.4 rlang_1.0.6 multcomp_1.4-20
[17] uuid_1.1-0 readxl_1.4.1 rstudioapi_0.14 minqa_1.2.5
[21] data.table_1.14.6 nloptr_2.0.3 flextable_0.8.3 rmarkdown_2.18
[25] splines_4.2.2 TMB_1.9.1 munsell_0.5.0 compiler_4.2.2
[29] numDeriv_2016.8-1.1 xfun_0.35 pkgconfig_2.0.3 systemfonts_1.0.4
[33] base64enc_0.1-3 htmltools_0.5.3 tidyselect_1.2.0 tibble_3.1.8
[37] glmmTMB_1.1.5 codetools_0.2-18 fansi_1.0.3 dplyr_1.0.10
[41] MASS_7.3-58.1 grid_4.2.2 nlme_3.1-160 xtable_1.8-4
[45] gtable_0.3.1 lifecycle_1.0.3 DBI_1.1.3 magrittr_2.0.3
[49] scales_1.2.1 zip_2.2.2 estimability_1.4.1 cli_3.4.1
[53] xml2_1.3.3 generics_0.1.3 vctrs_0.5.1 boot_1.3-28.1
[57] sandwich_3.0-2 TH.data_1.1-1 tools_4.2.2 forcats_0.5.2
[61] glue_1.6.2 officer_0.4.4 emmeans_1.8.2 fastmap_1.1.0
[65] survival_3.4-0 yaml_2.3.6 colorspace_2.0-3 knitr_1.41

The YAML header of my main document:

title: ''
output: 
  pdf_document:
        latex_engine: pdflatex
        number_sections: TRUE
        pandoc_args: ['--lua-filter=section-bibliographies.lua']
always_allow_html: true
geometry: "left = 4cm, right = 2cm, top = 2cm, bottom = 2cm"
fontsize: 11pt
header-includes:
  - \usepackage{float}
  - \usepackage{sectsty}
  - \usepackage{paralist}
  - \usepackage{setspace}\spacing{1.5}
  - \usepackage{fancyhdr}
  - \usepackage{lastpage}
  - \usepackage{dcolumn}
  - \usepackage{natbib}
  - \usepackage[nottoc, numbib]{tocbibind}
  - \usepackage{ragged2e}
  - \usepackage{pdflscape} 
  - \usepackage{textgreek}
  - \usepackage{graphicx} 
  - \usepackage{titlesec}
classoption: twoside
bibliography: library.bib
reference-section-title: References
section-bibs-level: 2
citation_package: biblatex
csl: journal-of-ecology.csl

Sorry for the late reply, somehow this issue slipped through. I think this might be more of an R Markdown question, it could make sense to ask there.

I seem to remember that setting citeproc: false prevents R Markdown from calling citeproc, but I'm not sure tbh.

I have the same issue with a simple qmd file, it's not R Markdown specific.

It seems that #14 was a duplicate of this, so this should be fixed now.