More WYSIWYG in math mode?

I am wondering if there is some alternative to math mode or some other way to use some things directly, e.g.

β instead of \beta

A | B instead of A \mid B (when using A | B in math mode, the space between A, | and B gets lost)


It would make formulas more comfortable to read.

-
some ideas in tex.stackexchange.com/questions/96225/… – David Carlisle Mar 13 '13 at 16:06

It is not a good idea to change the behaviour of |, and ' is by default ^\prime

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{newunicodechar}

\DeclareMathSymbol{|}{\mathrel}{symbols}{"6A}
\newunicodechar{𝜶}{\alpha}
\newunicodechar{β}{\beta}

\begin{document}
\huge
$\sin(𝜶)\ne\sin(β)$
$y'=y^\prime$

$A|B = A\mid B$

\end{document}

-
+1; but probably it's worth noting that the absolute value |a| can't be written with | any more. – egreg Mar 13 '13 at 16:43
but with the old definition $\mathchar"426A a\mathchar"526A$ – Herbert Mar 13 '13 at 17:01
Which is not very nice, is it? :) However \mathopen|a\mathclose| would work. In conclusion, I don't think that changing | to mean \mid is so convenient, which I think you agree to. – egreg Mar 13 '13 at 17:04
yes, | shouldn't be redefined – Herbert Mar 13 '13 at 17:04