Format vs. Software
You are (somewhat) correct: what we call LaTeX can either be a format or a program depending on the context. I find it is helpful to distinguish the two using 'LaTeX' for the format and 'latex
' for the piece of software.
You must remember though: latex
simply loads a file that defines the LaTeX format in TeX (to then be processed by tex
). (This same relationship exists, AFAIK, with ConTeXt.) Thus, in practice, the only(?) pieces of software that actually exist as far as I'm concerned are the TeX engines tex
, pdftex
, xetex
, and luatex
. (Others likely exist, but these are the top four.) The other executables (latex
, pdflatex
, …) exist only as pre-loaders of the LaTeX format.
In short, LaTeX provides a language which which to mark-up a document to be processed by latex
, which in turn only provides an engine (tex
, pdftex
, …) with the LaTeX format written in TeX.
Editors
This answer is plain and simple: LaTeX is entirely editor independent. Saying that you need an editor that can write LaTeX is like saying you need a particular pencil to write on copy paper. (This is a great virtue of TeX systems; the competition keeps editors on their game.)
LaTeX uses { ... }
to denote a required argument to a command, whilst [ ... ]
is optional. The use of { ... }
comes through from the underlying TeX set up (or at least how it is usually set up following ideas from D. E. Knuth). Thus for example both
\documentclass{article}
and
\documentclass[11pt]{article}
are valid LaTeX as the first argument is optional (square brackets), whereas the second one is required. As a result, you get a (low level) error if you do something like
\documentclass[11pt] % Oops, no mandatory argument!
\begin{document}
As noted in a comment, the pairings ( ... )
and < ... >
are seen in some contexts, as they provide a way of marking up particular types of argument. In the LaTeX kernel, ( ... )
is used to specify co-ordinates for material in picture mode, and this is picked up by other packages. The < ... >
use is possibly best known in beamer
, which uses these delimiters to show an argument related to the overlay nature of commands when making presentation slides.
On commands, note that LaTeX is written in TeX, a macro expansion language, and uses various primitives (built-ins), some of which work by expansion. As a result, whilst one sometimes talks about 'functions' in LaTeX, this is informal and should not be taken literally.
Best Answer
Sure, it is possible. But nobody finished the project by now ... Except the nts-System, written in Java, but without using the possibilities of Java. One of the last projects is ExTeX, written also in Java and also not finished ...
The real Problem is not to write it in C++ or whatelse, the problem is to finish it ... ;-)