20 questions linked to/from Is there a BNF grammar of the TeX language?
298 views

### Is LaTeX a context-free grammar? [duplicate]

How can you tell if something is a CFG or not? I am wondering if you could create a math/LaTeX parser using a parsing expression grammar (PEG), or not. Is this possible, and how can you tell?
239 views

### What type of Chomsky hierarchy is TeX? [duplicate]

There are four types of chomsky hierarchy (specified for formal languages): Type-0 Recursively enumerable Type-1 Context-sensitive Type-2 Context-free Type-3 Regular I consider that, it should ...
8k views

### What parsers for (La)TeX mathematics exist outside of the TeX engines?

Inspired by the author's motivation for asking Is there a BNF grammar of tex language. Are there any well done libraries that can parse some subset of TeX mathematics independently of the TeX engine? ...
535 views

### Are the TeX semantics and grammar defined somewhere in some official documents?

I'm a programmer, I would like to take a look at a more technical and specific definition of what is referred to as LaTeX or TeX. My interest in on syntax, semantics, and the grammar of this language ...
2k views

### Using newcommand with math environment

I defined a new command as: \newcommand{\eq}[2]{$$\begin{split}#1\end{split}\label{#2}$$} so to make a new equation I do: \eq{equation stuff here}{label here} But since ...
828 views

### Is there a formal grammar for *Equations* in TeX/LaTeX?

I've looked at this and this and understand there is no grammar of TeX as a whole. I am wondering if there is a grammar just for equations. They are relatively easy to identify in an amsmath file ...
346 views

### Are there any document viewers that use Tex as a backend?

I know that many people use editing programs like MikTeX and TexWorks for TeX documents; these programs (and others like them) provide a pseudo-WYSIWIG (what you see is what you get) interface to TeX. ...
662 views

### Where is the MiKTeX list of keywords?

I recently downloaded Basic MiKTeX 2.9.4813.. I'm trying to find on the MiKTeX dir a file containing a list of all general keywords for LaTeX languages but can't find any... Could you help me?
750 views

### Remove a specific latex command from the text AND closing bracket behind it

How to remove a specific latex command from the text AND closing bracket behind it, but to keep the text inside the brackets/ senseless example: We \edit{Introduce a} model for analyzing \emph{data}...
154 views

### Automatic Way of Searching for Syntax Inconsistencies

I have a large .tex file, and when ran am receiving error messages about missing \$ or extra delimiter/missing {. It tells me in the log file where the error is "supposed" to be located, but it is not ...
329 views

### Is there a BNF-grammar for simple constructs of the TeX language?

(Previously) Is there a TeX grammar that parses simple constructs like document, enumerate, section, subsection, etc.? I'm not interested in parsing complicated constructs requiring a more complex ...
367 views

### looking for selective latex command replacement methods

I have a perl script for generating wordpress (or physicsforums or wikipedia) style latex markup from standalone latex files, but it has grown into a bit of a monstrosity and has also recently met it'...
120 views

### Why \Box is uppercase?

I read LaTex formula syntax document at wikipedia and KaTex, and found B of \Box is uppercase, not \box. (1) Is there any reason that only \Box has uppercase in box family? It's very rare that only \...