TUGboat 43:2 (2022)
The Communications of the TeX Users Group

Title: Using knitr and LaTeX for literate laboratory notes

Summary: background, desiderata, and solutions for lab notes.

Full text of article: publicly available now.

Author: Boris Veytsman

Publication: TUGboat volume 43, number 2 (2022), pages 130-133

DOI (this page): 10.47397/tb/43-2/tb134veytsman-labnotes
(previous doi - next doi)

Category: Software & Tools

Difficulty: Intermediate

Abstract: LaTeX allows the production of detailed laboratory notebooks, that can be easily read, searched and indexed. The addition of knitr helps to integrate the notebooks with the inclusion of typeset code and its output, such as plots, tables, etc.


  1. R. Fairman. FigPut. Interactive Figures for LaTeX, 2022. ctan.org/pkg/figput
  2. A. Grahn. The animate package, 2022. ctan.org/pkg/animate
  3. A. Grahn. The media9 package, v1.24, 2022. ctan.org/pkg/media9
  4. J. Gruber. Markdown, 2004. daringfireball.net/projects/markdown/
  5. C. Heinz, B. Noses, J. Hoffmann. The Listings Package, 2020. ctan.org/pkg/listings
  6. H.M. Kanare. Writing the laboratory notebook. American Chemical Society, Washington, D.C, 1985.
  7. T. Kluyver, B. Ragan-Kelley, et al. Jupyter notebooks—a publishing format for reproducible computational workflows. In Positioning and Power in Academic Publishing: Players, Agents and Agendas, F. Loizides, B. Schmidt, eds., pp. 87–90. IOS Press, 2016.
  8. D.E. Knuth. Literate Programming. No. 27 in CSLI Lecture Notes. Stanford, California, 1992.
  9. F. Leisch, R Core Team. Sweave User Manual, 2022. stat.ethz.ch/R-manual/R-devel/library/utils/doc/Sweave.pdf
  10. Maxima. A computer algebra system, 2022. maxima.sourceforge.io/
  11. J.P. Mesirov. Accessible reproducible research. Science 327(5964):415–416, 2010. doi.org/10.1126/science.1179653
  12. R.C. Moss. The rise and fall of Adobe Flash, 2020. arstechnica.com/information-technology/2020/07/the-rise-and-fall-of-adobe-flash/
  13. L. Pauling. Research notebooks, 1922–1972. Special Collections & Archives Research Center, Oregon State University Libraries. scarc.library.oregonstate.edu/coll/pauling/rnb/
  14. P. Ryan. Keeping a Lab Notebook. National Institutes of Health, Office of Intramural Training and Education, 2012. www.training.nih.gov/assets/Lab_Notebook_508_(new).pdf
  15. M. Schwab, N. Karrenbach, J. Claerbout. Making scientific computations reproducible. Computing in Science & Engineering 2(6):61–67, 2000. doi.org/10.1109/5992.881708
  16. T. Tantau. The TikZ and PGF Packages, 2021. ctan.org/pkg/pgf
  17. T. Van Zandt, R. Niepraschk, H. Voß. PSTricks. PostScript macros for Generic TeX, 2007. ctan.org/pkg/pstricks-base
  18. B. Veytsman. Book review: Dynamic Documents with R and knitr, by Yihui Xie. TUGboat 35(1):115–119, 2014. tug.org/TUGboat/tb35-1/tb109reviews-xie.pdf
  19. Wikipedia contributors. Henry Spencer—Wikipedia, the free encyclopedia, 2022. en.wikipedia.org/w/index.php?title=Henry_Spencer&oldid=1093428638
  20. wxMaxima, 2022. wxmaxima-developers.github.io/wxmaxima/
  21. Y. Xie. Dynamic Documents with R and knitr. Chapman and Hall/CRC, Boca Raton; London; New York, second ed., 2015.
  22. Y. Xie. bookdown: Authoring Books and Technical Documents with R Markdown. Chapman and Hall/CRC, Boca Raton, Florida, 2016. ISBN 978-1138700109. bookdown.org/yihui/bookdown

TUGboat 43:2, 2022 (issue 134)   [generated 2022-12-09]
TUG home page; webmaster; facebook; twitter; mastodon;   (via DuckDuckGo)