mp4096 / indentex

An indentation-based superset of LaTeX
MIT License
9 stars 2 forks source link

Transpilation warning for invalid indent depth #25

Open mp4096 opened 7 years ago

mp4096 commented 7 years ago

This one originates from #16.

Idea: We want to allow only even indentation changes after a hashline. Examples:

% This is ok -- 2 ws indent change
# equation:
  1 + 1

% This is ok too -- 4 ws indent change
# itemize:
    * a
    * b
    * c

% This is ugly, but ok!
# itemize:
  * a
   * b
     * c

% This is not ok -- 1 ws indent change
# equation:
 1 + 1

% This is not ok -- 3 ws indent change
# itemize:
   * a
   * b
   * c

Actually, I'm not sure on this one. Unfortunately, there are many examples when the indent after the hashline must be arbitrary, e.g.:

% Here the user wants the numbers to be right-aligned in the source code
# bmatrix:
   2 \\
  23