rstudio / bookdown

Authoring Books and Technical Documents with R Markdown
https://pkgs.rstudio.com/bookdown/
GNU General Public License v3.0
3.76k stars 1.27k forks source link

Wrapping missing in some circumstances causing an overflow #1397

Open piiskop opened 1 year ago

piiskop commented 1 year ago

In some circumstances there is an overflow in the PDF output.

The YAML-header in index.Rmd:

--- 
site: bookdown::bookdown_site

author: "peacecop kalmer:"
colorlinks: TRUE
date: "`r Sys.Date()`"
description: "Tallinna Ülikooli kursuse \"Orgaaniline keemia I\" peacecop kalmeri: praktiliste tööde raport aastast 2022"
lang: et
title: |
  | Orgaanilise keemia esimese osa
  praktiliste tööde raportid

documentclass: book
papersize: a4
geometry: top=2cm, right=2cm, bottom=3cm, left=3cm
classoption: onecolumn, twoside
linestretch: 1.5

fontsize: 12pt
mainfont: DejaVu Serif # for displaying both Chinese symbols and emojis
CJKmainfont: Droid Sans Fallback

---

The content of _bookdown.yml:

book_filename: "orgaanilise-keemia-raportid"
new_session: false
delete_merged_file: true
rmd_files: [
  "index.Rmd",
  "rmd/test.Rmd"
]

The content of _output.yml:

bookdown::pdf_book:
  keep_tex: yes
  latex_engine: xelatex

The content of rmd/test.Rmd:

# joppenpuhh

Vesi ja 2-hüdroksü-1,2,3-heksaantrihape ehk 2-hüdroksü-1,2,3-propaantrikarboksüülhape

After building the PDF version we can see that there is an overflow and wrapping does not take place.

xfun::session_info('bookdown'):

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, RStudio 2022.2.2.485 Locale: LC_CTYPE=et_EE.UTF-8 LC_NUMERIC=C LC_TIME=et_EE.UTF-8 LC_COLLATE=et_EE.UTF-8 LC_MONETARY=et_EE.UTF-8 LC_MESSAGES=et_EE.UTF-8 LC_PAPER=et_EE.UTF-8 LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=et_EE.UTF-8 LC_IDENTIFICATION=C Package version: base64enc_0.1.3 bookdown_0.27.3 bslib_0.4.0 cachem_1.0.6 digest_0.6.29 evaluate_0.15 fastmap_1.1.0 fs_1.5.2 glue_1.6.2 graphics_4.2.2 grDevices_4.2.2 highr_0.9 htmltools_0.5.3 jquerylib_0.1.4 jsonlite_1.8.0 knitr_1.39 magrittr_2.0.3 memoise_2.0.1 methods_4.2.2 R6_2.5.1 rappdirs_0.3.3 rlang_1.0.4 rmarkdown_2.14 sass_0.4.2 stats_4.2.2 stringi_1.7.8 stringr_1.4.0 tinytex_0.40 tools_4.2.2 utils_4.2.2 xfun_0.31 yaml_2.3.5

    |