Skip to main content

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

InputTypeDescriptionDefault
DynamicDataInput sockets are dynamically created for each unique variable name wrapped in double curly brackets (e.g., {{title}}, {{content}}) within the LaTeX template.-

Properties

PropertyTypeDescriptionDefault
LaTeXTextThe LaTeX source code with optional Handlebars variable syntax ({{variable}}). Features syntax highlighting for LaTeX commands and environments.Empty string

Outputs

OutputTypeDescription
OutputTextThe 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):

  1. Direct inputs: Values connected to dynamically created input sockets
  2. Parent workflow variables: Variables set in the immediate parent workflow scope
  3. 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:

  1. Connect a Text node with value "Quarterly Financial Report" to the reportTitle input
  2. Connect a Variable node (or Text node) with the author name to the authorName input
  3. Connect a Datetime node formatted as "DD MMM YYYY" to the currentDate input
  4. Connect an AI Write node generating the summary to the summaryText input
  5. Connect a Read Database node or another data source to the analysisContent input
  6. Connect the Latex node's output to a Write To Library node
  7. In the Write To Library node, set the File Type property to latexString to compile the output to PDF

The resulting PDF will contain the structured LaTeX document with all dynamic content properly inserted.