pandoc-lua(1)
๐ NAME
pandoc-lua โ the Lua interface to the pandoc API. This is the pandoc-lua(1) page from the Pandoc Userโs Guide, and bestie, itโs giving โstandalone Lua but make it pandocโ โจ
๐ธ SYNOPSIS
pandoc-lua [options] [script [args]]
โจ DESCRIPTION
Okay so pandoc-lua is a standalone Lua interpreter with behavior similar to that of the standard lua executable, but exposing all of pandocโs Lua libraries. All pandoc.* packages, as well as the packages re and lpeg, are available via global variables. Furthermore, the globals PANDOC_VERSION, PANDOC_STATE, and PANDOC_API_VERSION are set at startup. Iconic. ๐
If no script argument is given, then the script is assumed to be passed in via stdin. When called without arguments, pandoc-lua behaves as pandoc-lua -v -i when the standard input (stdin) is a terminal, and as pandoc-lua - otherwise. On Windows the program will always behave as if it was connected to a terminal. No cap, thatโs literally the rule ๐ซถ
When called without the option -E, the interpreter checks for an environment variable LUA_INIT before running any argument. If the variable content has the format @filename, then pandoc-lua executes the file. Otherwise, pandoc-lua executes the string itself. Itโs giving โread the room, then run the thingโ ๐ญ
๐ OPTIONS
-e statโ Execute statement stat. Slay, one statement at a time โจ-l modโ Ifmodhas the patterng=m, then require libraryminto globalg; otherwise require librarymodinto globalmod. Very โput it where it belongsโ energy ๐-vโ Show version information. Vibe check: which version are we on? ๐-iโ Enter interactive mode after running script. Main character mode activated ๐-Eโ Ignore environment variables. Heads-up bestie: this is not fully implemented yet and only ignores theLUA_INITvariable. Other variables likeLUA_PATHandLUA_CPATHare not ignored. ๐-Wโ Turn warnings on. Let the warnings speak, fr fr ๐ฆ
๐ฆ INTERACTIVE MODE
In interactive mode, the Lua interpreter repeatedly prompts and waits for a line. After reading a line, Lua first tries to interpret the line as an expression. If it succeeds, it prints its value. Otherwise, it interprets the line as a statement. If you write an incomplete statement, the interpreter waits for its completion by issuing a different prompt. Itโs lowkey so patient about it ๐ธ
Exit the interactive mode by pressing Ctrl+D or Ctrl+C, or by typing os.exit(). The Isocline library is used for line editing. Press F1 to get a list of available keybindings; the ctrl key is abbreviated as ^ in that list. Iykyk ๐
๐ AUTHORS
Copyright 2023 John MacFarlane (jgm@berkeley.edu) and contributors. Released under the GPL, version 2 or later. This software carries no warranty of any kind. (See COPYRIGHT for full copyright and warranty notices.)
Lua: Copyright 1994-2023 Lua.org, PUC-Rio. Respect the origin story. ๐ซถ
The Pandoc source code may be downloaded from <https://hackage.haskell.org/package/pandoc> or <https://github.com/jgm/pandoc/releases>. Further documentation is available at <https://pandoc.org>. Obsessed with a good documentation link, honestly ๐ฅ
cute sign-off bestie: pandoc 3.10, dated September 22, 2022, page pandoc-lua(1) ๐๐
๐ฆ where this page comes from
- alpine 3.24: pandoc-cli-doc 3.10-r0 ยท GPL-2.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms