Skip to main content

Write PDF From LaTeX

Controlled node

Overview​

Create a PDF from LaTeX, with optional images and references.

Write PDF From LaTeX creates a PDF in the project library from LaTeX source. Use it for technical reports, equations and documents requiring precise typesetting.

Inputs​

InputTypeDescription
runEventCreates and saves the file.
dataDataA LaTeX string, or an object with latex, optional bibtex, and optional assets.
nameTextRequired filename. .pdf is appended if the name does not already end with it.
pathTextOptional library folder path, such as exports/reports. Missing folders are created. Leave blank for the library root.

Outputs​

OutputTypeDescription
fileDataThe saved library file reference, or an object with an error field.
doneEventContinues after the operation returns. Check file before using it.

name and path can be entered on the node or supplied through connections. path is a project-library path, not a path on your computer.

Basic example​

Connect a LaTeX node containing this source to data:

\documentclass{article}
\begin{document}
\section*{Report}
This report was generated by an Intellectible workflow.
\end{document}

Set name to report and trigger run. The result is report.pdf.

Add library images​

For images, supply an object instead of a plain string:

{
"latex": "\\documentclass{article}\n\\usepackage{graphicx}\n\\begin{document}\n\\includegraphics[width=5cm]{logo.png}\n\\end{document}",
"assets": [
{"name":"logo.png","id":"YOUR_LIBRARY_IMAGE_ID"}
]
}

Each asset needs a name matching the filename in \includegraphics and the id of an image in the project library. Use PNG or JPEG files with matching filename extensions. The assets property belongs inside data; it is not a separate node input.

Use a Data node to combine LaTeX text with file IDs from earlier workflow steps.

Add a bibliography​

Include a bibtex text property alongside latex. In the LaTeX source, use citation keys that exist in that bibliography, a bibliography style such as \bibliographystyle{plain}, and a \bibliography{references} command.

A Bibtex node can supply the bibliography text. Combine both text outputs into the data object before triggering the writer.

Troubleshooting​

Supply a complete, valid document and escape special LaTeX characters in inserted text. Compilation errors are reported in file.error.

Only supported packages and document commands are allowed. Commands that access arbitrary files or execute shell operations are not supported. For images, use the declared library assets rather than local filesystem paths.

Use the saved file​

The result is a library file reference, not a download URL. Pass it to another file node or Get Library Download URLs when you need a link.

A returned error object can still be followed by done. Inspect file if no file appears or a later step fails.