Linked Questions

2
votes
0answers
272 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?
13
votes
0answers
233 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 ...
16
votes
3answers
7k 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? ...
21
votes
1answer
529 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 ...
2
votes
3answers
2k views

Using newcommand with math environment

I defined a new command as: \newcommand{\eq}[2]{\begin{equation}\begin{split}#1\end{split}\label{#2}\end{equation}} so to make a new equation I do: \eq{equation stuff here}{label here} But since ...
5
votes
2answers
737 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 ...
1
vote
3answers
342 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. ...
2
votes
1answer
656 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?
7
votes
1answer
153 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 ...
0
votes
1answer
589 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}...
1
vote
1answer
318 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 ...
1
vote
1answer
115 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 \...
12
votes
0answers
242 views

The Universal Language Processor in TeX: Theoretical Question Regarding the “Expressive” Power of Tex [closed]

How expressive is TeX in terms of being a compiler or a preprocessor of other languages? One splendid example is the listings package in which TeX is changed so as to kind of recognize the kind of ...
3
votes
0answers
359 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'...
1
vote
0answers
318 views

Is there a BNF Grammar for tex math expression [closed]

Like this question. I have a similar question about that. Is there a BNF grammar for tex math expressions?

15 30 50 per page