What I mean with markdown like syntax, is for example using *...*
or **...**
instead of \emph{...}
or \(...\)
or \begin{blabla}...\end{blabla}
.
It seems to be possible to use this "markdown" kind of syntax in latex:
\catcode`\*=\active
\def*#1*{\emph{#1}}
There are many subjectives reasons why one may prefer the one or the other. One may argue that *...*
is more readable, someone else may find \emph{...}
better readable. One may say it is more clear what is the beginning and what is the end with LaTex syntax, the other may say that you must blind if you don't understand what is the beginning and the end with *...*
.
I would like to understand if there are any objective reasons to not use these "markdown like" commands in LaTeX ? I thought that LaTeX may be not really designed to process those kind of commands that doesn't have a clear beginning and end and therefore may cause errors ? Or is it totally fine to use this kind of syntax ?
Another question is, could I somehow define `...` in LaTeX ? I tried:
\catcode`\`=\active
\def`#1`{\emph{#1}}
But this doesn't work.
This goes *wrong*: $a^*=b^*$
$a^\emph{=b^}$
would also go wrong...$a^{\string*}$
works.*
as complex conjugate, I was speechless from realizing that. I just looked at the code with*
now active, so for me the reason it does not work is about the same as the reason it would not have worked with\emph
.