PharmTeX: a LaTeX-Based Open-Source Platform for Automated Reporting Workflow


Every year, the pharmaceutical industry generates a large number of scientific reports related to drug research, development, and regulatory submissions. Many of these reports are created using text processing tools such as Microsoft Word. Given the large number of figures, tables, references, and other elements, this is often a tedious task involving hours of copying and pasting and substantial efforts in quality control (QC). In the present article, we present the LaTeX-based open-source reporting platform, PharmTeX, a community-based effort to make reporting simple, reproducible, and user-friendly. The PharmTeX creators put a substantial effort into simplifying the sometimes complex elements of LaTeX into user-friendly functions that rely on advanced LaTeX and Perl code running in the background. Using this setup makes LaTeX much more accessible for users with no prior LaTeX experience. A software collection was compiled for users not wanting to manually install the required software components. The PharmTeX templates allow for inclusion of tables directly from mathematical software output as well and figures from several formats. Code listings can be included directly from source. No previous experience and only a few hours of training are required to start writing reports using PharmTeX. PharmTeX significantly reduces the time required for creating a scientific report fully compliant with regulatory and industry expectations. QC is made much simpler, since there is a direct link between analysis output and report input. PharmTeX makes available to report authors the strengths of LaTeX document processing without the need for extensive training.

This is a preview of subscription content, log in to check access.

Fig. 1
Fig. 2


  1. 1.

    Baumer B, Cetinkaya-Rundel M, Bray A, Loi L, Horton NJ. R markdown: integrating a reproducible analysis tool into introductory statistics. arXiv preprint arXiv. 1894, 2014;1402

  2. 2.

    Dauchy, A., Guennec, S.L.: Professional outputs with ODS LATEX. In: Proceedeings of the 2008 Pharmaceutical Users Software Exchange (PhUSE) Conference, vol. TU04 (2008). URL

  3. 3.

    Gentleman R, Temple Lang D. Statistical analyses and reproducible research. J Comput Graph Stat. 2007;16(1):1–23.

    Article  Google Scholar 

  4. 4.

    Lamport L. LATEX: a document preparation system: user’s guide and reference manual. Addison- Wesley. 1994;

  5. 5.

    Leisch, F.: Sweave. Dynamic generation of statistical reports using literate data analysis. Proceedings in Computational Statistics (2002). URL

  6. 6.

    Perttola, J.P.: SAS and latex—a perfect match? In: Proceedings of the 2008 Pharmaceutical Users Software Exchange (PhUSE) Conference, vol. TS06 (2008). URL

  7. 7.

    Wilkins, J.J., Jonsson, E.N.: Reproducible pharmacometrics. In: Tutorial at the 2013 Population Approach Group in Europe (PAGE) meeting (2013). URL

  8. 8.

    Xie, Y.: knitr: a general-purpose tool for dynamic report generation in r. R package version 1(1) (2013). URL

Download references

Author information



Corresponding author

Correspondence to Christian Hove Rasmussen.

Ethics declarations

Conflict of Interest

Christian Hove Rasmussen is employed at Certara Strategic Consulting and was previously employed at Pfizer. Timothy Nicholas, Mike K. Smith, Luke Fostvedt, Paula Burger, Lynn McFadyen, and Thomas G. Tensfeldt are employed at Pfizer. Vijayakumar Sundararajan is employed at Ridgeback Solutions and has supported Pfizer on a commercial basis. Mats O. Magnusson and E. Niclas Jonsson are employed at Pharmetheus and have supported Pfizer on a commercial basis. Kaori Ito is employed at Applied Pharmacometrics and Research and was previously employed at Pfizer.

Electronic supplementary material


(PDF 855 kb)


(PDF 1577 kb)

Rights and permissions

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Rasmussen, C.H., Smith, M.K., Ito, K. et al. PharmTeX: a LaTeX-Based Open-Source Platform for Automated Reporting Workflow. AAPS J 20, 52 (2018).

Download citation

Key Words

  • drug development
  • latex
  • pharmacometrics
  • report automation
  • reproducible reporting