HomeResearchNotes & BooksNews & SeminarsMisc

✾ ΛacTeX

What is ΛacTeX?

In short: ΛacTeX is a small collection of code (in Lua) to make typesetting in LaTeX easier, by simplifying the commands used as well as the document structure.

Before I go on explaining more in depth, I must make some disclaimers:

ΛacTeX is a amalgam of the words Laconic (Λακωνικός, meaning simple, with few words) and TeX. Its purpose is to read some .txt document with ΛacTeX commands and export another .tex document, in LaTeX. Below, as an example, there is a simple ΛacTeX document, which:

Later on, we will see how to construct it and export it to LaTeX, in the How do I use it? section.

Copy
VERS LUALATEX

CLASS BOOK [a4,12pt]

INPUT
    test_file.tex
END

PAC
    babel [greek,english]
    fontenc [T1]
    amsmath
    amsfonts
    amsthm
    OldStandard
END

INNIT
    THMS
END

START
    This is some text and some math  SUM _{ k IN |N } 1 / k  .
    THM [Some theorem of Fourier Analysis]
        For every  f  in  RMN L ^2  it holds:
           f(x) = SUM _{ k IN |Z } HAT f (k) e ^{ikx}   
        where the Fourier coefficients  HAT f (k)  are defined as:
           HAT f (k) = F// {1}{2 π } INT _{- π }^{ π } f(x) e^{-ikx} dx   
    END
    See, this is an equation:
    EQU
        f(x) = SUM _{ k IN |Z } HAT f (k) e ^{ikx}
    END
END

Where is it?

All of the code is available on GitHub:

Feel free to download it and modify it.

How do I use it?

Practical things first: Currently there is no .exe or .AppImage executable available. If a non-negligible amount of people request it, I will make it.

So, to run it, you will need to have Lua installed (it's very small in size). I have tried 5.1 upwards, but you shouldn't have problems with earlier versions too. If you have Linux, you can download it from your packet manager, or check here. If you have Windows, check here. If you have MacOS, you are on your own.

After you have downloaded Lua and the code, you can write your ΛacTeX in input.txt and compile in terminal lua lac.lua. You will get your LaTeX code in file.tex. You can change your input-output files in controls.lua. By default, file.tex is not executed; if you want to compile your code and get a pdf, in controls.lua change execute_tex = true. Of course, you need to have some version of tex installed (ex. texlive).

How is a ΛacTeX document structured? Its about time we construct, step by step, an example. To start, use VERS followed by the version of TeX you want to use to compile your document. As mentioned before,

Copy
INPUT
    test_file.tex
END
Copy
PAC
    some_package [attribute1,attribute2]
    some_other_package
END
Copy
INNIT
    THMS
END
Copy
START
    ...
END

Inside the START environment you can use the respective commands provided in the next section. Important notice: You can insert as many tabs as you want to keep your document neatly organised. Just have in mind that, after your tabs, you need to add extra spaces for math mode.

List of commands

Constantly updating. I have tried to include much of LaTeX's utility, while also keeping the collection of commands relatively small and compact. After all, this is supposed to make things simpler, not overwhelm us.

How do I provide suggestions and report bugs?

You can mail me at:

Or find me in person, in Zografou (Off. 120, dept. of Math.). Always mention what the problem is (roughly), don't just send .txt files.

Changelog
  • 20260501-23:15: Included more commands, such as embellishments in math mode, arrows, basic symbols. Now you can change the input and output files in controls.lua.
  • 20260430-23:00: Prototype.

Things to add in the future
  • [High] Remove the necessity to include a class.
  • [Medium] Include TikZ.
  • [Medium] Prepare a PDF with the complete collection of commands. Complete the List of commands in the site.
  • [Medium] Add START*, which initiates the document without \begin{document} ... \end{document}, so that ΛacTeX documents can be imported to input.txt
  • [Low] Include code blocks and directlua.
  • [Low] Keep ΛacTeX indentation when converting to LaTeX.
  • [Low] Forgot to include \part. Oops! Fix tabular, center, updownarrow on the backup.

Hosting service: Github