Latex
Uncontrolled node
Overview
The Latex node provides a syntax-highlighting editor for creating LaTeX documents with dynamic content injection. Using Handlebars templating syntax ({{variableName}}), you can reference data from other nodes in your workflow to generate dynamic LaTeX output. This node is commonly paired with the Write To Library node to compile LaTeX documents into PDFs.
When you type {{variableName}} in the LaTeX editor, the node automatically creates a corresponding input socket that accepts data connections from other nodes.
Inputs
| Input | Type | Description | Default |
|---|---|---|---|
| Dynamic | Data | Input sockets are dynamically created for each unique variable name wrapped in double curly brackets (e.g., {{title}}, {{content}}) within the LaTeX template. | - |
Properties
| Property | Type | Description | Default |
|---|---|---|---|
| LaTeX | Text | The LaTeX source code with optional Handlebars variable syntax ({{variable}}). Features syntax highlighting for LaTeX commands and environments. | Empty string |
Outputs
| Output | Type | Description |
|---|---|---|
| Output | Text | The compiled LaTeX string with all template variables replaced by their resolved values. |
Runtime Behavior
The Latex node is uncontrolled, meaning it executes automatically whenever its input data changes or when requested by downstream nodes.
At runtime, the node compiles the template using Handlebars and resolves variables from three sources (in order of precedence):
- Direct inputs: Values connected to dynamically created input sockets
- Parent workflow variables: Variables set in the immediate parent workflow scope
- Root workflow variables: Global variables available throughout the entire workflow execution
If no variables are used in the template, the node outputs the static LaTeX content unchanged. The output is a plain text string suitable for passing to file writing nodes or further text processing.
Example
Generating a Dynamic Report
LaTeX Property:
\documentclass{article}
\usepackage[utf8]{inputenc}
\title{ {{reportTitle}} }
\author{ {{authorName}} }
\date{ {{currentDate}} }
\begin{document}
\maketitle
\section{Executive Summary}
{{summaryText}}
\section{Data Analysis}
{{analysisContent}}
\end{document}
Workflow Setup:
- Connect a Text node with value "Quarterly Financial Report" to the
reportTitleinput - Connect a Variable node (or Text node) with the author name to the
authorNameinput - Connect a Datetime node formatted as "DD MMM YYYY" to the
currentDateinput - Connect an AI Write node generating the summary to the
summaryTextinput - Connect a Read Database node or another data source to the
analysisContentinput - Connect the Latex node's
outputto a Write To Library node - In the Write To Library node, set the File Type property to
latexStringto compile the output to PDF
The resulting PDF will contain the structured LaTeX document with all dynamic content properly inserted.