-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Welcome to the latex-generator wiki!
First of all you need to have a translator of from .ttex
format to .tex
. This is a command tool called texgen
. If you are using Windows operating system, you can download binary of the latest version of it from the release page. You can find an archieve with source code there too.
Create the file hello-tex.ttex
with the following code:
@Define
@Environments
Document = @TexBeginEnd "document"
Tex = @Verb
@Tex
\documentclass{article}
\usepackage[utf8]{inputenc}
@Document
Hello, \LaTeX!
Copy texgen
file into the directory of the source file, open command line and run:
./texgen hello.ttex
In the same folder hello.tex
file will appear. If you open it, you will see:
\documentclass{article}
\usepackage[utf8]{inputenc}
\begin{document}
Hello, \LaTeX!
\end{document}
All you need now is to compile the resulting file in any way you like. For example, using pdflatex
pdflatex hello.tex
Then hello.pdf
file will be created. If you open it, you will see:
Let's go through our first programm. First of all there was the block of definitions.
@Define
@Environments
Document = @TexBeginEnd "document"
Tex = @Verb
It should be the first block (or, in more LaTeX terminology, environment) in the file. There can be some types of definitions: Environemts, Prefs and MathCommands. Here we have defined only two environments...
More examples may be found on Simple examples. Step by step