News for hackers. Stuff that matters.
Re:Bookdown – Authoring Books and Technical Documents with R... by nonbel on Saturday December 03, 2016 @02:26PM (#13097089)
I still lose all formatting when copy-pasting code from the pdfs being generated. Why does that need to be a problem? Eg from page 47:

  ---
  title: "An Impressive Book"
  author: "Li Lei and Han Meimei"
  output:
  bookdown::gitbook:
  lib_dir: assets
  split_by: section
  config:
  toolbar:
  position: static
  bookdown::pdf_book:
  keep_tex: yes
  bookdown::html_book:
  css: toc.css
  documentclass: book
  ---
https://bookdown.org/yihui/bookdown/bookdown.pdf
Re:Bookdown – Authoring Books and Technical Documents with R... by yihui on Saturday December 03, 2016 @03:13PM (#13097296)
Because PDF is for printing purposes. There could be many many problem if you copy and paste from PDF (white spaces being eaten, ligatures, curly quotes, en/em-dashes, ...; almost as bad as Word, except that PDF is beautiful). So don't copy from PDF, but from HTML instead. HTML is much more faithful in terms of preserving characters.
Re:Bookdown – Authoring Books and Technical Documents with R... by nonbel on Saturday December 03, 2016 @08:46PM (#13098377)
So it is just an inherent limitation of pdfs? That's too bad, for some reason I find the html format less intuitive.