# Modest changes in LaTeX dialect possible?

I would like to create my own LaTeX-derivative markup language. (I asked similar questions before, but this is more limited.) Advice would be useful.

### First Question:

I believe there are three main categories of macros between the begin-document and end-document (which I will call the "main document"):

1. markup (e.g., \textit, \begin{quote})

2. characters (e.g., \kappa, \Bbb{A})

3. programming (e.g., \newcommand, \let, \newtheorem).

Is this classification reasonable, or am I omitting a logical class of macros?

I believe everything that can be typeset in LaTeX can still be typeset if I removed #3 from the main document and banned it into the preamble. This means that once my preamble is read, the set of allowed macro names will be fixed, and I just have true markup in my document. Another program could then, in principle, interpret markup (and interpret it differently) without having to be itself TeX.

### Second Question:

Is there a long-cut to { } environments? This is when used by itself, not when used to delineate arguments of macros. I mean hello {\it there} as opposed to hello \textit{there}. I am wondering if I can "ban" the plain environment use of the parens in my document, and rely on styling instead. In rare cases where needed, I would then say \begin{env} ... \end{env}. But I have not run into such a situation.

### Third question:

Is it possible to change catcodes in the main document, but as soon as LaTeX expands (enters = runs) a macro, the standard catcode definitions hold again? (I.e., so that I can still run all macros that were defined in packages without me having to make changes).

If this is the case, then I could define my own LaTeX dialect. My documents would have the power of standard LaTeX in the preamble, and then

\usepackage[version=2]{newdocument}
\begin{newdocument}
modified catcodes, outside markup
\end{newdocument}


where the newdocument would be my own version. as for me, I would want

• | becomes my cell separator in tabulars

• & become the entity operator, just as in html, i.e., &amp;kappa; and &hashmark;

• \\ be replaced with something like \nl

\catcode_=11
%changed catcodes:
$a_b$

\test
\end{document}

• thank you ulrike. \textit{$a_b$} also works appropriately. – ivo Welch Feb 15 '14 at 16:45