Introduction
When writing systematic reviews, PRISMA flow diagrams are essential for documenting study selection processes. However, manually creating these diagrams in LaTeX can be cumbersome. The prisma-flow-diagram
package simplifies this process by providing structured commands while leveraging TikZ for high-quality rendering.
This post covers how to install and use prisma-flow-diagram
to generate PRISMA 2009 flow diagrams in LaTeX effortlessly.
Installation
The prisma-flow-diagram
package is available on CTAN and can be installed directly via TeX Live or MiKTeX package managers.
To manually install, download prisma-flow-diagram.sty
from the GitHub repository and place it in the same directory as your .tex
file.
Then, include the package in your LaTeX preamble:
\usepackage{prisma-flow-diagram}
Usage
The package provides intuitive commands to construct PRISMA diagrams efficiently. Below are the main commands:
Basic Commands
-
\prismaflowstart
– Initializes the flow diagram. -
\prismaflownode{<id>}{<position>}{<text>}{<arrow source>}
– Defines a node. -
\prismalabel{<size>}{<position>}{<text>}
– Adds a label. -
\prismaflowarrow{<source>}{<destination>}
– Manually connects nodes. -
\prismaflowend
– Ends the flow diagram.
Example
Here’s a complete LaTeX example using the package:
\documentclass{article}
\usepackage{prisma-flow-diagram}
\begin{document}
\begin{figure}[H]
\resizebox{\textwidth}{!}{
\prismaflowstart
% Identification phase
\prismaflownode{n1a}{left=of tc}{Records identified through database searching (n = 251)}{};
\prismaflownode{n1b}{right=of tc}{Additional records identified through other sources (n = 0)}{};
\prismaflownode{n2}{below=of tc |- n1a.south}{Records after duplicates removed (n = 41)}{n1a};
\prismaflowarrow{n1b}{n2};
% Screening phase
\prismaflownode{n3}{below=of n2}{Records screened (n = 210)}{n2};
\prismaflownode{n3r}{right=of n3}{Records excluded (n = 175)}{};
\prismaflowarrow{n3}{n3r};
% Eligibility phase
\prismaflownode{n4}{below=of n3}{Full-text articles assessed for eligibility (n = 35)}{n3};
\prismaflownode{n4r}{right=of n4}{Full-text articles excluded, with reasons (n = 4) \\ - Not Relevant (n = 3) \\ - Not Open/Available paper (n = 2)}{};
\prismaflowarrow{n4}{n4r};
% Inclusion phase
\prismaflownode{n5}{below=of n4}{Studies included in qualitative synthesis (n = 30)}{n4};
\prismaflownode{n6}{below=of n5}{Studies included in quantitative synthesis (meta-analysis)}{n5};
% Labels
\prismalabel{1.3*\mh}{n1a.west}{Identification};
\prismalabel{1.3*\mh}{n1a.west |- {$(n2)!0.6!(n3)$}}{Screening};
\prismalabel{1.3*\mh}{n1a.west |- {$(n4)!0.2!(n5)$}}{Eligibility};
\prismalabel{1.3*\mh}{n1a.west |- n6}{Included};
\prismaflowend
}
\caption{PRISMA 2009 Flow Diagram}
\label{fig:prisma}
\end{figure}
\end{document}
Final remarks
Creating PRISMA flow diagrams in LaTeX no longer needs to be a tedious task. With prisma-flow-diagram
, you can generate clean, structured, and customizable diagrams efficiently. Try it out in your next systematic review and streamline your documentation workflow.
The prisma-flow-diagram
package is licensed under LPPL 1.3c. Feel free to contribute via GitHub by opening issues or submitting pull requests.